blob: 7ef3db990ad335527ac432beab77bff35f02e9c8 [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
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698GNULD
699RANLIB
700AR
701ARFLAGS
702SVNVERSION
703INSTALL_PROGRAM
704INSTALL_SCRIPT
705INSTALL_DATA
706LN
707OPT
708BASECFLAGS
709UNIVERSAL_ARCH_FLAGS
710OTHER_LIBTOOL_OPT
711LIBTOOL_CRUFT
712SO
713LDSHARED
714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
719USE_SIGNAL_MODULE
720SIGNAL_OBJS
721USE_THREAD_MODULE
722LDLAST
723THREADOBJ
724DLINCLDIR
725DYNLOADFILE
726MACHDEP_OBJS
727TRUE
728LIBOBJS
729HAVE_GETHOSTBYNAME_R_6_ARG
730HAVE_GETHOSTBYNAME_R_5_ARG
731HAVE_GETHOSTBYNAME_R_3_ARG
732HAVE_GETHOSTBYNAME_R
733HAVE_GETHOSTBYNAME
734LIBM
735LIBC
736UNICODE_OBJS
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Martin v. Löwiseba40652007-08-30 20:10:57 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Martin v. Löwiseba40652007-08-30 20:10:57 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Martin v. Löwiseba40652007-08-30 20:10:57 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Martin v. Löwiseba40652007-08-30 20:10:57 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Martin v. Löwiseba40652007-08-30 20:10:57 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001135# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Martin v. Löwiseba40652007-08-30 20:10:57 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001226 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001252\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001313 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001320 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1327 --enable-ipv6 Enable ipv6 (with ipv4) support
1328 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001329 --enable-big-digits[=BITS]
1330 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001331 --enable-unicode[=ucs[24]]
1332 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334Optional Packages:
1335 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1336 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001337 --with-universal-archs=ARCH
1338 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001339 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001340 --with-framework-name=FRAMEWORK
1341 specify an alternate name of the framework built
1342 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001344 --with-cxx-main=<compiler>
1345 compile main() and link python executable with C++
1346 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-suffix=.exe set executable suffix
1348 --with-pydebug build with Py_DEBUG defined
1349 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001350 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001351 --with-dbmliborder=db1:db2:...
1352 order to check db backends for dbm. Valid value is a
1353 colon separated string with the backend names
1354 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with-signal-module disable/enable signal module
1356 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1357 --with(out)-threads[=DIRECTORY]
1358 disable/enable thread support
1359 --with(out)-thread[=DIRECTORY]
1360 deprecated; use --with(out)-threads
1361 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001363 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001365 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001366 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001367 --with-fpectl enable SIGFPE catching
1368 --with-libm=STRING math library
1369 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001370
1371Some influential environment variables:
1372 CC C compiler command
1373 CFLAGS C compiler flags
1374 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1375 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001376 LIBS libraries to pass to the linker, e.g. -l<library>
1377 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1378 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 CPP C preprocessor
1380
1381Use these variables to override the choices made by `configure' or to help
1382it to find libraries and programs with nonstandard names/locations.
1383
Georg Brandl464432d2009-05-20 18:24:08 +00001384Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001385_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001386ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001387fi
1388
1389if test "$ac_init_help" = "recursive"; then
1390 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001392 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001393 ac_builddir=.
1394
Martin v. Löwiseba40652007-08-30 20:10:57 +00001395case "$ac_dir" in
1396.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1397*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001398 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001399 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001400 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001401 case $ac_top_builddir_sub in
1402 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1403 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1404 esac ;;
1405esac
1406ac_abs_top_builddir=$ac_pwd
1407ac_abs_builddir=$ac_pwd$ac_dir_suffix
1408# for backward compatibility:
1409ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001412 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001414 ac_top_srcdir=$ac_top_builddir_sub
1415 ac_abs_top_srcdir=$ac_pwd ;;
1416 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418 ac_top_srcdir=$srcdir
1419 ac_abs_top_srcdir=$srcdir ;;
1420 *) # Relative name.
1421 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1422 ac_top_srcdir=$ac_top_build_prefix$srcdir
1423 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001424esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001425ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001426
Martin v. Löwiseba40652007-08-30 20:10:57 +00001427 cd "$ac_dir" || { ac_status=$?; continue; }
1428 # Check for guested configure.
1429 if test -f "$ac_srcdir/configure.gnu"; then
1430 echo &&
1431 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1432 elif test -f "$ac_srcdir/configure"; then
1433 echo &&
1434 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001436 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437 fi || ac_status=$?
1438 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001439 done
1440fi
1441
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001443if $ac_init_version; then
1444 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001445python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001446generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001447
Martin v. Löwiseba40652007-08-30 20:10:57 +00001448Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014492002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001450This configure script is free software; the Free Software Foundation
1451gives unlimited permission to copy, distribute and modify it.
1452_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001453 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001455cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001456This file contains any messages produced by compilers while
1457running configure, to aid debugging if configure makes a mistake.
1458
Martin v. Löwis174440b2008-10-03 08:59:41 +00001459It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001460generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001461
1462 $ $0 $@
1463
1464_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001465exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001466{
1467cat <<_ASUNAME
1468## --------- ##
1469## Platform. ##
1470## --------- ##
1471
1472hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1473uname -m = `(uname -m) 2>/dev/null || echo unknown`
1474uname -r = `(uname -r) 2>/dev/null || echo unknown`
1475uname -s = `(uname -s) 2>/dev/null || echo unknown`
1476uname -v = `(uname -v) 2>/dev/null || echo unknown`
1477
1478/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1479/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1480
1481/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1482/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1483/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001484/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001485/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1486/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1487/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1488
1489_ASUNAME
1490
1491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1492for as_dir in $PATH
1493do
1494 IFS=$as_save_IFS
1495 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001496 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001497done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001498IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500} >&5
1501
1502cat >&5 <<_ACEOF
1503
1504
1505## ----------- ##
1506## Core tests. ##
1507## ----------- ##
1508
1509_ACEOF
1510
1511
1512# Keep a trace of the command line.
1513# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001514# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001516# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001517ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001518ac_configure_args0=
1519ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001520ac_must_keep_next=false
1521for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001522do
Skip Montanaro6dead952003-09-25 14:50:04 +00001523 for ac_arg
1524 do
1525 case $ac_arg in
1526 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1527 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1528 | -silent | --silent | --silen | --sile | --sil)
1529 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001530 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001531 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001532 esac
1533 case $ac_pass in
1534 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1535 2)
1536 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1537 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001538 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001539 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001540 case $ac_arg in
1541 *=* | --config-cache | -C | -disable-* | --disable-* \
1542 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1543 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1544 | -with-* | --with-* | -without-* | --without-* | --x)
1545 case "$ac_configure_args0 " in
1546 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1547 esac
1548 ;;
1549 -* ) ac_must_keep_next=true ;;
1550 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001551 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001552 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001553 ;;
1554 esac
1555 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001556done
Skip Montanaro6dead952003-09-25 14:50:04 +00001557$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1558$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 +00001559
1560# When interrupted or exit'd, cleanup temporary files, and complete
1561# config.log. We remove comments because anyway the quotes in there
1562# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563# WARNING: Use '\'' to represent an apostrophe within the trap.
1564# 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 +00001565trap 'exit_status=$?
1566 # Save into config.log some information that might help in debugging.
1567 {
1568 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001569
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 cat <<\_ASBOX
1571## ---------------- ##
1572## Cache variables. ##
1573## ---------------- ##
1574_ASBOX
1575 echo
1576 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001577(
1578 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1579 eval ac_val=\$$ac_var
1580 case $ac_val in #(
1581 *${as_nl}*)
1582 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001583 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1584echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001585 esac
1586 case $ac_var in #(
1587 _ | IFS | as_nl) ;; #(
1588 *) $as_unset $ac_var ;;
1589 esac ;;
1590 esac
1591 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1594 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001596 "s/'\''/'\''\\\\'\'''\''/g;
1597 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1598 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001599 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001600 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001601 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001602 esac |
1603 sort
1604)
Martin v. Löwis11437992002-04-12 09:54:03 +00001605 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001606
1607 cat <<\_ASBOX
1608## ----------------- ##
1609## Output variables. ##
1610## ----------------- ##
1611_ASBOX
1612 echo
1613 for ac_var in $ac_subst_vars
1614 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001615 eval ac_val=\$$ac_var
1616 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001617 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001619 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001620 done | sort
1621 echo
1622
1623 if test -n "$ac_subst_files"; then
1624 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001625## ------------------- ##
1626## File substitutions. ##
1627## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001628_ASBOX
1629 echo
1630 for ac_var in $ac_subst_files
1631 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001632 eval ac_val=\$$ac_var
1633 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001634 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001635 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001636 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001637 done | sort
1638 echo
1639 fi
1640
Martin v. Löwis11437992002-04-12 09:54:03 +00001641 if test -s confdefs.h; then
1642 cat <<\_ASBOX
1643## ----------- ##
1644## confdefs.h. ##
1645## ----------- ##
1646_ASBOX
1647 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001648 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001649 echo
1650 fi
1651 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001652 echo "$as_me: caught signal $ac_signal"
1653 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001655 rm -f core *.core core.conftest.* &&
1656 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001658' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001659for ac_signal in 1 2 13 15; do
1660 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1661done
1662ac_signal=0
1663
1664# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001665rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001666
1667# Predefined preprocessor variables.
1668
1669cat >>confdefs.h <<_ACEOF
1670#define PACKAGE_NAME "$PACKAGE_NAME"
1671_ACEOF
1672
1673
1674cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1676_ACEOF
1677
1678
1679cat >>confdefs.h <<_ACEOF
1680#define PACKAGE_VERSION "$PACKAGE_VERSION"
1681_ACEOF
1682
1683
1684cat >>confdefs.h <<_ACEOF
1685#define PACKAGE_STRING "$PACKAGE_STRING"
1686_ACEOF
1687
1688
1689cat >>confdefs.h <<_ACEOF
1690#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1691_ACEOF
1692
1693
1694# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001695# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001696if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001697 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001698elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001699 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001700else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001701 set x "$ac_default_prefix/share/config.site" \
1702 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001704shift
1705for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001706do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001708 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1709echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001710 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001711 . "$ac_site_file"
1712 fi
1713done
1714
1715if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001716 # Some versions of bash will fail to source /dev/null (special
1717 # files actually), so we avoid doing that.
1718 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001719 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1720echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001722 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1723 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 esac
1725 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001727 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1728echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001729 >$cache_file
1730fi
1731
1732# Check that the precious variables saved in the cache have kept the same
1733# value.
1734ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001735for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1737 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001738 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1739 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 case $ac_old_set,$ac_new_set in
1741 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1743echo "$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 +00001744 ac_cache_corrupted=: ;;
1745 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001746 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1747echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001748 ac_cache_corrupted=: ;;
1749 ,);;
1750 *)
1751 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001752 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1753echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1754 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1755echo "$as_me: former value: $ac_old_val" >&2;}
1756 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1757echo "$as_me: current value: $ac_new_val" >&2;}
1758 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001759 fi;;
1760 esac
1761 # Pass precious variables to config.status.
1762 if test "$ac_new_set" = set; then
1763 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001764 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001765 *) ac_arg=$ac_var=$ac_new_val ;;
1766 esac
1767 case " $ac_configure_args " in
1768 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1769 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1770 esac
1771 fi
1772done
1773if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001774 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1775echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1776 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1777echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001778 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001779fi
1780
Martin v. Löwiseba40652007-08-30 20:10:57 +00001781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
Guido van Rossum7f43da71994-08-01 12:15:30 +00001805ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001807ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1808ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1809ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001810
Guido van Rossum627b2d71993-12-24 10:39:16 +00001811
Michael W. Hudson54241132001-12-07 15:38:26 +00001812
Martin v. Löwiseba40652007-08-30 20:10:57 +00001813ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001814
1815
Martin v. Löwis11437992002-04-12 09:54:03 +00001816
Georg Brandlbcd64a32009-03-31 21:45:18 +00001817if test "$prefix" != "/"; then
1818 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1819fi
1820
1821
Martin v. Löwis11437992002-04-12 09:54:03 +00001822
1823
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001824
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001825
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001826# We don't use PACKAGE_ variables, and they cause conflicts
1827# with other autoconf-based packages that include Python.h
1828grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1829rm confdefs.h
1830mv confdefs.h.new confdefs.h
1831
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001832
Martin v. Löwis174440b2008-10-03 08:59:41 +00001833VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001834
Martin v. Löwis1142de32002-03-29 16:28:31 +00001835
1836SOVERSION=1.0
1837
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001838# The later defininition of _XOPEN_SOURCE disables certain features
1839# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1840
1841cat >>confdefs.h <<\_ACEOF
1842#define _GNU_SOURCE 1
1843_ACEOF
1844
1845
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001846# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1847# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1848# them.
1849
1850cat >>confdefs.h <<\_ACEOF
1851#define _NETBSD_SOURCE 1
1852_ACEOF
1853
1854
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001855# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1856# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1857# them.
1858
1859cat >>confdefs.h <<\_ACEOF
1860#define __BSD_VISIBLE 1
1861_ACEOF
1862
1863
Martin v. Löwisd6320502004-08-12 13:45:08 +00001864# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1865# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1866
1867cat >>confdefs.h <<\_ACEOF
1868#define _BSD_TYPES 1
1869_ACEOF
1870
1871
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001872# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1873# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1874# them.
1875
1876cat >>confdefs.h <<\_ACEOF
1877#define _DARWIN_C_SOURCE 1
1878_ACEOF
1879
1880
1881
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001882define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001883
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001884# Arguments passed to configure.
1885
1886CONFIG_ARGS="$ac_configure_args"
1887
Martin v. Löwiseba40652007-08-30 20:10:57 +00001888# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001889if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001890 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001891 case $enableval in
1892 yes)
1893 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1894 ;;
1895 esac
1896 case $enableval in
1897 no)
1898 UNIVERSALSDK=
1899 enable_universalsdk=
1900 ;;
1901 *)
1902 UNIVERSALSDK=$enableval
1903 ;;
1904 esac
1905
1906else
1907
1908 UNIVERSALSDK=
1909 enable_universalsdk=
1910
Martin v. Löwiseba40652007-08-30 20:10:57 +00001911fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001912
1913
Martin v. Löwiseba40652007-08-30 20:10:57 +00001914
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001915
1916
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001917UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001918{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1919echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001920
1921# Check whether --with-universal-archs was given.
1922if test "${with_universal_archs+set}" = set; then
1923 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001924 { echo "$as_me:$LINENO: result: $withval" >&5
1925echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001926 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001927 if test "${enable_universalsdk}" ; then
1928 :
1929 else
1930 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1931echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1932 { (exit 1); exit 1; }; }
1933 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001934
1935else
1936
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001937 { echo "$as_me:$LINENO: result: 32-bit" >&5
1938echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001939
1940fi
1941
1942
1943
1944
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001945
1946# Check whether --with-framework-name was given.
1947if test "${with_framework_name+set}" = set; then
1948 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001949 if test "${enable_framework}"; then
1950 :
1951 else
1952 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1953echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1954 { (exit 1); exit 1; }; }
1955 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001956 PYTHONFRAMEWORK=${withval}
1957 PYTHONFRAMEWORKDIR=${withval}.framework
1958 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1959
1960else
1961
1962 PYTHONFRAMEWORK=Python
1963 PYTHONFRAMEWORKDIR=Python.framework
1964 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1965
1966fi
1967
Martin v. Löwiseba40652007-08-30 20:10:57 +00001968# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001969if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001970 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001971 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001972 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001973 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001974 esac
1975 case $enableval in
1976 no)
1977 PYTHONFRAMEWORK=
1978 PYTHONFRAMEWORKDIR=no-framework
1979 PYTHONFRAMEWORKPREFIX=
1980 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001981 FRAMEWORKINSTALLFIRST=
1982 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001983 FRAMEWORKALTINSTALLFIRST=
1984 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001985 if test "x${prefix}" = "xNONE"; then
1986 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1987 else
1988 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1989 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001990 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001991 ;;
1992 *)
1993 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001994 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001995 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001996 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1997 if test "$UNIVERSAL_ARCHS" = "all"
1998 then
1999 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00002000 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002001 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00002002 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002003 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2004 fi
2005
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002006 if test "x${prefix}" = "xNONE" ; then
2007 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2008 else
2009 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2010 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002011 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002012
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002013 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002014 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002015 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002016
Martin v. Löwiseba40652007-08-30 20:10:57 +00002017 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002018
Martin v. Löwiseba40652007-08-30 20:10:57 +00002019 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002020
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002021 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2022
2023 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2024
Jack Jansene578a632001-08-15 01:27:14 +00002025 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002026
Guido van Rossum563e7081996-09-10 18:20:48 +00002027else
Martin v. Löwis11437992002-04-12 09:54:03 +00002028
Jack Jansene578a632001-08-15 01:27:14 +00002029 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002030 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002031 PYTHONFRAMEWORKPREFIX=
2032 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002033 FRAMEWORKINSTALLFIRST=
2034 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002035 FRAMEWORKALTINSTALLFIRST=
2036 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002037 if test "x${prefix}" = "xNONE" ; then
2038 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2039 else
2040 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2041 fi
Jack Jansene578a632001-08-15 01:27:14 +00002042 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002043
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002044 if test "$UNIVERSAL_ARCHS" = "all"
2045 then
2046 FRAMEWORKINSTALLLAST=update4wayuniversal
2047 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2048 fi
2049
Martin v. Löwiseba40652007-08-30 20:10:57 +00002050fi
2051
Michael W. Hudson54241132001-12-07 15:38:26 +00002052
2053
2054
2055
Jack Jansene578a632001-08-15 01:27:14 +00002056
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002057
2058
Ronald Oussoren5b787322006-06-06 19:50:24 +00002059
2060
2061
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002062
Jack Jansene578a632001-08-15 01:27:14 +00002063##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002064## AC_HELP_STRING(--with-dyld,
2065## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002066##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002067# Set name for machine-dependent library files
2068
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002069{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2070echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002071if test -z "$MACHDEP"
2072then
Guido van Rossum563e7081996-09-10 18:20:48 +00002073 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002074 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002075 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002076 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002077 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002078 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002079 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002080 ac_md_system=`echo $ac_sys_system |
2081 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2082 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002083 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002084 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002085
Guido van Rossum07397971997-04-29 21:49:50 +00002086 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002087 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002088 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002089 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002090 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002091 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002092 esac
2093fi
Guido van Rossum91922671997-10-09 20:24:13 +00002094
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002095# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2096# disable features if it is defined, without any means to access these
2097# features as extensions. For these systems, we skip the definition of
2098# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2099# some feature, make sure there is no alternative way to access this
2100# feature. Also, when using wildcards, make sure you have verified the
2101# need for not defining _XOPEN_SOURCE on all systems matching the
2102# wildcard, and that the wildcard does not include future systems
2103# (which may remove their limitations).
2104case $ac_sys_system/$ac_sys_release in
2105 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2106 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002107 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002108 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002109 define_xopen_source=no
2110 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2111 # also defined. This can be overridden by defining _BSD_SOURCE
2112 # As this has a different meaning on Linux, only define it on OpenBSD
2113
2114cat >>confdefs.h <<\_ACEOF
2115#define _BSD_SOURCE 1
2116_ACEOF
2117
2118 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002119 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2120 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2121 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002122 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 +00002123 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002124 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2125 # of union __?sigval. Reported by Stuart Bishop.
2126 SunOS/5.6)
2127 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002128 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2129 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002130 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002131 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002132 define_xopen_source=no;;
2133 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002134 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002135 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002136 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002137 # On FreeBSD 4, the math functions C89 does not cover are never defined
2138 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2139 FreeBSD/4.*)
2140 define_xopen_source=no;;
2141 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2142 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2143 # identifies itself as Darwin/7.*
2144 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2145 # disables platform specific features beyond repair.
2146 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2147 # has no effect, don't bother defining them
2148 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002149 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002150 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2151 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2152 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002153 AIX/4)
2154 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002155 AIX/5)
2156 if test `uname -r` -eq 1; then
2157 define_xopen_source=no
2158 fi
2159 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002160 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2161 # defining NI_NUMERICHOST.
2162 QNX/6.3.2)
2163 define_xopen_source=no
2164 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002165
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002166esac
2167
2168if test $define_xopen_source = yes
2169then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002170 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2171 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002172 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2173 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002174 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002175 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002176
2177cat >>confdefs.h <<\_ACEOF
2178#define _XOPEN_SOURCE 500
2179_ACEOF
2180
2181 ;;
2182 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002183
2184cat >>confdefs.h <<\_ACEOF
2185#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002186_ACEOF
2187
Skip Montanarof0d5f792004-08-15 14:08:23 +00002188 ;;
2189 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002190
2191 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2192 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2193 # several APIs are not declared. Since this is also needed in some
2194 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002195 # except for Solaris 10, where it must not be defined,
2196 # as it implies XPG4.2
2197 case $ac_sys_system/$ac_sys_release in
2198 SunOS/5.10)
2199 ;;
2200 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002201
2202cat >>confdefs.h <<\_ACEOF
2203#define _XOPEN_SOURCE_EXTENDED 1
2204_ACEOF
2205
Martin v. Löwis7dece662005-11-26 11:38:24 +00002206 ;;
2207 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002208
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002209
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002210cat >>confdefs.h <<\_ACEOF
2211#define _POSIX_C_SOURCE 200112L
2212_ACEOF
2213
2214
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002215fi
2216
Guido van Rossum91922671997-10-09 20:24:13 +00002217#
2218# SGI compilers allow the specification of the both the ABI and the
2219# ISA on the command line. Depending on the values of these switches,
2220# different and often incompatable code will be generated.
2221#
2222# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2223# thus supply support for various ABI/ISA combinations. The MACHDEP
2224# variable is also adjusted.
2225#
2226
2227if test ! -z "$SGI_ABI"
2228then
2229 CC="cc $SGI_ABI"
2230 LDFLAGS="$SGI_ABI $LDFLAGS"
2231 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2232fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002233{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2234echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002235
Jack Jansen83f898c2002-12-30 22:23:40 +00002236# And add extra plat-mac for darwin
2237
Jack Jansen7b59b422003-03-17 15:44:10 +00002238
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002239{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2240echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002241if test -z "$EXTRAPLATDIR"
2242then
2243 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002244 darwin)
2245 EXTRAPLATDIR="\$(PLATMACDIRS)"
2246 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2247 ;;
2248 *)
2249 EXTRAPLATDIR=""
2250 EXTRAMACHDEPPATH=""
2251 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002252 esac
2253fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002254{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2255echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002256
Jack Jansen6b08a402004-06-03 12:41:45 +00002257# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2258# it may influence the way we can build extensions, so distutils
2259# needs to check it
2260
Ronald Oussoren988117f2006-04-29 11:31:35 +00002261
Jack Jansen6b08a402004-06-03 12:41:45 +00002262CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002263EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002264
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002265{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2266echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002267ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002268{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2269echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002270
Guido van Rossum627b2d71993-12-24 10:39:16 +00002271# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002272
2273# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2274# for debug/optimization stuff. BASECFLAGS is for flags that are required
2275# just to get things to compile and link. Users are free to override OPT
2276# when running configure or make. The build should not break if they do.
2277# BASECFLAGS should generally not be messed with, however.
2278
2279# XXX shouldn't some/most/all of this code be merged with the stuff later
2280# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002281{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2282echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002283
Martin v. Löwiseba40652007-08-30 20:10:57 +00002284# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002285if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002286 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002287 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002288 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002289 without_gcc=yes;;
2290 yes) CC=gcc
2291 without_gcc=no;;
2292 *) CC=$withval
2293 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002294 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002295else
Martin v. Löwis11437992002-04-12 09:54:03 +00002296
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002297 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002298 AIX*) CC=cc_r
2299 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002300 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002301 case $BE_HOST_CPU in
2302 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002303 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002304 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002305 BASECFLAGS="$BASECFLAGS -export pragma"
2306 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002307 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002308 ;;
2309 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002310 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002311 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002312 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002313 ;;
2314 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002315 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2316echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002317 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002318 ;;
2319 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002320 AR="\$(srcdir)/Modules/ar_beos"
2321 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002322 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002323 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002324 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002325fi
2326
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002327{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2328echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002329
Guido van Rossum8b131c51995-03-09 14:10:13 +00002330# If the user switches compilers, we can't believe the cache
2331if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2332then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002333 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002334(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002335echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002336(it is also a good idea to do 'make clean' before compiling)" >&2;}
2337 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002338fi
2339
Martin v. Löwis11437992002-04-12 09:54:03 +00002340ac_ext=c
2341ac_cpp='$CPP $CPPFLAGS'
2342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2344ac_compiler_gnu=$ac_cv_c_compiler_gnu
2345if test -n "$ac_tool_prefix"; then
2346 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2347set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002348{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2349echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002350if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002351 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002352else
2353 if test -n "$CC"; then
2354 ac_cv_prog_CC="$CC" # Let the user override the test.
2355else
Martin v. Löwis11437992002-04-12 09:54:03 +00002356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2357for as_dir in $PATH
2358do
2359 IFS=$as_save_IFS
2360 test -z "$as_dir" && as_dir=.
2361 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362 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 +00002363 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002364 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002365 break 2
2366 fi
2367done
2368done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002370
Jack Jansendd19cf82001-12-06 22:36:17 +00002371fi
2372fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002373CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002374if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002375 { echo "$as_me:$LINENO: result: $CC" >&5
2376echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002377else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002378 { echo "$as_me:$LINENO: result: no" >&5
2379echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002380fi
2381
Martin v. Löwiseba40652007-08-30 20:10:57 +00002382
Martin v. Löwis11437992002-04-12 09:54:03 +00002383fi
2384if test -z "$ac_cv_prog_CC"; then
2385 ac_ct_CC=$CC
2386 # Extract the first word of "gcc", so it can be a program name with args.
2387set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002388{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2389echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002390if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002392else
2393 if test -n "$ac_ct_CC"; then
2394 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2395else
2396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2397for as_dir in $PATH
2398do
2399 IFS=$as_save_IFS
2400 test -z "$as_dir" && as_dir=.
2401 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002402 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 +00002403 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002404 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002405 break 2
2406 fi
2407done
2408done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002409IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002410
2411fi
2412fi
2413ac_ct_CC=$ac_cv_prog_ac_ct_CC
2414if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002415 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2416echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002417else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002418 { echo "$as_me:$LINENO: result: no" >&5
2419echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002420fi
2421
Martin v. Löwiseba40652007-08-30 20:10:57 +00002422 if test "x$ac_ct_CC" = x; then
2423 CC=""
2424 else
2425 case $cross_compiling:$ac_tool_warned in
2426yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002427{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2428whose name does not start with the host triplet. If you think this
2429configuration is useful to you, please write to autoconf@gnu.org." >&5
2430echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2431whose name does not start with the host triplet. If you think this
2432configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002433ac_tool_warned=yes ;;
2434esac
2435 CC=$ac_ct_CC
2436 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002437else
2438 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002439fi
2440
Jack Jansendd19cf82001-12-06 22:36:17 +00002441if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002442 if test -n "$ac_tool_prefix"; then
2443 # 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 +00002444set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002445{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2446echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002447if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002448 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002449else
2450 if test -n "$CC"; then
2451 ac_cv_prog_CC="$CC" # Let the user override the test.
2452else
Martin v. Löwis11437992002-04-12 09:54:03 +00002453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2454for as_dir in $PATH
2455do
2456 IFS=$as_save_IFS
2457 test -z "$as_dir" && as_dir=.
2458 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459 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 +00002460 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002461 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002462 break 2
2463 fi
2464done
2465done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002466IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002467
2468fi
2469fi
2470CC=$ac_cv_prog_CC
2471if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002472 { echo "$as_me:$LINENO: result: $CC" >&5
2473echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002474else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002475 { echo "$as_me:$LINENO: result: no" >&5
2476echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002477fi
2478
Martin v. Löwiseba40652007-08-30 20:10:57 +00002479
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002481fi
2482if test -z "$CC"; then
2483 # Extract the first word of "cc", so it can be a program name with args.
2484set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002485{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2486echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002487if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002488 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002489else
2490 if test -n "$CC"; then
2491 ac_cv_prog_CC="$CC" # Let the user override the test.
2492else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002493 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2495for as_dir in $PATH
2496do
2497 IFS=$as_save_IFS
2498 test -z "$as_dir" && as_dir=.
2499 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002500 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 +00002501 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2502 ac_prog_rejected=yes
2503 continue
2504 fi
2505 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002506 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 break 2
2508 fi
2509done
2510done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002511IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002512
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002513if test $ac_prog_rejected = yes; then
2514 # We found a bogon in the path, so make sure we never use it.
2515 set dummy $ac_cv_prog_CC
2516 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002518 # We chose a different compiler from the bogus one.
2519 # However, it has the same basename, so the bogon will be chosen
2520 # first if we set CC to just the basename; use the full file name.
2521 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002522 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002523 fi
2524fi
2525fi
2526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002527CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002528if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002529 { echo "$as_me:$LINENO: result: $CC" >&5
2530echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002532 { echo "$as_me:$LINENO: result: no" >&5
2533echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002534fi
2535
Martin v. Löwiseba40652007-08-30 20:10:57 +00002536
Martin v. Löwis11437992002-04-12 09:54:03 +00002537fi
2538if test -z "$CC"; then
2539 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002540 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 do
2542 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2543set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002544{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2545echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002546if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002547 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002548else
2549 if test -n "$CC"; then
2550 ac_cv_prog_CC="$CC" # Let the user override the test.
2551else
Martin v. Löwis11437992002-04-12 09:54:03 +00002552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2553for as_dir in $PATH
2554do
2555 IFS=$as_save_IFS
2556 test -z "$as_dir" && as_dir=.
2557 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558 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 +00002559 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002560 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002562 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002563done
2564done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002566
2567fi
2568fi
2569CC=$ac_cv_prog_CC
2570if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002571 { echo "$as_me:$LINENO: result: $CC" >&5
2572echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002574 { echo "$as_me:$LINENO: result: no" >&5
2575echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002576fi
2577
Martin v. Löwiseba40652007-08-30 20:10:57 +00002578
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 test -n "$CC" && break
2580 done
2581fi
2582if test -z "$CC"; then
2583 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002585do
2586 # Extract the first word of "$ac_prog", so it can be a program name with args.
2587set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002588{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2589echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002590if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002591 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002592else
2593 if test -n "$ac_ct_CC"; then
2594 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2595else
2596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2597for as_dir in $PATH
2598do
2599 IFS=$as_save_IFS
2600 test -z "$as_dir" && as_dir=.
2601 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 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 +00002603 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002604 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 break 2
2606 fi
2607done
2608done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002609IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002610
Martin v. Löwis11437992002-04-12 09:54:03 +00002611fi
2612fi
2613ac_ct_CC=$ac_cv_prog_ac_ct_CC
2614if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002615 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2616echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002617else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002618 { echo "$as_me:$LINENO: result: no" >&5
2619echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002620fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002621
Martin v. Löwiseba40652007-08-30 20:10:57 +00002622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 test -n "$ac_ct_CC" && break
2624done
Michael W. Hudson54241132001-12-07 15:38:26 +00002625
Martin v. Löwiseba40652007-08-30 20:10:57 +00002626 if test "x$ac_ct_CC" = x; then
2627 CC=""
2628 else
2629 case $cross_compiling:$ac_tool_warned in
2630yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002631{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2632whose name does not start with the host triplet. If you think this
2633configuration is useful to you, please write to autoconf@gnu.org." >&5
2634echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2635whose name does not start with the host triplet. If you think this
2636configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637ac_tool_warned=yes ;;
2638esac
2639 CC=$ac_ct_CC
2640 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002641fi
2642
2643fi
2644
2645
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002646test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002647See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002648echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002649See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002650 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002651
2652# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002653echo "$as_me:$LINENO: checking for C compiler version" >&5
2654ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002655{ (ac_try="$ac_compiler --version >&5"
2656case "(($ac_try" in
2657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2658 *) ac_try_echo=$ac_try;;
2659esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002661 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002665{ (ac_try="$ac_compiler -v >&5"
2666case "(($ac_try" in
2667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2668 *) ac_try_echo=$ac_try;;
2669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002671 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002675{ (ac_try="$ac_compiler -V >&5"
2676case "(($ac_try" in
2677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2678 *) ac_try_echo=$ac_try;;
2679esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 (exit $ac_status); }
2685
2686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002687/* confdefs.h. */
2688_ACEOF
2689cat confdefs.h >>conftest.$ac_ext
2690cat >>conftest.$ac_ext <<_ACEOF
2691/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002692
Martin v. Löwis11437992002-04-12 09:54:03 +00002693int
2694main ()
2695{
2696
2697 ;
2698 return 0;
2699}
2700_ACEOF
2701ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002702ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002703# Try to create an executable without -o first, disregard a.out.
2704# It will help us diagnose broken compilers, and finding out an intuition
2705# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002706{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2707echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2708ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2709#
2710# List of possible output files, starting from the most likely.
2711# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2712# only as a last resort. b.out is created by i960 compilers.
2713ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2714#
2715# The IRIX 6 linker writes into existing files which may not be
2716# executable, retaining their permissions. Remove them first so a
2717# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002718ac_rmfiles=
2719for ac_file in $ac_files
2720do
2721 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002722 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2724 esac
2725done
2726rm -f $ac_rmfiles
2727
2728if { (ac_try="$ac_link_default"
2729case "(($ac_try" in
2730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2731 *) ac_try_echo=$ac_try;;
2732esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002734 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002738 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2739# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2740# in a Makefile. We should not override ac_cv_exeext if it was cached,
2741# so that the user can short-circuit this test for compilers unknown to
2742# Autoconf.
2743for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002744do
2745 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002746 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002747 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002748 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002750 # We found the default executable, but exeext='' is most
2751 # certainly right.
2752 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002753 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002754 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2755 then :; else
2756 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2757 fi
2758 # We set ac_cv_exeext here because the later test for it is not
2759 # safe: cross compilers may not add the suffix if given an `-o'
2760 # argument, so we may need to know it at that point already.
2761 # Even if this section looks crufty: it has the advantage of
2762 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002763 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002764 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002765 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 esac
2767done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002768test "$ac_cv_exeext" = no && ac_cv_exeext=
2769
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002770else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002771 ac_file=''
2772fi
2773
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002774{ echo "$as_me:$LINENO: result: $ac_file" >&5
2775echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002776if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002778sed 's/^/| /' conftest.$ac_ext >&5
2779
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002780{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002781See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002782echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002783See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002784 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002785fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002786
Martin v. Löwis11437992002-04-12 09:54:03 +00002787ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002788
Martin v. Löwiseba40652007-08-30 20:10:57 +00002789# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002790# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002791{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2792echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002793# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2794# If not cross compiling, check that we can run a simple program.
2795if test "$cross_compiling" != yes; then
2796 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797 { (case "(($ac_try" in
2798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2799 *) ac_try_echo=$ac_try;;
2800esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002802 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002803 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002805 (exit $ac_status); }; }; then
2806 cross_compiling=no
2807 else
2808 if test "$cross_compiling" = maybe; then
2809 cross_compiling=yes
2810 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002811 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002812If you meant to cross compile, use \`--host'.
2813See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002814echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002815If you meant to cross compile, use \`--host'.
2816See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002817 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002818 fi
2819 fi
2820fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002821{ echo "$as_me:$LINENO: result: yes" >&5
2822echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002823
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002824rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002825ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002826# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002827# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002828{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2829echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2830{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2831echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002832
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002833{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2834echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002835if { (ac_try="$ac_link"
2836case "(($ac_try" in
2837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2838 *) ac_try_echo=$ac_try;;
2839esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002841 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 (exit $ac_status); }; then
2845 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2846# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2847# work properly (i.e., refer to `conftest.exe'), while it won't with
2848# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002849for ac_file in conftest.exe conftest conftest.*; do
2850 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002851 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002852 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002853 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002854 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002855 * ) break;;
2856 esac
2857done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002859 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002860See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002861echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002862See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002863 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002864fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002865
Martin v. Löwis11437992002-04-12 09:54:03 +00002866rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002867{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2868echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002869
2870rm -f conftest.$ac_ext
2871EXEEXT=$ac_cv_exeext
2872ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002873{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2874echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002875if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002876 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002877else
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002879/* confdefs.h. */
2880_ACEOF
2881cat confdefs.h >>conftest.$ac_ext
2882cat >>conftest.$ac_ext <<_ACEOF
2883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002884
Martin v. Löwis11437992002-04-12 09:54:03 +00002885int
2886main ()
2887{
2888
2889 ;
2890 return 0;
2891}
2892_ACEOF
2893rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002894if { (ac_try="$ac_compile"
2895case "(($ac_try" in
2896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2897 *) ac_try_echo=$ac_try;;
2898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002900 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002901 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002904 for ac_file in conftest.o conftest.obj conftest.*; do
2905 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002906 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002907 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2909 break;;
2910 esac
2911done
2912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002914sed 's/^/| /' conftest.$ac_ext >&5
2915
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002916{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002917See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002918echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002919See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002920 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002921fi
2922
2923rm -f conftest.$ac_cv_objext conftest.$ac_ext
2924fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002925{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2926echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002927OBJEXT=$ac_cv_objext
2928ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002929{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2930echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002931if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002932 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002933else
2934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002935/* confdefs.h. */
2936_ACEOF
2937cat confdefs.h >>conftest.$ac_ext
2938cat >>conftest.$ac_ext <<_ACEOF
2939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
Martin v. Löwis11437992002-04-12 09:54:03 +00002941int
2942main ()
2943{
2944#ifndef __GNUC__
2945 choke me
2946#endif
2947
2948 ;
2949 return 0;
2950}
2951_ACEOF
2952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002953if { (ac_try="$ac_compile"
2954case "(($ac_try" in
2955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2956 *) ac_try_echo=$ac_try;;
2957esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002961 grep -v '^ *+' conftest.er1 >conftest.err
2962 rm -f conftest.er1
2963 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002965 (exit $ac_status); } && {
2966 test -z "$ac_c_werror_flag" ||
2967 test ! -s conftest.err
2968 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002969 ac_compiler_gnu=yes
2970else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002972sed 's/^/| /' conftest.$ac_ext >&5
2973
Martin v. Löwiseba40652007-08-30 20:10:57 +00002974 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002976
2977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002978ac_cv_c_compiler_gnu=$ac_compiler_gnu
2979
2980fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002981{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2982echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2983GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002984ac_test_CFLAGS=${CFLAGS+set}
2985ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002986{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2987echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002988if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002989 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002990else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002991 ac_save_c_werror_flag=$ac_c_werror_flag
2992 ac_c_werror_flag=yes
2993 ac_cv_prog_cc_g=no
2994 CFLAGS="-g"
2995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002996/* confdefs.h. */
2997_ACEOF
2998cat confdefs.h >>conftest.$ac_ext
2999cat >>conftest.$ac_ext <<_ACEOF
3000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003001
Martin v. Löwis11437992002-04-12 09:54:03 +00003002int
3003main ()
3004{
3005
3006 ;
3007 return 0;
3008}
3009_ACEOF
3010rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003011if { (ac_try="$ac_compile"
3012case "(($ac_try" in
3013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3014 *) ac_try_echo=$ac_try;;
3015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003019 grep -v '^ *+' conftest.er1 >conftest.err
3020 rm -f conftest.er1
3021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003023 (exit $ac_status); } && {
3024 test -z "$ac_c_werror_flag" ||
3025 test ! -s conftest.err
3026 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003027 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003028else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003030sed 's/^/| /' conftest.$ac_ext >&5
3031
Martin v. Löwiseba40652007-08-30 20:10:57 +00003032 CFLAGS=""
3033 cat >conftest.$ac_ext <<_ACEOF
3034/* confdefs.h. */
3035_ACEOF
3036cat confdefs.h >>conftest.$ac_ext
3037cat >>conftest.$ac_ext <<_ACEOF
3038/* end confdefs.h. */
3039
3040int
3041main ()
3042{
3043
3044 ;
3045 return 0;
3046}
3047_ACEOF
3048rm -f conftest.$ac_objext
3049if { (ac_try="$ac_compile"
3050case "(($ac_try" in
3051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3052 *) ac_try_echo=$ac_try;;
3053esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003055 (eval "$ac_compile") 2>conftest.er1
3056 ac_status=$?
3057 grep -v '^ *+' conftest.er1 >conftest.err
3058 rm -f conftest.er1
3059 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003061 (exit $ac_status); } && {
3062 test -z "$ac_c_werror_flag" ||
3063 test ! -s conftest.err
3064 } && test -s conftest.$ac_objext; then
3065 :
3066else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003067 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003068sed 's/^/| /' conftest.$ac_ext >&5
3069
3070 ac_c_werror_flag=$ac_save_c_werror_flag
3071 CFLAGS="-g"
3072 cat >conftest.$ac_ext <<_ACEOF
3073/* confdefs.h. */
3074_ACEOF
3075cat confdefs.h >>conftest.$ac_ext
3076cat >>conftest.$ac_ext <<_ACEOF
3077/* end confdefs.h. */
3078
3079int
3080main ()
3081{
3082
3083 ;
3084 return 0;
3085}
3086_ACEOF
3087rm -f conftest.$ac_objext
3088if { (ac_try="$ac_compile"
3089case "(($ac_try" in
3090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3091 *) ac_try_echo=$ac_try;;
3092esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003094 (eval "$ac_compile") 2>conftest.er1
3095 ac_status=$?
3096 grep -v '^ *+' conftest.er1 >conftest.err
3097 rm -f conftest.er1
3098 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003100 (exit $ac_status); } && {
3101 test -z "$ac_c_werror_flag" ||
3102 test ! -s conftest.err
3103 } && test -s conftest.$ac_objext; then
3104 ac_cv_prog_cc_g=yes
3105else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003106 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003107sed 's/^/| /' conftest.$ac_ext >&5
3108
3109
Guido van Rossum627b2d71993-12-24 10:39:16 +00003110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003111
3112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003114
3115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3116fi
3117
3118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3119 ac_c_werror_flag=$ac_save_c_werror_flag
3120fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003121{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3122echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003123if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003124 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003125elif test $ac_cv_prog_cc_g = yes; then
3126 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003127 CFLAGS="-g -O2"
3128 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003129 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003130 fi
3131else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003132 if test "$GCC" = yes; then
3133 CFLAGS="-O2"
3134 else
3135 CFLAGS=
3136 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003137fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003138{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3139echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003140if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003141 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003142else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003143 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003144ac_save_CC=$CC
3145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003146/* confdefs.h. */
3147_ACEOF
3148cat confdefs.h >>conftest.$ac_ext
3149cat >>conftest.$ac_ext <<_ACEOF
3150/* end confdefs.h. */
3151#include <stdarg.h>
3152#include <stdio.h>
3153#include <sys/types.h>
3154#include <sys/stat.h>
3155/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3156struct buf { int x; };
3157FILE * (*rcsopen) (struct buf *, struct stat *, int);
3158static char *e (p, i)
3159 char **p;
3160 int i;
3161{
3162 return p[i];
3163}
3164static char *f (char * (*g) (char **, int), char **p, ...)
3165{
3166 char *s;
3167 va_list v;
3168 va_start (v,p);
3169 s = g (p, va_arg (v,int));
3170 va_end (v);
3171 return s;
3172}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003173
3174/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3175 function prototypes and stuff, but not '\xHH' hex character constants.
3176 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003177 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003178 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3179 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003180 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003181int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3182
Martin v. Löwiseba40652007-08-30 20:10:57 +00003183/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3184 inside strings and character constants. */
3185#define FOO(x) 'x'
3186int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3187
Skip Montanaro6dead952003-09-25 14:50:04 +00003188int test (int i, double x);
3189struct s1 {int (*f) (int a);};
3190struct s2 {int (*f) (double a);};
3191int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3192int argc;
3193char **argv;
3194int
3195main ()
3196{
3197return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3198 ;
3199 return 0;
3200}
3201_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003202for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3203 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003204do
3205 CC="$ac_save_CC $ac_arg"
3206 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003207if { (ac_try="$ac_compile"
3208case "(($ac_try" in
3209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3210 *) ac_try_echo=$ac_try;;
3211esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003215 grep -v '^ *+' conftest.er1 >conftest.err
3216 rm -f conftest.er1
3217 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003219 (exit $ac_status); } && {
3220 test -z "$ac_c_werror_flag" ||
3221 test ! -s conftest.err
3222 } && test -s conftest.$ac_objext; then
3223 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003224else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003226sed 's/^/| /' conftest.$ac_ext >&5
3227
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228
Skip Montanaro6dead952003-09-25 14:50:04 +00003229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003230
3231rm -f core conftest.err conftest.$ac_objext
3232 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003233done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003234rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003235CC=$ac_save_CC
3236
3237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003238# AC_CACHE_VAL
3239case "x$ac_cv_prog_cc_c89" in
3240 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003241 { echo "$as_me:$LINENO: result: none needed" >&5
3242echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003243 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003244 { echo "$as_me:$LINENO: result: unsupported" >&5
3245echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003246 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003247 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003248 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3249echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003250esac
3251
Skip Montanaro6dead952003-09-25 14:50:04 +00003252
Martin v. Löwis11437992002-04-12 09:54:03 +00003253ac_ext=c
3254ac_cpp='$CPP $CPPFLAGS'
3255ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3256ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3257ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003258
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003259
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003260
3261
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003262{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3263echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003264
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003266if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003267 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003268
3269 case $withval in
3270 no) with_cxx_main=no
3271 MAINCC='$(CC)';;
3272 yes) with_cxx_main=yes
3273 MAINCC='$(CXX)';;
3274 *) with_cxx_main=yes
3275 MAINCC=$withval
3276 if test -z "$CXX"
3277 then
3278 CXX=$withval
3279 fi;;
3280 esac
3281else
3282
3283 with_cxx_main=no
3284 MAINCC='$(CC)'
3285
Martin v. Löwiseba40652007-08-30 20:10:57 +00003286fi
3287
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003288{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3289echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003290
3291preset_cxx="$CXX"
3292if test -z "$CXX"
3293then
3294 case "$CC" in
3295 gcc) # Extract the first word of "g++", so it can be a program name with args.
3296set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003297{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3298echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003299if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003300 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301else
3302 case $CXX in
3303 [\\/]* | ?:[\\/]*)
3304 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3305 ;;
3306 *)
3307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308for as_dir in notfound
3309do
3310 IFS=$as_save_IFS
3311 test -z "$as_dir" && as_dir=.
3312 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313 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 +00003314 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003315 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003316 break 2
3317 fi
3318done
3319done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003320IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003321
3322 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3323 ;;
3324esac
3325fi
3326CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003327if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003328 { echo "$as_me:$LINENO: result: $CXX" >&5
3329echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003330else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003331 { echo "$as_me:$LINENO: result: no" >&5
3332echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003334
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003335 ;;
3336 cc) # Extract the first word of "c++", so it can be a program name with args.
3337set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003338{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3339echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003340if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003341 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003342else
3343 case $CXX in
3344 [\\/]* | ?:[\\/]*)
3345 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3346 ;;
3347 *)
3348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349for as_dir in notfound
3350do
3351 IFS=$as_save_IFS
3352 test -z "$as_dir" && as_dir=.
3353 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003354 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 +00003355 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003356 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003357 break 2
3358 fi
3359done
3360done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003361IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003362
3363 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3364 ;;
3365esac
3366fi
3367CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003368if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003369 { echo "$as_me:$LINENO: result: $CXX" >&5
3370echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003371else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003372 { echo "$as_me:$LINENO: result: no" >&5
3373echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003375
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003376 ;;
3377 esac
3378 if test "$CXX" = "notfound"
3379 then
3380 CXX=""
3381 fi
3382fi
3383if test -z "$CXX"
3384then
3385 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3386do
3387 # Extract the first word of "$ac_prog", so it can be a program name with args.
3388set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003389{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3390echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003391if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003393else
3394 if test -n "$CXX"; then
3395 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3396else
3397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3398for as_dir in $PATH
3399do
3400 IFS=$as_save_IFS
3401 test -z "$as_dir" && as_dir=.
3402 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003403 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 +00003404 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003405 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003406 break 2
3407 fi
3408done
3409done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003410IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003411
3412fi
3413fi
3414CXX=$ac_cv_prog_CXX
3415if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003416 { echo "$as_me:$LINENO: result: $CXX" >&5
3417echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003419 { echo "$as_me:$LINENO: result: no" >&5
3420echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003421fi
3422
Martin v. Löwiseba40652007-08-30 20:10:57 +00003423
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003424 test -n "$CXX" && break
3425done
3426test -n "$CXX" || CXX="notfound"
3427
3428 if test "$CXX" = "notfound"
3429 then
3430 CXX=""
3431 fi
3432fi
3433if test "$preset_cxx" != "$CXX"
3434then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003435 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003436
3437 By default, distutils will build C++ extension modules with \"$CXX\".
3438 If this is not intended, then set CXX on the configure command line.
3439 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003440echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003441
3442 By default, distutils will build C++ extension modules with \"$CXX\".
3443 If this is not intended, then set CXX on the configure command line.
3444 " >&2;}
3445fi
3446
3447
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003448# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003449
3450ac_ext=c
3451ac_cpp='$CPP $CPPFLAGS'
3452ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3453ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3454ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003455{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3456echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003457# On Suns, sometimes $CPP names a directory.
3458if test -n "$CPP" && test -d "$CPP"; then
3459 CPP=
3460fi
3461if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003463 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003464else
Martin v. Löwis11437992002-04-12 09:54:03 +00003465 # Double quotes because CPP needs to be expanded
3466 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3467 do
3468 ac_preproc_ok=false
3469for ac_c_preproc_warn_flag in '' yes
3470do
3471 # Use a header file that comes with gcc, so configuring glibc
3472 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003473 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3474 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003475 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 # not just through cpp. "Syntax error" is here to catch this case.
3477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003478/* confdefs.h. */
3479_ACEOF
3480cat confdefs.h >>conftest.$ac_ext
3481cat >>conftest.$ac_ext <<_ACEOF
3482/* end confdefs.h. */
3483#ifdef __STDC__
3484# include <limits.h>
3485#else
3486# include <assert.h>
3487#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003488 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003489_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003490if { (ac_try="$ac_cpp conftest.$ac_ext"
3491case "(($ac_try" in
3492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3493 *) ac_try_echo=$ac_try;;
3494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003496 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003497 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003498 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003499 rm -f conftest.er1
3500 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502 (exit $ac_status); } >/dev/null && {
3503 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3504 test ! -s conftest.err
3505 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003506 :
3507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003509sed 's/^/| /' conftest.$ac_ext >&5
3510
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 # Broken: fails on valid input.
3512continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003514
Martin v. Löwis11437992002-04-12 09:54:03 +00003515rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003516
Martin v. Löwiseba40652007-08-30 20:10:57 +00003517 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003518 # can be detected and how.
3519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003520/* confdefs.h. */
3521_ACEOF
3522cat confdefs.h >>conftest.$ac_ext
3523cat >>conftest.$ac_ext <<_ACEOF
3524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003525#include <ac_nonexistent.h>
3526_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003527if { (ac_try="$ac_cpp conftest.$ac_ext"
3528case "(($ac_try" in
3529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3530 *) ac_try_echo=$ac_try;;
3531esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003533 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003535 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 rm -f conftest.er1
3537 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003539 (exit $ac_status); } >/dev/null && {
3540 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3541 test ! -s conftest.err
3542 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 # Broken: success on invalid input.
3544continue
3545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003547sed 's/^/| /' conftest.$ac_ext >&5
3548
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 # Passes both tests.
3550ac_preproc_ok=:
3551break
3552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003553
Martin v. Löwis11437992002-04-12 09:54:03 +00003554rm -f conftest.err conftest.$ac_ext
3555
3556done
3557# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3558rm -f conftest.err conftest.$ac_ext
3559if $ac_preproc_ok; then
3560 break
3561fi
3562
3563 done
3564 ac_cv_prog_CPP=$CPP
3565
3566fi
3567 CPP=$ac_cv_prog_CPP
3568else
3569 ac_cv_prog_CPP=$CPP
3570fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003571{ echo "$as_me:$LINENO: result: $CPP" >&5
3572echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003573ac_preproc_ok=false
3574for ac_c_preproc_warn_flag in '' yes
3575do
3576 # Use a header file that comes with gcc, so configuring glibc
3577 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003578 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3579 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 # On the NeXT, cc -E runs the code through the compiler's parser,
3581 # not just through cpp. "Syntax error" is here to catch this case.
3582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003583/* confdefs.h. */
3584_ACEOF
3585cat confdefs.h >>conftest.$ac_ext
3586cat >>conftest.$ac_ext <<_ACEOF
3587/* end confdefs.h. */
3588#ifdef __STDC__
3589# include <limits.h>
3590#else
3591# include <assert.h>
3592#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003593 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003594_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003595if { (ac_try="$ac_cpp conftest.$ac_ext"
3596case "(($ac_try" in
3597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3598 *) ac_try_echo=$ac_try;;
3599esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003601 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003603 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 rm -f conftest.er1
3605 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003607 (exit $ac_status); } >/dev/null && {
3608 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3609 test ! -s conftest.err
3610 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 :
3612else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003614sed 's/^/| /' conftest.$ac_ext >&5
3615
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 # Broken: fails on valid input.
3617continue
3618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003619
Martin v. Löwis11437992002-04-12 09:54:03 +00003620rm -f conftest.err conftest.$ac_ext
3621
Martin v. Löwiseba40652007-08-30 20:10:57 +00003622 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 # can be detected and how.
3624 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003625/* confdefs.h. */
3626_ACEOF
3627cat confdefs.h >>conftest.$ac_ext
3628cat >>conftest.$ac_ext <<_ACEOF
3629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003630#include <ac_nonexistent.h>
3631_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003632if { (ac_try="$ac_cpp conftest.$ac_ext"
3633case "(($ac_try" in
3634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3635 *) ac_try_echo=$ac_try;;
3636esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003638 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003640 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 rm -f conftest.er1
3642 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003644 (exit $ac_status); } >/dev/null && {
3645 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3646 test ! -s conftest.err
3647 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003648 # Broken: success on invalid input.
3649continue
3650else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003652sed 's/^/| /' conftest.$ac_ext >&5
3653
Martin v. Löwis11437992002-04-12 09:54:03 +00003654 # Passes both tests.
3655ac_preproc_ok=:
3656break
3657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003658
Martin v. Löwis11437992002-04-12 09:54:03 +00003659rm -f conftest.err conftest.$ac_ext
3660
3661done
3662# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3663rm -f conftest.err conftest.$ac_ext
3664if $ac_preproc_ok; then
3665 :
3666else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003667 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003668See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003669echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003670See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003671 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672fi
3673
3674ac_ext=c
3675ac_cpp='$CPP $CPPFLAGS'
3676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3678ac_compiler_gnu=$ac_cv_c_compiler_gnu
3679
3680
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003681{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3682echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003683if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003684 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003685else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003686 # Extract the first word of "grep ggrep" to use in msg output
3687if test -z "$GREP"; then
3688set dummy grep ggrep; ac_prog_name=$2
3689if test "${ac_cv_path_GREP+set}" = set; then
3690 echo $ECHO_N "(cached) $ECHO_C" >&6
3691else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003692 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003693# Loop through the user's path and test for each of PROGNAME-LIST
3694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003695for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3696do
3697 IFS=$as_save_IFS
3698 test -z "$as_dir" && as_dir=.
3699 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003700 for ac_exec_ext in '' $ac_executable_extensions; do
3701 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3702 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3703 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003704 # Check for GNU $ac_path_GREP
3705case `"$ac_path_GREP" --version 2>&1` in
3706*GNU*)
3707 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3708*)
3709 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003710 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003711 while :
3712 do
3713 cat "conftest.in" "conftest.in" >"conftest.tmp"
3714 mv "conftest.tmp" "conftest.in"
3715 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003716 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003717 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3718 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3719 ac_count=`expr $ac_count + 1`
3720 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3721 # Best one so far, save it but keep looking for a better one
3722 ac_cv_path_GREP="$ac_path_GREP"
3723 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003724 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003725 # 10*(2^10) chars as input seems more than enough
3726 test $ac_count -gt 10 && break
3727 done
3728 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3729esac
3730
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003731
3732 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003733 done
3734done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003735
3736done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003737IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003738
3739
3740fi
3741
3742GREP="$ac_cv_path_GREP"
3743if test -z "$GREP"; then
3744 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3745echo "$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 +00003746 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003747fi
3748
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749else
3750 ac_cv_path_GREP=$GREP
3751fi
3752
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003753
Martin v. Löwiseba40652007-08-30 20:10:57 +00003754fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003755{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3756echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003757 GREP="$ac_cv_path_GREP"
3758
3759
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003760{ echo "$as_me:$LINENO: checking for egrep" >&5
3761echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003762if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003763 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003764else
3765 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3766 then ac_cv_path_EGREP="$GREP -E"
3767 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003768 # Extract the first word of "egrep" to use in msg output
3769if test -z "$EGREP"; then
3770set dummy egrep; ac_prog_name=$2
3771if test "${ac_cv_path_EGREP+set}" = set; then
3772 echo $ECHO_N "(cached) $ECHO_C" >&6
3773else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003774 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003775# Loop through the user's path and test for each of PROGNAME-LIST
3776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3778do
3779 IFS=$as_save_IFS
3780 test -z "$as_dir" && as_dir=.
3781 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003782 for ac_exec_ext in '' $ac_executable_extensions; do
3783 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3784 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3785 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003786 # Check for GNU $ac_path_EGREP
3787case `"$ac_path_EGREP" --version 2>&1` in
3788*GNU*)
3789 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3790*)
3791 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003792 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003793 while :
3794 do
3795 cat "conftest.in" "conftest.in" >"conftest.tmp"
3796 mv "conftest.tmp" "conftest.in"
3797 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003798 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003799 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3800 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3801 ac_count=`expr $ac_count + 1`
3802 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3803 # Best one so far, save it but keep looking for a better one
3804 ac_cv_path_EGREP="$ac_path_EGREP"
3805 ac_path_EGREP_max=$ac_count
3806 fi
3807 # 10*(2^10) chars as input seems more than enough
3808 test $ac_count -gt 10 && break
3809 done
3810 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3811esac
3812
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003813
3814 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003815 done
3816done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003817
3818done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003819IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003820
3821
3822fi
3823
3824EGREP="$ac_cv_path_EGREP"
3825if test -z "$EGREP"; then
3826 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3827echo "$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 +00003828 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003829fi
3830
Martin v. Löwiseba40652007-08-30 20:10:57 +00003831else
3832 ac_cv_path_EGREP=$EGREP
3833fi
3834
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003835
Martin v. Löwiseba40652007-08-30 20:10:57 +00003836 fi
3837fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003838{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3839echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003840 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003841
3842
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003843
3844{ echo "$as_me:$LINENO: checking for AIX" >&5
3845echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3846cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003847/* confdefs.h. */
3848_ACEOF
3849cat confdefs.h >>conftest.$ac_ext
3850cat >>conftest.$ac_ext <<_ACEOF
3851/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003852#ifdef _AIX
3853 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003854#endif
3855
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003856_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3858 $EGREP "yes" >/dev/null 2>&1; then
3859 { echo "$as_me:$LINENO: result: yes" >&5
3860echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003861cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003862#define _ALL_SOURCE 1
3863_ACEOF
3864
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003865else
3866 { echo "$as_me:$LINENO: result: no" >&5
3867echo "${ECHO_T}no" >&6; }
3868fi
Mark Dickinsonab442262009-11-20 19:27:43 +00003869rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003870
3871
3872
3873# Check for unsupported systems
3874case $ac_sys_system/$ac_sys_release in
3875atheos*|Linux*/1*)
3876 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3877 echo See README for details.
3878 exit 1;;
3879esac
3880
3881
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003882{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3883echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003884
3885# Check whether --with-suffix was given.
3886if test "${with_suffix+set}" = set; then
3887 withval=$with_suffix;
3888 case $withval in
3889 no) EXEEXT=;;
3890 yes) EXEEXT=.exe;;
3891 *) EXEEXT=$withval;;
3892 esac
3893fi
3894
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003895{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3896echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003897
3898# Test whether we're running on a non-case-sensitive system, in which
3899# case we give a warning if no ext is given
3900
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003901{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3902echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003903if test ! -d CaseSensitiveTestDir; then
3904mkdir CaseSensitiveTestDir
3905fi
3906
3907if test -d casesensitivetestdir
3908then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003909 { echo "$as_me:$LINENO: result: yes" >&5
3910echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003911 BUILDEXEEXT=.exe
3912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003913 { echo "$as_me:$LINENO: result: no" >&5
3914echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003915 BUILDEXEEXT=$EXEEXT
3916fi
3917rmdir CaseSensitiveTestDir
3918
3919case $MACHDEP in
3920bsdos*)
3921 case $CC in
3922 gcc) CC="$CC -D_HAVE_BSDI";;
3923 esac;;
3924esac
3925
3926case $ac_sys_system in
3927hp*|HP*)
3928 case $CC in
3929 cc|*/cc) CC="$CC -Ae";;
3930 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003931SunOS*)
3932 # Some functions have a prototype only with that define, e.g. confstr
3933
3934cat >>confdefs.h <<\_ACEOF
3935#define __EXTENSIONS__ 1
3936_ACEOF
3937
3938 ;;
3939esac
3940
3941
3942
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003943{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3944echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003945if test -z "$LIBRARY"
3946then
3947 LIBRARY='libpython$(VERSION).a'
3948fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003949{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3950echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003951
3952# LDLIBRARY is the name of the library to link against (as opposed to the
3953# name of the library into which to insert object files). BLDLIBRARY is also
3954# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3955# is blank as the main program is not linked directly against LDLIBRARY.
3956# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3957# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3958# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3959# DLLLIBRARY is the shared (i.e., DLL) library.
3960#
3961# RUNSHARED is used to run shared python without installed libraries
3962#
3963# INSTSONAME is the name of the shared library that will be use to install
3964# on the system - some systems like version suffix, others don't
3965
3966
3967
3968
3969
3970
3971LDLIBRARY="$LIBRARY"
3972BLDLIBRARY='$(LDLIBRARY)'
3973INSTSONAME='$(LDLIBRARY)'
3974DLLLIBRARY=''
3975LDLIBRARYDIR=''
3976RUNSHARED=''
3977
3978# LINKCC is the command that links the python executable -- default is $(CC).
3979# If CXX is set, and if it is needed to link a main function that was
3980# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3981# python might then depend on the C++ runtime
3982# This is altered for AIX in order to build the export list before
3983# linking.
3984
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003985{ echo "$as_me:$LINENO: checking LINKCC" >&5
3986echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003987if test -z "$LINKCC"
3988then
3989 LINKCC='$(PURIFY) $(MAINCC)'
3990 case $ac_sys_system in
3991 AIX*)
3992 exp_extra="\"\""
3993 if test $ac_sys_release -ge 5 -o \
3994 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3995 exp_extra="."
3996 fi
3997 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003998 QNX*)
3999 # qcc must be used because the other compilers do not
4000 # support -N.
4001 LINKCC=qcc;;
4002 esac
4003fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004004{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4005echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004006
4007# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4008# make sure we default having it set to "no": this is used by
4009# distutils.unixccompiler to know if it should add --enable-new-dtags
4010# to linker command lines, and failing to detect GNU ld simply results
4011# in the same bahaviour as before.
4012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004013{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4014echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004015ac_prog=ld
4016if test "$GCC" = yes; then
4017 ac_prog=`$CC -print-prog-name=ld`
4018fi
4019case `"$ac_prog" -V 2>&1 < /dev/null` in
4020 *GNU*)
4021 GNULD=yes;;
4022 *)
4023 GNULD=no;;
4024esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004025{ echo "$as_me:$LINENO: result: $GNULD" >&5
4026echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004027
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004028{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4029echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004030# Check whether --enable-shared was given.
4031if test "${enable_shared+set}" = set; then
4032 enableval=$enable_shared;
4033fi
4034
4035
4036if test -z "$enable_shared"
4037then
4038 case $ac_sys_system in
4039 CYGWIN* | atheos*)
4040 enable_shared="yes";;
4041 *)
4042 enable_shared="no";;
4043 esac
4044fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004045{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4046echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004047
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004048{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4049echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004050# Check whether --enable-profiling was given.
4051if test "${enable_profiling+set}" = set; then
4052 enableval=$enable_profiling; ac_save_cc="$CC"
4053 CC="$CC -pg"
4054 if test "$cross_compiling" = yes; then
4055 ac_enable_profiling="no"
4056else
4057 cat >conftest.$ac_ext <<_ACEOF
4058/* confdefs.h. */
4059_ACEOF
4060cat confdefs.h >>conftest.$ac_ext
4061cat >>conftest.$ac_ext <<_ACEOF
4062/* end confdefs.h. */
4063int main() { return 0; }
4064_ACEOF
4065rm -f conftest$ac_exeext
4066if { (ac_try="$ac_link"
4067case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
4076 { (case "(($ac_try" in
4077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4078 *) ac_try_echo=$ac_try;;
4079esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004081 (eval "$ac_try") 2>&5
4082 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004084 (exit $ac_status); }; }; then
4085 ac_enable_profiling="yes"
4086else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004087 echo "$as_me: program exited with status $ac_status" >&5
4088echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004089sed 's/^/| /' conftest.$ac_ext >&5
4090
4091( exit $ac_status )
4092ac_enable_profiling="no"
4093fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4095fi
4096
4097
4098 CC="$ac_save_cc"
4099fi
4100
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004101{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4102echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004103
4104case "$ac_enable_profiling" in
4105 "yes")
4106 BASECFLAGS="-pg $BASECFLAGS"
4107 LDFLAGS="-pg $LDFLAGS"
4108 ;;
4109esac
4110
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004111{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4112echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004113
4114# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4115# library that we build, but we do not want to link against it (we
4116# will find it with a -framework option). For this reason there is an
4117# extra variable BLDLIBRARY against which Python and the extension
4118# modules are linked, BLDLIBRARY. This is normally the same as
4119# LDLIBRARY, but empty for MacOSX framework builds.
4120if test "$enable_framework"
4121then
4122 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4123 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4124 BLDLIBRARY=''
4125else
4126 BLDLIBRARY='$(LDLIBRARY)'
4127fi
4128
4129# Other platforms follow
4130if test $enable_shared = "yes"; then
4131
4132cat >>confdefs.h <<\_ACEOF
4133#define Py_ENABLE_SHARED 1
4134_ACEOF
4135
4136 case $ac_sys_system in
4137 BeOS*)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 ;;
4140 CYGWIN*)
4141 LDLIBRARY='libpython$(VERSION).dll.a'
4142 DLLLIBRARY='libpython$(VERSION).dll'
4143 ;;
4144 SunOS*)
4145 LDLIBRARY='libpython$(VERSION).so'
4146 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4147 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4148 INSTSONAME="$LDLIBRARY".$SOVERSION
4149 ;;
4150 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4151 LDLIBRARY='libpython$(VERSION).so'
4152 BLDLIBRARY='-L. -lpython$(VERSION)'
4153 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4154 case $ac_sys_system in
4155 FreeBSD*)
4156 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4157 ;;
4158 esac
4159 INSTSONAME="$LDLIBRARY".$SOVERSION
4160 ;;
4161 hp*|HP*)
4162 case `uname -m` in
4163 ia64)
4164 LDLIBRARY='libpython$(VERSION).so'
4165 ;;
4166 *)
4167 LDLIBRARY='libpython$(VERSION).sl'
4168 ;;
4169 esac
4170 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4171 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4172 ;;
4173 OSF*)
4174 LDLIBRARY='libpython$(VERSION).so'
4175 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4176 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4177 ;;
4178 atheos*)
4179 LDLIBRARY='libpython$(VERSION).so'
4180 BLDLIBRARY='-L. -lpython$(VERSION)'
4181 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4182 ;;
4183 Darwin*)
4184 LDLIBRARY='libpython$(VERSION).dylib'
4185 BLDLIBRARY='-L. -lpython$(VERSION)'
4186 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4187 ;;
4188
4189 esac
4190else # shared is disabled
4191 case $ac_sys_system in
4192 CYGWIN*)
4193 BLDLIBRARY='$(LIBRARY)'
4194 LDLIBRARY='libpython$(VERSION).dll.a'
4195 ;;
4196 esac
4197fi
4198
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004199{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4200echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004201
4202if test -n "$ac_tool_prefix"; then
4203 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4204set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004205{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4206echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004207if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004208 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004209else
4210 if test -n "$RANLIB"; then
4211 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4212else
4213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4214for as_dir in $PATH
4215do
4216 IFS=$as_save_IFS
4217 test -z "$as_dir" && as_dir=.
4218 for ac_exec_ext in '' $ac_executable_extensions; do
4219 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4220 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004221 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004222 break 2
4223 fi
4224done
4225done
4226IFS=$as_save_IFS
4227
4228fi
4229fi
4230RANLIB=$ac_cv_prog_RANLIB
4231if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004232 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4233echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004234else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004235 { echo "$as_me:$LINENO: result: no" >&5
4236echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004237fi
4238
4239
4240fi
4241if test -z "$ac_cv_prog_RANLIB"; then
4242 ac_ct_RANLIB=$RANLIB
4243 # Extract the first word of "ranlib", so it can be a program name with args.
4244set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004245{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4246echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004247if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004248 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004249else
4250 if test -n "$ac_ct_RANLIB"; then
4251 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4252else
4253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4254for as_dir in $PATH
4255do
4256 IFS=$as_save_IFS
4257 test -z "$as_dir" && as_dir=.
4258 for ac_exec_ext in '' $ac_executable_extensions; do
4259 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4260 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004261 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004262 break 2
4263 fi
4264done
4265done
4266IFS=$as_save_IFS
4267
4268fi
4269fi
4270ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4271if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004272 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4273echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004274else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004275 { echo "$as_me:$LINENO: result: no" >&5
4276echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004277fi
4278
4279 if test "x$ac_ct_RANLIB" = x; then
4280 RANLIB=":"
4281 else
4282 case $cross_compiling:$ac_tool_warned in
4283yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004284{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4285whose name does not start with the host triplet. If you think this
4286configuration is useful to you, please write to autoconf@gnu.org." >&5
4287echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4288whose name does not start with the host triplet. If you think this
4289configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004290ac_tool_warned=yes ;;
4291esac
4292 RANLIB=$ac_ct_RANLIB
4293 fi
4294else
4295 RANLIB="$ac_cv_prog_RANLIB"
4296fi
4297
4298
4299for ac_prog in ar aal
4300do
4301 # Extract the first word of "$ac_prog", so it can be a program name with args.
4302set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004303{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4304echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004305if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004306 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004307else
4308 if test -n "$AR"; then
4309 ac_cv_prog_AR="$AR" # Let the user override the test.
4310else
4311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4312for as_dir in $PATH
4313do
4314 IFS=$as_save_IFS
4315 test -z "$as_dir" && as_dir=.
4316 for ac_exec_ext in '' $ac_executable_extensions; do
4317 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4318 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004319 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004320 break 2
4321 fi
4322done
4323done
4324IFS=$as_save_IFS
4325
4326fi
4327fi
4328AR=$ac_cv_prog_AR
4329if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004330 { echo "$as_me:$LINENO: result: $AR" >&5
4331echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004332else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004333 { echo "$as_me:$LINENO: result: no" >&5
4334echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004335fi
4336
4337
4338 test -n "$AR" && break
4339done
4340test -n "$AR" || AR="ar"
4341
4342
4343# tweak ARFLAGS only if the user didn't set it on the command line
4344
4345if test -z "$ARFLAGS"
4346then
4347 ARFLAGS="rc"
4348fi
4349
4350
4351# Extract the first word of "svnversion", so it can be a program name with args.
4352set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004353{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004355if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004356 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004357else
4358 if test -n "$SVNVERSION"; then
4359 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4360else
4361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4362for as_dir in $PATH
4363do
4364 IFS=$as_save_IFS
4365 test -z "$as_dir" && as_dir=.
4366 for ac_exec_ext in '' $ac_executable_extensions; do
4367 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4368 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004369 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004370 break 2
4371 fi
4372done
4373done
4374IFS=$as_save_IFS
4375
4376 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4377fi
4378fi
4379SVNVERSION=$ac_cv_prog_SVNVERSION
4380if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004381 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4382echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004383else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004384 { echo "$as_me:$LINENO: result: no" >&5
4385echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004386fi
4387
4388
4389if test $SVNVERSION = found
4390then
4391 SVNVERSION="svnversion \$(srcdir)"
4392else
4393 SVNVERSION="echo Unversioned directory"
4394fi
4395
4396case $MACHDEP in
4397bsdos*|hp*|HP*)
4398 # install -d does not work on BSDI or HP-UX
4399 if test -z "$INSTALL"
4400 then
4401 INSTALL="${srcdir}/install-sh -c"
4402 fi
4403esac
4404ac_aux_dir=
4405for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4406 if test -f "$ac_dir/install-sh"; then
4407 ac_aux_dir=$ac_dir
4408 ac_install_sh="$ac_aux_dir/install-sh -c"
4409 break
4410 elif test -f "$ac_dir/install.sh"; then
4411 ac_aux_dir=$ac_dir
4412 ac_install_sh="$ac_aux_dir/install.sh -c"
4413 break
4414 elif test -f "$ac_dir/shtool"; then
4415 ac_aux_dir=$ac_dir
4416 ac_install_sh="$ac_aux_dir/shtool install -c"
4417 break
4418 fi
4419done
4420if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004421 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4422echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004423 { (exit 1); exit 1; }; }
4424fi
4425
4426# These three variables are undocumented and unsupported,
4427# and are intended to be withdrawn in a future Autoconf release.
4428# They can cause serious problems if a builder's source tree is in a directory
4429# whose full name contains unusual characters.
4430ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4431ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4432ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4433
4434
4435# Find a good install program. We prefer a C program (faster),
4436# so one script is as good as another. But avoid the broken or
4437# incompatible versions:
4438# SysV /etc/install, /usr/sbin/install
4439# SunOS /usr/etc/install
4440# IRIX /sbin/install
4441# AIX /bin/install
4442# AmigaOS /C/install, which installs bootblocks on floppy discs
4443# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4444# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4445# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4446# OS/2's system install, which has a completely different semantic
4447# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004448{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4449echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004450if test -z "$INSTALL"; then
4451if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004452 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004453else
4454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4455for as_dir in $PATH
4456do
4457 IFS=$as_save_IFS
4458 test -z "$as_dir" && as_dir=.
4459 # Account for people who put trailing slashes in PATH elements.
4460case $as_dir/ in
4461 ./ | .// | /cC/* | \
4462 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4463 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4464 /usr/ucb/* ) ;;
4465 *)
4466 # OSF1 and SCO ODT 3.0 have their own names for install.
4467 # Don't use installbsd from OSF since it installs stuff as root
4468 # by default.
4469 for ac_prog in ginstall scoinst install; do
4470 for ac_exec_ext in '' $ac_executable_extensions; do
4471 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4472 if test $ac_prog = install &&
4473 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4474 # AIX install. It has an incompatible calling convention.
4475 :
4476 elif test $ac_prog = install &&
4477 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4478 # program-specific install script used by HP pwplus--don't use.
4479 :
4480 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004481 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4482 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004483 fi
4484 fi
4485 done
4486 done
4487 ;;
4488esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004489done
4490IFS=$as_save_IFS
4491
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004492
4493fi
4494 if test "${ac_cv_path_install+set}" = set; then
4495 INSTALL=$ac_cv_path_install
4496 else
4497 # As a last resort, use the slow shell script. Don't cache a
4498 # value for INSTALL within a source directory, because that will
4499 # break other packages using the cache if that directory is
4500 # removed, or if the value is a relative name.
4501 INSTALL=$ac_install_sh
4502 fi
4503fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004504{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4505echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004506
4507# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4508# It thinks the first close brace ends the variable substitution.
4509test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4510
4511test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4512
4513test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4514
4515
4516# Not every filesystem supports hard links
4517
4518if test -z "$LN" ; then
4519 case $ac_sys_system in
4520 BeOS*) LN="ln -s";;
4521 CYGWIN*) LN="ln -s";;
4522 atheos*) LN="ln -s";;
4523 *) LN=ln;;
4524 esac
4525fi
4526
4527# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004528{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4529echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004530
4531# Check whether --with-pydebug was given.
4532if test "${with_pydebug+set}" = set; then
4533 withval=$with_pydebug;
4534if test "$withval" != no
4535then
4536
4537cat >>confdefs.h <<\_ACEOF
4538#define Py_DEBUG 1
4539_ACEOF
4540
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004541 { echo "$as_me:$LINENO: result: yes" >&5
4542echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004543 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004544else { echo "$as_me:$LINENO: result: no" >&5
4545echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004546fi
4547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004548 { echo "$as_me:$LINENO: result: no" >&5
4549echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004550fi
4551
4552
4553# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4554# merged with this chunk of code?
4555
4556# Optimizer/debugger flags
4557# ------------------------
4558# (The following bit of code is complicated enough - please keep things
4559# indented properly. Just pretend you're editing Python code. ;-)
4560
4561# There are two parallel sets of case statements below, one that checks to
4562# see if OPT was set and one that does BASECFLAGS setting based upon
4563# compiler and platform. BASECFLAGS tweaks need to be made even if the
4564# user set OPT.
4565
4566# tweak OPT based on compiler and platform, only if the user didn't set
4567# it on the command line
4568
4569if test -z "$OPT"
4570then
4571 case $GCC in
4572 yes)
4573 if test "$CC" != 'g++' ; then
4574 STRICT_PROTO="-Wstrict-prototypes"
4575 fi
4576 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4577 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4578 WRAP="-fwrapv"
4579 fi
4580 case $ac_cv_prog_cc_g in
4581 yes)
4582 if test "$Py_DEBUG" = 'true' ; then
4583 # Optimization messes up debuggers, so turn it off for
4584 # debug builds.
4585 OPT="-g -Wall $STRICT_PROTO"
4586 else
4587 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4588 fi
4589 ;;
4590 *)
4591 OPT="-O3 -Wall $STRICT_PROTO"
4592 ;;
4593 esac
4594 case $ac_sys_system in
4595 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4596 ;;
4597 esac
4598 ;;
4599
4600 *)
4601 OPT="-O"
4602 ;;
4603 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004604fi
4605
4606
4607
4608# The -arch flags for universal builds on OSX
4609UNIVERSAL_ARCH_FLAGS=
4610
4611
4612# tweak BASECFLAGS based on compiler and platform
4613case $GCC in
4614yes)
4615 # Python violates C99 rules, by casting between incompatible
4616 # pointer types. GCC may generate bad code as a result of that,
4617 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004618 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4619echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004620 ac_save_cc="$CC"
4621 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004622 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4623 echo $ECHO_N "(cached) $ECHO_C" >&6
4624else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004625 cat >conftest.$ac_ext <<_ACEOF
4626/* confdefs.h. */
4627_ACEOF
4628cat confdefs.h >>conftest.$ac_ext
4629cat >>conftest.$ac_ext <<_ACEOF
4630/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004631
4632int
4633main ()
4634{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004635int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004636 ;
4637 return 0;
4638}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004639_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004640rm -f conftest.$ac_objext
4641if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004642case "(($ac_try" in
4643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4644 *) ac_try_echo=$ac_try;;
4645esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004647 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004648 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004649 grep -v '^ *+' conftest.er1 >conftest.err
4650 rm -f conftest.er1
4651 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004653 (exit $ac_status); } && {
4654 test -z "$ac_c_werror_flag" ||
4655 test ! -s conftest.err
4656 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004657 ac_cv_no_strict_aliasing_ok=yes
4658else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004659 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004660sed 's/^/| /' conftest.$ac_ext >&5
4661
Gregory P. Smith373469a2009-11-01 21:03:38 +00004662 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004663fi
4664
Gregory P. Smith373469a2009-11-01 21:03:38 +00004665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004666fi
4667
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004668 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004669 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4670echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004671 if test $ac_cv_no_strict_aliasing_ok = yes
4672 then
4673 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4674 fi
4675
4676 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4677 # support. Without this, treatment of subnormals doesn't follow
4678 # the standard.
4679 case $ac_sys_machine in
4680 alpha*)
4681 BASECFLAGS="$BASECFLAGS -mieee"
4682 ;;
4683 esac
4684
4685 case $ac_sys_system in
4686 SCO_SV*)
4687 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4688 ;;
4689 # is there any other compiler on Darwin besides gcc?
4690 Darwin*)
4691 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4692 # used to be here, but non-Apple gcc doesn't accept them.
4693
4694
4695 if test "${enable_universalsdk}"; then
4696 UNIVERSAL_ARCH_FLAGS=""
4697 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4698 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4699 ARCH_RUN_32BIT=""
4700
4701 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4702 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren25967582009-09-06 10:00:26 +00004703 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004704
4705 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4706 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4707 ARCH_RUN_32BIT="arch -i386 -ppc"
4708
Ronald Oussoren23d92532009-09-07 06:12:00 +00004709 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4710 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4711 ARCH_RUN_32BIT="arch -i386"
4712
4713 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4714 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4715 ARCH_RUN_32BIT="arch -i386 -ppc"
4716
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004717 else
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00004718 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4719echo "$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 +00004720 { (exit 1); exit 1; }; }
4721
4722 fi
4723
4724
4725 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4726 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4727 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4728 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4729 fi
4730 fi
4731
4732 # Calculate the right deployment target for this build.
4733 #
4734 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4735 if test ${cur_target} '>' 10.2; then
4736 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004737 if test ${enable_universalsdk}; then
4738 if test "${UNIVERSAL_ARCHS}" = "all"; then
4739 # Ensure that the default platform for a
4740 # 4-way universal build is OSX 10.5,
4741 # that's the first OS release where
4742 # 4-way builds make sense.
4743 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004744
4745 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4746 cur_target='10.5'
4747
4748 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4749 cur_target='10.5'
4750
4751 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4752 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004753 fi
4754 else
4755 if test `arch` = "i386"; then
4756 # On Intel macs default to a deployment
4757 # target of 10.4, that's the first OSX
4758 # release with Intel support.
4759 cur_target="10.4"
4760 fi
4761 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004762 fi
4763 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4764
4765 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4766 # environment with a value that is the same as what we'll use
4767 # in the Makefile to ensure that we'll get the same compiler
4768 # environment during configure and build time.
4769 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4770 export MACOSX_DEPLOYMENT_TARGET
4771 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4772
4773 ;;
4774 OSF*)
4775 BASECFLAGS="$BASECFLAGS -mieee"
4776 ;;
4777 esac
4778 ;;
4779
4780*)
4781 case $ac_sys_system in
4782 OpenUNIX*|UnixWare*)
4783 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4784 ;;
4785 OSF*)
4786 BASECFLAGS="$BASECFLAGS -ieee -std"
4787 ;;
4788 SCO_SV*)
4789 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4790 ;;
4791 esac
4792 ;;
4793esac
4794
4795if test "$Py_DEBUG" = 'true'; then
4796 :
4797else
4798 OPT="-DNDEBUG $OPT"
4799fi
4800
4801if test "$ac_arch_flags"
4802then
4803 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4804fi
4805
4806# disable check for icc since it seems to pass, but generates a warning
4807if test "$CC" = icc
4808then
4809 ac_cv_opt_olimit_ok=no
4810fi
4811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004812{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4813echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004814if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004815 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004816else
4817 ac_save_cc="$CC"
4818CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004819cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004820/* confdefs.h. */
4821_ACEOF
4822cat confdefs.h >>conftest.$ac_ext
4823cat >>conftest.$ac_ext <<_ACEOF
4824/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004825
4826int
4827main ()
4828{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004829int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004830 ;
4831 return 0;
4832}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004833_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004834rm -f conftest.$ac_objext
4835if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004836case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4839esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004841 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004842 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004843 grep -v '^ *+' conftest.er1 >conftest.err
4844 rm -f conftest.er1
4845 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004847 (exit $ac_status); } && {
4848 test -z "$ac_c_werror_flag" ||
4849 test ! -s conftest.err
4850 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004851 ac_cv_opt_olimit_ok=yes
4852else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004853 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004854sed 's/^/| /' conftest.$ac_ext >&5
4855
Gregory P. Smith373469a2009-11-01 21:03:38 +00004856 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004857fi
4858
Gregory P. Smith373469a2009-11-01 21:03:38 +00004859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004860CC="$ac_save_cc"
4861fi
4862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004863{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4864echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004865if test $ac_cv_opt_olimit_ok = yes; then
4866 case $ac_sys_system in
4867 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4868 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4869 # environment?
4870 Darwin*)
4871 ;;
4872 *)
4873 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4874 ;;
4875 esac
4876else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004877 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4878echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004879 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004880 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004881else
4882 ac_save_cc="$CC"
4883 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004884 cat >conftest.$ac_ext <<_ACEOF
4885/* confdefs.h. */
4886_ACEOF
4887cat confdefs.h >>conftest.$ac_ext
4888cat >>conftest.$ac_ext <<_ACEOF
4889/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004890
4891int
4892main ()
4893{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004894int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004895 ;
4896 return 0;
4897}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004898_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004899rm -f conftest.$ac_objext
4900if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004901case "(($ac_try" in
4902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4903 *) ac_try_echo=$ac_try;;
4904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004906 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004907 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004908 grep -v '^ *+' conftest.er1 >conftest.err
4909 rm -f conftest.er1
4910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004912 (exit $ac_status); } && {
4913 test -z "$ac_c_werror_flag" ||
4914 test ! -s conftest.err
4915 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004916 ac_cv_olimit_ok=yes
4917else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004918 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004919sed 's/^/| /' conftest.$ac_ext >&5
4920
Gregory P. Smith373469a2009-11-01 21:03:38 +00004921 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004922fi
4923
Gregory P. Smith373469a2009-11-01 21:03:38 +00004924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004925 CC="$ac_save_cc"
4926fi
4927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004928 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4929echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004930 if test $ac_cv_olimit_ok = yes; then
4931 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4932 fi
4933fi
4934
4935# Check whether GCC supports PyArg_ParseTuple format
4936if test "$GCC" = "yes"
4937then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004938 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4939echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004940 save_CFLAGS=$CFLAGS
4941 CFLAGS="$CFLAGS -Werror"
4942 cat >conftest.$ac_ext <<_ACEOF
4943/* confdefs.h. */
4944_ACEOF
4945cat confdefs.h >>conftest.$ac_ext
4946cat >>conftest.$ac_ext <<_ACEOF
4947/* end confdefs.h. */
4948
4949 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4950
4951int
4952main ()
4953{
4954
4955 ;
4956 return 0;
4957}
4958_ACEOF
4959rm -f conftest.$ac_objext
4960if { (ac_try="$ac_compile"
4961case "(($ac_try" in
4962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4963 *) ac_try_echo=$ac_try;;
4964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004966 (eval "$ac_compile") 2>conftest.er1
4967 ac_status=$?
4968 grep -v '^ *+' conftest.er1 >conftest.err
4969 rm -f conftest.er1
4970 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004972 (exit $ac_status); } && {
4973 test -z "$ac_c_werror_flag" ||
4974 test ! -s conftest.err
4975 } && test -s conftest.$ac_objext; then
4976
4977cat >>confdefs.h <<\_ACEOF
4978#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4979_ACEOF
4980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004981 { echo "$as_me:$LINENO: result: yes" >&5
4982echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004983else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004984 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004985sed 's/^/| /' conftest.$ac_ext >&5
4986
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004987 { echo "$as_me:$LINENO: result: no" >&5
4988echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004989
4990fi
4991
4992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4993 CFLAGS=$save_CFLAGS
4994fi
4995
4996# On some compilers, pthreads are available without further options
4997# (e.g. MacOS X). On some of these systems, the compiler will not
4998# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4999# So we have to see first whether pthreads are available without
5000# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005001{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5002echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005004 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005005else
5006 if test "$cross_compiling" = yes; then
5007 ac_cv_pthread_is_default=no
5008else
5009 cat >conftest.$ac_ext <<_ACEOF
5010/* confdefs.h. */
5011_ACEOF
5012cat confdefs.h >>conftest.$ac_ext
5013cat >>conftest.$ac_ext <<_ACEOF
5014/* end confdefs.h. */
5015
5016#include <pthread.h>
5017
5018void* routine(void* p){return NULL;}
5019
5020int main(){
5021 pthread_t p;
5022 if(pthread_create(&p,NULL,routine,NULL)!=0)
5023 return 1;
5024 (void)pthread_detach(p);
5025 return 0;
5026}
5027
5028_ACEOF
5029rm -f conftest$ac_exeext
5030if { (ac_try="$ac_link"
5031case "(($ac_try" in
5032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5033 *) ac_try_echo=$ac_try;;
5034esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005036 (eval "$ac_link") 2>&5
5037 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5040 { (case "(($ac_try" in
5041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5042 *) ac_try_echo=$ac_try;;
5043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005045 (eval "$ac_try") 2>&5
5046 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005048 (exit $ac_status); }; }; then
5049
5050 ac_cv_pthread_is_default=yes
5051 ac_cv_kthread=no
5052 ac_cv_pthread=no
5053
5054else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005055 echo "$as_me: program exited with status $ac_status" >&5
5056echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005057sed 's/^/| /' conftest.$ac_ext >&5
5058
5059( exit $ac_status )
5060ac_cv_pthread_is_default=no
5061fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5063fi
5064
5065
5066
5067fi
5068
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005069{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5070echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005071
5072
5073if test $ac_cv_pthread_is_default = yes
5074then
5075 ac_cv_kpthread=no
5076else
5077# -Kpthread, if available, provides the right #defines
5078# and linker options to make pthread_create available
5079# Some compilers won't report that they do not support -Kpthread,
5080# so we need to run a program to see whether it really made the
5081# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005082{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5083echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005084if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005085 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005086else
5087 ac_save_cc="$CC"
5088CC="$CC -Kpthread"
5089if test "$cross_compiling" = yes; then
5090 ac_cv_kpthread=no
5091else
5092 cat >conftest.$ac_ext <<_ACEOF
5093/* confdefs.h. */
5094_ACEOF
5095cat confdefs.h >>conftest.$ac_ext
5096cat >>conftest.$ac_ext <<_ACEOF
5097/* end confdefs.h. */
5098
5099#include <pthread.h>
5100
5101void* routine(void* p){return NULL;}
5102
5103int main(){
5104 pthread_t p;
5105 if(pthread_create(&p,NULL,routine,NULL)!=0)
5106 return 1;
5107 (void)pthread_detach(p);
5108 return 0;
5109}
5110
5111_ACEOF
5112rm -f conftest$ac_exeext
5113if { (ac_try="$ac_link"
5114case "(($ac_try" in
5115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5116 *) ac_try_echo=$ac_try;;
5117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005119 (eval "$ac_link") 2>&5
5120 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5123 { (case "(($ac_try" in
5124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5125 *) ac_try_echo=$ac_try;;
5126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005128 (eval "$ac_try") 2>&5
5129 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005131 (exit $ac_status); }; }; then
5132 ac_cv_kpthread=yes
5133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005134 echo "$as_me: program exited with status $ac_status" >&5
5135echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005136sed 's/^/| /' conftest.$ac_ext >&5
5137
5138( exit $ac_status )
5139ac_cv_kpthread=no
5140fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5142fi
5143
5144
5145CC="$ac_save_cc"
5146fi
5147
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005148{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5149echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005150fi
5151
5152if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5153then
5154# -Kthread, if available, provides the right #defines
5155# and linker options to make pthread_create available
5156# Some compilers won't report that they do not support -Kthread,
5157# so we need to run a program to see whether it really made the
5158# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005159{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5160echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005161if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005162 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005163else
5164 ac_save_cc="$CC"
5165CC="$CC -Kthread"
5166if test "$cross_compiling" = yes; then
5167 ac_cv_kthread=no
5168else
5169 cat >conftest.$ac_ext <<_ACEOF
5170/* confdefs.h. */
5171_ACEOF
5172cat confdefs.h >>conftest.$ac_ext
5173cat >>conftest.$ac_ext <<_ACEOF
5174/* end confdefs.h. */
5175
5176#include <pthread.h>
5177
5178void* routine(void* p){return NULL;}
5179
5180int main(){
5181 pthread_t p;
5182 if(pthread_create(&p,NULL,routine,NULL)!=0)
5183 return 1;
5184 (void)pthread_detach(p);
5185 return 0;
5186}
5187
5188_ACEOF
5189rm -f conftest$ac_exeext
5190if { (ac_try="$ac_link"
5191case "(($ac_try" in
5192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5193 *) ac_try_echo=$ac_try;;
5194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005196 (eval "$ac_link") 2>&5
5197 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5200 { (case "(($ac_try" in
5201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5202 *) ac_try_echo=$ac_try;;
5203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005205 (eval "$ac_try") 2>&5
5206 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005208 (exit $ac_status); }; }; then
5209 ac_cv_kthread=yes
5210else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005211 echo "$as_me: program exited with status $ac_status" >&5
5212echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005213sed 's/^/| /' conftest.$ac_ext >&5
5214
5215( exit $ac_status )
5216ac_cv_kthread=no
5217fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5219fi
5220
5221
5222CC="$ac_save_cc"
5223fi
5224
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005225{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5226echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005227fi
5228
5229if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5230then
5231# -pthread, if available, provides the right #defines
5232# and linker options to make pthread_create available
5233# Some compilers won't report that they do not support -pthread,
5234# so we need to run a program to see whether it really made the
5235# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005236{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5237echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005238if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005239 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005240else
5241 ac_save_cc="$CC"
5242CC="$CC -pthread"
5243if test "$cross_compiling" = yes; then
5244 ac_cv_pthread=no
5245else
5246 cat >conftest.$ac_ext <<_ACEOF
5247/* confdefs.h. */
5248_ACEOF
5249cat confdefs.h >>conftest.$ac_ext
5250cat >>conftest.$ac_ext <<_ACEOF
5251/* end confdefs.h. */
5252
5253#include <pthread.h>
5254
5255void* routine(void* p){return NULL;}
5256
5257int main(){
5258 pthread_t p;
5259 if(pthread_create(&p,NULL,routine,NULL)!=0)
5260 return 1;
5261 (void)pthread_detach(p);
5262 return 0;
5263}
5264
5265_ACEOF
5266rm -f conftest$ac_exeext
5267if { (ac_try="$ac_link"
5268case "(($ac_try" in
5269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5270 *) ac_try_echo=$ac_try;;
5271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005273 (eval "$ac_link") 2>&5
5274 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5277 { (case "(($ac_try" in
5278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5279 *) ac_try_echo=$ac_try;;
5280esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005282 (eval "$ac_try") 2>&5
5283 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005285 (exit $ac_status); }; }; then
5286 ac_cv_pthread=yes
5287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005288 echo "$as_me: program exited with status $ac_status" >&5
5289echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005290sed 's/^/| /' conftest.$ac_ext >&5
5291
5292( exit $ac_status )
5293ac_cv_pthread=no
5294fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5296fi
5297
5298
5299CC="$ac_save_cc"
5300fi
5301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005302{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5303echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005304fi
5305
5306# If we have set a CC compiler flag for thread support then
5307# check if it works for CXX, too.
5308ac_cv_cxx_thread=no
5309if test ! -z "$CXX"
5310then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005311{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5312echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005313ac_save_cxx="$CXX"
5314
5315if test "$ac_cv_kpthread" = "yes"
5316then
5317 CXX="$CXX -Kpthread"
5318 ac_cv_cxx_thread=yes
5319elif test "$ac_cv_kthread" = "yes"
5320then
5321 CXX="$CXX -Kthread"
5322 ac_cv_cxx_thread=yes
5323elif test "$ac_cv_pthread" = "yes"
5324then
5325 CXX="$CXX -pthread"
5326 ac_cv_cxx_thread=yes
5327fi
5328
5329if test $ac_cv_cxx_thread = yes
5330then
5331 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5332 $CXX -c conftest.$ac_ext 2>&5
5333 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5334 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5335 then
5336 ac_cv_cxx_thread=yes
5337 else
5338 ac_cv_cxx_thread=no
5339 fi
5340 rm -fr conftest*
5341fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005342{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5343echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005344fi
5345CXX="$ac_save_cxx"
5346
5347
5348# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005349{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5350echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005351if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005352 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005353else
5354 cat >conftest.$ac_ext <<_ACEOF
5355/* confdefs.h. */
5356_ACEOF
5357cat confdefs.h >>conftest.$ac_ext
5358cat >>conftest.$ac_ext <<_ACEOF
5359/* end confdefs.h. */
5360#include <stdlib.h>
5361#include <stdarg.h>
5362#include <string.h>
5363#include <float.h>
5364
5365int
5366main ()
5367{
5368
5369 ;
5370 return 0;
5371}
5372_ACEOF
5373rm -f conftest.$ac_objext
5374if { (ac_try="$ac_compile"
5375case "(($ac_try" in
5376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5377 *) ac_try_echo=$ac_try;;
5378esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005380 (eval "$ac_compile") 2>conftest.er1
5381 ac_status=$?
5382 grep -v '^ *+' conftest.er1 >conftest.err
5383 rm -f conftest.er1
5384 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005386 (exit $ac_status); } && {
5387 test -z "$ac_c_werror_flag" ||
5388 test ! -s conftest.err
5389 } && test -s conftest.$ac_objext; then
5390 ac_cv_header_stdc=yes
5391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005392 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005393sed 's/^/| /' conftest.$ac_ext >&5
5394
5395 ac_cv_header_stdc=no
5396fi
5397
5398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5399
5400if test $ac_cv_header_stdc = yes; then
5401 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5402 cat >conftest.$ac_ext <<_ACEOF
5403/* confdefs.h. */
5404_ACEOF
5405cat confdefs.h >>conftest.$ac_ext
5406cat >>conftest.$ac_ext <<_ACEOF
5407/* end confdefs.h. */
5408#include <string.h>
5409
5410_ACEOF
5411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5412 $EGREP "memchr" >/dev/null 2>&1; then
5413 :
5414else
5415 ac_cv_header_stdc=no
5416fi
Mark Dickinsonab442262009-11-20 19:27:43 +00005417rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005418
5419fi
5420
5421if test $ac_cv_header_stdc = yes; then
5422 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5423 cat >conftest.$ac_ext <<_ACEOF
5424/* confdefs.h. */
5425_ACEOF
5426cat confdefs.h >>conftest.$ac_ext
5427cat >>conftest.$ac_ext <<_ACEOF
5428/* end confdefs.h. */
5429#include <stdlib.h>
5430
5431_ACEOF
5432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5433 $EGREP "free" >/dev/null 2>&1; then
5434 :
5435else
5436 ac_cv_header_stdc=no
5437fi
Mark Dickinsonab442262009-11-20 19:27:43 +00005438rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005439
5440fi
5441
5442if test $ac_cv_header_stdc = yes; then
5443 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5444 if test "$cross_compiling" = yes; then
5445 :
5446else
5447 cat >conftest.$ac_ext <<_ACEOF
5448/* confdefs.h. */
5449_ACEOF
5450cat confdefs.h >>conftest.$ac_ext
5451cat >>conftest.$ac_ext <<_ACEOF
5452/* end confdefs.h. */
5453#include <ctype.h>
5454#include <stdlib.h>
5455#if ((' ' & 0x0FF) == 0x020)
5456# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5457# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5458#else
5459# define ISLOWER(c) \
5460 (('a' <= (c) && (c) <= 'i') \
5461 || ('j' <= (c) && (c) <= 'r') \
5462 || ('s' <= (c) && (c) <= 'z'))
5463# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5464#endif
5465
5466#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5467int
5468main ()
5469{
5470 int i;
5471 for (i = 0; i < 256; i++)
5472 if (XOR (islower (i), ISLOWER (i))
5473 || toupper (i) != TOUPPER (i))
5474 return 2;
5475 return 0;
5476}
5477_ACEOF
5478rm -f conftest$ac_exeext
5479if { (ac_try="$ac_link"
5480case "(($ac_try" in
5481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5482 *) ac_try_echo=$ac_try;;
5483esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005485 (eval "$ac_link") 2>&5
5486 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005488 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5489 { (case "(($ac_try" in
5490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5491 *) ac_try_echo=$ac_try;;
5492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005494 (eval "$ac_try") 2>&5
5495 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005497 (exit $ac_status); }; }; then
5498 :
5499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005500 echo "$as_me: program exited with status $ac_status" >&5
5501echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005502sed 's/^/| /' conftest.$ac_ext >&5
5503
5504( exit $ac_status )
5505ac_cv_header_stdc=no
5506fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5508fi
5509
5510
5511fi
5512fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005513{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5514echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005515if test $ac_cv_header_stdc = yes; then
5516
5517cat >>confdefs.h <<\_ACEOF
5518#define STDC_HEADERS 1
5519_ACEOF
5520
5521fi
5522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005523# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5534 inttypes.h stdint.h unistd.h
5535do
5536as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5537{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5538echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5539if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5540 echo $ECHO_N "(cached) $ECHO_C" >&6
5541else
5542 cat >conftest.$ac_ext <<_ACEOF
5543/* confdefs.h. */
5544_ACEOF
5545cat confdefs.h >>conftest.$ac_ext
5546cat >>conftest.$ac_ext <<_ACEOF
5547/* end confdefs.h. */
5548$ac_includes_default
5549
5550#include <$ac_header>
5551_ACEOF
5552rm -f conftest.$ac_objext
5553if { (ac_try="$ac_compile"
5554case "(($ac_try" in
5555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5556 *) ac_try_echo=$ac_try;;
5557esac
5558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5559 (eval "$ac_compile") 2>conftest.er1
5560 ac_status=$?
5561 grep -v '^ *+' conftest.er1 >conftest.err
5562 rm -f conftest.er1
5563 cat conftest.err >&5
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); } && {
5566 test -z "$ac_c_werror_flag" ||
5567 test ! -s conftest.err
5568 } && test -s conftest.$ac_objext; then
5569 eval "$as_ac_Header=yes"
5570else
5571 echo "$as_me: failed program was:" >&5
5572sed 's/^/| /' conftest.$ac_ext >&5
5573
5574 eval "$as_ac_Header=no"
5575fi
5576
5577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5578fi
5579ac_res=`eval echo '${'$as_ac_Header'}'`
5580 { echo "$as_me:$LINENO: result: $ac_res" >&5
5581echo "${ECHO_T}$ac_res" >&6; }
5582if test `eval echo '${'$as_ac_Header'}'` = yes; then
5583 cat >>confdefs.h <<_ACEOF
5584#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5585_ACEOF
5586
5587fi
5588
5589done
5590
5591
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005592
Martin v. Löwis11437992002-04-12 09:54:03 +00005593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
Anthony Baxter8a560de2004-10-13 15:30:56 +00005628
Martin v. Löwisc3001752005-01-23 09:27:24 +00005629
Martin v. Löwis11017b12006-01-14 18:12:57 +00005630
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005631
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005632
5633
5634
5635
5636
5637
5638
5639
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005640
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005641
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005642
5643
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005644
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005645
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005646for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5647fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005648ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005649shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005650unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005651sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5652sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005653sys/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 +00005654sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005655sys/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 +00005656sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005657bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005658do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005659as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005660if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005661 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5662echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005663if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005665fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005666ac_res=`eval echo '${'$as_ac_Header'}'`
5667 { echo "$as_me:$LINENO: result: $ac_res" >&5
5668echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005669else
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005671{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5672echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005674/* confdefs.h. */
5675_ACEOF
5676cat confdefs.h >>conftest.$ac_ext
5677cat >>conftest.$ac_ext <<_ACEOF
5678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005679$ac_includes_default
5680#include <$ac_header>
5681_ACEOF
5682rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005683if { (ac_try="$ac_compile"
5684case "(($ac_try" in
5685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5686 *) ac_try_echo=$ac_try;;
5687esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005691 grep -v '^ *+' conftest.er1 >conftest.err
5692 rm -f conftest.er1
5693 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005695 (exit $ac_status); } && {
5696 test -z "$ac_c_werror_flag" ||
5697 test ! -s conftest.err
5698 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005699 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005700else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005702sed 's/^/| /' conftest.$ac_ext >&5
5703
Martin v. Löwiseba40652007-08-30 20:10:57 +00005704 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005706
5707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005708{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5709echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005710
5711# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005712{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5713echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005714cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005715/* confdefs.h. */
5716_ACEOF
5717cat confdefs.h >>conftest.$ac_ext
5718cat >>conftest.$ac_ext <<_ACEOF
5719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005720#include <$ac_header>
5721_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005722if { (ac_try="$ac_cpp conftest.$ac_ext"
5723case "(($ac_try" in
5724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5725 *) ac_try_echo=$ac_try;;
5726esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005728 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005730 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005731 rm -f conftest.er1
5732 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005734 (exit $ac_status); } >/dev/null && {
5735 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5736 test ! -s conftest.err
5737 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005738 ac_header_preproc=yes
5739else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005741sed 's/^/| /' conftest.$ac_ext >&5
5742
Martin v. Löwis11437992002-04-12 09:54:03 +00005743 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005745
Martin v. Löwis11437992002-04-12 09:54:03 +00005746rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005747{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5748echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005749
5750# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005751case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5752 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005753 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5754echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5755 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5756echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005757 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005758 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005759 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005760 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5761echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5763echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5765echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5766 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5767echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5768 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5769echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5770 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5771echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005772 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005773## -------------------------------------- ##
5774## Report this to http://bugs.python.org/ ##
5775## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005776_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005777 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005778 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005779esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005780{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5781echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005782if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005783 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005784else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005785 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005786fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005787ac_res=`eval echo '${'$as_ac_Header'}'`
5788 { echo "$as_me:$LINENO: result: $ac_res" >&5
5789echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005790
5791fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005792if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005793 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005794#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005795_ACEOF
5796
5797fi
5798
Guido van Rossum627b2d71993-12-24 10:39:16 +00005799done
5800
Martin v. Löwis11437992002-04-12 09:54:03 +00005801
5802
5803
5804
5805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005806ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005807for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005808 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5809{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5810echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005811if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005812 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005813else
Martin v. Löwis11437992002-04-12 09:54:03 +00005814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005815/* confdefs.h. */
5816_ACEOF
5817cat confdefs.h >>conftest.$ac_ext
5818cat >>conftest.$ac_ext <<_ACEOF
5819/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005820#include <sys/types.h>
5821#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005822
Martin v. Löwis11437992002-04-12 09:54:03 +00005823int
5824main ()
5825{
5826if ((DIR *) 0)
5827return 0;
5828 ;
5829 return 0;
5830}
5831_ACEOF
5832rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005833if { (ac_try="$ac_compile"
5834case "(($ac_try" in
5835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5836 *) ac_try_echo=$ac_try;;
5837esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005839 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005841 grep -v '^ *+' conftest.er1 >conftest.err
5842 rm -f conftest.er1
5843 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005845 (exit $ac_status); } && {
5846 test -z "$ac_c_werror_flag" ||
5847 test ! -s conftest.err
5848 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005849 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005850else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005852sed 's/^/| /' conftest.$ac_ext >&5
5853
Martin v. Löwiseba40652007-08-30 20:10:57 +00005854 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005856
5857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005858fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005859ac_res=`eval echo '${'$as_ac_Header'}'`
5860 { echo "$as_me:$LINENO: result: $ac_res" >&5
5861echo "${ECHO_T}$ac_res" >&6; }
5862if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005863 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005864#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005865_ACEOF
5866
5867ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005868fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005869
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005870done
5871# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5872if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005873 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5874echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005875if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005877else
Martin v. Löwis11437992002-04-12 09:54:03 +00005878 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005880/* confdefs.h. */
5881_ACEOF
5882cat confdefs.h >>conftest.$ac_ext
5883cat >>conftest.$ac_ext <<_ACEOF
5884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005885
Martin v. Löwiseba40652007-08-30 20:10:57 +00005886/* Override any GCC internal prototype to avoid an error.
5887 Use char because int might match the return type of a GCC
5888 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005889#ifdef __cplusplus
5890extern "C"
5891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005892char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005893int
5894main ()
5895{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005896return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005897 ;
5898 return 0;
5899}
5900_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005901for ac_lib in '' dir; do
5902 if test -z "$ac_lib"; then
5903 ac_res="none required"
5904 else
5905 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005907 fi
5908 rm -f conftest.$ac_objext conftest$ac_exeext
5909if { (ac_try="$ac_link"
5910case "(($ac_try" in
5911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5912 *) ac_try_echo=$ac_try;;
5913esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005916 ac_status=$?
5917 grep -v '^ *+' conftest.er1 >conftest.err
5918 rm -f conftest.er1
5919 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005921 (exit $ac_status); } && {
5922 test -z "$ac_c_werror_flag" ||
5923 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005924 } && test -s conftest$ac_exeext &&
5925 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005926 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005927else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005928 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005929sed 's/^/| /' conftest.$ac_ext >&5
5930
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931
Brett Cannon19fab762007-06-02 03:02:29 +00005932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005933
5934rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5935 conftest$ac_exeext
5936 if test "${ac_cv_search_opendir+set}" = set; then
5937 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005939done
5940if test "${ac_cv_search_opendir+set}" = set; then
5941 :
5942else
5943 ac_cv_search_opendir=no
5944fi
5945rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005946LIBS=$ac_func_search_save_LIBS
5947fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005948{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5949echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005950ac_res=$ac_cv_search_opendir
5951if test "$ac_res" != no; then
5952 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005953
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005954fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005955
Michael W. Hudson54241132001-12-07 15:38:26 +00005956else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005957 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5958echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005959if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005960 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005961else
5962 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005964/* confdefs.h. */
5965_ACEOF
5966cat confdefs.h >>conftest.$ac_ext
5967cat >>conftest.$ac_ext <<_ACEOF
5968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005969
Martin v. Löwiseba40652007-08-30 20:10:57 +00005970/* Override any GCC internal prototype to avoid an error.
5971 Use char because int might match the return type of a GCC
5972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005973#ifdef __cplusplus
5974extern "C"
5975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005976char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005977int
5978main ()
5979{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005980return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005981 ;
5982 return 0;
5983}
5984_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985for ac_lib in '' x; do
5986 if test -z "$ac_lib"; then
5987 ac_res="none required"
5988 else
5989 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005990 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005991 fi
5992 rm -f conftest.$ac_objext conftest$ac_exeext
5993if { (ac_try="$ac_link"
5994case "(($ac_try" in
5995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5996 *) ac_try_echo=$ac_try;;
5997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005999 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006000 ac_status=$?
6001 grep -v '^ *+' conftest.er1 >conftest.err
6002 rm -f conftest.er1
6003 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006005 (exit $ac_status); } && {
6006 test -z "$ac_c_werror_flag" ||
6007 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006008 } && test -s conftest$ac_exeext &&
6009 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006010 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006011else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006012 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006013sed 's/^/| /' conftest.$ac_ext >&5
6014
Martin v. Löwiseba40652007-08-30 20:10:57 +00006015
Brett Cannon19fab762007-06-02 03:02:29 +00006016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006017
6018rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6019 conftest$ac_exeext
6020 if test "${ac_cv_search_opendir+set}" = set; then
6021 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006023done
6024if test "${ac_cv_search_opendir+set}" = set; then
6025 :
6026else
6027 ac_cv_search_opendir=no
6028fi
6029rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006030LIBS=$ac_func_search_save_LIBS
6031fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006032{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6033echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006034ac_res=$ac_cv_search_opendir
6035if test "$ac_res" != no; then
6036 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006038fi
6039
6040fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006041
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006042{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6043echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006045 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006046else
6047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006048/* confdefs.h. */
6049_ACEOF
6050cat confdefs.h >>conftest.$ac_ext
6051cat >>conftest.$ac_ext <<_ACEOF
6052/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054int
6055main ()
6056{
6057return makedev(0, 0);
6058 ;
6059 return 0;
6060}
6061_ACEOF
6062rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006063if { (ac_try="$ac_link"
6064case "(($ac_try" in
6065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6066 *) ac_try_echo=$ac_try;;
6067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006069 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006071 grep -v '^ *+' conftest.er1 >conftest.err
6072 rm -f conftest.er1
6073 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006075 (exit $ac_status); } && {
6076 test -z "$ac_c_werror_flag" ||
6077 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006078 } && test -s conftest$ac_exeext &&
6079 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080 ac_cv_header_sys_types_h_makedev=yes
6081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006083sed 's/^/| /' conftest.$ac_ext >&5
6084
Martin v. Löwiseba40652007-08-30 20:10:57 +00006085 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006087
6088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090
6091fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006092{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6093echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094
6095if test $ac_cv_header_sys_types_h_makedev = no; then
6096if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006097 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6098echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006100 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006102{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6103echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104else
6105 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006106{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6107echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006109/* confdefs.h. */
6110_ACEOF
6111cat confdefs.h >>conftest.$ac_ext
6112cat >>conftest.$ac_ext <<_ACEOF
6113/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114$ac_includes_default
6115#include <sys/mkdev.h>
6116_ACEOF
6117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006118if { (ac_try="$ac_compile"
6119case "(($ac_try" in
6120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6121 *) ac_try_echo=$ac_try;;
6122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006126 grep -v '^ *+' conftest.er1 >conftest.err
6127 rm -f conftest.er1
6128 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006130 (exit $ac_status); } && {
6131 test -z "$ac_c_werror_flag" ||
6132 test ! -s conftest.err
6133 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134 ac_header_compiler=yes
6135else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006137sed 's/^/| /' conftest.$ac_ext >&5
6138
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006141
6142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006143{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6144echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145
6146# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006147{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6148echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006150/* confdefs.h. */
6151_ACEOF
6152cat confdefs.h >>conftest.$ac_ext
6153cat >>conftest.$ac_ext <<_ACEOF
6154/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155#include <sys/mkdev.h>
6156_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006157if { (ac_try="$ac_cpp conftest.$ac_ext"
6158case "(($ac_try" in
6159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6160 *) ac_try_echo=$ac_try;;
6161esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006165 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166 rm -f conftest.er1
6167 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006169 (exit $ac_status); } >/dev/null && {
6170 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6171 test ! -s conftest.err
6172 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173 ac_header_preproc=yes
6174else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006176sed 's/^/| /' conftest.$ac_ext >&5
6177
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178 ac_header_preproc=no
6179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006182{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6183echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184
6185# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006186case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6187 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006188 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6189echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6190 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6191echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006192 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006193 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006194 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6201 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6202echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6203 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6204echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6205 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6206echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006207 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006208## -------------------------------------- ##
6209## Report this to http://bugs.python.org/ ##
6210## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006211_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006212 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006213 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006215{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6216echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006218 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219else
6220 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6221fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006222{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6223echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006224
6225fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006226if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227
6228cat >>confdefs.h <<\_ACEOF
6229#define MAJOR_IN_MKDEV 1
6230_ACEOF
6231
6232fi
6233
6234
6235
6236 if test $ac_cv_header_sys_mkdev_h = no; then
6237 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006238 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6239echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006241 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006243{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6244echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245else
6246 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006247{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6248echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006250/* confdefs.h. */
6251_ACEOF
6252cat confdefs.h >>conftest.$ac_ext
6253cat >>conftest.$ac_ext <<_ACEOF
6254/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255$ac_includes_default
6256#include <sys/sysmacros.h>
6257_ACEOF
6258rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006259if { (ac_try="$ac_compile"
6260case "(($ac_try" in
6261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6262 *) ac_try_echo=$ac_try;;
6263esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006267 grep -v '^ *+' conftest.er1 >conftest.err
6268 rm -f conftest.er1
6269 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006271 (exit $ac_status); } && {
6272 test -z "$ac_c_werror_flag" ||
6273 test ! -s conftest.err
6274 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275 ac_header_compiler=yes
6276else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006278sed 's/^/| /' conftest.$ac_ext >&5
6279
Martin v. Löwiseba40652007-08-30 20:10:57 +00006280 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006282
6283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006284{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6285echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286
6287# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006288{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6289echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006291/* confdefs.h. */
6292_ACEOF
6293cat confdefs.h >>conftest.$ac_ext
6294cat >>conftest.$ac_ext <<_ACEOF
6295/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296#include <sys/sysmacros.h>
6297_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006298if { (ac_try="$ac_cpp conftest.$ac_ext"
6299case "(($ac_try" in
6300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6301 *) ac_try_echo=$ac_try;;
6302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006304 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006306 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307 rm -f conftest.er1
6308 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006310 (exit $ac_status); } >/dev/null && {
6311 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6312 test ! -s conftest.err
6313 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314 ac_header_preproc=yes
6315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006317sed 's/^/| /' conftest.$ac_ext >&5
6318
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006319 ac_header_preproc=no
6320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006321
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006323{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6324echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006325
6326# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006327case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6328 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006329 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6330echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6331 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6332echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006333 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006334 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006335 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6342 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6343echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6344 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6345echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6346 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6347echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006348 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006349## -------------------------------------- ##
6350## Report this to http://bugs.python.org/ ##
6351## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006352_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006353 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006354 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006355esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006356{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6357echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006358if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006359 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006360else
6361 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6362fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006363{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6364echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006365
6366fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006367if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006368
6369cat >>confdefs.h <<\_ACEOF
6370#define MAJOR_IN_SYSMACROS 1
6371_ACEOF
6372
6373fi
6374
6375
6376 fi
6377fi
6378
Michael W. Hudson54241132001-12-07 15:38:26 +00006379
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006380# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006381
6382for ac_header in term.h
6383do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006384as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6385{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006387if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006389else
6390 cat >conftest.$ac_ext <<_ACEOF
6391/* confdefs.h. */
6392_ACEOF
6393cat confdefs.h >>conftest.$ac_ext
6394cat >>conftest.$ac_ext <<_ACEOF
6395/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006396
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006397#ifdef HAVE_CURSES_H
6398#include <curses.h>
6399#endif
6400
6401
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006402#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006403_ACEOF
6404rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006405if { (ac_try="$ac_compile"
6406case "(($ac_try" in
6407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6408 *) ac_try_echo=$ac_try;;
6409esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006412 ac_status=$?
6413 grep -v '^ *+' conftest.er1 >conftest.err
6414 rm -f conftest.er1
6415 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006417 (exit $ac_status); } && {
6418 test -z "$ac_c_werror_flag" ||
6419 test ! -s conftest.err
6420 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006421 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006422else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006423 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006424sed 's/^/| /' conftest.$ac_ext >&5
6425
Martin v. Löwiseba40652007-08-30 20:10:57 +00006426 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006428
6429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006430fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006431ac_res=`eval echo '${'$as_ac_Header'}'`
6432 { echo "$as_me:$LINENO: result: $ac_res" >&5
6433echo "${ECHO_T}$ac_res" >&6; }
6434if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006435 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006436#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006437_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006438
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006439fi
6440
6441done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006442
6443
Martin v. Löwis11017b12006-01-14 18:12:57 +00006444# On Linux, netlink.h requires asm/types.h
6445
6446for ac_header in linux/netlink.h
6447do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006448as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6449{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6450echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006451if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006452 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006453else
6454 cat >conftest.$ac_ext <<_ACEOF
6455/* confdefs.h. */
6456_ACEOF
6457cat confdefs.h >>conftest.$ac_ext
6458cat >>conftest.$ac_ext <<_ACEOF
6459/* end confdefs.h. */
6460
6461#ifdef HAVE_ASM_TYPES_H
6462#include <asm/types.h>
6463#endif
6464#ifdef HAVE_SYS_SOCKET_H
6465#include <sys/socket.h>
6466#endif
6467
6468
6469#include <$ac_header>
6470_ACEOF
6471rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006472if { (ac_try="$ac_compile"
6473case "(($ac_try" in
6474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6475 *) ac_try_echo=$ac_try;;
6476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006479 ac_status=$?
6480 grep -v '^ *+' conftest.er1 >conftest.err
6481 rm -f conftest.er1
6482 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006484 (exit $ac_status); } && {
6485 test -z "$ac_c_werror_flag" ||
6486 test ! -s conftest.err
6487 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006488 eval "$as_ac_Header=yes"
6489else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006490 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006491sed 's/^/| /' conftest.$ac_ext >&5
6492
Martin v. Löwiseba40652007-08-30 20:10:57 +00006493 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006495
6496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006497fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006498ac_res=`eval echo '${'$as_ac_Header'}'`
6499 { echo "$as_me:$LINENO: result: $ac_res" >&5
6500echo "${ECHO_T}$ac_res" >&6; }
6501if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006502 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006503#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006504_ACEOF
6505
6506fi
6507
6508done
6509
6510
Guido van Rossum627b2d71993-12-24 10:39:16 +00006511# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006512was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006513{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6514echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006515cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006516/* confdefs.h. */
6517_ACEOF
6518cat confdefs.h >>conftest.$ac_ext
6519cat >>conftest.$ac_ext <<_ACEOF
6520/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006521#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006525 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006526 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006527else
Martin v. Löwis11437992002-04-12 09:54:03 +00006528
6529
6530cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006531#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006532_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006533
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006534
Guido van Rossum627b2d71993-12-24 10:39:16 +00006535fi
Mark Dickinsonab442262009-11-20 19:27:43 +00006536rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006537
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006538{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6539echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006540
Neal Norwitz11690112002-07-30 01:08:28 +00006541# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006542{ echo "$as_me:$LINENO: checking for makedev" >&5
6543echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006544cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006545/* confdefs.h. */
6546_ACEOF
6547cat confdefs.h >>conftest.$ac_ext
6548cat >>conftest.$ac_ext <<_ACEOF
6549/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006550#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006551int
6552main ()
6553{
6554 makedev(0, 0)
6555 ;
6556 return 0;
6557}
6558_ACEOF
6559rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006560if { (ac_try="$ac_link"
6561case "(($ac_try" in
6562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6563 *) ac_try_echo=$ac_try;;
6564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006568 grep -v '^ *+' conftest.er1 >conftest.err
6569 rm -f conftest.er1
6570 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006572 (exit $ac_status); } && {
6573 test -z "$ac_c_werror_flag" ||
6574 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006575 } && test -s conftest$ac_exeext &&
6576 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006577 ac_cv_has_makedev=yes
6578else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006580sed 's/^/| /' conftest.$ac_ext >&5
6581
Martin v. Löwiseba40652007-08-30 20:10:57 +00006582 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006584
6585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006586 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006587if test "$ac_cv_has_makedev" = "no"; then
6588 # we didn't link, try if _OSF_SOURCE will allow us to link
6589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006590/* confdefs.h. */
6591_ACEOF
6592cat confdefs.h >>conftest.$ac_ext
6593cat >>conftest.$ac_ext <<_ACEOF
6594/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006595
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006596#define _OSF_SOURCE 1
6597#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006598
Neal Norwitz11690112002-07-30 01:08:28 +00006599int
6600main ()
6601{
6602 makedev(0, 0)
6603 ;
6604 return 0;
6605}
6606_ACEOF
6607rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006608if { (ac_try="$ac_link"
6609case "(($ac_try" in
6610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6611 *) ac_try_echo=$ac_try;;
6612esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006614 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006616 grep -v '^ *+' conftest.er1 >conftest.err
6617 rm -f conftest.er1
6618 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006620 (exit $ac_status); } && {
6621 test -z "$ac_c_werror_flag" ||
6622 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006623 } && test -s conftest$ac_exeext &&
6624 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006625 ac_cv_has_makedev=yes
6626else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006628sed 's/^/| /' conftest.$ac_ext >&5
6629
Martin v. Löwiseba40652007-08-30 20:10:57 +00006630 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006632
6633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006634 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006635 if test "$ac_cv_has_makedev" = "yes"; then
6636
6637cat >>confdefs.h <<\_ACEOF
6638#define _OSF_SOURCE 1
6639_ACEOF
6640
6641 fi
6642fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006643{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6644echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006645if test "$ac_cv_has_makedev" = "yes"; then
6646
6647cat >>confdefs.h <<\_ACEOF
6648#define HAVE_MAKEDEV 1
6649_ACEOF
6650
6651fi
6652
Martin v. Löwis399a6892002-10-04 10:22:02 +00006653# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6654# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6655# defined, but the compiler does not support pragma redefine_extname,
6656# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6657# structures (such as rlimit64) without declaring them. As a
6658# work-around, disable LFS on such configurations
6659
6660use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006661{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6662echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006663cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006664/* confdefs.h. */
6665_ACEOF
6666cat confdefs.h >>conftest.$ac_ext
6667cat >>conftest.$ac_ext <<_ACEOF
6668/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006669
6670#define _LARGEFILE_SOURCE 1
6671#define _FILE_OFFSET_BITS 64
6672#include <sys/resource.h>
6673
Martin v. Löwis399a6892002-10-04 10:22:02 +00006674int
6675main ()
6676{
6677struct rlimit foo;
6678 ;
6679 return 0;
6680}
6681_ACEOF
6682rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683if { (ac_try="$ac_compile"
6684case "(($ac_try" in
6685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6686 *) ac_try_echo=$ac_try;;
6687esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006691 grep -v '^ *+' conftest.er1 >conftest.err
6692 rm -f conftest.er1
6693 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006695 (exit $ac_status); } && {
6696 test -z "$ac_c_werror_flag" ||
6697 test ! -s conftest.err
6698 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006699 sol_lfs_bug=no
6700else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006702sed 's/^/| /' conftest.$ac_ext >&5
6703
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006706
6707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006708{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6709echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006710if test "$sol_lfs_bug" = "yes"; then
6711 use_lfs=no
6712fi
6713
6714if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006715# Two defines needed to enable largefile support on various platforms
6716# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006717
Martin v. Löwis11437992002-04-12 09:54:03 +00006718cat >>confdefs.h <<\_ACEOF
6719#define _LARGEFILE_SOURCE 1
6720_ACEOF
6721
6722
6723cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006724#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006725_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006726
Martin v. Löwis399a6892002-10-04 10:22:02 +00006727fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006728
Guido van Rossum84e7b241996-08-19 21:59:00 +00006729# Add some code to confdefs.h so that the test for off_t works on SCO
6730cat >> confdefs.h <<\EOF
6731#if defined(SCO_DS)
6732#undef _OFF_T
6733#endif
6734EOF
6735
Guido van Rossumef2255b2000-03-10 22:30:29 +00006736# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006737{ echo "$as_me:$LINENO: checking for mode_t" >&5
6738echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006739if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006740 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006741else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006742 cat >conftest.$ac_ext <<_ACEOF
6743/* confdefs.h. */
6744_ACEOF
6745cat confdefs.h >>conftest.$ac_ext
6746cat >>conftest.$ac_ext <<_ACEOF
6747/* end confdefs.h. */
6748$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006749typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006750int
6751main ()
6752{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006753if ((ac__type_new_ *) 0)
6754 return 0;
6755if (sizeof (ac__type_new_))
6756 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006757 ;
6758 return 0;
6759}
6760_ACEOF
6761rm -f conftest.$ac_objext
6762if { (ac_try="$ac_compile"
6763case "(($ac_try" in
6764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6765 *) ac_try_echo=$ac_try;;
6766esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006768 (eval "$ac_compile") 2>conftest.er1
6769 ac_status=$?
6770 grep -v '^ *+' conftest.er1 >conftest.err
6771 rm -f conftest.er1
6772 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006774 (exit $ac_status); } && {
6775 test -z "$ac_c_werror_flag" ||
6776 test ! -s conftest.err
6777 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006778 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006779else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006781sed 's/^/| /' conftest.$ac_ext >&5
6782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006783 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785
6786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006788{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6789echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6790if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006791 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006792else
Martin v. Löwis11437992002-04-12 09:54:03 +00006793
6794cat >>confdefs.h <<_ACEOF
6795#define mode_t int
6796_ACEOF
6797
6798fi
6799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006800{ echo "$as_me:$LINENO: checking for off_t" >&5
6801echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006802if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006803 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006804else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006805 cat >conftest.$ac_ext <<_ACEOF
6806/* confdefs.h. */
6807_ACEOF
6808cat confdefs.h >>conftest.$ac_ext
6809cat >>conftest.$ac_ext <<_ACEOF
6810/* end confdefs.h. */
6811$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006812typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006813int
6814main ()
6815{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006816if ((ac__type_new_ *) 0)
6817 return 0;
6818if (sizeof (ac__type_new_))
6819 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006820 ;
6821 return 0;
6822}
6823_ACEOF
6824rm -f conftest.$ac_objext
6825if { (ac_try="$ac_compile"
6826case "(($ac_try" in
6827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6828 *) ac_try_echo=$ac_try;;
6829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831 (eval "$ac_compile") 2>conftest.er1
6832 ac_status=$?
6833 grep -v '^ *+' conftest.er1 >conftest.err
6834 rm -f conftest.er1
6835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006837 (exit $ac_status); } && {
6838 test -z "$ac_c_werror_flag" ||
6839 test ! -s conftest.err
6840 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006841 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006844sed 's/^/| /' conftest.$ac_ext >&5
6845
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006846 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006848
6849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006850fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006851{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6852echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6853if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006854 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006855else
Martin v. Löwis11437992002-04-12 09:54:03 +00006856
6857cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006858#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006859_ACEOF
6860
6861fi
6862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006863{ echo "$as_me:$LINENO: checking for pid_t" >&5
6864echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006865if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006866 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006867else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006868 cat >conftest.$ac_ext <<_ACEOF
6869/* confdefs.h. */
6870_ACEOF
6871cat confdefs.h >>conftest.$ac_ext
6872cat >>conftest.$ac_ext <<_ACEOF
6873/* end confdefs.h. */
6874$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006875typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006876int
6877main ()
6878{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006879if ((ac__type_new_ *) 0)
6880 return 0;
6881if (sizeof (ac__type_new_))
6882 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006883 ;
6884 return 0;
6885}
6886_ACEOF
6887rm -f conftest.$ac_objext
6888if { (ac_try="$ac_compile"
6889case "(($ac_try" in
6890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6891 *) ac_try_echo=$ac_try;;
6892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006894 (eval "$ac_compile") 2>conftest.er1
6895 ac_status=$?
6896 grep -v '^ *+' conftest.er1 >conftest.err
6897 rm -f conftest.er1
6898 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006900 (exit $ac_status); } && {
6901 test -z "$ac_c_werror_flag" ||
6902 test ! -s conftest.err
6903 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006904 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006907sed 's/^/| /' conftest.$ac_ext >&5
6908
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006909 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911
6912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006913fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006914{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6915echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6916if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006917 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006918else
Martin v. Löwis11437992002-04-12 09:54:03 +00006919
6920cat >>confdefs.h <<_ACEOF
6921#define pid_t int
6922_ACEOF
6923
6924fi
6925
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006926{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6927echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006928if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006929 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006930else
6931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006932/* confdefs.h. */
6933_ACEOF
6934cat confdefs.h >>conftest.$ac_ext
6935cat >>conftest.$ac_ext <<_ACEOF
6936/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006937#include <sys/types.h>
6938#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940int
6941main ()
6942{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006943return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006944 ;
6945 return 0;
6946}
6947_ACEOF
6948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949if { (ac_try="$ac_compile"
6950case "(($ac_try" in
6951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6952 *) ac_try_echo=$ac_try;;
6953esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006957 grep -v '^ *+' conftest.er1 >conftest.err
6958 rm -f conftest.er1
6959 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006961 (exit $ac_status); } && {
6962 test -z "$ac_c_werror_flag" ||
6963 test ! -s conftest.err
6964 } && test -s conftest.$ac_objext; then
6965 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006966else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006968sed 's/^/| /' conftest.$ac_ext >&5
6969
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006972
6973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006974fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006975{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6976echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006977
Martin v. Löwis11437992002-04-12 09:54:03 +00006978cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006979#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006980_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006981
Michael W. Hudson54241132001-12-07 15:38:26 +00006982
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006983{ echo "$as_me:$LINENO: checking for size_t" >&5
6984echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006985if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006988 cat >conftest.$ac_ext <<_ACEOF
6989/* confdefs.h. */
6990_ACEOF
6991cat confdefs.h >>conftest.$ac_ext
6992cat >>conftest.$ac_ext <<_ACEOF
6993/* end confdefs.h. */
6994$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006995typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006996int
6997main ()
6998{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006999if ((ac__type_new_ *) 0)
7000 return 0;
7001if (sizeof (ac__type_new_))
7002 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007003 ;
7004 return 0;
7005}
7006_ACEOF
7007rm -f conftest.$ac_objext
7008if { (ac_try="$ac_compile"
7009case "(($ac_try" in
7010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7011 *) ac_try_echo=$ac_try;;
7012esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007014 (eval "$ac_compile") 2>conftest.er1
7015 ac_status=$?
7016 grep -v '^ *+' conftest.er1 >conftest.err
7017 rm -f conftest.er1
7018 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007020 (exit $ac_status); } && {
7021 test -z "$ac_c_werror_flag" ||
7022 test ! -s conftest.err
7023 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007024 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007025else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007027sed 's/^/| /' conftest.$ac_ext >&5
7028
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007029 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007031
7032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007033fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007034{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7035echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7036if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007037 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007038else
Martin v. Löwis11437992002-04-12 09:54:03 +00007039
7040cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007041#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007042_ACEOF
7043
7044fi
7045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007046{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7047echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007048if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007049 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007050else
7051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007052/* confdefs.h. */
7053_ACEOF
7054cat confdefs.h >>conftest.$ac_ext
7055cat >>conftest.$ac_ext <<_ACEOF
7056/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007057#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007058
7059_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007061 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062 ac_cv_type_uid_t=yes
7063else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007064 ac_cv_type_uid_t=no
7065fi
Mark Dickinsonab442262009-11-20 19:27:43 +00007066rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007068fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007069{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7070echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007071if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007072
Martin v. Löwis11437992002-04-12 09:54:03 +00007073cat >>confdefs.h <<\_ACEOF
7074#define uid_t int
7075_ACEOF
7076
7077
7078cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007080_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007081
7082fi
7083
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007084
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007085 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7086echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007087if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007088 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007089else
7090 ac_cv_c_uint32_t=no
7091 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7092 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7093 cat >conftest.$ac_ext <<_ACEOF
7094/* confdefs.h. */
7095_ACEOF
7096cat confdefs.h >>conftest.$ac_ext
7097cat >>conftest.$ac_ext <<_ACEOF
7098/* end confdefs.h. */
7099$ac_includes_default
7100int
7101main ()
7102{
7103static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7104test_array [0] = 0
7105
7106 ;
7107 return 0;
7108}
7109_ACEOF
7110rm -f conftest.$ac_objext
7111if { (ac_try="$ac_compile"
7112case "(($ac_try" in
7113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7114 *) ac_try_echo=$ac_try;;
7115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007117 (eval "$ac_compile") 2>conftest.er1
7118 ac_status=$?
7119 grep -v '^ *+' conftest.er1 >conftest.err
7120 rm -f conftest.er1
7121 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007123 (exit $ac_status); } && {
7124 test -z "$ac_c_werror_flag" ||
7125 test ! -s conftest.err
7126 } && test -s conftest.$ac_objext; then
7127 case $ac_type in
7128 uint32_t) ac_cv_c_uint32_t=yes ;;
7129 *) ac_cv_c_uint32_t=$ac_type ;;
7130esac
7131
7132else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007133 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007134sed 's/^/| /' conftest.$ac_ext >&5
7135
7136
7137fi
7138
7139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7140 test "$ac_cv_c_uint32_t" != no && break
7141 done
7142fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007143{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7144echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007145 case $ac_cv_c_uint32_t in #(
7146 no|yes) ;; #(
7147 *)
7148
7149cat >>confdefs.h <<\_ACEOF
7150#define _UINT32_T 1
7151_ACEOF
7152
7153
7154cat >>confdefs.h <<_ACEOF
7155#define uint32_t $ac_cv_c_uint32_t
7156_ACEOF
7157;;
7158 esac
7159
7160
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007161 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7162echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007163if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007164 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007165else
7166 ac_cv_c_uint64_t=no
7167 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7168 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7169 cat >conftest.$ac_ext <<_ACEOF
7170/* confdefs.h. */
7171_ACEOF
7172cat confdefs.h >>conftest.$ac_ext
7173cat >>conftest.$ac_ext <<_ACEOF
7174/* end confdefs.h. */
7175$ac_includes_default
7176int
7177main ()
7178{
7179static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7180test_array [0] = 0
7181
7182 ;
7183 return 0;
7184}
7185_ACEOF
7186rm -f conftest.$ac_objext
7187if { (ac_try="$ac_compile"
7188case "(($ac_try" in
7189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7190 *) ac_try_echo=$ac_try;;
7191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007193 (eval "$ac_compile") 2>conftest.er1
7194 ac_status=$?
7195 grep -v '^ *+' conftest.er1 >conftest.err
7196 rm -f conftest.er1
7197 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007199 (exit $ac_status); } && {
7200 test -z "$ac_c_werror_flag" ||
7201 test ! -s conftest.err
7202 } && test -s conftest.$ac_objext; then
7203 case $ac_type in
7204 uint64_t) ac_cv_c_uint64_t=yes ;;
7205 *) ac_cv_c_uint64_t=$ac_type ;;
7206esac
7207
7208else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007209 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007210sed 's/^/| /' conftest.$ac_ext >&5
7211
7212
7213fi
7214
7215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7216 test "$ac_cv_c_uint64_t" != no && break
7217 done
7218fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007219{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7220echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007221 case $ac_cv_c_uint64_t in #(
7222 no|yes) ;; #(
7223 *)
7224
7225cat >>confdefs.h <<\_ACEOF
7226#define _UINT64_T 1
7227_ACEOF
7228
7229
7230cat >>confdefs.h <<_ACEOF
7231#define uint64_t $ac_cv_c_uint64_t
7232_ACEOF
7233;;
7234 esac
7235
7236
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007237 { echo "$as_me:$LINENO: checking for int32_t" >&5
7238echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007239if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007240 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007241else
7242 ac_cv_c_int32_t=no
7243 for ac_type in 'int32_t' 'int' 'long int' \
7244 'long long int' 'short int' 'signed char'; do
7245 cat >conftest.$ac_ext <<_ACEOF
7246/* confdefs.h. */
7247_ACEOF
7248cat confdefs.h >>conftest.$ac_ext
7249cat >>conftest.$ac_ext <<_ACEOF
7250/* end confdefs.h. */
7251$ac_includes_default
7252int
7253main ()
7254{
7255static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7256test_array [0] = 0
7257
7258 ;
7259 return 0;
7260}
7261_ACEOF
7262rm -f conftest.$ac_objext
7263if { (ac_try="$ac_compile"
7264case "(($ac_try" in
7265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7266 *) ac_try_echo=$ac_try;;
7267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007269 (eval "$ac_compile") 2>conftest.er1
7270 ac_status=$?
7271 grep -v '^ *+' conftest.er1 >conftest.err
7272 rm -f conftest.er1
7273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007275 (exit $ac_status); } && {
7276 test -z "$ac_c_werror_flag" ||
7277 test ! -s conftest.err
7278 } && test -s conftest.$ac_objext; then
7279 cat >conftest.$ac_ext <<_ACEOF
7280/* confdefs.h. */
7281_ACEOF
7282cat confdefs.h >>conftest.$ac_ext
7283cat >>conftest.$ac_ext <<_ACEOF
7284/* end confdefs.h. */
7285$ac_includes_default
7286int
7287main ()
7288{
7289static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007290 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007291test_array [0] = 0
7292
7293 ;
7294 return 0;
7295}
7296_ACEOF
7297rm -f conftest.$ac_objext
7298if { (ac_try="$ac_compile"
7299case "(($ac_try" in
7300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7301 *) ac_try_echo=$ac_try;;
7302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007304 (eval "$ac_compile") 2>conftest.er1
7305 ac_status=$?
7306 grep -v '^ *+' conftest.er1 >conftest.err
7307 rm -f conftest.er1
7308 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007310 (exit $ac_status); } && {
7311 test -z "$ac_c_werror_flag" ||
7312 test ! -s conftest.err
7313 } && test -s conftest.$ac_objext; then
7314 :
7315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007316 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007317sed 's/^/| /' conftest.$ac_ext >&5
7318
7319 case $ac_type in
7320 int32_t) ac_cv_c_int32_t=yes ;;
7321 *) ac_cv_c_int32_t=$ac_type ;;
7322esac
7323
7324fi
7325
7326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007328 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007329sed 's/^/| /' conftest.$ac_ext >&5
7330
7331
7332fi
7333
7334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7335 test "$ac_cv_c_int32_t" != no && break
7336 done
7337fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007338{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7339echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007340 case $ac_cv_c_int32_t in #(
7341 no|yes) ;; #(
7342 *)
7343
7344cat >>confdefs.h <<_ACEOF
7345#define int32_t $ac_cv_c_int32_t
7346_ACEOF
7347;;
7348 esac
7349
7350
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007351 { echo "$as_me:$LINENO: checking for int64_t" >&5
7352echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007353if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007354 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007355else
7356 ac_cv_c_int64_t=no
7357 for ac_type in 'int64_t' 'int' 'long int' \
7358 'long long int' 'short int' 'signed char'; do
7359 cat >conftest.$ac_ext <<_ACEOF
7360/* confdefs.h. */
7361_ACEOF
7362cat confdefs.h >>conftest.$ac_ext
7363cat >>conftest.$ac_ext <<_ACEOF
7364/* end confdefs.h. */
7365$ac_includes_default
7366int
7367main ()
7368{
7369static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7370test_array [0] = 0
7371
7372 ;
7373 return 0;
7374}
7375_ACEOF
7376rm -f conftest.$ac_objext
7377if { (ac_try="$ac_compile"
7378case "(($ac_try" in
7379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7380 *) ac_try_echo=$ac_try;;
7381esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007383 (eval "$ac_compile") 2>conftest.er1
7384 ac_status=$?
7385 grep -v '^ *+' conftest.er1 >conftest.err
7386 rm -f conftest.er1
7387 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007389 (exit $ac_status); } && {
7390 test -z "$ac_c_werror_flag" ||
7391 test ! -s conftest.err
7392 } && test -s conftest.$ac_objext; then
7393 cat >conftest.$ac_ext <<_ACEOF
7394/* confdefs.h. */
7395_ACEOF
7396cat confdefs.h >>conftest.$ac_ext
7397cat >>conftest.$ac_ext <<_ACEOF
7398/* end confdefs.h. */
7399$ac_includes_default
7400int
7401main ()
7402{
7403static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007404 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007405test_array [0] = 0
7406
7407 ;
7408 return 0;
7409}
7410_ACEOF
7411rm -f conftest.$ac_objext
7412if { (ac_try="$ac_compile"
7413case "(($ac_try" in
7414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7415 *) ac_try_echo=$ac_try;;
7416esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007418 (eval "$ac_compile") 2>conftest.er1
7419 ac_status=$?
7420 grep -v '^ *+' conftest.er1 >conftest.err
7421 rm -f conftest.er1
7422 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007424 (exit $ac_status); } && {
7425 test -z "$ac_c_werror_flag" ||
7426 test ! -s conftest.err
7427 } && test -s conftest.$ac_objext; then
7428 :
7429else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007430 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007431sed 's/^/| /' conftest.$ac_ext >&5
7432
7433 case $ac_type in
7434 int64_t) ac_cv_c_int64_t=yes ;;
7435 *) ac_cv_c_int64_t=$ac_type ;;
7436esac
7437
7438fi
7439
7440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7441else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007442 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007443sed 's/^/| /' conftest.$ac_ext >&5
7444
7445
7446fi
7447
7448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7449 test "$ac_cv_c_int64_t" != no && break
7450 done
7451fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007452{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7453echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007454 case $ac_cv_c_int64_t in #(
7455 no|yes) ;; #(
7456 *)
7457
7458cat >>confdefs.h <<_ACEOF
7459#define int64_t $ac_cv_c_int64_t
7460_ACEOF
7461;;
7462 esac
7463
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007464{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7465echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007466if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007467 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007468else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007469 cat >conftest.$ac_ext <<_ACEOF
7470/* confdefs.h. */
7471_ACEOF
7472cat confdefs.h >>conftest.$ac_ext
7473cat >>conftest.$ac_ext <<_ACEOF
7474/* end confdefs.h. */
7475$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007476typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007477int
7478main ()
7479{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007480if ((ac__type_new_ *) 0)
7481 return 0;
7482if (sizeof (ac__type_new_))
7483 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007484 ;
7485 return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext
7489if { (ac_try="$ac_compile"
7490case "(($ac_try" in
7491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7492 *) ac_try_echo=$ac_try;;
7493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007495 (eval "$ac_compile") 2>conftest.er1
7496 ac_status=$?
7497 grep -v '^ *+' conftest.er1 >conftest.err
7498 rm -f conftest.er1
7499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007501 (exit $ac_status); } && {
7502 test -z "$ac_c_werror_flag" ||
7503 test ! -s conftest.err
7504 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007505 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007507 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007508sed 's/^/| /' conftest.$ac_ext >&5
7509
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007510 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007512
7513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007514fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007515{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7516echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7517if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007518
7519cat >>confdefs.h <<\_ACEOF
7520#define HAVE_SSIZE_T 1
7521_ACEOF
7522
7523fi
7524
Jack Jansendd19cf82001-12-06 22:36:17 +00007525
Michael W. Hudson54241132001-12-07 15:38:26 +00007526# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007527# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007528{ echo "$as_me:$LINENO: checking for int" >&5
7529echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7530if test "${ac_cv_type_int+set}" = set; then
7531 echo $ECHO_N "(cached) $ECHO_C" >&6
7532else
7533 cat >conftest.$ac_ext <<_ACEOF
7534/* confdefs.h. */
7535_ACEOF
7536cat confdefs.h >>conftest.$ac_ext
7537cat >>conftest.$ac_ext <<_ACEOF
7538/* end confdefs.h. */
7539$ac_includes_default
7540typedef int ac__type_new_;
7541int
7542main ()
7543{
7544if ((ac__type_new_ *) 0)
7545 return 0;
7546if (sizeof (ac__type_new_))
7547 return 0;
7548 ;
7549 return 0;
7550}
7551_ACEOF
7552rm -f conftest.$ac_objext
7553if { (ac_try="$ac_compile"
7554case "(($ac_try" in
7555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7556 *) ac_try_echo=$ac_try;;
7557esac
7558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7559 (eval "$ac_compile") 2>conftest.er1
7560 ac_status=$?
7561 grep -v '^ *+' conftest.er1 >conftest.err
7562 rm -f conftest.er1
7563 cat conftest.err >&5
7564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7565 (exit $ac_status); } && {
7566 test -z "$ac_c_werror_flag" ||
7567 test ! -s conftest.err
7568 } && test -s conftest.$ac_objext; then
7569 ac_cv_type_int=yes
7570else
7571 echo "$as_me: failed program was:" >&5
7572sed 's/^/| /' conftest.$ac_ext >&5
7573
7574 ac_cv_type_int=no
7575fi
7576
7577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7578fi
7579{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7580echo "${ECHO_T}$ac_cv_type_int" >&6; }
7581
Martin v. Löwiseba40652007-08-30 20:10:57 +00007582# The cast to long int works around a bug in the HP C Compiler
7583# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7584# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7585# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007586{ echo "$as_me:$LINENO: checking size of int" >&5
7587echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007588if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007589 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007590else
Martin v. Löwis11437992002-04-12 09:54:03 +00007591 if test "$cross_compiling" = yes; then
7592 # Depending upon the size, compute the lo and hi bounds.
7593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007594/* confdefs.h. */
7595_ACEOF
7596cat confdefs.h >>conftest.$ac_ext
7597cat >>conftest.$ac_ext <<_ACEOF
7598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007599$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007600 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007601int
7602main ()
7603{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007604static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007605test_array [0] = 0
7606
7607 ;
7608 return 0;
7609}
7610_ACEOF
7611rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007612if { (ac_try="$ac_compile"
7613case "(($ac_try" in
7614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7615 *) ac_try_echo=$ac_try;;
7616esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007620 grep -v '^ *+' conftest.er1 >conftest.err
7621 rm -f conftest.er1
7622 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007624 (exit $ac_status); } && {
7625 test -z "$ac_c_werror_flag" ||
7626 test ! -s conftest.err
7627 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007628 ac_lo=0 ac_mid=0
7629 while :; do
7630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007631/* confdefs.h. */
7632_ACEOF
7633cat confdefs.h >>conftest.$ac_ext
7634cat >>conftest.$ac_ext <<_ACEOF
7635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007636$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007637 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007638int
7639main ()
7640{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007641static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007642test_array [0] = 0
7643
7644 ;
7645 return 0;
7646}
7647_ACEOF
7648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649if { (ac_try="$ac_compile"
7650case "(($ac_try" in
7651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7652 *) ac_try_echo=$ac_try;;
7653esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007657 grep -v '^ *+' conftest.er1 >conftest.err
7658 rm -f conftest.er1
7659 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661 (exit $ac_status); } && {
7662 test -z "$ac_c_werror_flag" ||
7663 test ! -s conftest.err
7664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 ac_hi=$ac_mid; break
7666else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007668sed 's/^/| /' conftest.$ac_ext >&5
7669
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670 ac_lo=`expr $ac_mid + 1`
7671 if test $ac_lo -le $ac_mid; then
7672 ac_lo= ac_hi=
7673 break
7674 fi
7675 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007677
7678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 done
7680else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007682sed 's/^/| /' conftest.$ac_ext >&5
7683
Martin v. Löwiseba40652007-08-30 20:10:57 +00007684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007685/* confdefs.h. */
7686_ACEOF
7687cat confdefs.h >>conftest.$ac_ext
7688cat >>conftest.$ac_ext <<_ACEOF
7689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007690$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007691 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007692int
7693main ()
7694{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007695static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007696test_array [0] = 0
7697
7698 ;
7699 return 0;
7700}
7701_ACEOF
7702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703if { (ac_try="$ac_compile"
7704case "(($ac_try" in
7705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7706 *) ac_try_echo=$ac_try;;
7707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007711 grep -v '^ *+' conftest.er1 >conftest.err
7712 rm -f conftest.er1
7713 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715 (exit $ac_status); } && {
7716 test -z "$ac_c_werror_flag" ||
7717 test ! -s conftest.err
7718 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007719 ac_hi=-1 ac_mid=-1
7720 while :; do
7721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007722/* confdefs.h. */
7723_ACEOF
7724cat confdefs.h >>conftest.$ac_ext
7725cat >>conftest.$ac_ext <<_ACEOF
7726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007727$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007728 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007729int
7730main ()
7731{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007733test_array [0] = 0
7734
7735 ;
7736 return 0;
7737}
7738_ACEOF
7739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740if { (ac_try="$ac_compile"
7741case "(($ac_try" in
7742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7743 *) ac_try_echo=$ac_try;;
7744esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007748 grep -v '^ *+' conftest.er1 >conftest.err
7749 rm -f conftest.er1
7750 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752 (exit $ac_status); } && {
7753 test -z "$ac_c_werror_flag" ||
7754 test ! -s conftest.err
7755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_lo=$ac_mid; break
7757else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007759sed 's/^/| /' conftest.$ac_ext >&5
7760
Martin v. Löwiseba40652007-08-30 20:10:57 +00007761 ac_hi=`expr '(' $ac_mid ')' - 1`
7762 if test $ac_mid -le $ac_hi; then
7763 ac_lo= ac_hi=
7764 break
7765 fi
7766 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007768
7769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 done
7771else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007773sed 's/^/| /' conftest.$ac_ext >&5
7774
Martin v. Löwiseba40652007-08-30 20:10:57 +00007775 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007777
7778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007780
7781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007782# Binary search between lo and hi bounds.
7783while test "x$ac_lo" != "x$ac_hi"; do
7784 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007786/* confdefs.h. */
7787_ACEOF
7788cat confdefs.h >>conftest.$ac_ext
7789cat >>conftest.$ac_ext <<_ACEOF
7790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007791$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007792 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007793int
7794main ()
7795{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007796static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007797test_array [0] = 0
7798
7799 ;
7800 return 0;
7801}
7802_ACEOF
7803rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007804if { (ac_try="$ac_compile"
7805case "(($ac_try" in
7806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7807 *) ac_try_echo=$ac_try;;
7808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007812 grep -v '^ *+' conftest.er1 >conftest.err
7813 rm -f conftest.er1
7814 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007816 (exit $ac_status); } && {
7817 test -z "$ac_c_werror_flag" ||
7818 test ! -s conftest.err
7819 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 ac_hi=$ac_mid
7821else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007823sed 's/^/| /' conftest.$ac_ext >&5
7824
Martin v. Löwiseba40652007-08-30 20:10:57 +00007825 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007827
7828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007829done
7830case $ac_lo in
7831?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007833 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007834See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007835echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007836See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007837 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007838 else
7839 ac_cv_sizeof_int=0
7840 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007841esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007842else
Martin v. Löwis11437992002-04-12 09:54:03 +00007843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007844/* confdefs.h. */
7845_ACEOF
7846cat confdefs.h >>conftest.$ac_ext
7847cat >>conftest.$ac_ext <<_ACEOF
7848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007849$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007850 typedef int ac__type_sizeof_;
7851static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7852static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007853#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007854#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007855int
7856main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007857{
Martin v. Löwis11437992002-04-12 09:54:03 +00007858
7859 FILE *f = fopen ("conftest.val", "w");
7860 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007861 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007862 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007864 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007865 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007866 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007867 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 }
7869 else
7870 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007871 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007872 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007873 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007874 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007876 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007877
7878 ;
7879 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007880}
Martin v. Löwis11437992002-04-12 09:54:03 +00007881_ACEOF
7882rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883if { (ac_try="$ac_link"
7884case "(($ac_try" in
7885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7886 *) ac_try_echo=$ac_try;;
7887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007889 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007893 { (case "(($ac_try" in
7894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7895 *) ac_try_echo=$ac_try;;
7896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007898 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 (exit $ac_status); }; }; then
7902 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007904 echo "$as_me: program exited with status $ac_status" >&5
7905echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007906sed 's/^/| /' conftest.$ac_ext >&5
7907
Martin v. Löwis11437992002-04-12 09:54:03 +00007908( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007910 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007911See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007912echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007913See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007914 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007915 else
7916 ac_cv_sizeof_int=0
7917 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007919rm -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 +00007920fi
7921rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007922fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007923{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7924echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007925
7926
7927
Martin v. Löwis11437992002-04-12 09:54:03 +00007928cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007929#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007930_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007931
7932
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007933{ echo "$as_me:$LINENO: checking for long" >&5
7934echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7935if test "${ac_cv_type_long+set}" = set; then
7936 echo $ECHO_N "(cached) $ECHO_C" >&6
7937else
7938 cat >conftest.$ac_ext <<_ACEOF
7939/* confdefs.h. */
7940_ACEOF
7941cat confdefs.h >>conftest.$ac_ext
7942cat >>conftest.$ac_ext <<_ACEOF
7943/* end confdefs.h. */
7944$ac_includes_default
7945typedef long ac__type_new_;
7946int
7947main ()
7948{
7949if ((ac__type_new_ *) 0)
7950 return 0;
7951if (sizeof (ac__type_new_))
7952 return 0;
7953 ;
7954 return 0;
7955}
7956_ACEOF
7957rm -f conftest.$ac_objext
7958if { (ac_try="$ac_compile"
7959case "(($ac_try" in
7960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7961 *) ac_try_echo=$ac_try;;
7962esac
7963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7964 (eval "$ac_compile") 2>conftest.er1
7965 ac_status=$?
7966 grep -v '^ *+' conftest.er1 >conftest.err
7967 rm -f conftest.er1
7968 cat conftest.err >&5
7969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970 (exit $ac_status); } && {
7971 test -z "$ac_c_werror_flag" ||
7972 test ! -s conftest.err
7973 } && test -s conftest.$ac_objext; then
7974 ac_cv_type_long=yes
7975else
7976 echo "$as_me: failed program was:" >&5
7977sed 's/^/| /' conftest.$ac_ext >&5
7978
7979 ac_cv_type_long=no
7980fi
7981
7982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7983fi
7984{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7985echo "${ECHO_T}$ac_cv_type_long" >&6; }
7986
Martin v. Löwiseba40652007-08-30 20:10:57 +00007987# The cast to long int works around a bug in the HP C Compiler
7988# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7989# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7990# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007991{ echo "$as_me:$LINENO: checking size of long" >&5
7992echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007993if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007994 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007995else
Martin v. Löwis11437992002-04-12 09:54:03 +00007996 if test "$cross_compiling" = yes; then
7997 # Depending upon the size, compute the lo and hi bounds.
7998cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007999/* confdefs.h. */
8000_ACEOF
8001cat confdefs.h >>conftest.$ac_ext
8002cat >>conftest.$ac_ext <<_ACEOF
8003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008004$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008005 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008006int
8007main ()
8008{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008009static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008010test_array [0] = 0
8011
8012 ;
8013 return 0;
8014}
8015_ACEOF
8016rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008017if { (ac_try="$ac_compile"
8018case "(($ac_try" in
8019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8020 *) ac_try_echo=$ac_try;;
8021esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008025 grep -v '^ *+' conftest.er1 >conftest.err
8026 rm -f conftest.er1
8027 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008029 (exit $ac_status); } && {
8030 test -z "$ac_c_werror_flag" ||
8031 test ! -s conftest.err
8032 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008033 ac_lo=0 ac_mid=0
8034 while :; do
8035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008036/* confdefs.h. */
8037_ACEOF
8038cat confdefs.h >>conftest.$ac_ext
8039cat >>conftest.$ac_ext <<_ACEOF
8040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008041$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008042 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008043int
8044main ()
8045{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008046static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008047test_array [0] = 0
8048
8049 ;
8050 return 0;
8051}
8052_ACEOF
8053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054if { (ac_try="$ac_compile"
8055case "(($ac_try" in
8056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8057 *) ac_try_echo=$ac_try;;
8058esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008062 grep -v '^ *+' conftest.er1 >conftest.err
8063 rm -f conftest.er1
8064 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066 (exit $ac_status); } && {
8067 test -z "$ac_c_werror_flag" ||
8068 test ! -s conftest.err
8069 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 ac_hi=$ac_mid; break
8071else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008073sed 's/^/| /' conftest.$ac_ext >&5
8074
Martin v. Löwiseba40652007-08-30 20:10:57 +00008075 ac_lo=`expr $ac_mid + 1`
8076 if test $ac_lo -le $ac_mid; then
8077 ac_lo= ac_hi=
8078 break
8079 fi
8080 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008082
8083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 done
8085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008087sed 's/^/| /' conftest.$ac_ext >&5
8088
Martin v. Löwiseba40652007-08-30 20:10:57 +00008089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008090/* confdefs.h. */
8091_ACEOF
8092cat confdefs.h >>conftest.$ac_ext
8093cat >>conftest.$ac_ext <<_ACEOF
8094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008095$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008096 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008097int
8098main ()
8099{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008100static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008101test_array [0] = 0
8102
8103 ;
8104 return 0;
8105}
8106_ACEOF
8107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108if { (ac_try="$ac_compile"
8109case "(($ac_try" in
8110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8111 *) ac_try_echo=$ac_try;;
8112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008116 grep -v '^ *+' conftest.er1 >conftest.err
8117 rm -f conftest.er1
8118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008120 (exit $ac_status); } && {
8121 test -z "$ac_c_werror_flag" ||
8122 test ! -s conftest.err
8123 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008124 ac_hi=-1 ac_mid=-1
8125 while :; do
8126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008127/* confdefs.h. */
8128_ACEOF
8129cat confdefs.h >>conftest.$ac_ext
8130cat >>conftest.$ac_ext <<_ACEOF
8131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008132$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008133 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008134int
8135main ()
8136{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008137static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008138test_array [0] = 0
8139
8140 ;
8141 return 0;
8142}
8143_ACEOF
8144rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008145if { (ac_try="$ac_compile"
8146case "(($ac_try" in
8147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8148 *) ac_try_echo=$ac_try;;
8149esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008153 grep -v '^ *+' conftest.er1 >conftest.err
8154 rm -f conftest.er1
8155 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008157 (exit $ac_status); } && {
8158 test -z "$ac_c_werror_flag" ||
8159 test ! -s conftest.err
8160 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 ac_lo=$ac_mid; break
8162else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008164sed 's/^/| /' conftest.$ac_ext >&5
8165
Martin v. Löwiseba40652007-08-30 20:10:57 +00008166 ac_hi=`expr '(' $ac_mid ')' - 1`
8167 if test $ac_mid -le $ac_hi; then
8168 ac_lo= ac_hi=
8169 break
8170 fi
8171 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173
8174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008175 done
8176else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008178sed 's/^/| /' conftest.$ac_ext >&5
8179
Martin v. Löwiseba40652007-08-30 20:10:57 +00008180 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008182
8183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008185
8186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008187# Binary search between lo and hi bounds.
8188while test "x$ac_lo" != "x$ac_hi"; do
8189 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8190 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008191/* confdefs.h. */
8192_ACEOF
8193cat confdefs.h >>conftest.$ac_ext
8194cat >>conftest.$ac_ext <<_ACEOF
8195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008196$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008197 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008198int
8199main ()
8200{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008201static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008202test_array [0] = 0
8203
8204 ;
8205 return 0;
8206}
8207_ACEOF
8208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008209if { (ac_try="$ac_compile"
8210case "(($ac_try" in
8211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8212 *) ac_try_echo=$ac_try;;
8213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008217 grep -v '^ *+' conftest.er1 >conftest.err
8218 rm -f conftest.er1
8219 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008221 (exit $ac_status); } && {
8222 test -z "$ac_c_werror_flag" ||
8223 test ! -s conftest.err
8224 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 ac_hi=$ac_mid
8226else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008228sed 's/^/| /' conftest.$ac_ext >&5
8229
Martin v. Löwiseba40652007-08-30 20:10:57 +00008230 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008232
8233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008234done
8235case $ac_lo in
8236?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008238 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008239See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008240echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008241See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008242 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008243 else
8244 ac_cv_sizeof_long=0
8245 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008246esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008247else
Martin v. Löwis11437992002-04-12 09:54:03 +00008248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008249/* confdefs.h. */
8250_ACEOF
8251cat confdefs.h >>conftest.$ac_ext
8252cat >>conftest.$ac_ext <<_ACEOF
8253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008254$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008255 typedef long ac__type_sizeof_;
8256static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8257static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008258#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008259#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008260int
8261main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008262{
Martin v. Löwis11437992002-04-12 09:54:03 +00008263
8264 FILE *f = fopen ("conftest.val", "w");
8265 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008266 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008267 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008268 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008269 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008270 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008271 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008272 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 }
8274 else
8275 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008276 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008277 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008278 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008279 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008281 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008282
8283 ;
8284 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008285}
Martin v. Löwis11437992002-04-12 09:54:03 +00008286_ACEOF
8287rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008288if { (ac_try="$ac_link"
8289case "(($ac_try" in
8290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8291 *) ac_try_echo=$ac_try;;
8292esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008294 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008297 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008298 { (case "(($ac_try" in
8299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8300 *) ac_try_echo=$ac_try;;
8301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008303 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008304 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008306 (exit $ac_status); }; }; then
8307 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008308else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008309 echo "$as_me: program exited with status $ac_status" >&5
8310echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008311sed 's/^/| /' conftest.$ac_ext >&5
8312
Martin v. Löwis11437992002-04-12 09:54:03 +00008313( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008315 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008316See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008317echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008318See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008319 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008320 else
8321 ac_cv_sizeof_long=0
8322 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008324rm -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 +00008325fi
8326rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008327fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008328{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8329echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008330
8331
8332
Martin v. Löwis11437992002-04-12 09:54:03 +00008333cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008334#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008335_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008336
8337
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008338{ echo "$as_me:$LINENO: checking for void *" >&5
8339echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8340if test "${ac_cv_type_void_p+set}" = set; then
8341 echo $ECHO_N "(cached) $ECHO_C" >&6
8342else
8343 cat >conftest.$ac_ext <<_ACEOF
8344/* confdefs.h. */
8345_ACEOF
8346cat confdefs.h >>conftest.$ac_ext
8347cat >>conftest.$ac_ext <<_ACEOF
8348/* end confdefs.h. */
8349$ac_includes_default
8350typedef void * ac__type_new_;
8351int
8352main ()
8353{
8354if ((ac__type_new_ *) 0)
8355 return 0;
8356if (sizeof (ac__type_new_))
8357 return 0;
8358 ;
8359 return 0;
8360}
8361_ACEOF
8362rm -f conftest.$ac_objext
8363if { (ac_try="$ac_compile"
8364case "(($ac_try" in
8365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8366 *) ac_try_echo=$ac_try;;
8367esac
8368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8369 (eval "$ac_compile") 2>conftest.er1
8370 ac_status=$?
8371 grep -v '^ *+' conftest.er1 >conftest.err
8372 rm -f conftest.er1
8373 cat conftest.err >&5
8374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8375 (exit $ac_status); } && {
8376 test -z "$ac_c_werror_flag" ||
8377 test ! -s conftest.err
8378 } && test -s conftest.$ac_objext; then
8379 ac_cv_type_void_p=yes
8380else
8381 echo "$as_me: failed program was:" >&5
8382sed 's/^/| /' conftest.$ac_ext >&5
8383
8384 ac_cv_type_void_p=no
8385fi
8386
8387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8388fi
8389{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8390echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8391
Martin v. Löwiseba40652007-08-30 20:10:57 +00008392# The cast to long int works around a bug in the HP C Compiler
8393# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8394# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8395# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008396{ echo "$as_me:$LINENO: checking size of void *" >&5
8397echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008398if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008399 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008400else
Martin v. Löwis11437992002-04-12 09:54:03 +00008401 if test "$cross_compiling" = yes; then
8402 # Depending upon the size, compute the lo and hi bounds.
8403cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008404/* confdefs.h. */
8405_ACEOF
8406cat confdefs.h >>conftest.$ac_ext
8407cat >>conftest.$ac_ext <<_ACEOF
8408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008409$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008410 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008411int
8412main ()
8413{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008414static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008415test_array [0] = 0
8416
8417 ;
8418 return 0;
8419}
8420_ACEOF
8421rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008422if { (ac_try="$ac_compile"
8423case "(($ac_try" in
8424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8425 *) ac_try_echo=$ac_try;;
8426esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008430 grep -v '^ *+' conftest.er1 >conftest.err
8431 rm -f conftest.er1
8432 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008434 (exit $ac_status); } && {
8435 test -z "$ac_c_werror_flag" ||
8436 test ! -s conftest.err
8437 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 ac_lo=0 ac_mid=0
8439 while :; do
8440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* confdefs.h. */
8442_ACEOF
8443cat confdefs.h >>conftest.$ac_ext
8444cat >>conftest.$ac_ext <<_ACEOF
8445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008446$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008447 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008448int
8449main ()
8450{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008451static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008452test_array [0] = 0
8453
8454 ;
8455 return 0;
8456}
8457_ACEOF
8458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459if { (ac_try="$ac_compile"
8460case "(($ac_try" in
8461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8462 *) ac_try_echo=$ac_try;;
8463esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008467 grep -v '^ *+' conftest.er1 >conftest.err
8468 rm -f conftest.er1
8469 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471 (exit $ac_status); } && {
8472 test -z "$ac_c_werror_flag" ||
8473 test ! -s conftest.err
8474 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_hi=$ac_mid; break
8476else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008478sed 's/^/| /' conftest.$ac_ext >&5
8479
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480 ac_lo=`expr $ac_mid + 1`
8481 if test $ac_lo -le $ac_mid; then
8482 ac_lo= ac_hi=
8483 break
8484 fi
8485 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008487
8488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 done
8490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008492sed 's/^/| /' conftest.$ac_ext >&5
8493
Martin v. Löwiseba40652007-08-30 20:10:57 +00008494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008495/* confdefs.h. */
8496_ACEOF
8497cat confdefs.h >>conftest.$ac_ext
8498cat >>conftest.$ac_ext <<_ACEOF
8499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008500$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008501 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008502int
8503main ()
8504{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008505static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008506test_array [0] = 0
8507
8508 ;
8509 return 0;
8510}
8511_ACEOF
8512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008513if { (ac_try="$ac_compile"
8514case "(($ac_try" in
8515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8516 *) ac_try_echo=$ac_try;;
8517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008521 grep -v '^ *+' conftest.er1 >conftest.err
8522 rm -f conftest.er1
8523 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008525 (exit $ac_status); } && {
8526 test -z "$ac_c_werror_flag" ||
8527 test ! -s conftest.err
8528 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 ac_hi=-1 ac_mid=-1
8530 while :; do
8531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008532/* confdefs.h. */
8533_ACEOF
8534cat confdefs.h >>conftest.$ac_ext
8535cat >>conftest.$ac_ext <<_ACEOF
8536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008537$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008538 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008539int
8540main ()
8541{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008542static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008543test_array [0] = 0
8544
8545 ;
8546 return 0;
8547}
8548_ACEOF
8549rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008550if { (ac_try="$ac_compile"
8551case "(($ac_try" in
8552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8553 *) ac_try_echo=$ac_try;;
8554esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008558 grep -v '^ *+' conftest.er1 >conftest.err
8559 rm -f conftest.er1
8560 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008562 (exit $ac_status); } && {
8563 test -z "$ac_c_werror_flag" ||
8564 test ! -s conftest.err
8565 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ac_lo=$ac_mid; break
8567else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008569sed 's/^/| /' conftest.$ac_ext >&5
8570
Martin v. Löwiseba40652007-08-30 20:10:57 +00008571 ac_hi=`expr '(' $ac_mid ')' - 1`
8572 if test $ac_mid -le $ac_hi; then
8573 ac_lo= ac_hi=
8574 break
8575 fi
8576 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008578
8579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 done
8581else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008583sed 's/^/| /' conftest.$ac_ext >&5
8584
Martin v. Löwiseba40652007-08-30 20:10:57 +00008585 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008587
8588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008590
8591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008592# Binary search between lo and hi bounds.
8593while test "x$ac_lo" != "x$ac_hi"; do
8594 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008596/* confdefs.h. */
8597_ACEOF
8598cat confdefs.h >>conftest.$ac_ext
8599cat >>conftest.$ac_ext <<_ACEOF
8600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008601$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008602 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008603int
8604main ()
8605{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008606static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008607test_array [0] = 0
8608
8609 ;
8610 return 0;
8611}
8612_ACEOF
8613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008614if { (ac_try="$ac_compile"
8615case "(($ac_try" in
8616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8617 *) ac_try_echo=$ac_try;;
8618esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008622 grep -v '^ *+' conftest.er1 >conftest.err
8623 rm -f conftest.er1
8624 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008626 (exit $ac_status); } && {
8627 test -z "$ac_c_werror_flag" ||
8628 test ! -s conftest.err
8629 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ac_hi=$ac_mid
8631else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008633sed 's/^/| /' conftest.$ac_ext >&5
8634
Martin v. Löwiseba40652007-08-30 20:10:57 +00008635 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008637
8638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008639done
8640case $ac_lo in
8641?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008643 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008644See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008645echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008646See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008647 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008648 else
8649 ac_cv_sizeof_void_p=0
8650 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008651esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008652else
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008654/* confdefs.h. */
8655_ACEOF
8656cat confdefs.h >>conftest.$ac_ext
8657cat >>conftest.$ac_ext <<_ACEOF
8658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008659$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008660 typedef void * ac__type_sizeof_;
8661static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8662static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008663#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008664#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008665int
8666main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008667{
Martin v. Löwis11437992002-04-12 09:54:03 +00008668
8669 FILE *f = fopen ("conftest.val", "w");
8670 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008671 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008672 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008674 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008675 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008676 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008677 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 }
8679 else
8680 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008681 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008682 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008683 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008684 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008686 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008687
8688 ;
8689 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008690}
Martin v. Löwis11437992002-04-12 09:54:03 +00008691_ACEOF
8692rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693if { (ac_try="$ac_link"
8694case "(($ac_try" in
8695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8696 *) ac_try_echo=$ac_try;;
8697esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008699 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008703 { (case "(($ac_try" in
8704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8705 *) ac_try_echo=$ac_try;;
8706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008708 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 (exit $ac_status); }; }; then
8712 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008713else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008714 echo "$as_me: program exited with status $ac_status" >&5
8715echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008716sed 's/^/| /' conftest.$ac_ext >&5
8717
Martin v. Löwis11437992002-04-12 09:54:03 +00008718( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008720 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008721See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008722echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008723See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008724 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008725 else
8726 ac_cv_sizeof_void_p=0
8727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729rm -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 +00008730fi
8731rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008732fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008733{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8734echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008735
8736
8737
Martin v. Löwis11437992002-04-12 09:54:03 +00008738cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008739#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008740_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008741
8742
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008743{ echo "$as_me:$LINENO: checking for short" >&5
8744echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8745if test "${ac_cv_type_short+set}" = set; then
8746 echo $ECHO_N "(cached) $ECHO_C" >&6
8747else
8748 cat >conftest.$ac_ext <<_ACEOF
8749/* confdefs.h. */
8750_ACEOF
8751cat confdefs.h >>conftest.$ac_ext
8752cat >>conftest.$ac_ext <<_ACEOF
8753/* end confdefs.h. */
8754$ac_includes_default
8755typedef short ac__type_new_;
8756int
8757main ()
8758{
8759if ((ac__type_new_ *) 0)
8760 return 0;
8761if (sizeof (ac__type_new_))
8762 return 0;
8763 ;
8764 return 0;
8765}
8766_ACEOF
8767rm -f conftest.$ac_objext
8768if { (ac_try="$ac_compile"
8769case "(($ac_try" in
8770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8771 *) ac_try_echo=$ac_try;;
8772esac
8773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8774 (eval "$ac_compile") 2>conftest.er1
8775 ac_status=$?
8776 grep -v '^ *+' conftest.er1 >conftest.err
8777 rm -f conftest.er1
8778 cat conftest.err >&5
8779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8780 (exit $ac_status); } && {
8781 test -z "$ac_c_werror_flag" ||
8782 test ! -s conftest.err
8783 } && test -s conftest.$ac_objext; then
8784 ac_cv_type_short=yes
8785else
8786 echo "$as_me: failed program was:" >&5
8787sed 's/^/| /' conftest.$ac_ext >&5
8788
8789 ac_cv_type_short=no
8790fi
8791
8792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8793fi
8794{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8795echo "${ECHO_T}$ac_cv_type_short" >&6; }
8796
Martin v. Löwiseba40652007-08-30 20:10:57 +00008797# The cast to long int works around a bug in the HP C Compiler
8798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8800# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008801{ echo "$as_me:$LINENO: checking size of short" >&5
8802echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008803if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008804 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008805else
Martin v. Löwis11437992002-04-12 09:54:03 +00008806 if test "$cross_compiling" = yes; then
8807 # Depending upon the size, compute the lo and hi bounds.
8808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008809/* confdefs.h. */
8810_ACEOF
8811cat confdefs.h >>conftest.$ac_ext
8812cat >>conftest.$ac_ext <<_ACEOF
8813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008814$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008815 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008816int
8817main ()
8818{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008819static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008820test_array [0] = 0
8821
8822 ;
8823 return 0;
8824}
8825_ACEOF
8826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008827if { (ac_try="$ac_compile"
8828case "(($ac_try" in
8829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8830 *) ac_try_echo=$ac_try;;
8831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008835 grep -v '^ *+' conftest.er1 >conftest.err
8836 rm -f conftest.er1
8837 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008839 (exit $ac_status); } && {
8840 test -z "$ac_c_werror_flag" ||
8841 test ! -s conftest.err
8842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 ac_lo=0 ac_mid=0
8844 while :; do
8845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008846/* confdefs.h. */
8847_ACEOF
8848cat confdefs.h >>conftest.$ac_ext
8849cat >>conftest.$ac_ext <<_ACEOF
8850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008851$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008852 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008853int
8854main ()
8855{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008856static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008857test_array [0] = 0
8858
8859 ;
8860 return 0;
8861}
8862_ACEOF
8863rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864if { (ac_try="$ac_compile"
8865case "(($ac_try" in
8866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8867 *) ac_try_echo=$ac_try;;
8868esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008872 grep -v '^ *+' conftest.er1 >conftest.err
8873 rm -f conftest.er1
8874 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876 (exit $ac_status); } && {
8877 test -z "$ac_c_werror_flag" ||
8878 test ! -s conftest.err
8879 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_hi=$ac_mid; break
8881else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008883sed 's/^/| /' conftest.$ac_ext >&5
8884
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885 ac_lo=`expr $ac_mid + 1`
8886 if test $ac_lo -le $ac_mid; then
8887 ac_lo= ac_hi=
8888 break
8889 fi
8890 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008892
8893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 done
8895else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008897sed 's/^/| /' conftest.$ac_ext >&5
8898
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008900/* confdefs.h. */
8901_ACEOF
8902cat confdefs.h >>conftest.$ac_ext
8903cat >>conftest.$ac_ext <<_ACEOF
8904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008905$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008906 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008907int
8908main ()
8909{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008910static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008911test_array [0] = 0
8912
8913 ;
8914 return 0;
8915}
8916_ACEOF
8917rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918if { (ac_try="$ac_compile"
8919case "(($ac_try" in
8920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8921 *) ac_try_echo=$ac_try;;
8922esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008926 grep -v '^ *+' conftest.er1 >conftest.err
8927 rm -f conftest.er1
8928 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008930 (exit $ac_status); } && {
8931 test -z "$ac_c_werror_flag" ||
8932 test ! -s conftest.err
8933 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 ac_hi=-1 ac_mid=-1
8935 while :; do
8936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* confdefs.h. */
8938_ACEOF
8939cat confdefs.h >>conftest.$ac_ext
8940cat >>conftest.$ac_ext <<_ACEOF
8941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008943 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008944int
8945main ()
8946{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008947static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008948test_array [0] = 0
8949
8950 ;
8951 return 0;
8952}
8953_ACEOF
8954rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008955if { (ac_try="$ac_compile"
8956case "(($ac_try" in
8957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8958 *) ac_try_echo=$ac_try;;
8959esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008963 grep -v '^ *+' conftest.er1 >conftest.err
8964 rm -f conftest.er1
8965 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967 (exit $ac_status); } && {
8968 test -z "$ac_c_werror_flag" ||
8969 test ! -s conftest.err
8970 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 ac_lo=$ac_mid; break
8972else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008974sed 's/^/| /' conftest.$ac_ext >&5
8975
Martin v. Löwiseba40652007-08-30 20:10:57 +00008976 ac_hi=`expr '(' $ac_mid ')' - 1`
8977 if test $ac_mid -le $ac_hi; then
8978 ac_lo= ac_hi=
8979 break
8980 fi
8981 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008983
8984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 done
8986else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008988sed 's/^/| /' conftest.$ac_ext >&5
8989
Martin v. Löwiseba40652007-08-30 20:10:57 +00008990 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008992
8993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008995
8996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008997# Binary search between lo and hi bounds.
8998while test "x$ac_lo" != "x$ac_hi"; do
8999 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009001/* confdefs.h. */
9002_ACEOF
9003cat confdefs.h >>conftest.$ac_ext
9004cat >>conftest.$ac_ext <<_ACEOF
9005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009006$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009007 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009008int
9009main ()
9010{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009011static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009012test_array [0] = 0
9013
9014 ;
9015 return 0;
9016}
9017_ACEOF
9018rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009019if { (ac_try="$ac_compile"
9020case "(($ac_try" in
9021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9022 *) ac_try_echo=$ac_try;;
9023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009027 grep -v '^ *+' conftest.er1 >conftest.err
9028 rm -f conftest.er1
9029 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009031 (exit $ac_status); } && {
9032 test -z "$ac_c_werror_flag" ||
9033 test ! -s conftest.err
9034 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 ac_hi=$ac_mid
9036else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009037 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009038sed 's/^/| /' conftest.$ac_ext >&5
9039
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009042
9043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009044done
9045case $ac_lo in
9046?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009048 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009049See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009050echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009051See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009052 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009053 else
9054 ac_cv_sizeof_short=0
9055 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009056esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009057else
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009059/* confdefs.h. */
9060_ACEOF
9061cat confdefs.h >>conftest.$ac_ext
9062cat >>conftest.$ac_ext <<_ACEOF
9063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009064$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009065 typedef short ac__type_sizeof_;
9066static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9067static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009068#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009069#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009070int
9071main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009072{
Martin v. Löwis11437992002-04-12 09:54:03 +00009073
9074 FILE *f = fopen ("conftest.val", "w");
9075 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009076 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009077 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009079 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009080 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009082 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 }
9084 else
9085 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009086 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009087 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009088 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009089 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009090 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009091 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009092
9093 ;
9094 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009095}
Martin v. Löwis11437992002-04-12 09:54:03 +00009096_ACEOF
9097rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098if { (ac_try="$ac_link"
9099case "(($ac_try" in
9100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9101 *) ac_try_echo=$ac_try;;
9102esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009104 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009105 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009108 { (case "(($ac_try" in
9109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9110 *) ac_try_echo=$ac_try;;
9111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009113 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 (exit $ac_status); }; }; then
9117 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009119 echo "$as_me: program exited with status $ac_status" >&5
9120echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009121sed 's/^/| /' conftest.$ac_ext >&5
9122
Martin v. Löwis11437992002-04-12 09:54:03 +00009123( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009125 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009126See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009127echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009128See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009129 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009130 else
9131 ac_cv_sizeof_short=0
9132 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009134rm -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 +00009135fi
9136rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009137fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009138{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9139echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009140
9141
9142
Martin v. Löwis11437992002-04-12 09:54:03 +00009143cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009144#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009145_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009146
9147
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009148{ echo "$as_me:$LINENO: checking for float" >&5
9149echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9150if test "${ac_cv_type_float+set}" = set; then
9151 echo $ECHO_N "(cached) $ECHO_C" >&6
9152else
9153 cat >conftest.$ac_ext <<_ACEOF
9154/* confdefs.h. */
9155_ACEOF
9156cat confdefs.h >>conftest.$ac_ext
9157cat >>conftest.$ac_ext <<_ACEOF
9158/* end confdefs.h. */
9159$ac_includes_default
9160typedef float ac__type_new_;
9161int
9162main ()
9163{
9164if ((ac__type_new_ *) 0)
9165 return 0;
9166if (sizeof (ac__type_new_))
9167 return 0;
9168 ;
9169 return 0;
9170}
9171_ACEOF
9172rm -f conftest.$ac_objext
9173if { (ac_try="$ac_compile"
9174case "(($ac_try" in
9175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9176 *) ac_try_echo=$ac_try;;
9177esac
9178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9179 (eval "$ac_compile") 2>conftest.er1
9180 ac_status=$?
9181 grep -v '^ *+' conftest.er1 >conftest.err
9182 rm -f conftest.er1
9183 cat conftest.err >&5
9184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9185 (exit $ac_status); } && {
9186 test -z "$ac_c_werror_flag" ||
9187 test ! -s conftest.err
9188 } && test -s conftest.$ac_objext; then
9189 ac_cv_type_float=yes
9190else
9191 echo "$as_me: failed program was:" >&5
9192sed 's/^/| /' conftest.$ac_ext >&5
9193
9194 ac_cv_type_float=no
9195fi
9196
9197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9198fi
9199{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9200echo "${ECHO_T}$ac_cv_type_float" >&6; }
9201
Martin v. Löwiseba40652007-08-30 20:10:57 +00009202# The cast to long int works around a bug in the HP C Compiler
9203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9205# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009206{ echo "$as_me:$LINENO: checking size of float" >&5
9207echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009208if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009209 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009210else
Martin v. Löwis11437992002-04-12 09:54:03 +00009211 if test "$cross_compiling" = yes; then
9212 # Depending upon the size, compute the lo and hi bounds.
9213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009214/* confdefs.h. */
9215_ACEOF
9216cat confdefs.h >>conftest.$ac_ext
9217cat >>conftest.$ac_ext <<_ACEOF
9218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009219$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009220 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009221int
9222main ()
9223{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009225test_array [0] = 0
9226
9227 ;
9228 return 0;
9229}
9230_ACEOF
9231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009232if { (ac_try="$ac_compile"
9233case "(($ac_try" in
9234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9235 *) ac_try_echo=$ac_try;;
9236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009240 grep -v '^ *+' conftest.er1 >conftest.err
9241 rm -f conftest.er1
9242 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009244 (exit $ac_status); } && {
9245 test -z "$ac_c_werror_flag" ||
9246 test ! -s conftest.err
9247 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009248 ac_lo=0 ac_mid=0
9249 while :; do
9250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009251/* confdefs.h. */
9252_ACEOF
9253cat confdefs.h >>conftest.$ac_ext
9254cat >>conftest.$ac_ext <<_ACEOF
9255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009256$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009257 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009258int
9259main ()
9260{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009262test_array [0] = 0
9263
9264 ;
9265 return 0;
9266}
9267_ACEOF
9268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269if { (ac_try="$ac_compile"
9270case "(($ac_try" in
9271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9272 *) ac_try_echo=$ac_try;;
9273esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009277 grep -v '^ *+' conftest.er1 >conftest.err
9278 rm -f conftest.er1
9279 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281 (exit $ac_status); } && {
9282 test -z "$ac_c_werror_flag" ||
9283 test ! -s conftest.err
9284 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 ac_hi=$ac_mid; break
9286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009288sed 's/^/| /' conftest.$ac_ext >&5
9289
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290 ac_lo=`expr $ac_mid + 1`
9291 if test $ac_lo -le $ac_mid; then
9292 ac_lo= ac_hi=
9293 break
9294 fi
9295 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009297
9298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 done
9300else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009302sed 's/^/| /' conftest.$ac_ext >&5
9303
Martin v. Löwiseba40652007-08-30 20:10:57 +00009304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009305/* confdefs.h. */
9306_ACEOF
9307cat confdefs.h >>conftest.$ac_ext
9308cat >>conftest.$ac_ext <<_ACEOF
9309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009310$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009311 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009312int
9313main ()
9314{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009315static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009316test_array [0] = 0
9317
9318 ;
9319 return 0;
9320}
9321_ACEOF
9322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009323if { (ac_try="$ac_compile"
9324case "(($ac_try" in
9325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9326 *) ac_try_echo=$ac_try;;
9327esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009331 grep -v '^ *+' conftest.er1 >conftest.err
9332 rm -f conftest.er1
9333 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009335 (exit $ac_status); } && {
9336 test -z "$ac_c_werror_flag" ||
9337 test ! -s conftest.err
9338 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009339 ac_hi=-1 ac_mid=-1
9340 while :; do
9341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009342/* confdefs.h. */
9343_ACEOF
9344cat confdefs.h >>conftest.$ac_ext
9345cat >>conftest.$ac_ext <<_ACEOF
9346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009347$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009348 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009349int
9350main ()
9351{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009353test_array [0] = 0
9354
9355 ;
9356 return 0;
9357}
9358_ACEOF
9359rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009360if { (ac_try="$ac_compile"
9361case "(($ac_try" in
9362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9363 *) ac_try_echo=$ac_try;;
9364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009368 grep -v '^ *+' conftest.er1 >conftest.err
9369 rm -f conftest.er1
9370 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372 (exit $ac_status); } && {
9373 test -z "$ac_c_werror_flag" ||
9374 test ! -s conftest.err
9375 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ac_lo=$ac_mid; break
9377else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009379sed 's/^/| /' conftest.$ac_ext >&5
9380
Martin v. Löwiseba40652007-08-30 20:10:57 +00009381 ac_hi=`expr '(' $ac_mid ')' - 1`
9382 if test $ac_mid -le $ac_hi; then
9383 ac_lo= ac_hi=
9384 break
9385 fi
9386 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009388
9389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 done
9391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009393sed 's/^/| /' conftest.$ac_ext >&5
9394
Martin v. Löwiseba40652007-08-30 20:10:57 +00009395 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009397
9398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009400
9401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009402# Binary search between lo and hi bounds.
9403while test "x$ac_lo" != "x$ac_hi"; do
9404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009406/* confdefs.h. */
9407_ACEOF
9408cat confdefs.h >>conftest.$ac_ext
9409cat >>conftest.$ac_ext <<_ACEOF
9410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009411$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009412 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009413int
9414main ()
9415{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009416static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009417test_array [0] = 0
9418
9419 ;
9420 return 0;
9421}
9422_ACEOF
9423rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009424if { (ac_try="$ac_compile"
9425case "(($ac_try" in
9426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9427 *) ac_try_echo=$ac_try;;
9428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009432 grep -v '^ *+' conftest.er1 >conftest.err
9433 rm -f conftest.er1
9434 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009436 (exit $ac_status); } && {
9437 test -z "$ac_c_werror_flag" ||
9438 test ! -s conftest.err
9439 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 ac_hi=$ac_mid
9441else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009443sed 's/^/| /' conftest.$ac_ext >&5
9444
Martin v. Löwiseba40652007-08-30 20:10:57 +00009445 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009447
9448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009449done
9450case $ac_lo in
9451?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009454See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009455echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009456See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009457 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458 else
9459 ac_cv_sizeof_float=0
9460 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009461esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009462else
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009464/* confdefs.h. */
9465_ACEOF
9466cat confdefs.h >>conftest.$ac_ext
9467cat >>conftest.$ac_ext <<_ACEOF
9468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009469$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009470 typedef float ac__type_sizeof_;
9471static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9472static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009473#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009474#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009475int
9476main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009477{
Martin v. Löwis11437992002-04-12 09:54:03 +00009478
9479 FILE *f = fopen ("conftest.val", "w");
9480 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009481 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009482 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009484 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009487 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 }
9489 else
9490 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009491 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009492 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009493 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009494 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009496 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009497
9498 ;
9499 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009500}
Martin v. Löwis11437992002-04-12 09:54:03 +00009501_ACEOF
9502rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503if { (ac_try="$ac_link"
9504case "(($ac_try" in
9505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9506 *) ac_try_echo=$ac_try;;
9507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009513 { (case "(($ac_try" in
9514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9515 *) ac_try_echo=$ac_try;;
9516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009518 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 (exit $ac_status); }; }; then
9522 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009524 echo "$as_me: program exited with status $ac_status" >&5
9525echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009526sed 's/^/| /' conftest.$ac_ext >&5
9527
Martin v. Löwis11437992002-04-12 09:54:03 +00009528( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009530 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009531See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009532echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009533See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009534 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009535 else
9536 ac_cv_sizeof_float=0
9537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539rm -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 +00009540fi
9541rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009542fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009543{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9544echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009545
9546
9547
Martin v. Löwis11437992002-04-12 09:54:03 +00009548cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009549#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009550_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009551
9552
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009553{ echo "$as_me:$LINENO: checking for double" >&5
9554echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9555if test "${ac_cv_type_double+set}" = set; then
9556 echo $ECHO_N "(cached) $ECHO_C" >&6
9557else
9558 cat >conftest.$ac_ext <<_ACEOF
9559/* confdefs.h. */
9560_ACEOF
9561cat confdefs.h >>conftest.$ac_ext
9562cat >>conftest.$ac_ext <<_ACEOF
9563/* end confdefs.h. */
9564$ac_includes_default
9565typedef double ac__type_new_;
9566int
9567main ()
9568{
9569if ((ac__type_new_ *) 0)
9570 return 0;
9571if (sizeof (ac__type_new_))
9572 return 0;
9573 ;
9574 return 0;
9575}
9576_ACEOF
9577rm -f conftest.$ac_objext
9578if { (ac_try="$ac_compile"
9579case "(($ac_try" in
9580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9581 *) ac_try_echo=$ac_try;;
9582esac
9583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9584 (eval "$ac_compile") 2>conftest.er1
9585 ac_status=$?
9586 grep -v '^ *+' conftest.er1 >conftest.err
9587 rm -f conftest.er1
9588 cat conftest.err >&5
9589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9590 (exit $ac_status); } && {
9591 test -z "$ac_c_werror_flag" ||
9592 test ! -s conftest.err
9593 } && test -s conftest.$ac_objext; then
9594 ac_cv_type_double=yes
9595else
9596 echo "$as_me: failed program was:" >&5
9597sed 's/^/| /' conftest.$ac_ext >&5
9598
9599 ac_cv_type_double=no
9600fi
9601
9602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9603fi
9604{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9605echo "${ECHO_T}$ac_cv_type_double" >&6; }
9606
Martin v. Löwiseba40652007-08-30 20:10:57 +00009607# The cast to long int works around a bug in the HP C Compiler
9608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9610# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009611{ echo "$as_me:$LINENO: checking size of double" >&5
9612echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009613if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009614 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009615else
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 if test "$cross_compiling" = yes; then
9617 # Depending upon the size, compute the lo and hi bounds.
9618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009619/* confdefs.h. */
9620_ACEOF
9621cat confdefs.h >>conftest.$ac_ext
9622cat >>conftest.$ac_ext <<_ACEOF
9623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009624$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009625 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009626int
9627main ()
9628{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009630test_array [0] = 0
9631
9632 ;
9633 return 0;
9634}
9635_ACEOF
9636rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009637if { (ac_try="$ac_compile"
9638case "(($ac_try" in
9639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9640 *) ac_try_echo=$ac_try;;
9641esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009645 grep -v '^ *+' conftest.er1 >conftest.err
9646 rm -f conftest.er1
9647 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009649 (exit $ac_status); } && {
9650 test -z "$ac_c_werror_flag" ||
9651 test ! -s conftest.err
9652 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009653 ac_lo=0 ac_mid=0
9654 while :; do
9655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009656/* confdefs.h. */
9657_ACEOF
9658cat confdefs.h >>conftest.$ac_ext
9659cat >>conftest.$ac_ext <<_ACEOF
9660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009661$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009662 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009663int
9664main ()
9665{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009666static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009667test_array [0] = 0
9668
9669 ;
9670 return 0;
9671}
9672_ACEOF
9673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674if { (ac_try="$ac_compile"
9675case "(($ac_try" in
9676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9677 *) ac_try_echo=$ac_try;;
9678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009682 grep -v '^ *+' conftest.er1 >conftest.err
9683 rm -f conftest.er1
9684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686 (exit $ac_status); } && {
9687 test -z "$ac_c_werror_flag" ||
9688 test ! -s conftest.err
9689 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ac_hi=$ac_mid; break
9691else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009693sed 's/^/| /' conftest.$ac_ext >&5
9694
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695 ac_lo=`expr $ac_mid + 1`
9696 if test $ac_lo -le $ac_mid; then
9697 ac_lo= ac_hi=
9698 break
9699 fi
9700 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009702
9703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 done
9705else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009707sed 's/^/| /' conftest.$ac_ext >&5
9708
Martin v. Löwiseba40652007-08-30 20:10:57 +00009709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009710/* confdefs.h. */
9711_ACEOF
9712cat confdefs.h >>conftest.$ac_ext
9713cat >>conftest.$ac_ext <<_ACEOF
9714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009715$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009716 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009717int
9718main ()
9719{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009721test_array [0] = 0
9722
9723 ;
9724 return 0;
9725}
9726_ACEOF
9727rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009728if { (ac_try="$ac_compile"
9729case "(($ac_try" in
9730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9731 *) ac_try_echo=$ac_try;;
9732esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009736 grep -v '^ *+' conftest.er1 >conftest.err
9737 rm -f conftest.er1
9738 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740 (exit $ac_status); } && {
9741 test -z "$ac_c_werror_flag" ||
9742 test ! -s conftest.err
9743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_hi=-1 ac_mid=-1
9745 while :; do
9746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009747/* confdefs.h. */
9748_ACEOF
9749cat confdefs.h >>conftest.$ac_ext
9750cat >>conftest.$ac_ext <<_ACEOF
9751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009753 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009754int
9755main ()
9756{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009757static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009758test_array [0] = 0
9759
9760 ;
9761 return 0;
9762}
9763_ACEOF
9764rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009765if { (ac_try="$ac_compile"
9766case "(($ac_try" in
9767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9768 *) ac_try_echo=$ac_try;;
9769esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009773 grep -v '^ *+' conftest.er1 >conftest.err
9774 rm -f conftest.er1
9775 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777 (exit $ac_status); } && {
9778 test -z "$ac_c_werror_flag" ||
9779 test ! -s conftest.err
9780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ac_lo=$ac_mid; break
9782else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009784sed 's/^/| /' conftest.$ac_ext >&5
9785
Martin v. Löwiseba40652007-08-30 20:10:57 +00009786 ac_hi=`expr '(' $ac_mid ')' - 1`
9787 if test $ac_mid -le $ac_hi; then
9788 ac_lo= ac_hi=
9789 break
9790 fi
9791 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793
9794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 done
9796else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009798sed 's/^/| /' conftest.$ac_ext >&5
9799
Martin v. Löwiseba40652007-08-30 20:10:57 +00009800 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009802
9803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009805
9806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009807# Binary search between lo and hi bounds.
9808while test "x$ac_lo" != "x$ac_hi"; do
9809 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009811/* confdefs.h. */
9812_ACEOF
9813cat confdefs.h >>conftest.$ac_ext
9814cat >>conftest.$ac_ext <<_ACEOF
9815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009816$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009817 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009818int
9819main ()
9820{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009821static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009822test_array [0] = 0
9823
9824 ;
9825 return 0;
9826}
9827_ACEOF
9828rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009829if { (ac_try="$ac_compile"
9830case "(($ac_try" in
9831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9832 *) ac_try_echo=$ac_try;;
9833esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009837 grep -v '^ *+' conftest.er1 >conftest.err
9838 rm -f conftest.er1
9839 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009841 (exit $ac_status); } && {
9842 test -z "$ac_c_werror_flag" ||
9843 test ! -s conftest.err
9844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 ac_hi=$ac_mid
9846else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009848sed 's/^/| /' conftest.$ac_ext >&5
9849
Martin v. Löwiseba40652007-08-30 20:10:57 +00009850 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009852
9853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009854done
9855case $ac_lo in
9856?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009858 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009859See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009860echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009861See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009862 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009863 else
9864 ac_cv_sizeof_double=0
9865 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009866esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009867else
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009869/* confdefs.h. */
9870_ACEOF
9871cat confdefs.h >>conftest.$ac_ext
9872cat >>conftest.$ac_ext <<_ACEOF
9873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009874$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009875 typedef double ac__type_sizeof_;
9876static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9877static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009878#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009879#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009880int
9881main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009882{
Martin v. Löwis11437992002-04-12 09:54:03 +00009883
9884 FILE *f = fopen ("conftest.val", "w");
9885 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009886 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009887 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009889 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009890 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009891 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009892 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 }
9894 else
9895 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009896 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009897 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009898 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009899 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009901 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009902
9903 ;
9904 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009905}
Martin v. Löwis11437992002-04-12 09:54:03 +00009906_ACEOF
9907rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908if { (ac_try="$ac_link"
9909case "(($ac_try" in
9910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9911 *) ac_try_echo=$ac_try;;
9912esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009918 { (case "(($ac_try" in
9919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9920 *) ac_try_echo=$ac_try;;
9921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009923 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 (exit $ac_status); }; }; then
9927 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009928else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009929 echo "$as_me: program exited with status $ac_status" >&5
9930echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009931sed 's/^/| /' conftest.$ac_ext >&5
9932
Martin v. Löwis11437992002-04-12 09:54:03 +00009933( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009935 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009936See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009937echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009938See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009939 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009940 else
9941 ac_cv_sizeof_double=0
9942 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944rm -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 +00009945fi
9946rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009947fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009948{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9949echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009950
9951
9952
Martin v. Löwis11437992002-04-12 09:54:03 +00009953cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009954#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009955_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009956
9957
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009958{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9959echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9960if test "${ac_cv_type_fpos_t+set}" = set; then
9961 echo $ECHO_N "(cached) $ECHO_C" >&6
9962else
9963 cat >conftest.$ac_ext <<_ACEOF
9964/* confdefs.h. */
9965_ACEOF
9966cat confdefs.h >>conftest.$ac_ext
9967cat >>conftest.$ac_ext <<_ACEOF
9968/* end confdefs.h. */
9969$ac_includes_default
9970typedef fpos_t ac__type_new_;
9971int
9972main ()
9973{
9974if ((ac__type_new_ *) 0)
9975 return 0;
9976if (sizeof (ac__type_new_))
9977 return 0;
9978 ;
9979 return 0;
9980}
9981_ACEOF
9982rm -f conftest.$ac_objext
9983if { (ac_try="$ac_compile"
9984case "(($ac_try" in
9985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9986 *) ac_try_echo=$ac_try;;
9987esac
9988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9989 (eval "$ac_compile") 2>conftest.er1
9990 ac_status=$?
9991 grep -v '^ *+' conftest.er1 >conftest.err
9992 rm -f conftest.er1
9993 cat conftest.err >&5
9994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9995 (exit $ac_status); } && {
9996 test -z "$ac_c_werror_flag" ||
9997 test ! -s conftest.err
9998 } && test -s conftest.$ac_objext; then
9999 ac_cv_type_fpos_t=yes
10000else
10001 echo "$as_me: failed program was:" >&5
10002sed 's/^/| /' conftest.$ac_ext >&5
10003
10004 ac_cv_type_fpos_t=no
10005fi
10006
10007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10008fi
10009{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10010echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10011
Martin v. Löwiseba40652007-08-30 20:10:57 +000010012# The cast to long int works around a bug in the HP C Compiler
10013# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10014# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10015# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010016{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10017echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010018if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010019 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010020else
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 if test "$cross_compiling" = yes; then
10022 # Depending upon the size, compute the lo and hi bounds.
10023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010024/* confdefs.h. */
10025_ACEOF
10026cat confdefs.h >>conftest.$ac_ext
10027cat >>conftest.$ac_ext <<_ACEOF
10028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010029$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010030 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010031int
10032main ()
10033{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010034static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010035test_array [0] = 0
10036
10037 ;
10038 return 0;
10039}
10040_ACEOF
10041rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010042if { (ac_try="$ac_compile"
10043case "(($ac_try" in
10044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10045 *) ac_try_echo=$ac_try;;
10046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010050 grep -v '^ *+' conftest.er1 >conftest.err
10051 rm -f conftest.er1
10052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010054 (exit $ac_status); } && {
10055 test -z "$ac_c_werror_flag" ||
10056 test ! -s conftest.err
10057 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010058 ac_lo=0 ac_mid=0
10059 while :; do
10060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010061/* confdefs.h. */
10062_ACEOF
10063cat confdefs.h >>conftest.$ac_ext
10064cat >>conftest.$ac_ext <<_ACEOF
10065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010066$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010067 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010068int
10069main ()
10070{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010071static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010072test_array [0] = 0
10073
10074 ;
10075 return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079if { (ac_try="$ac_compile"
10080case "(($ac_try" in
10081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10082 *) ac_try_echo=$ac_try;;
10083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010087 grep -v '^ *+' conftest.er1 >conftest.err
10088 rm -f conftest.er1
10089 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091 (exit $ac_status); } && {
10092 test -z "$ac_c_werror_flag" ||
10093 test ! -s conftest.err
10094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_hi=$ac_mid; break
10096else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010098sed 's/^/| /' conftest.$ac_ext >&5
10099
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100 ac_lo=`expr $ac_mid + 1`
10101 if test $ac_lo -le $ac_mid; then
10102 ac_lo= ac_hi=
10103 break
10104 fi
10105 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010107
10108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 done
10110else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010112sed 's/^/| /' conftest.$ac_ext >&5
10113
Martin v. Löwiseba40652007-08-30 20:10:57 +000010114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010115/* confdefs.h. */
10116_ACEOF
10117cat confdefs.h >>conftest.$ac_ext
10118cat >>conftest.$ac_ext <<_ACEOF
10119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010120$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010121 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010122int
10123main ()
10124{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010126test_array [0] = 0
10127
10128 ;
10129 return 0;
10130}
10131_ACEOF
10132rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010133if { (ac_try="$ac_compile"
10134case "(($ac_try" in
10135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10136 *) ac_try_echo=$ac_try;;
10137esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010141 grep -v '^ *+' conftest.er1 >conftest.err
10142 rm -f conftest.er1
10143 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010145 (exit $ac_status); } && {
10146 test -z "$ac_c_werror_flag" ||
10147 test ! -s conftest.err
10148 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 ac_hi=-1 ac_mid=-1
10150 while :; do
10151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010152/* confdefs.h. */
10153_ACEOF
10154cat confdefs.h >>conftest.$ac_ext
10155cat >>conftest.$ac_ext <<_ACEOF
10156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010157$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010158 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010159int
10160main ()
10161{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010162static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010163test_array [0] = 0
10164
10165 ;
10166 return 0;
10167}
10168_ACEOF
10169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010170if { (ac_try="$ac_compile"
10171case "(($ac_try" in
10172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10173 *) ac_try_echo=$ac_try;;
10174esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010178 grep -v '^ *+' conftest.er1 >conftest.err
10179 rm -f conftest.er1
10180 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182 (exit $ac_status); } && {
10183 test -z "$ac_c_werror_flag" ||
10184 test ! -s conftest.err
10185 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_lo=$ac_mid; break
10187else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010189sed 's/^/| /' conftest.$ac_ext >&5
10190
Martin v. Löwiseba40652007-08-30 20:10:57 +000010191 ac_hi=`expr '(' $ac_mid ')' - 1`
10192 if test $ac_mid -le $ac_hi; then
10193 ac_lo= ac_hi=
10194 break
10195 fi
10196 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010198
10199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 done
10201else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010203sed 's/^/| /' conftest.$ac_ext >&5
10204
Martin v. Löwiseba40652007-08-30 20:10:57 +000010205 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010207
10208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010210
10211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010212# Binary search between lo and hi bounds.
10213while test "x$ac_lo" != "x$ac_hi"; do
10214 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10215 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010216/* confdefs.h. */
10217_ACEOF
10218cat confdefs.h >>conftest.$ac_ext
10219cat >>conftest.$ac_ext <<_ACEOF
10220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010221$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010222 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010223int
10224main ()
10225{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010226static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010227test_array [0] = 0
10228
10229 ;
10230 return 0;
10231}
10232_ACEOF
10233rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010234if { (ac_try="$ac_compile"
10235case "(($ac_try" in
10236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10237 *) ac_try_echo=$ac_try;;
10238esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010240 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010242 grep -v '^ *+' conftest.er1 >conftest.err
10243 rm -f conftest.er1
10244 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010246 (exit $ac_status); } && {
10247 test -z "$ac_c_werror_flag" ||
10248 test ! -s conftest.err
10249 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ac_hi=$ac_mid
10251else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010253sed 's/^/| /' conftest.$ac_ext >&5
10254
Martin v. Löwiseba40652007-08-30 20:10:57 +000010255 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010257
10258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010259done
10260case $ac_lo in
10261?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010263 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010264See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010265echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010266See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010267 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010268 else
10269 ac_cv_sizeof_fpos_t=0
10270 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010271esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010272else
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010274/* confdefs.h. */
10275_ACEOF
10276cat confdefs.h >>conftest.$ac_ext
10277cat >>conftest.$ac_ext <<_ACEOF
10278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010279$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010280 typedef fpos_t ac__type_sizeof_;
10281static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10282static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010283#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010284#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010285int
10286main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010287{
Martin v. Löwis11437992002-04-12 09:54:03 +000010288
10289 FILE *f = fopen ("conftest.val", "w");
10290 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010291 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010292 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010294 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010295 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010296 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010297 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 }
10299 else
10300 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010301 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010302 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010303 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010304 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010306 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010307
10308 ;
10309 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010310}
Martin v. Löwis11437992002-04-12 09:54:03 +000010311_ACEOF
10312rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010313if { (ac_try="$ac_link"
10314case "(($ac_try" in
10315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10316 *) ac_try_echo=$ac_try;;
10317esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010319 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010323 { (case "(($ac_try" in
10324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10325 *) ac_try_echo=$ac_try;;
10326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010328 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 (exit $ac_status); }; }; then
10332 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010333else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010334 echo "$as_me: program exited with status $ac_status" >&5
10335echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010336sed 's/^/| /' conftest.$ac_ext >&5
10337
Martin v. Löwis11437992002-04-12 09:54:03 +000010338( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010339if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010340 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010341See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010342echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010343See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010344 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010345 else
10346 ac_cv_sizeof_fpos_t=0
10347 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010349rm -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 +000010350fi
10351rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010352fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010353{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10354echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010355
10356
10357
Martin v. Löwis11437992002-04-12 09:54:03 +000010358cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010359#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010360_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010361
Michael W. Hudson54241132001-12-07 15:38:26 +000010362
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010363{ echo "$as_me:$LINENO: checking for size_t" >&5
10364echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10365if test "${ac_cv_type_size_t+set}" = set; then
10366 echo $ECHO_N "(cached) $ECHO_C" >&6
10367else
10368 cat >conftest.$ac_ext <<_ACEOF
10369/* confdefs.h. */
10370_ACEOF
10371cat confdefs.h >>conftest.$ac_ext
10372cat >>conftest.$ac_ext <<_ACEOF
10373/* end confdefs.h. */
10374$ac_includes_default
10375typedef size_t ac__type_new_;
10376int
10377main ()
10378{
10379if ((ac__type_new_ *) 0)
10380 return 0;
10381if (sizeof (ac__type_new_))
10382 return 0;
10383 ;
10384 return 0;
10385}
10386_ACEOF
10387rm -f conftest.$ac_objext
10388if { (ac_try="$ac_compile"
10389case "(($ac_try" in
10390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10391 *) ac_try_echo=$ac_try;;
10392esac
10393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10394 (eval "$ac_compile") 2>conftest.er1
10395 ac_status=$?
10396 grep -v '^ *+' conftest.er1 >conftest.err
10397 rm -f conftest.er1
10398 cat conftest.err >&5
10399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10400 (exit $ac_status); } && {
10401 test -z "$ac_c_werror_flag" ||
10402 test ! -s conftest.err
10403 } && test -s conftest.$ac_objext; then
10404 ac_cv_type_size_t=yes
10405else
10406 echo "$as_me: failed program was:" >&5
10407sed 's/^/| /' conftest.$ac_ext >&5
10408
10409 ac_cv_type_size_t=no
10410fi
10411
10412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10413fi
10414{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10415echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10416
Martin v. Löwiseba40652007-08-30 20:10:57 +000010417# The cast to long int works around a bug in the HP C Compiler
10418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10420# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010421{ echo "$as_me:$LINENO: checking size of size_t" >&5
10422echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010424 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010426 if test "$cross_compiling" = yes; then
10427 # Depending upon the size, compute the lo and hi bounds.
10428cat >conftest.$ac_ext <<_ACEOF
10429/* confdefs.h. */
10430_ACEOF
10431cat confdefs.h >>conftest.$ac_ext
10432cat >>conftest.$ac_ext <<_ACEOF
10433/* end confdefs.h. */
10434$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010435 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436int
10437main ()
10438{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010439static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010440test_array [0] = 0
10441
10442 ;
10443 return 0;
10444}
10445_ACEOF
10446rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010447if { (ac_try="$ac_compile"
10448case "(($ac_try" in
10449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10450 *) ac_try_echo=$ac_try;;
10451esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010454 ac_status=$?
10455 grep -v '^ *+' conftest.er1 >conftest.err
10456 rm -f conftest.er1
10457 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010459 (exit $ac_status); } && {
10460 test -z "$ac_c_werror_flag" ||
10461 test ! -s conftest.err
10462 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010463 ac_lo=0 ac_mid=0
10464 while :; do
10465 cat >conftest.$ac_ext <<_ACEOF
10466/* confdefs.h. */
10467_ACEOF
10468cat confdefs.h >>conftest.$ac_ext
10469cat >>conftest.$ac_ext <<_ACEOF
10470/* end confdefs.h. */
10471$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010472 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010473int
10474main ()
10475{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010476static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477test_array [0] = 0
10478
10479 ;
10480 return 0;
10481}
10482_ACEOF
10483rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010484if { (ac_try="$ac_compile"
10485case "(($ac_try" in
10486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10487 *) ac_try_echo=$ac_try;;
10488esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491 ac_status=$?
10492 grep -v '^ *+' conftest.er1 >conftest.err
10493 rm -f conftest.er1
10494 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010496 (exit $ac_status); } && {
10497 test -z "$ac_c_werror_flag" ||
10498 test ! -s conftest.err
10499 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500 ac_hi=$ac_mid; break
10501else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010502 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010503sed 's/^/| /' conftest.$ac_ext >&5
10504
Martin v. Löwiseba40652007-08-30 20:10:57 +000010505 ac_lo=`expr $ac_mid + 1`
10506 if test $ac_lo -le $ac_mid; then
10507 ac_lo= ac_hi=
10508 break
10509 fi
10510 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010512
10513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514 done
10515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010516 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010517sed 's/^/| /' conftest.$ac_ext >&5
10518
Martin v. Löwiseba40652007-08-30 20:10:57 +000010519 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010520/* confdefs.h. */
10521_ACEOF
10522cat confdefs.h >>conftest.$ac_ext
10523cat >>conftest.$ac_ext <<_ACEOF
10524/* end confdefs.h. */
10525$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010526 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527int
10528main ()
10529{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010530static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010531test_array [0] = 0
10532
10533 ;
10534 return 0;
10535}
10536_ACEOF
10537rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010538if { (ac_try="$ac_compile"
10539case "(($ac_try" in
10540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10541 *) ac_try_echo=$ac_try;;
10542esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010545 ac_status=$?
10546 grep -v '^ *+' conftest.er1 >conftest.err
10547 rm -f conftest.er1
10548 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010550 (exit $ac_status); } && {
10551 test -z "$ac_c_werror_flag" ||
10552 test ! -s conftest.err
10553 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010554 ac_hi=-1 ac_mid=-1
10555 while :; do
10556 cat >conftest.$ac_ext <<_ACEOF
10557/* confdefs.h. */
10558_ACEOF
10559cat confdefs.h >>conftest.$ac_ext
10560cat >>conftest.$ac_ext <<_ACEOF
10561/* end confdefs.h. */
10562$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010563 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564int
10565main ()
10566{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010567static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010568test_array [0] = 0
10569
10570 ;
10571 return 0;
10572}
10573_ACEOF
10574rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010575if { (ac_try="$ac_compile"
10576case "(($ac_try" in
10577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10578 *) ac_try_echo=$ac_try;;
10579esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582 ac_status=$?
10583 grep -v '^ *+' conftest.er1 >conftest.err
10584 rm -f conftest.er1
10585 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010587 (exit $ac_status); } && {
10588 test -z "$ac_c_werror_flag" ||
10589 test ! -s conftest.err
10590 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591 ac_lo=$ac_mid; break
10592else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010593 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594sed 's/^/| /' conftest.$ac_ext >&5
10595
Martin v. Löwiseba40652007-08-30 20:10:57 +000010596 ac_hi=`expr '(' $ac_mid ')' - 1`
10597 if test $ac_mid -le $ac_hi; then
10598 ac_lo= ac_hi=
10599 break
10600 fi
10601 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010603
10604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605 done
10606else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010607 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608sed 's/^/| /' conftest.$ac_ext >&5
10609
Martin v. Löwiseba40652007-08-30 20:10:57 +000010610 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010612
10613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010615
10616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617# Binary search between lo and hi bounds.
10618while test "x$ac_lo" != "x$ac_hi"; do
10619 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10620 cat >conftest.$ac_ext <<_ACEOF
10621/* confdefs.h. */
10622_ACEOF
10623cat confdefs.h >>conftest.$ac_ext
10624cat >>conftest.$ac_ext <<_ACEOF
10625/* end confdefs.h. */
10626$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010627 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628int
10629main ()
10630{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010631static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010632test_array [0] = 0
10633
10634 ;
10635 return 0;
10636}
10637_ACEOF
10638rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010639if { (ac_try="$ac_compile"
10640case "(($ac_try" in
10641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10642 *) ac_try_echo=$ac_try;;
10643esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646 ac_status=$?
10647 grep -v '^ *+' conftest.er1 >conftest.err
10648 rm -f conftest.er1
10649 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010651 (exit $ac_status); } && {
10652 test -z "$ac_c_werror_flag" ||
10653 test ! -s conftest.err
10654 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655 ac_hi=$ac_mid
10656else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010657 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658sed 's/^/| /' conftest.$ac_ext >&5
10659
Martin v. Löwiseba40652007-08-30 20:10:57 +000010660 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010662
10663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010664done
10665case $ac_lo in
10666?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010667'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010668 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010670echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010672 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673 else
10674 ac_cv_sizeof_size_t=0
10675 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010676esac
10677else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678 cat >conftest.$ac_ext <<_ACEOF
10679/* confdefs.h. */
10680_ACEOF
10681cat confdefs.h >>conftest.$ac_ext
10682cat >>conftest.$ac_ext <<_ACEOF
10683/* end confdefs.h. */
10684$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010685 typedef size_t ac__type_sizeof_;
10686static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10687static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010688#include <stdio.h>
10689#include <stdlib.h>
10690int
10691main ()
10692{
10693
10694 FILE *f = fopen ("conftest.val", "w");
10695 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010696 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010697 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010698 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010699 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010700 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010701 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010702 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703 }
10704 else
10705 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010706 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010707 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010708 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010709 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010712
10713 ;
10714 return 0;
10715}
10716_ACEOF
10717rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010718if { (ac_try="$ac_link"
10719case "(($ac_try" in
10720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10721 *) ac_try_echo=$ac_try;;
10722esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010724 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010725 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010727 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010728 { (case "(($ac_try" in
10729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10730 *) ac_try_echo=$ac_try;;
10731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010733 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010734 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010736 (exit $ac_status); }; }; then
10737 ac_cv_sizeof_size_t=`cat conftest.val`
10738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010739 echo "$as_me: program exited with status $ac_status" >&5
10740echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010741sed 's/^/| /' conftest.$ac_ext >&5
10742
10743( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010744if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010745 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010746See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010747echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010748See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010749 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010750 else
10751 ac_cv_sizeof_size_t=0
10752 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010754rm -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 +000010755fi
10756rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010757fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010758{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10759echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010760
10761
10762
Martin v. Löwis18e16552006-02-15 17:27:45 +000010763cat >>confdefs.h <<_ACEOF
10764#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10765_ACEOF
10766
10767
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010768{ echo "$as_me:$LINENO: checking for pid_t" >&5
10769echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10770if test "${ac_cv_type_pid_t+set}" = set; then
10771 echo $ECHO_N "(cached) $ECHO_C" >&6
10772else
10773 cat >conftest.$ac_ext <<_ACEOF
10774/* confdefs.h. */
10775_ACEOF
10776cat confdefs.h >>conftest.$ac_ext
10777cat >>conftest.$ac_ext <<_ACEOF
10778/* end confdefs.h. */
10779$ac_includes_default
10780typedef pid_t ac__type_new_;
10781int
10782main ()
10783{
10784if ((ac__type_new_ *) 0)
10785 return 0;
10786if (sizeof (ac__type_new_))
10787 return 0;
10788 ;
10789 return 0;
10790}
10791_ACEOF
10792rm -f conftest.$ac_objext
10793if { (ac_try="$ac_compile"
10794case "(($ac_try" in
10795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10796 *) ac_try_echo=$ac_try;;
10797esac
10798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10799 (eval "$ac_compile") 2>conftest.er1
10800 ac_status=$?
10801 grep -v '^ *+' conftest.er1 >conftest.err
10802 rm -f conftest.er1
10803 cat conftest.err >&5
10804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10805 (exit $ac_status); } && {
10806 test -z "$ac_c_werror_flag" ||
10807 test ! -s conftest.err
10808 } && test -s conftest.$ac_objext; then
10809 ac_cv_type_pid_t=yes
10810else
10811 echo "$as_me: failed program was:" >&5
10812sed 's/^/| /' conftest.$ac_ext >&5
10813
10814 ac_cv_type_pid_t=no
10815fi
10816
10817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10818fi
10819{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10820echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10821
Christian Heimes951cc0f2008-01-31 23:08:23 +000010822# The cast to long int works around a bug in the HP C Compiler
10823# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10824# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10825# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010826{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10827echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010828if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010829 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010830else
10831 if test "$cross_compiling" = yes; then
10832 # Depending upon the size, compute the lo and hi bounds.
10833cat >conftest.$ac_ext <<_ACEOF
10834/* confdefs.h. */
10835_ACEOF
10836cat confdefs.h >>conftest.$ac_ext
10837cat >>conftest.$ac_ext <<_ACEOF
10838/* end confdefs.h. */
10839$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010840 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010841int
10842main ()
10843{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010844static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010845test_array [0] = 0
10846
10847 ;
10848 return 0;
10849}
10850_ACEOF
10851rm -f conftest.$ac_objext
10852if { (ac_try="$ac_compile"
10853case "(($ac_try" in
10854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10855 *) ac_try_echo=$ac_try;;
10856esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010858 (eval "$ac_compile") 2>conftest.er1
10859 ac_status=$?
10860 grep -v '^ *+' conftest.er1 >conftest.err
10861 rm -f conftest.er1
10862 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010864 (exit $ac_status); } && {
10865 test -z "$ac_c_werror_flag" ||
10866 test ! -s conftest.err
10867 } && test -s conftest.$ac_objext; then
10868 ac_lo=0 ac_mid=0
10869 while :; do
10870 cat >conftest.$ac_ext <<_ACEOF
10871/* confdefs.h. */
10872_ACEOF
10873cat confdefs.h >>conftest.$ac_ext
10874cat >>conftest.$ac_ext <<_ACEOF
10875/* end confdefs.h. */
10876$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010877 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010878int
10879main ()
10880{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010882test_array [0] = 0
10883
10884 ;
10885 return 0;
10886}
10887_ACEOF
10888rm -f conftest.$ac_objext
10889if { (ac_try="$ac_compile"
10890case "(($ac_try" in
10891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10892 *) ac_try_echo=$ac_try;;
10893esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010895 (eval "$ac_compile") 2>conftest.er1
10896 ac_status=$?
10897 grep -v '^ *+' conftest.er1 >conftest.err
10898 rm -f conftest.er1
10899 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010901 (exit $ac_status); } && {
10902 test -z "$ac_c_werror_flag" ||
10903 test ! -s conftest.err
10904 } && test -s conftest.$ac_objext; then
10905 ac_hi=$ac_mid; break
10906else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010907 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010908sed 's/^/| /' conftest.$ac_ext >&5
10909
10910 ac_lo=`expr $ac_mid + 1`
10911 if test $ac_lo -le $ac_mid; then
10912 ac_lo= ac_hi=
10913 break
10914 fi
10915 ac_mid=`expr 2 '*' $ac_mid + 1`
10916fi
10917
10918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10919 done
10920else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010921 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010922sed 's/^/| /' conftest.$ac_ext >&5
10923
10924 cat >conftest.$ac_ext <<_ACEOF
10925/* confdefs.h. */
10926_ACEOF
10927cat confdefs.h >>conftest.$ac_ext
10928cat >>conftest.$ac_ext <<_ACEOF
10929/* end confdefs.h. */
10930$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010931 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010932int
10933main ()
10934{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010935static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010936test_array [0] = 0
10937
10938 ;
10939 return 0;
10940}
10941_ACEOF
10942rm -f conftest.$ac_objext
10943if { (ac_try="$ac_compile"
10944case "(($ac_try" in
10945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10946 *) ac_try_echo=$ac_try;;
10947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010949 (eval "$ac_compile") 2>conftest.er1
10950 ac_status=$?
10951 grep -v '^ *+' conftest.er1 >conftest.err
10952 rm -f conftest.er1
10953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010955 (exit $ac_status); } && {
10956 test -z "$ac_c_werror_flag" ||
10957 test ! -s conftest.err
10958 } && test -s conftest.$ac_objext; then
10959 ac_hi=-1 ac_mid=-1
10960 while :; do
10961 cat >conftest.$ac_ext <<_ACEOF
10962/* confdefs.h. */
10963_ACEOF
10964cat confdefs.h >>conftest.$ac_ext
10965cat >>conftest.$ac_ext <<_ACEOF
10966/* end confdefs.h. */
10967$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010968 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010969int
10970main ()
10971{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010972static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010973test_array [0] = 0
10974
10975 ;
10976 return 0;
10977}
10978_ACEOF
10979rm -f conftest.$ac_objext
10980if { (ac_try="$ac_compile"
10981case "(($ac_try" in
10982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10983 *) ac_try_echo=$ac_try;;
10984esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010986 (eval "$ac_compile") 2>conftest.er1
10987 ac_status=$?
10988 grep -v '^ *+' conftest.er1 >conftest.err
10989 rm -f conftest.er1
10990 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010992 (exit $ac_status); } && {
10993 test -z "$ac_c_werror_flag" ||
10994 test ! -s conftest.err
10995 } && test -s conftest.$ac_objext; then
10996 ac_lo=$ac_mid; break
10997else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010998 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010999sed 's/^/| /' conftest.$ac_ext >&5
11000
11001 ac_hi=`expr '(' $ac_mid ')' - 1`
11002 if test $ac_mid -le $ac_hi; then
11003 ac_lo= ac_hi=
11004 break
11005 fi
11006 ac_mid=`expr 2 '*' $ac_mid`
11007fi
11008
11009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11010 done
11011else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011012 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011013sed 's/^/| /' conftest.$ac_ext >&5
11014
11015 ac_lo= ac_hi=
11016fi
11017
11018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11019fi
11020
11021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11022# Binary search between lo and hi bounds.
11023while test "x$ac_lo" != "x$ac_hi"; do
11024 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11025 cat >conftest.$ac_ext <<_ACEOF
11026/* confdefs.h. */
11027_ACEOF
11028cat confdefs.h >>conftest.$ac_ext
11029cat >>conftest.$ac_ext <<_ACEOF
11030/* end confdefs.h. */
11031$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011032 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011033int
11034main ()
11035{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011036static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011037test_array [0] = 0
11038
11039 ;
11040 return 0;
11041}
11042_ACEOF
11043rm -f conftest.$ac_objext
11044if { (ac_try="$ac_compile"
11045case "(($ac_try" in
11046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11047 *) ac_try_echo=$ac_try;;
11048esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011050 (eval "$ac_compile") 2>conftest.er1
11051 ac_status=$?
11052 grep -v '^ *+' conftest.er1 >conftest.err
11053 rm -f conftest.er1
11054 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011056 (exit $ac_status); } && {
11057 test -z "$ac_c_werror_flag" ||
11058 test ! -s conftest.err
11059 } && test -s conftest.$ac_objext; then
11060 ac_hi=$ac_mid
11061else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011062 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011063sed 's/^/| /' conftest.$ac_ext >&5
11064
11065 ac_lo=`expr '(' $ac_mid ')' + 1`
11066fi
11067
11068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11069done
11070case $ac_lo in
11071?*) ac_cv_sizeof_pid_t=$ac_lo;;
11072'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011073 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011074See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011075echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011076See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011077 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011078 else
11079 ac_cv_sizeof_pid_t=0
11080 fi ;;
11081esac
11082else
11083 cat >conftest.$ac_ext <<_ACEOF
11084/* confdefs.h. */
11085_ACEOF
11086cat confdefs.h >>conftest.$ac_ext
11087cat >>conftest.$ac_ext <<_ACEOF
11088/* end confdefs.h. */
11089$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011090 typedef pid_t ac__type_sizeof_;
11091static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11092static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011093#include <stdio.h>
11094#include <stdlib.h>
11095int
11096main ()
11097{
11098
11099 FILE *f = fopen ("conftest.val", "w");
11100 if (! f)
11101 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011102 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011103 {
11104 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011105 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011106 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011107 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011108 }
11109 else
11110 {
11111 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011112 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011113 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011114 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011115 }
11116 return ferror (f) || fclose (f) != 0;
11117
11118 ;
11119 return 0;
11120}
11121_ACEOF
11122rm -f conftest$ac_exeext
11123if { (ac_try="$ac_link"
11124case "(($ac_try" in
11125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11126 *) ac_try_echo=$ac_try;;
11127esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011129 (eval "$ac_link") 2>&5
11130 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11133 { (case "(($ac_try" in
11134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11135 *) ac_try_echo=$ac_try;;
11136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011138 (eval "$ac_try") 2>&5
11139 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011141 (exit $ac_status); }; }; then
11142 ac_cv_sizeof_pid_t=`cat conftest.val`
11143else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011144 echo "$as_me: program exited with status $ac_status" >&5
11145echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011146sed 's/^/| /' conftest.$ac_ext >&5
11147
11148( exit $ac_status )
11149if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011150 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011151See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011152echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011153See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011154 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011155 else
11156 ac_cv_sizeof_pid_t=0
11157 fi
11158fi
11159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11160fi
11161rm -f conftest.val
11162fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011163{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11164echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011165
11166
11167
11168cat >>confdefs.h <<_ACEOF
11169#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11170_ACEOF
11171
11172
Michael W. Hudson54241132001-12-07 15:38:26 +000011173
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011174{ echo "$as_me:$LINENO: checking for long long support" >&5
11175echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011176have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011178/* confdefs.h. */
11179_ACEOF
11180cat confdefs.h >>conftest.$ac_ext
11181cat >>conftest.$ac_ext <<_ACEOF
11182/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011183
Martin v. Löwis11437992002-04-12 09:54:03 +000011184int
11185main ()
11186{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011187long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 ;
11189 return 0;
11190}
11191_ACEOF
11192rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011193if { (ac_try="$ac_compile"
11194case "(($ac_try" in
11195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11196 *) ac_try_echo=$ac_try;;
11197esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011201 grep -v '^ *+' conftest.er1 >conftest.err
11202 rm -f conftest.er1
11203 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011205 (exit $ac_status); } && {
11206 test -z "$ac_c_werror_flag" ||
11207 test ! -s conftest.err
11208 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011209
11210
11211cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011212#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011213_ACEOF
11214
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011215 have_long_long=yes
11216
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011219sed 's/^/| /' conftest.$ac_ext >&5
11220
Martin v. Löwiseba40652007-08-30 20:10:57 +000011221
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011223
11224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011225{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11226echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011227if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011228{ echo "$as_me:$LINENO: checking for long long" >&5
11229echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11230if test "${ac_cv_type_long_long+set}" = set; then
11231 echo $ECHO_N "(cached) $ECHO_C" >&6
11232else
11233 cat >conftest.$ac_ext <<_ACEOF
11234/* confdefs.h. */
11235_ACEOF
11236cat confdefs.h >>conftest.$ac_ext
11237cat >>conftest.$ac_ext <<_ACEOF
11238/* end confdefs.h. */
11239$ac_includes_default
11240typedef long long ac__type_new_;
11241int
11242main ()
11243{
11244if ((ac__type_new_ *) 0)
11245 return 0;
11246if (sizeof (ac__type_new_))
11247 return 0;
11248 ;
11249 return 0;
11250}
11251_ACEOF
11252rm -f conftest.$ac_objext
11253if { (ac_try="$ac_compile"
11254case "(($ac_try" in
11255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11256 *) ac_try_echo=$ac_try;;
11257esac
11258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11259 (eval "$ac_compile") 2>conftest.er1
11260 ac_status=$?
11261 grep -v '^ *+' conftest.er1 >conftest.err
11262 rm -f conftest.er1
11263 cat conftest.err >&5
11264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11265 (exit $ac_status); } && {
11266 test -z "$ac_c_werror_flag" ||
11267 test ! -s conftest.err
11268 } && test -s conftest.$ac_objext; then
11269 ac_cv_type_long_long=yes
11270else
11271 echo "$as_me: failed program was:" >&5
11272sed 's/^/| /' conftest.$ac_ext >&5
11273
11274 ac_cv_type_long_long=no
11275fi
11276
11277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11278fi
11279{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11280echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11281
Martin v. Löwiseba40652007-08-30 20:10:57 +000011282# The cast to long int works around a bug in the HP C Compiler
11283# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11284# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11285# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011286{ echo "$as_me:$LINENO: checking size of long long" >&5
11287echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011288if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011289 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011290else
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 if test "$cross_compiling" = yes; then
11292 # Depending upon the size, compute the lo and hi bounds.
11293cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011294/* confdefs.h. */
11295_ACEOF
11296cat confdefs.h >>conftest.$ac_ext
11297cat >>conftest.$ac_ext <<_ACEOF
11298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011299$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011300 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011301int
11302main ()
11303{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011304static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011305test_array [0] = 0
11306
11307 ;
11308 return 0;
11309}
11310_ACEOF
11311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011312if { (ac_try="$ac_compile"
11313case "(($ac_try" in
11314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11315 *) ac_try_echo=$ac_try;;
11316esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011320 grep -v '^ *+' conftest.er1 >conftest.err
11321 rm -f conftest.er1
11322 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011324 (exit $ac_status); } && {
11325 test -z "$ac_c_werror_flag" ||
11326 test ! -s conftest.err
11327 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 ac_lo=0 ac_mid=0
11329 while :; do
11330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011331/* confdefs.h. */
11332_ACEOF
11333cat confdefs.h >>conftest.$ac_ext
11334cat >>conftest.$ac_ext <<_ACEOF
11335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011336$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011337 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011338int
11339main ()
11340{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011342test_array [0] = 0
11343
11344 ;
11345 return 0;
11346}
11347_ACEOF
11348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349if { (ac_try="$ac_compile"
11350case "(($ac_try" in
11351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11352 *) ac_try_echo=$ac_try;;
11353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011357 grep -v '^ *+' conftest.er1 >conftest.err
11358 rm -f conftest.er1
11359 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011361 (exit $ac_status); } && {
11362 test -z "$ac_c_werror_flag" ||
11363 test ! -s conftest.err
11364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ac_hi=$ac_mid; break
11366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011368sed 's/^/| /' conftest.$ac_ext >&5
11369
Martin v. Löwiseba40652007-08-30 20:10:57 +000011370 ac_lo=`expr $ac_mid + 1`
11371 if test $ac_lo -le $ac_mid; then
11372 ac_lo= ac_hi=
11373 break
11374 fi
11375 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011377
11378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 done
11380else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011382sed 's/^/| /' conftest.$ac_ext >&5
11383
Martin v. Löwiseba40652007-08-30 20:10:57 +000011384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011385/* confdefs.h. */
11386_ACEOF
11387cat confdefs.h >>conftest.$ac_ext
11388cat >>conftest.$ac_ext <<_ACEOF
11389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011390$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011391 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011392int
11393main ()
11394{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011395static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011396test_array [0] = 0
11397
11398 ;
11399 return 0;
11400}
11401_ACEOF
11402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011403if { (ac_try="$ac_compile"
11404case "(($ac_try" in
11405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11406 *) ac_try_echo=$ac_try;;
11407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011411 grep -v '^ *+' conftest.er1 >conftest.err
11412 rm -f conftest.er1
11413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011415 (exit $ac_status); } && {
11416 test -z "$ac_c_werror_flag" ||
11417 test ! -s conftest.err
11418 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011419 ac_hi=-1 ac_mid=-1
11420 while :; do
11421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011422/* confdefs.h. */
11423_ACEOF
11424cat confdefs.h >>conftest.$ac_ext
11425cat >>conftest.$ac_ext <<_ACEOF
11426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011427$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011428 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011429int
11430main ()
11431{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011433test_array [0] = 0
11434
11435 ;
11436 return 0;
11437}
11438_ACEOF
11439rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011440if { (ac_try="$ac_compile"
11441case "(($ac_try" in
11442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11443 *) ac_try_echo=$ac_try;;
11444esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011448 grep -v '^ *+' conftest.er1 >conftest.err
11449 rm -f conftest.er1
11450 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011452 (exit $ac_status); } && {
11453 test -z "$ac_c_werror_flag" ||
11454 test ! -s conftest.err
11455 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ac_lo=$ac_mid; break
11457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011459sed 's/^/| /' conftest.$ac_ext >&5
11460
Martin v. Löwiseba40652007-08-30 20:10:57 +000011461 ac_hi=`expr '(' $ac_mid ')' - 1`
11462 if test $ac_mid -le $ac_hi; then
11463 ac_lo= ac_hi=
11464 break
11465 fi
11466 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468
11469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 done
11471else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011473sed 's/^/| /' conftest.$ac_ext >&5
11474
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011477
11478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011480
11481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011482# Binary search between lo and hi bounds.
11483while test "x$ac_lo" != "x$ac_hi"; do
11484 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011486/* confdefs.h. */
11487_ACEOF
11488cat confdefs.h >>conftest.$ac_ext
11489cat >>conftest.$ac_ext <<_ACEOF
11490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011491$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011492 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011493int
11494main ()
11495{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011496static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011497test_array [0] = 0
11498
11499 ;
11500 return 0;
11501}
11502_ACEOF
11503rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011504if { (ac_try="$ac_compile"
11505case "(($ac_try" in
11506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11507 *) ac_try_echo=$ac_try;;
11508esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011512 grep -v '^ *+' conftest.er1 >conftest.err
11513 rm -f conftest.er1
11514 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011516 (exit $ac_status); } && {
11517 test -z "$ac_c_werror_flag" ||
11518 test ! -s conftest.err
11519 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 ac_hi=$ac_mid
11521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011523sed 's/^/| /' conftest.$ac_ext >&5
11524
Martin v. Löwiseba40652007-08-30 20:10:57 +000011525 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011527
11528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011529done
11530case $ac_lo in
11531?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011533 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011534See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011535echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011536See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011537 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011538 else
11539 ac_cv_sizeof_long_long=0
11540 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011541esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011542else
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011544/* confdefs.h. */
11545_ACEOF
11546cat confdefs.h >>conftest.$ac_ext
11547cat >>conftest.$ac_ext <<_ACEOF
11548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011549$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011550 typedef long long ac__type_sizeof_;
11551static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11552static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011553#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011554#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011555int
11556main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011557{
Martin v. Löwis11437992002-04-12 09:54:03 +000011558
11559 FILE *f = fopen ("conftest.val", "w");
11560 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011561 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011562 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011564 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011565 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011566 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011567 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 }
11569 else
11570 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011571 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011572 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011573 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011574 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011576 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011577
11578 ;
11579 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011580}
Martin v. Löwis11437992002-04-12 09:54:03 +000011581_ACEOF
11582rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011583if { (ac_try="$ac_link"
11584case "(($ac_try" in
11585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11586 *) ac_try_echo=$ac_try;;
11587esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011589 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011593 { (case "(($ac_try" in
11594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11595 *) ac_try_echo=$ac_try;;
11596esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011598 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011601 (exit $ac_status); }; }; then
11602 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011604 echo "$as_me: program exited with status $ac_status" >&5
11605echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011606sed 's/^/| /' conftest.$ac_ext >&5
11607
Martin v. Löwis11437992002-04-12 09:54:03 +000011608( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011610 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011611See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011612echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011613See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011614 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011615 else
11616 ac_cv_sizeof_long_long=0
11617 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619rm -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 +000011620fi
11621rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011622fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011623{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11624echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011625
11626
11627
Martin v. Löwis11437992002-04-12 09:54:03 +000011628cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011629#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011630_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011631
Michael W. Hudson54241132001-12-07 15:38:26 +000011632
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011633fi
11634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011635{ echo "$as_me:$LINENO: checking for long double support" >&5
11636echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011637have_long_double=no
11638cat >conftest.$ac_ext <<_ACEOF
11639/* confdefs.h. */
11640_ACEOF
11641cat confdefs.h >>conftest.$ac_ext
11642cat >>conftest.$ac_ext <<_ACEOF
11643/* end confdefs.h. */
11644
11645int
11646main ()
11647{
11648long double x; x = (long double)0.;
11649 ;
11650 return 0;
11651}
11652_ACEOF
11653rm -f conftest.$ac_objext
11654if { (ac_try="$ac_compile"
11655case "(($ac_try" in
11656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11657 *) ac_try_echo=$ac_try;;
11658esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011660 (eval "$ac_compile") 2>conftest.er1
11661 ac_status=$?
11662 grep -v '^ *+' conftest.er1 >conftest.err
11663 rm -f conftest.er1
11664 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011666 (exit $ac_status); } && {
11667 test -z "$ac_c_werror_flag" ||
11668 test ! -s conftest.err
11669 } && test -s conftest.$ac_objext; then
11670
11671
11672cat >>confdefs.h <<\_ACEOF
11673#define HAVE_LONG_DOUBLE 1
11674_ACEOF
11675
11676 have_long_double=yes
11677
11678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011679 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011680sed 's/^/| /' conftest.$ac_ext >&5
11681
11682
11683fi
11684
11685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011686{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11687echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011688if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011689{ echo "$as_me:$LINENO: checking for long double" >&5
11690echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11691if test "${ac_cv_type_long_double+set}" = set; then
11692 echo $ECHO_N "(cached) $ECHO_C" >&6
11693else
11694 cat >conftest.$ac_ext <<_ACEOF
11695/* confdefs.h. */
11696_ACEOF
11697cat confdefs.h >>conftest.$ac_ext
11698cat >>conftest.$ac_ext <<_ACEOF
11699/* end confdefs.h. */
11700$ac_includes_default
11701typedef long double ac__type_new_;
11702int
11703main ()
11704{
11705if ((ac__type_new_ *) 0)
11706 return 0;
11707if (sizeof (ac__type_new_))
11708 return 0;
11709 ;
11710 return 0;
11711}
11712_ACEOF
11713rm -f conftest.$ac_objext
11714if { (ac_try="$ac_compile"
11715case "(($ac_try" in
11716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11717 *) ac_try_echo=$ac_try;;
11718esac
11719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11720 (eval "$ac_compile") 2>conftest.er1
11721 ac_status=$?
11722 grep -v '^ *+' conftest.er1 >conftest.err
11723 rm -f conftest.er1
11724 cat conftest.err >&5
11725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11726 (exit $ac_status); } && {
11727 test -z "$ac_c_werror_flag" ||
11728 test ! -s conftest.err
11729 } && test -s conftest.$ac_objext; then
11730 ac_cv_type_long_double=yes
11731else
11732 echo "$as_me: failed program was:" >&5
11733sed 's/^/| /' conftest.$ac_ext >&5
11734
11735 ac_cv_type_long_double=no
11736fi
11737
11738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11739fi
11740{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11741echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11742
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011743# The cast to long int works around a bug in the HP C Compiler
11744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11746# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011747{ echo "$as_me:$LINENO: checking size of long double" >&5
11748echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011749if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011750 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011751else
11752 if test "$cross_compiling" = yes; then
11753 # Depending upon the size, compute the lo and hi bounds.
11754cat >conftest.$ac_ext <<_ACEOF
11755/* confdefs.h. */
11756_ACEOF
11757cat confdefs.h >>conftest.$ac_ext
11758cat >>conftest.$ac_ext <<_ACEOF
11759/* end confdefs.h. */
11760$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011761 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011762int
11763main ()
11764{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011766test_array [0] = 0
11767
11768 ;
11769 return 0;
11770}
11771_ACEOF
11772rm -f conftest.$ac_objext
11773if { (ac_try="$ac_compile"
11774case "(($ac_try" in
11775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11776 *) ac_try_echo=$ac_try;;
11777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011779 (eval "$ac_compile") 2>conftest.er1
11780 ac_status=$?
11781 grep -v '^ *+' conftest.er1 >conftest.err
11782 rm -f conftest.er1
11783 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011785 (exit $ac_status); } && {
11786 test -z "$ac_c_werror_flag" ||
11787 test ! -s conftest.err
11788 } && test -s conftest.$ac_objext; then
11789 ac_lo=0 ac_mid=0
11790 while :; do
11791 cat >conftest.$ac_ext <<_ACEOF
11792/* confdefs.h. */
11793_ACEOF
11794cat confdefs.h >>conftest.$ac_ext
11795cat >>conftest.$ac_ext <<_ACEOF
11796/* end confdefs.h. */
11797$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011798 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011799int
11800main ()
11801{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011803test_array [0] = 0
11804
11805 ;
11806 return 0;
11807}
11808_ACEOF
11809rm -f conftest.$ac_objext
11810if { (ac_try="$ac_compile"
11811case "(($ac_try" in
11812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11813 *) ac_try_echo=$ac_try;;
11814esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011816 (eval "$ac_compile") 2>conftest.er1
11817 ac_status=$?
11818 grep -v '^ *+' conftest.er1 >conftest.err
11819 rm -f conftest.er1
11820 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011822 (exit $ac_status); } && {
11823 test -z "$ac_c_werror_flag" ||
11824 test ! -s conftest.err
11825 } && test -s conftest.$ac_objext; then
11826 ac_hi=$ac_mid; break
11827else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011828 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011829sed 's/^/| /' conftest.$ac_ext >&5
11830
11831 ac_lo=`expr $ac_mid + 1`
11832 if test $ac_lo -le $ac_mid; then
11833 ac_lo= ac_hi=
11834 break
11835 fi
11836 ac_mid=`expr 2 '*' $ac_mid + 1`
11837fi
11838
11839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11840 done
11841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011842 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011843sed 's/^/| /' conftest.$ac_ext >&5
11844
11845 cat >conftest.$ac_ext <<_ACEOF
11846/* confdefs.h. */
11847_ACEOF
11848cat confdefs.h >>conftest.$ac_ext
11849cat >>conftest.$ac_ext <<_ACEOF
11850/* end confdefs.h. */
11851$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011852 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011853int
11854main ()
11855{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011856static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011857test_array [0] = 0
11858
11859 ;
11860 return 0;
11861}
11862_ACEOF
11863rm -f conftest.$ac_objext
11864if { (ac_try="$ac_compile"
11865case "(($ac_try" in
11866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11867 *) ac_try_echo=$ac_try;;
11868esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011870 (eval "$ac_compile") 2>conftest.er1
11871 ac_status=$?
11872 grep -v '^ *+' conftest.er1 >conftest.err
11873 rm -f conftest.er1
11874 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011876 (exit $ac_status); } && {
11877 test -z "$ac_c_werror_flag" ||
11878 test ! -s conftest.err
11879 } && test -s conftest.$ac_objext; then
11880 ac_hi=-1 ac_mid=-1
11881 while :; do
11882 cat >conftest.$ac_ext <<_ACEOF
11883/* confdefs.h. */
11884_ACEOF
11885cat confdefs.h >>conftest.$ac_ext
11886cat >>conftest.$ac_ext <<_ACEOF
11887/* end confdefs.h. */
11888$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011889 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011890int
11891main ()
11892{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011894test_array [0] = 0
11895
11896 ;
11897 return 0;
11898}
11899_ACEOF
11900rm -f conftest.$ac_objext
11901if { (ac_try="$ac_compile"
11902case "(($ac_try" in
11903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11904 *) ac_try_echo=$ac_try;;
11905esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011907 (eval "$ac_compile") 2>conftest.er1
11908 ac_status=$?
11909 grep -v '^ *+' conftest.er1 >conftest.err
11910 rm -f conftest.er1
11911 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011913 (exit $ac_status); } && {
11914 test -z "$ac_c_werror_flag" ||
11915 test ! -s conftest.err
11916 } && test -s conftest.$ac_objext; then
11917 ac_lo=$ac_mid; break
11918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011919 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011920sed 's/^/| /' conftest.$ac_ext >&5
11921
11922 ac_hi=`expr '(' $ac_mid ')' - 1`
11923 if test $ac_mid -le $ac_hi; then
11924 ac_lo= ac_hi=
11925 break
11926 fi
11927 ac_mid=`expr 2 '*' $ac_mid`
11928fi
11929
11930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11931 done
11932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011933 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011934sed 's/^/| /' conftest.$ac_ext >&5
11935
11936 ac_lo= ac_hi=
11937fi
11938
11939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11940fi
11941
11942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11943# Binary search between lo and hi bounds.
11944while test "x$ac_lo" != "x$ac_hi"; do
11945 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11946 cat >conftest.$ac_ext <<_ACEOF
11947/* confdefs.h. */
11948_ACEOF
11949cat confdefs.h >>conftest.$ac_ext
11950cat >>conftest.$ac_ext <<_ACEOF
11951/* end confdefs.h. */
11952$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011953 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011954int
11955main ()
11956{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011958test_array [0] = 0
11959
11960 ;
11961 return 0;
11962}
11963_ACEOF
11964rm -f conftest.$ac_objext
11965if { (ac_try="$ac_compile"
11966case "(($ac_try" in
11967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11968 *) ac_try_echo=$ac_try;;
11969esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011971 (eval "$ac_compile") 2>conftest.er1
11972 ac_status=$?
11973 grep -v '^ *+' conftest.er1 >conftest.err
11974 rm -f conftest.er1
11975 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011977 (exit $ac_status); } && {
11978 test -z "$ac_c_werror_flag" ||
11979 test ! -s conftest.err
11980 } && test -s conftest.$ac_objext; then
11981 ac_hi=$ac_mid
11982else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011983 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011984sed 's/^/| /' conftest.$ac_ext >&5
11985
11986 ac_lo=`expr '(' $ac_mid ')' + 1`
11987fi
11988
11989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11990done
11991case $ac_lo in
11992?*) ac_cv_sizeof_long_double=$ac_lo;;
11993'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011995See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011996echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011997See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011998 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011999 else
12000 ac_cv_sizeof_long_double=0
12001 fi ;;
12002esac
12003else
12004 cat >conftest.$ac_ext <<_ACEOF
12005/* confdefs.h. */
12006_ACEOF
12007cat confdefs.h >>conftest.$ac_ext
12008cat >>conftest.$ac_ext <<_ACEOF
12009/* end confdefs.h. */
12010$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012011 typedef long double ac__type_sizeof_;
12012static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12013static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012014#include <stdio.h>
12015#include <stdlib.h>
12016int
12017main ()
12018{
12019
12020 FILE *f = fopen ("conftest.val", "w");
12021 if (! f)
12022 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012023 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012024 {
12025 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012026 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012027 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012028 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012029 }
12030 else
12031 {
12032 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012033 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012034 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012035 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012036 }
12037 return ferror (f) || fclose (f) != 0;
12038
12039 ;
12040 return 0;
12041}
12042_ACEOF
12043rm -f conftest$ac_exeext
12044if { (ac_try="$ac_link"
12045case "(($ac_try" in
12046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12047 *) ac_try_echo=$ac_try;;
12048esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012050 (eval "$ac_link") 2>&5
12051 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12054 { (case "(($ac_try" in
12055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12056 *) ac_try_echo=$ac_try;;
12057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012059 (eval "$ac_try") 2>&5
12060 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012062 (exit $ac_status); }; }; then
12063 ac_cv_sizeof_long_double=`cat conftest.val`
12064else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012065 echo "$as_me: program exited with status $ac_status" >&5
12066echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012067sed 's/^/| /' conftest.$ac_ext >&5
12068
12069( exit $ac_status )
12070if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012071 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012072See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012073echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012074See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012075 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012076 else
12077 ac_cv_sizeof_long_double=0
12078 fi
12079fi
12080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12081fi
12082rm -f conftest.val
12083fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012084{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12085echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012086
12087
12088
12089cat >>confdefs.h <<_ACEOF
12090#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12091_ACEOF
12092
12093
12094fi
12095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012096{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12097echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012098have_c99_bool=no
12099cat >conftest.$ac_ext <<_ACEOF
12100/* confdefs.h. */
12101_ACEOF
12102cat confdefs.h >>conftest.$ac_ext
12103cat >>conftest.$ac_ext <<_ACEOF
12104/* end confdefs.h. */
12105
12106int
12107main ()
12108{
12109_Bool x; x = (_Bool)0;
12110 ;
12111 return 0;
12112}
12113_ACEOF
12114rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012115if { (ac_try="$ac_compile"
12116case "(($ac_try" in
12117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12118 *) ac_try_echo=$ac_try;;
12119esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012122 ac_status=$?
12123 grep -v '^ *+' conftest.er1 >conftest.err
12124 rm -f conftest.er1
12125 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012127 (exit $ac_status); } && {
12128 test -z "$ac_c_werror_flag" ||
12129 test ! -s conftest.err
12130 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012131
12132
12133cat >>confdefs.h <<\_ACEOF
12134#define HAVE_C99_BOOL 1
12135_ACEOF
12136
12137 have_c99_bool=yes
12138
12139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012140 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012141sed 's/^/| /' conftest.$ac_ext >&5
12142
Martin v. Löwiseba40652007-08-30 20:10:57 +000012143
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012145
12146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012147{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12148echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012149if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012150{ echo "$as_me:$LINENO: checking for _Bool" >&5
12151echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12152if test "${ac_cv_type__Bool+set}" = set; then
12153 echo $ECHO_N "(cached) $ECHO_C" >&6
12154else
12155 cat >conftest.$ac_ext <<_ACEOF
12156/* confdefs.h. */
12157_ACEOF
12158cat confdefs.h >>conftest.$ac_ext
12159cat >>conftest.$ac_ext <<_ACEOF
12160/* end confdefs.h. */
12161$ac_includes_default
12162typedef _Bool ac__type_new_;
12163int
12164main ()
12165{
12166if ((ac__type_new_ *) 0)
12167 return 0;
12168if (sizeof (ac__type_new_))
12169 return 0;
12170 ;
12171 return 0;
12172}
12173_ACEOF
12174rm -f conftest.$ac_objext
12175if { (ac_try="$ac_compile"
12176case "(($ac_try" in
12177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12178 *) ac_try_echo=$ac_try;;
12179esac
12180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12181 (eval "$ac_compile") 2>conftest.er1
12182 ac_status=$?
12183 grep -v '^ *+' conftest.er1 >conftest.err
12184 rm -f conftest.er1
12185 cat conftest.err >&5
12186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12187 (exit $ac_status); } && {
12188 test -z "$ac_c_werror_flag" ||
12189 test ! -s conftest.err
12190 } && test -s conftest.$ac_objext; then
12191 ac_cv_type__Bool=yes
12192else
12193 echo "$as_me: failed program was:" >&5
12194sed 's/^/| /' conftest.$ac_ext >&5
12195
12196 ac_cv_type__Bool=no
12197fi
12198
12199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12200fi
12201{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12202echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12203
Martin v. Löwiseba40652007-08-30 20:10:57 +000012204# The cast to long int works around a bug in the HP C Compiler
12205# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12206# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12207# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012208{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12209echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012210if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012211 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012212else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012213 if test "$cross_compiling" = yes; then
12214 # Depending upon the size, compute the lo and hi bounds.
12215cat >conftest.$ac_ext <<_ACEOF
12216/* confdefs.h. */
12217_ACEOF
12218cat confdefs.h >>conftest.$ac_ext
12219cat >>conftest.$ac_ext <<_ACEOF
12220/* end confdefs.h. */
12221$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012222 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012223int
12224main ()
12225{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012226static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012227test_array [0] = 0
12228
12229 ;
12230 return 0;
12231}
12232_ACEOF
12233rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012234if { (ac_try="$ac_compile"
12235case "(($ac_try" in
12236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12237 *) ac_try_echo=$ac_try;;
12238esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012240 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012241 ac_status=$?
12242 grep -v '^ *+' conftest.er1 >conftest.err
12243 rm -f conftest.er1
12244 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012246 (exit $ac_status); } && {
12247 test -z "$ac_c_werror_flag" ||
12248 test ! -s conftest.err
12249 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012250 ac_lo=0 ac_mid=0
12251 while :; do
12252 cat >conftest.$ac_ext <<_ACEOF
12253/* confdefs.h. */
12254_ACEOF
12255cat confdefs.h >>conftest.$ac_ext
12256cat >>conftest.$ac_ext <<_ACEOF
12257/* end confdefs.h. */
12258$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012259 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012260int
12261main ()
12262{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012263static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012264test_array [0] = 0
12265
12266 ;
12267 return 0;
12268}
12269_ACEOF
12270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012271if { (ac_try="$ac_compile"
12272case "(($ac_try" in
12273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12274 *) ac_try_echo=$ac_try;;
12275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012278 ac_status=$?
12279 grep -v '^ *+' conftest.er1 >conftest.err
12280 rm -f conftest.er1
12281 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012283 (exit $ac_status); } && {
12284 test -z "$ac_c_werror_flag" ||
12285 test ! -s conftest.err
12286 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012287 ac_hi=$ac_mid; break
12288else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012289 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012290sed 's/^/| /' conftest.$ac_ext >&5
12291
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292 ac_lo=`expr $ac_mid + 1`
12293 if test $ac_lo -le $ac_mid; then
12294 ac_lo= ac_hi=
12295 break
12296 fi
12297 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012299
12300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012301 done
12302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012303 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012304sed 's/^/| /' conftest.$ac_ext >&5
12305
Martin v. Löwiseba40652007-08-30 20:10:57 +000012306 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012307/* confdefs.h. */
12308_ACEOF
12309cat confdefs.h >>conftest.$ac_ext
12310cat >>conftest.$ac_ext <<_ACEOF
12311/* end confdefs.h. */
12312$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012313 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012314int
12315main ()
12316{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012317static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012318test_array [0] = 0
12319
12320 ;
12321 return 0;
12322}
12323_ACEOF
12324rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012325if { (ac_try="$ac_compile"
12326case "(($ac_try" in
12327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12328 *) ac_try_echo=$ac_try;;
12329esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012331 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012332 ac_status=$?
12333 grep -v '^ *+' conftest.er1 >conftest.err
12334 rm -f conftest.er1
12335 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337 (exit $ac_status); } && {
12338 test -z "$ac_c_werror_flag" ||
12339 test ! -s conftest.err
12340 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012341 ac_hi=-1 ac_mid=-1
12342 while :; do
12343 cat >conftest.$ac_ext <<_ACEOF
12344/* confdefs.h. */
12345_ACEOF
12346cat confdefs.h >>conftest.$ac_ext
12347cat >>conftest.$ac_ext <<_ACEOF
12348/* end confdefs.h. */
12349$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012350 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012351int
12352main ()
12353{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012354static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012355test_array [0] = 0
12356
12357 ;
12358 return 0;
12359}
12360_ACEOF
12361rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012362if { (ac_try="$ac_compile"
12363case "(($ac_try" in
12364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12365 *) ac_try_echo=$ac_try;;
12366esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012369 ac_status=$?
12370 grep -v '^ *+' conftest.er1 >conftest.err
12371 rm -f conftest.er1
12372 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012374 (exit $ac_status); } && {
12375 test -z "$ac_c_werror_flag" ||
12376 test ! -s conftest.err
12377 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012378 ac_lo=$ac_mid; break
12379else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012380 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012381sed 's/^/| /' conftest.$ac_ext >&5
12382
Martin v. Löwiseba40652007-08-30 20:10:57 +000012383 ac_hi=`expr '(' $ac_mid ')' - 1`
12384 if test $ac_mid -le $ac_hi; then
12385 ac_lo= ac_hi=
12386 break
12387 fi
12388 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390
12391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012392 done
12393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012394 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012395sed 's/^/| /' conftest.$ac_ext >&5
12396
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399
12400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012402
12403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012404# Binary search between lo and hi bounds.
12405while test "x$ac_lo" != "x$ac_hi"; do
12406 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12407 cat >conftest.$ac_ext <<_ACEOF
12408/* confdefs.h. */
12409_ACEOF
12410cat confdefs.h >>conftest.$ac_ext
12411cat >>conftest.$ac_ext <<_ACEOF
12412/* end confdefs.h. */
12413$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012414 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012415int
12416main ()
12417{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012418static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012419test_array [0] = 0
12420
12421 ;
12422 return 0;
12423}
12424_ACEOF
12425rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012426if { (ac_try="$ac_compile"
12427case "(($ac_try" in
12428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12429 *) ac_try_echo=$ac_try;;
12430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012433 ac_status=$?
12434 grep -v '^ *+' conftest.er1 >conftest.err
12435 rm -f conftest.er1
12436 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012438 (exit $ac_status); } && {
12439 test -z "$ac_c_werror_flag" ||
12440 test ! -s conftest.err
12441 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012442 ac_hi=$ac_mid
12443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012444 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012445sed 's/^/| /' conftest.$ac_ext >&5
12446
Martin v. Löwiseba40652007-08-30 20:10:57 +000012447 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012449
12450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012451done
12452case $ac_lo in
12453?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012455 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012456See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012457echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012458See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012459 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460 else
12461 ac_cv_sizeof__Bool=0
12462 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012463esac
12464else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012465 cat >conftest.$ac_ext <<_ACEOF
12466/* confdefs.h. */
12467_ACEOF
12468cat confdefs.h >>conftest.$ac_ext
12469cat >>conftest.$ac_ext <<_ACEOF
12470/* end confdefs.h. */
12471$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012472 typedef _Bool ac__type_sizeof_;
12473static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12474static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012475#include <stdio.h>
12476#include <stdlib.h>
12477int
12478main ()
12479{
12480
12481 FILE *f = fopen ("conftest.val", "w");
12482 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012483 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012484 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012485 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012486 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012487 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012488 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012489 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012490 }
12491 else
12492 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012493 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012494 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012495 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012496 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012497 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012499
12500 ;
12501 return 0;
12502}
12503_ACEOF
12504rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012505if { (ac_try="$ac_link"
12506case "(($ac_try" in
12507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12508 *) ac_try_echo=$ac_try;;
12509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012511 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012512 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012514 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515 { (case "(($ac_try" in
12516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12517 *) ac_try_echo=$ac_try;;
12518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012521 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012523 (exit $ac_status); }; }; then
12524 ac_cv_sizeof__Bool=`cat conftest.val`
12525else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012526 echo "$as_me: program exited with status $ac_status" >&5
12527echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012528sed 's/^/| /' conftest.$ac_ext >&5
12529
12530( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012531if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012532 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012533See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012534echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012535See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012536 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012537 else
12538 ac_cv_sizeof__Bool=0
12539 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541rm -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 +000012542fi
12543rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012544fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012545{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12546echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012547
12548
12549
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012550cat >>confdefs.h <<_ACEOF
12551#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12552_ACEOF
12553
12554
12555fi
12556
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012557{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12558echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012559if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012560 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012561else
12562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012563/* confdefs.h. */
12564_ACEOF
12565cat confdefs.h >>conftest.$ac_ext
12566cat >>conftest.$ac_ext <<_ACEOF
12567/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012568#ifdef HAVE_STDINT_H
12569 #include <stdint.h>
12570 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012571
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012572typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012573int
12574main ()
12575{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012576if ((ac__type_new_ *) 0)
12577 return 0;
12578if (sizeof (ac__type_new_))
12579 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012580 ;
12581 return 0;
12582}
12583_ACEOF
12584rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012585if { (ac_try="$ac_compile"
12586case "(($ac_try" in
12587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12588 *) ac_try_echo=$ac_try;;
12589esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012593 grep -v '^ *+' conftest.er1 >conftest.err
12594 rm -f conftest.er1
12595 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012597 (exit $ac_status); } && {
12598 test -z "$ac_c_werror_flag" ||
12599 test ! -s conftest.err
12600 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012601 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012604sed 's/^/| /' conftest.$ac_ext >&5
12605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012606 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012608
12609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012610fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012611{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12612echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12613if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012614
12615cat >>confdefs.h <<_ACEOF
12616#define HAVE_UINTPTR_T 1
12617_ACEOF
12618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012619{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12620echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12621if test "${ac_cv_type_uintptr_t+set}" = set; then
12622 echo $ECHO_N "(cached) $ECHO_C" >&6
12623else
12624 cat >conftest.$ac_ext <<_ACEOF
12625/* confdefs.h. */
12626_ACEOF
12627cat confdefs.h >>conftest.$ac_ext
12628cat >>conftest.$ac_ext <<_ACEOF
12629/* end confdefs.h. */
12630$ac_includes_default
12631typedef uintptr_t ac__type_new_;
12632int
12633main ()
12634{
12635if ((ac__type_new_ *) 0)
12636 return 0;
12637if (sizeof (ac__type_new_))
12638 return 0;
12639 ;
12640 return 0;
12641}
12642_ACEOF
12643rm -f conftest.$ac_objext
12644if { (ac_try="$ac_compile"
12645case "(($ac_try" in
12646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12647 *) ac_try_echo=$ac_try;;
12648esac
12649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12650 (eval "$ac_compile") 2>conftest.er1
12651 ac_status=$?
12652 grep -v '^ *+' conftest.er1 >conftest.err
12653 rm -f conftest.er1
12654 cat conftest.err >&5
12655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12656 (exit $ac_status); } && {
12657 test -z "$ac_c_werror_flag" ||
12658 test ! -s conftest.err
12659 } && test -s conftest.$ac_objext; then
12660 ac_cv_type_uintptr_t=yes
12661else
12662 echo "$as_me: failed program was:" >&5
12663sed 's/^/| /' conftest.$ac_ext >&5
12664
12665 ac_cv_type_uintptr_t=no
12666fi
12667
12668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12669fi
12670{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12671echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12672
Martin v. Löwiseba40652007-08-30 20:10:57 +000012673# The cast to long int works around a bug in the HP C Compiler
12674# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12675# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12676# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012677{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12678echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012679if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012680 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012681else
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 if test "$cross_compiling" = yes; then
12683 # Depending upon the size, compute the lo and hi bounds.
12684cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012685/* confdefs.h. */
12686_ACEOF
12687cat confdefs.h >>conftest.$ac_ext
12688cat >>conftest.$ac_ext <<_ACEOF
12689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012690$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012691 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012692int
12693main ()
12694{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012695static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012696test_array [0] = 0
12697
12698 ;
12699 return 0;
12700}
12701_ACEOF
12702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012703if { (ac_try="$ac_compile"
12704case "(($ac_try" in
12705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12706 *) ac_try_echo=$ac_try;;
12707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012711 grep -v '^ *+' conftest.er1 >conftest.err
12712 rm -f conftest.er1
12713 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012715 (exit $ac_status); } && {
12716 test -z "$ac_c_werror_flag" ||
12717 test ! -s conftest.err
12718 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 ac_lo=0 ac_mid=0
12720 while :; do
12721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012722/* confdefs.h. */
12723_ACEOF
12724cat confdefs.h >>conftest.$ac_ext
12725cat >>conftest.$ac_ext <<_ACEOF
12726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012727$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012728 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012729int
12730main ()
12731{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012733test_array [0] = 0
12734
12735 ;
12736 return 0;
12737}
12738_ACEOF
12739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012740if { (ac_try="$ac_compile"
12741case "(($ac_try" in
12742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12743 *) ac_try_echo=$ac_try;;
12744esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012748 grep -v '^ *+' conftest.er1 >conftest.err
12749 rm -f conftest.er1
12750 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752 (exit $ac_status); } && {
12753 test -z "$ac_c_werror_flag" ||
12754 test ! -s conftest.err
12755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ac_hi=$ac_mid; break
12757else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012759sed 's/^/| /' conftest.$ac_ext >&5
12760
Martin v. Löwiseba40652007-08-30 20:10:57 +000012761 ac_lo=`expr $ac_mid + 1`
12762 if test $ac_lo -le $ac_mid; then
12763 ac_lo= ac_hi=
12764 break
12765 fi
12766 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012768
12769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 done
12771else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012773sed 's/^/| /' conftest.$ac_ext >&5
12774
Martin v. Löwiseba40652007-08-30 20:10:57 +000012775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012776/* confdefs.h. */
12777_ACEOF
12778cat confdefs.h >>conftest.$ac_ext
12779cat >>conftest.$ac_ext <<_ACEOF
12780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012781$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012782 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012783int
12784main ()
12785{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012786static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012787test_array [0] = 0
12788
12789 ;
12790 return 0;
12791}
12792_ACEOF
12793rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794if { (ac_try="$ac_compile"
12795case "(($ac_try" in
12796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12797 *) ac_try_echo=$ac_try;;
12798esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012802 grep -v '^ *+' conftest.er1 >conftest.err
12803 rm -f conftest.er1
12804 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012806 (exit $ac_status); } && {
12807 test -z "$ac_c_werror_flag" ||
12808 test ! -s conftest.err
12809 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 ac_hi=-1 ac_mid=-1
12811 while :; do
12812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012813/* confdefs.h. */
12814_ACEOF
12815cat confdefs.h >>conftest.$ac_ext
12816cat >>conftest.$ac_ext <<_ACEOF
12817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012818$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012819 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012820int
12821main ()
12822{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012824test_array [0] = 0
12825
12826 ;
12827 return 0;
12828}
12829_ACEOF
12830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012831if { (ac_try="$ac_compile"
12832case "(($ac_try" in
12833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12834 *) ac_try_echo=$ac_try;;
12835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012839 grep -v '^ *+' conftest.er1 >conftest.err
12840 rm -f conftest.er1
12841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012843 (exit $ac_status); } && {
12844 test -z "$ac_c_werror_flag" ||
12845 test ! -s conftest.err
12846 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 ac_lo=$ac_mid; break
12848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012850sed 's/^/| /' conftest.$ac_ext >&5
12851
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852 ac_hi=`expr '(' $ac_mid ')' - 1`
12853 if test $ac_mid -le $ac_hi; then
12854 ac_lo= ac_hi=
12855 break
12856 fi
12857 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012859
12860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 done
12862else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012864sed 's/^/| /' conftest.$ac_ext >&5
12865
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012868
12869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012871
12872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012873# Binary search between lo and hi bounds.
12874while test "x$ac_lo" != "x$ac_hi"; do
12875 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012877/* confdefs.h. */
12878_ACEOF
12879cat confdefs.h >>conftest.$ac_ext
12880cat >>conftest.$ac_ext <<_ACEOF
12881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012882$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012883 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012884int
12885main ()
12886{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012887static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012888test_array [0] = 0
12889
12890 ;
12891 return 0;
12892}
12893_ACEOF
12894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012895if { (ac_try="$ac_compile"
12896case "(($ac_try" in
12897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12898 *) ac_try_echo=$ac_try;;
12899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012903 grep -v '^ *+' conftest.er1 >conftest.err
12904 rm -f conftest.er1
12905 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012907 (exit $ac_status); } && {
12908 test -z "$ac_c_werror_flag" ||
12909 test ! -s conftest.err
12910 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 ac_hi=$ac_mid
12912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012914sed 's/^/| /' conftest.$ac_ext >&5
12915
Martin v. Löwiseba40652007-08-30 20:10:57 +000012916 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012918
12919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012920done
12921case $ac_lo in
12922?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012923'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012924 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012925See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012926echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012927See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012928 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012929 else
12930 ac_cv_sizeof_uintptr_t=0
12931 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012932esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012933else
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012935/* confdefs.h. */
12936_ACEOF
12937cat confdefs.h >>conftest.$ac_ext
12938cat >>conftest.$ac_ext <<_ACEOF
12939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012940$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012941 typedef uintptr_t ac__type_sizeof_;
12942static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12943static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012944#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012945#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012946int
12947main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012948{
Martin v. Löwis11437992002-04-12 09:54:03 +000012949
12950 FILE *f = fopen ("conftest.val", "w");
12951 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012952 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012953 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012955 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012956 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012957 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012958 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 }
12960 else
12961 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012962 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012963 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012964 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012965 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012967 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
12969 ;
12970 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012971}
Martin v. Löwis11437992002-04-12 09:54:03 +000012972_ACEOF
12973rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012974if { (ac_try="$ac_link"
12975case "(($ac_try" in
12976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12977 *) ac_try_echo=$ac_try;;
12978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012980 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012984 { (case "(($ac_try" in
12985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12986 *) ac_try_echo=$ac_try;;
12987esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012989 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 (exit $ac_status); }; }; then
12993 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012995 echo "$as_me: program exited with status $ac_status" >&5
12996echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012997sed 's/^/| /' conftest.$ac_ext >&5
12998
Martin v. Löwis11437992002-04-12 09:54:03 +000012999( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013000if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013001 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013002See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013003echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013004See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013005 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013006 else
13007 ac_cv_sizeof_uintptr_t=0
13008 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010rm -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 +000013011fi
13012rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013013fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013014{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13015echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013016
13017
13018
Martin v. Löwis11437992002-04-12 09:54:03 +000013019cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013020#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013021_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013022
Michael W. Hudson54241132001-12-07 15:38:26 +000013023
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013024fi
13025
Martin v. Löwisebe26702006-10-02 14:55:51 +000013026
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013027{ echo "$as_me:$LINENO: checking for off_t" >&5
13028echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13029if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013030 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013031else
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013033/* confdefs.h. */
13034_ACEOF
13035cat confdefs.h >>conftest.$ac_ext
13036cat >>conftest.$ac_ext <<_ACEOF
13037/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013038
13039#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013040#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013041#endif
13042
13043
13044typedef off_t ac__type_new_;
13045int
13046main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013047{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013048if ((ac__type_new_ *) 0)
13049 return 0;
13050if (sizeof (ac__type_new_))
13051 return 0;
13052 ;
13053 return 0;
13054}
13055_ACEOF
13056rm -f conftest.$ac_objext
13057if { (ac_try="$ac_compile"
13058case "(($ac_try" in
13059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13060 *) ac_try_echo=$ac_try;;
13061esac
13062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13063 (eval "$ac_compile") 2>conftest.er1
13064 ac_status=$?
13065 grep -v '^ *+' conftest.er1 >conftest.err
13066 rm -f conftest.er1
13067 cat conftest.err >&5
13068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13069 (exit $ac_status); } && {
13070 test -z "$ac_c_werror_flag" ||
13071 test ! -s conftest.err
13072 } && test -s conftest.$ac_objext; then
13073 ac_cv_type_off_t=yes
13074else
13075 echo "$as_me: failed program was:" >&5
13076sed 's/^/| /' conftest.$ac_ext >&5
13077
13078 ac_cv_type_off_t=no
13079fi
13080
13081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13082fi
13083{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13084echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13085
13086# The cast to long int works around a bug in the HP C Compiler
13087# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13088# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13089# This bug is HP SR number 8606223364.
13090{ echo "$as_me:$LINENO: checking size of off_t" >&5
13091echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13092if test "${ac_cv_sizeof_off_t+set}" = set; then
13093 echo $ECHO_N "(cached) $ECHO_C" >&6
13094else
13095 if test "$cross_compiling" = yes; then
13096 # Depending upon the size, compute the lo and hi bounds.
13097cat >conftest.$ac_ext <<_ACEOF
13098/* confdefs.h. */
13099_ACEOF
13100cat confdefs.h >>conftest.$ac_ext
13101cat >>conftest.$ac_ext <<_ACEOF
13102/* end confdefs.h. */
13103
13104#ifdef HAVE_SYS_TYPES_H
13105#include <sys/types.h>
13106#endif
13107
13108
13109 typedef off_t ac__type_sizeof_;
13110int
13111main ()
13112{
13113static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13114test_array [0] = 0
13115
13116 ;
13117 return 0;
13118}
13119_ACEOF
13120rm -f conftest.$ac_objext
13121if { (ac_try="$ac_compile"
13122case "(($ac_try" in
13123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13124 *) ac_try_echo=$ac_try;;
13125esac
13126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13127 (eval "$ac_compile") 2>conftest.er1
13128 ac_status=$?
13129 grep -v '^ *+' conftest.er1 >conftest.err
13130 rm -f conftest.er1
13131 cat conftest.err >&5
13132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13133 (exit $ac_status); } && {
13134 test -z "$ac_c_werror_flag" ||
13135 test ! -s conftest.err
13136 } && test -s conftest.$ac_objext; then
13137 ac_lo=0 ac_mid=0
13138 while :; do
13139 cat >conftest.$ac_ext <<_ACEOF
13140/* confdefs.h. */
13141_ACEOF
13142cat confdefs.h >>conftest.$ac_ext
13143cat >>conftest.$ac_ext <<_ACEOF
13144/* end confdefs.h. */
13145
13146#ifdef HAVE_SYS_TYPES_H
13147#include <sys/types.h>
13148#endif
13149
13150
13151 typedef off_t ac__type_sizeof_;
13152int
13153main ()
13154{
13155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13156test_array [0] = 0
13157
13158 ;
13159 return 0;
13160}
13161_ACEOF
13162rm -f conftest.$ac_objext
13163if { (ac_try="$ac_compile"
13164case "(($ac_try" in
13165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13166 *) ac_try_echo=$ac_try;;
13167esac
13168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13169 (eval "$ac_compile") 2>conftest.er1
13170 ac_status=$?
13171 grep -v '^ *+' conftest.er1 >conftest.err
13172 rm -f conftest.er1
13173 cat conftest.err >&5
13174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13175 (exit $ac_status); } && {
13176 test -z "$ac_c_werror_flag" ||
13177 test ! -s conftest.err
13178 } && test -s conftest.$ac_objext; then
13179 ac_hi=$ac_mid; break
13180else
13181 echo "$as_me: failed program was:" >&5
13182sed 's/^/| /' conftest.$ac_ext >&5
13183
13184 ac_lo=`expr $ac_mid + 1`
13185 if test $ac_lo -le $ac_mid; then
13186 ac_lo= ac_hi=
13187 break
13188 fi
13189 ac_mid=`expr 2 '*' $ac_mid + 1`
13190fi
13191
13192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13193 done
13194else
13195 echo "$as_me: failed program was:" >&5
13196sed 's/^/| /' conftest.$ac_ext >&5
13197
13198 cat >conftest.$ac_ext <<_ACEOF
13199/* confdefs.h. */
13200_ACEOF
13201cat confdefs.h >>conftest.$ac_ext
13202cat >>conftest.$ac_ext <<_ACEOF
13203/* end confdefs.h. */
13204
13205#ifdef HAVE_SYS_TYPES_H
13206#include <sys/types.h>
13207#endif
13208
13209
13210 typedef off_t ac__type_sizeof_;
13211int
13212main ()
13213{
13214static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13215test_array [0] = 0
13216
13217 ;
13218 return 0;
13219}
13220_ACEOF
13221rm -f conftest.$ac_objext
13222if { (ac_try="$ac_compile"
13223case "(($ac_try" in
13224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13225 *) ac_try_echo=$ac_try;;
13226esac
13227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13228 (eval "$ac_compile") 2>conftest.er1
13229 ac_status=$?
13230 grep -v '^ *+' conftest.er1 >conftest.err
13231 rm -f conftest.er1
13232 cat conftest.err >&5
13233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13234 (exit $ac_status); } && {
13235 test -z "$ac_c_werror_flag" ||
13236 test ! -s conftest.err
13237 } && test -s conftest.$ac_objext; then
13238 ac_hi=-1 ac_mid=-1
13239 while :; do
13240 cat >conftest.$ac_ext <<_ACEOF
13241/* confdefs.h. */
13242_ACEOF
13243cat confdefs.h >>conftest.$ac_ext
13244cat >>conftest.$ac_ext <<_ACEOF
13245/* end confdefs.h. */
13246
13247#ifdef HAVE_SYS_TYPES_H
13248#include <sys/types.h>
13249#endif
13250
13251
13252 typedef off_t ac__type_sizeof_;
13253int
13254main ()
13255{
13256static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13257test_array [0] = 0
13258
13259 ;
13260 return 0;
13261}
13262_ACEOF
13263rm -f conftest.$ac_objext
13264if { (ac_try="$ac_compile"
13265case "(($ac_try" in
13266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13267 *) ac_try_echo=$ac_try;;
13268esac
13269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13270 (eval "$ac_compile") 2>conftest.er1
13271 ac_status=$?
13272 grep -v '^ *+' conftest.er1 >conftest.err
13273 rm -f conftest.er1
13274 cat conftest.err >&5
13275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13276 (exit $ac_status); } && {
13277 test -z "$ac_c_werror_flag" ||
13278 test ! -s conftest.err
13279 } && test -s conftest.$ac_objext; then
13280 ac_lo=$ac_mid; break
13281else
13282 echo "$as_me: failed program was:" >&5
13283sed 's/^/| /' conftest.$ac_ext >&5
13284
13285 ac_hi=`expr '(' $ac_mid ')' - 1`
13286 if test $ac_mid -le $ac_hi; then
13287 ac_lo= ac_hi=
13288 break
13289 fi
13290 ac_mid=`expr 2 '*' $ac_mid`
13291fi
13292
13293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13294 done
13295else
13296 echo "$as_me: failed program was:" >&5
13297sed 's/^/| /' conftest.$ac_ext >&5
13298
13299 ac_lo= ac_hi=
13300fi
13301
13302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13303fi
13304
13305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13306# Binary search between lo and hi bounds.
13307while test "x$ac_lo" != "x$ac_hi"; do
13308 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13309 cat >conftest.$ac_ext <<_ACEOF
13310/* confdefs.h. */
13311_ACEOF
13312cat confdefs.h >>conftest.$ac_ext
13313cat >>conftest.$ac_ext <<_ACEOF
13314/* end confdefs.h. */
13315
13316#ifdef HAVE_SYS_TYPES_H
13317#include <sys/types.h>
13318#endif
13319
13320
13321 typedef off_t ac__type_sizeof_;
13322int
13323main ()
13324{
13325static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13326test_array [0] = 0
13327
13328 ;
13329 return 0;
13330}
13331_ACEOF
13332rm -f conftest.$ac_objext
13333if { (ac_try="$ac_compile"
13334case "(($ac_try" in
13335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13336 *) ac_try_echo=$ac_try;;
13337esac
13338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13339 (eval "$ac_compile") 2>conftest.er1
13340 ac_status=$?
13341 grep -v '^ *+' conftest.er1 >conftest.err
13342 rm -f conftest.er1
13343 cat conftest.err >&5
13344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13345 (exit $ac_status); } && {
13346 test -z "$ac_c_werror_flag" ||
13347 test ! -s conftest.err
13348 } && test -s conftest.$ac_objext; then
13349 ac_hi=$ac_mid
13350else
13351 echo "$as_me: failed program was:" >&5
13352sed 's/^/| /' conftest.$ac_ext >&5
13353
13354 ac_lo=`expr '(' $ac_mid ')' + 1`
13355fi
13356
13357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13358done
13359case $ac_lo in
13360?*) ac_cv_sizeof_off_t=$ac_lo;;
13361'') if test "$ac_cv_type_off_t" = yes; then
13362 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13363See \`config.log' for more details." >&5
13364echo "$as_me: error: cannot compute sizeof (off_t)
13365See \`config.log' for more details." >&2;}
13366 { (exit 77); exit 77; }; }
13367 else
13368 ac_cv_sizeof_off_t=0
13369 fi ;;
13370esac
13371else
13372 cat >conftest.$ac_ext <<_ACEOF
13373/* confdefs.h. */
13374_ACEOF
13375cat confdefs.h >>conftest.$ac_ext
13376cat >>conftest.$ac_ext <<_ACEOF
13377/* end confdefs.h. */
13378
13379#ifdef HAVE_SYS_TYPES_H
13380#include <sys/types.h>
13381#endif
13382
13383
13384 typedef off_t ac__type_sizeof_;
13385static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13386static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13387#include <stdio.h>
13388#include <stdlib.h>
13389int
13390main ()
13391{
13392
13393 FILE *f = fopen ("conftest.val", "w");
13394 if (! f)
13395 return 1;
13396 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13397 {
13398 long int i = longval ();
13399 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13400 return 1;
13401 fprintf (f, "%ld\n", i);
13402 }
13403 else
13404 {
13405 unsigned long int i = ulongval ();
13406 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13407 return 1;
13408 fprintf (f, "%lu\n", i);
13409 }
13410 return ferror (f) || fclose (f) != 0;
13411
13412 ;
13413 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013414}
Martin v. Löwis11437992002-04-12 09:54:03 +000013415_ACEOF
13416rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013417if { (ac_try="$ac_link"
13418case "(($ac_try" in
13419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13420 *) ac_try_echo=$ac_try;;
13421esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013427 { (case "(($ac_try" in
13428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13429 *) ac_try_echo=$ac_try;;
13430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013432 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013435 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013436 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013438 echo "$as_me: program exited with status $ac_status" >&5
13439echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013440sed 's/^/| /' conftest.$ac_ext >&5
13441
Martin v. Löwis11437992002-04-12 09:54:03 +000013442( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013443if test "$ac_cv_type_off_t" = yes; then
13444 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13445See \`config.log' for more details." >&5
13446echo "$as_me: error: cannot compute sizeof (off_t)
13447See \`config.log' for more details." >&2;}
13448 { (exit 77); exit 77; }; }
13449 else
13450 ac_cv_sizeof_off_t=0
13451 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013453rm -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 +000013454fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013455rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013456fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013457{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13458echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013460
13461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013463#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013464_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013465
Michael W. Hudson54241132001-12-07 15:38:26 +000013466
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013467
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013468{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13469echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013470if test "$have_long_long" = yes -a \
13471 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13472 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013473
Martin v. Löwis11437992002-04-12 09:54:03 +000013474cat >>confdefs.h <<\_ACEOF
13475#define HAVE_LARGEFILE_SUPPORT 1
13476_ACEOF
13477
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013478 { echo "$as_me:$LINENO: result: yes" >&5
13479echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013480else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013481 { echo "$as_me:$LINENO: result: no" >&5
13482echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013483fi
13484
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013485{ echo "$as_me:$LINENO: checking for time_t" >&5
13486echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13487if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013489else
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013491/* confdefs.h. */
13492_ACEOF
13493cat confdefs.h >>conftest.$ac_ext
13494cat >>conftest.$ac_ext <<_ACEOF
13495/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013496
13497#ifdef HAVE_SYS_TYPES_H
13498#include <sys/types.h>
13499#endif
13500#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013501#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013502#endif
13503
13504
13505typedef time_t ac__type_new_;
13506int
13507main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013508{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013509if ((ac__type_new_ *) 0)
13510 return 0;
13511if (sizeof (ac__type_new_))
13512 return 0;
13513 ;
13514 return 0;
13515}
13516_ACEOF
13517rm -f conftest.$ac_objext
13518if { (ac_try="$ac_compile"
13519case "(($ac_try" in
13520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13521 *) ac_try_echo=$ac_try;;
13522esac
13523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13524 (eval "$ac_compile") 2>conftest.er1
13525 ac_status=$?
13526 grep -v '^ *+' conftest.er1 >conftest.err
13527 rm -f conftest.er1
13528 cat conftest.err >&5
13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530 (exit $ac_status); } && {
13531 test -z "$ac_c_werror_flag" ||
13532 test ! -s conftest.err
13533 } && test -s conftest.$ac_objext; then
13534 ac_cv_type_time_t=yes
13535else
13536 echo "$as_me: failed program was:" >&5
13537sed 's/^/| /' conftest.$ac_ext >&5
13538
13539 ac_cv_type_time_t=no
13540fi
13541
13542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13543fi
13544{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13545echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13546
13547# The cast to long int works around a bug in the HP C Compiler
13548# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13549# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13550# This bug is HP SR number 8606223364.
13551{ echo "$as_me:$LINENO: checking size of time_t" >&5
13552echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13553if test "${ac_cv_sizeof_time_t+set}" = set; then
13554 echo $ECHO_N "(cached) $ECHO_C" >&6
13555else
13556 if test "$cross_compiling" = yes; then
13557 # Depending upon the size, compute the lo and hi bounds.
13558cat >conftest.$ac_ext <<_ACEOF
13559/* confdefs.h. */
13560_ACEOF
13561cat confdefs.h >>conftest.$ac_ext
13562cat >>conftest.$ac_ext <<_ACEOF
13563/* end confdefs.h. */
13564
13565#ifdef HAVE_SYS_TYPES_H
13566#include <sys/types.h>
13567#endif
13568#ifdef HAVE_TIME_H
13569#include <time.h>
13570#endif
13571
13572
13573 typedef time_t ac__type_sizeof_;
13574int
13575main ()
13576{
13577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13578test_array [0] = 0
13579
13580 ;
13581 return 0;
13582}
13583_ACEOF
13584rm -f conftest.$ac_objext
13585if { (ac_try="$ac_compile"
13586case "(($ac_try" in
13587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13588 *) ac_try_echo=$ac_try;;
13589esac
13590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13591 (eval "$ac_compile") 2>conftest.er1
13592 ac_status=$?
13593 grep -v '^ *+' conftest.er1 >conftest.err
13594 rm -f conftest.er1
13595 cat conftest.err >&5
13596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13597 (exit $ac_status); } && {
13598 test -z "$ac_c_werror_flag" ||
13599 test ! -s conftest.err
13600 } && test -s conftest.$ac_objext; then
13601 ac_lo=0 ac_mid=0
13602 while :; do
13603 cat >conftest.$ac_ext <<_ACEOF
13604/* confdefs.h. */
13605_ACEOF
13606cat confdefs.h >>conftest.$ac_ext
13607cat >>conftest.$ac_ext <<_ACEOF
13608/* end confdefs.h. */
13609
13610#ifdef HAVE_SYS_TYPES_H
13611#include <sys/types.h>
13612#endif
13613#ifdef HAVE_TIME_H
13614#include <time.h>
13615#endif
13616
13617
13618 typedef time_t ac__type_sizeof_;
13619int
13620main ()
13621{
13622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13623test_array [0] = 0
13624
13625 ;
13626 return 0;
13627}
13628_ACEOF
13629rm -f conftest.$ac_objext
13630if { (ac_try="$ac_compile"
13631case "(($ac_try" in
13632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13633 *) ac_try_echo=$ac_try;;
13634esac
13635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13636 (eval "$ac_compile") 2>conftest.er1
13637 ac_status=$?
13638 grep -v '^ *+' conftest.er1 >conftest.err
13639 rm -f conftest.er1
13640 cat conftest.err >&5
13641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13642 (exit $ac_status); } && {
13643 test -z "$ac_c_werror_flag" ||
13644 test ! -s conftest.err
13645 } && test -s conftest.$ac_objext; then
13646 ac_hi=$ac_mid; break
13647else
13648 echo "$as_me: failed program was:" >&5
13649sed 's/^/| /' conftest.$ac_ext >&5
13650
13651 ac_lo=`expr $ac_mid + 1`
13652 if test $ac_lo -le $ac_mid; then
13653 ac_lo= ac_hi=
13654 break
13655 fi
13656 ac_mid=`expr 2 '*' $ac_mid + 1`
13657fi
13658
13659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13660 done
13661else
13662 echo "$as_me: failed program was:" >&5
13663sed 's/^/| /' conftest.$ac_ext >&5
13664
13665 cat >conftest.$ac_ext <<_ACEOF
13666/* confdefs.h. */
13667_ACEOF
13668cat confdefs.h >>conftest.$ac_ext
13669cat >>conftest.$ac_ext <<_ACEOF
13670/* end confdefs.h. */
13671
13672#ifdef HAVE_SYS_TYPES_H
13673#include <sys/types.h>
13674#endif
13675#ifdef HAVE_TIME_H
13676#include <time.h>
13677#endif
13678
13679
13680 typedef time_t ac__type_sizeof_;
13681int
13682main ()
13683{
13684static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13685test_array [0] = 0
13686
13687 ;
13688 return 0;
13689}
13690_ACEOF
13691rm -f conftest.$ac_objext
13692if { (ac_try="$ac_compile"
13693case "(($ac_try" in
13694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13695 *) ac_try_echo=$ac_try;;
13696esac
13697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13698 (eval "$ac_compile") 2>conftest.er1
13699 ac_status=$?
13700 grep -v '^ *+' conftest.er1 >conftest.err
13701 rm -f conftest.er1
13702 cat conftest.err >&5
13703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13704 (exit $ac_status); } && {
13705 test -z "$ac_c_werror_flag" ||
13706 test ! -s conftest.err
13707 } && test -s conftest.$ac_objext; then
13708 ac_hi=-1 ac_mid=-1
13709 while :; do
13710 cat >conftest.$ac_ext <<_ACEOF
13711/* confdefs.h. */
13712_ACEOF
13713cat confdefs.h >>conftest.$ac_ext
13714cat >>conftest.$ac_ext <<_ACEOF
13715/* end confdefs.h. */
13716
13717#ifdef HAVE_SYS_TYPES_H
13718#include <sys/types.h>
13719#endif
13720#ifdef HAVE_TIME_H
13721#include <time.h>
13722#endif
13723
13724
13725 typedef time_t ac__type_sizeof_;
13726int
13727main ()
13728{
13729static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13730test_array [0] = 0
13731
13732 ;
13733 return 0;
13734}
13735_ACEOF
13736rm -f conftest.$ac_objext
13737if { (ac_try="$ac_compile"
13738case "(($ac_try" in
13739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13740 *) ac_try_echo=$ac_try;;
13741esac
13742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13743 (eval "$ac_compile") 2>conftest.er1
13744 ac_status=$?
13745 grep -v '^ *+' conftest.er1 >conftest.err
13746 rm -f conftest.er1
13747 cat conftest.err >&5
13748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749 (exit $ac_status); } && {
13750 test -z "$ac_c_werror_flag" ||
13751 test ! -s conftest.err
13752 } && test -s conftest.$ac_objext; then
13753 ac_lo=$ac_mid; break
13754else
13755 echo "$as_me: failed program was:" >&5
13756sed 's/^/| /' conftest.$ac_ext >&5
13757
13758 ac_hi=`expr '(' $ac_mid ')' - 1`
13759 if test $ac_mid -le $ac_hi; then
13760 ac_lo= ac_hi=
13761 break
13762 fi
13763 ac_mid=`expr 2 '*' $ac_mid`
13764fi
13765
13766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13767 done
13768else
13769 echo "$as_me: failed program was:" >&5
13770sed 's/^/| /' conftest.$ac_ext >&5
13771
13772 ac_lo= ac_hi=
13773fi
13774
13775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13776fi
13777
13778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13779# Binary search between lo and hi bounds.
13780while test "x$ac_lo" != "x$ac_hi"; do
13781 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13782 cat >conftest.$ac_ext <<_ACEOF
13783/* confdefs.h. */
13784_ACEOF
13785cat confdefs.h >>conftest.$ac_ext
13786cat >>conftest.$ac_ext <<_ACEOF
13787/* end confdefs.h. */
13788
13789#ifdef HAVE_SYS_TYPES_H
13790#include <sys/types.h>
13791#endif
13792#ifdef HAVE_TIME_H
13793#include <time.h>
13794#endif
13795
13796
13797 typedef time_t ac__type_sizeof_;
13798int
13799main ()
13800{
13801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13802test_array [0] = 0
13803
13804 ;
13805 return 0;
13806}
13807_ACEOF
13808rm -f conftest.$ac_objext
13809if { (ac_try="$ac_compile"
13810case "(($ac_try" in
13811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13812 *) ac_try_echo=$ac_try;;
13813esac
13814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13815 (eval "$ac_compile") 2>conftest.er1
13816 ac_status=$?
13817 grep -v '^ *+' conftest.er1 >conftest.err
13818 rm -f conftest.er1
13819 cat conftest.err >&5
13820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13821 (exit $ac_status); } && {
13822 test -z "$ac_c_werror_flag" ||
13823 test ! -s conftest.err
13824 } && test -s conftest.$ac_objext; then
13825 ac_hi=$ac_mid
13826else
13827 echo "$as_me: failed program was:" >&5
13828sed 's/^/| /' conftest.$ac_ext >&5
13829
13830 ac_lo=`expr '(' $ac_mid ')' + 1`
13831fi
13832
13833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13834done
13835case $ac_lo in
13836?*) ac_cv_sizeof_time_t=$ac_lo;;
13837'') if test "$ac_cv_type_time_t" = yes; then
13838 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13839See \`config.log' for more details." >&5
13840echo "$as_me: error: cannot compute sizeof (time_t)
13841See \`config.log' for more details." >&2;}
13842 { (exit 77); exit 77; }; }
13843 else
13844 ac_cv_sizeof_time_t=0
13845 fi ;;
13846esac
13847else
13848 cat >conftest.$ac_ext <<_ACEOF
13849/* confdefs.h. */
13850_ACEOF
13851cat confdefs.h >>conftest.$ac_ext
13852cat >>conftest.$ac_ext <<_ACEOF
13853/* end confdefs.h. */
13854
13855#ifdef HAVE_SYS_TYPES_H
13856#include <sys/types.h>
13857#endif
13858#ifdef HAVE_TIME_H
13859#include <time.h>
13860#endif
13861
13862
13863 typedef time_t ac__type_sizeof_;
13864static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13865static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13866#include <stdio.h>
13867#include <stdlib.h>
13868int
13869main ()
13870{
13871
13872 FILE *f = fopen ("conftest.val", "w");
13873 if (! f)
13874 return 1;
13875 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13876 {
13877 long int i = longval ();
13878 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13879 return 1;
13880 fprintf (f, "%ld\n", i);
13881 }
13882 else
13883 {
13884 unsigned long int i = ulongval ();
13885 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13886 return 1;
13887 fprintf (f, "%lu\n", i);
13888 }
13889 return ferror (f) || fclose (f) != 0;
13890
13891 ;
13892 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013893}
Martin v. Löwis11437992002-04-12 09:54:03 +000013894_ACEOF
13895rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013896if { (ac_try="$ac_link"
13897case "(($ac_try" in
13898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13899 *) ac_try_echo=$ac_try;;
13900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013902 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013906 { (case "(($ac_try" in
13907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13908 *) ac_try_echo=$ac_try;;
13909esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013911 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013915 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013916else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013917 echo "$as_me: program exited with status $ac_status" >&5
13918echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013919sed 's/^/| /' conftest.$ac_ext >&5
13920
Martin v. Löwis11437992002-04-12 09:54:03 +000013921( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013922if test "$ac_cv_type_time_t" = yes; then
13923 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13924See \`config.log' for more details." >&5
13925echo "$as_me: error: cannot compute sizeof (time_t)
13926See \`config.log' for more details." >&2;}
13927 { (exit 77); exit 77; }; }
13928 else
13929 ac_cv_sizeof_time_t=0
13930 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013932rm -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 +000013933fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013934rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013935fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013936{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13937echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013938
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013939
13940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013942#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013943_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013944
Michael W. Hudson54241132001-12-07 15:38:26 +000013945
13946
Trent Mick635f6fb2000-08-23 21:33:05 +000013947# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013948ac_save_cc="$CC"
13949if test "$ac_cv_kpthread" = "yes"
13950then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013951elif test "$ac_cv_kthread" = "yes"
13952then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013953elif test "$ac_cv_pthread" = "yes"
13954then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013955fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013956{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13957echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013958have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013959cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013960/* confdefs.h. */
13961_ACEOF
13962cat confdefs.h >>conftest.$ac_ext
13963cat >>conftest.$ac_ext <<_ACEOF
13964/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013965#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013966int
13967main ()
13968{
Guido van Rossum12580492000-09-24 16:47:19 +000013969pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 ;
13971 return 0;
13972}
13973_ACEOF
13974rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013975if { (ac_try="$ac_compile"
13976case "(($ac_try" in
13977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13978 *) ac_try_echo=$ac_try;;
13979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013983 grep -v '^ *+' conftest.er1 >conftest.err
13984 rm -f conftest.er1
13985 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013987 (exit $ac_status); } && {
13988 test -z "$ac_c_werror_flag" ||
13989 test ! -s conftest.err
13990 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013991 have_pthread_t=yes
13992else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013994sed 's/^/| /' conftest.$ac_ext >&5
13995
Martin v. Löwiseba40652007-08-30 20:10:57 +000013996
Trent Mick635f6fb2000-08-23 21:33:05 +000013997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013998
13999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014000{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14001echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014002if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014003 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14004echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14005if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014006 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014007else
Martin v. Löwis11437992002-04-12 09:54:03 +000014008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014009/* confdefs.h. */
14010_ACEOF
14011cat confdefs.h >>conftest.$ac_ext
14012cat >>conftest.$ac_ext <<_ACEOF
14013/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014014
14015#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014016#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014017#endif
14018
14019
14020typedef pthread_t ac__type_new_;
14021int
14022main ()
14023{
14024if ((ac__type_new_ *) 0)
14025 return 0;
14026if (sizeof (ac__type_new_))
14027 return 0;
14028 ;
14029 return 0;
14030}
14031_ACEOF
14032rm -f conftest.$ac_objext
14033if { (ac_try="$ac_compile"
14034case "(($ac_try" in
14035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14036 *) ac_try_echo=$ac_try;;
14037esac
14038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14039 (eval "$ac_compile") 2>conftest.er1
14040 ac_status=$?
14041 grep -v '^ *+' conftest.er1 >conftest.err
14042 rm -f conftest.er1
14043 cat conftest.err >&5
14044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14045 (exit $ac_status); } && {
14046 test -z "$ac_c_werror_flag" ||
14047 test ! -s conftest.err
14048 } && test -s conftest.$ac_objext; then
14049 ac_cv_type_pthread_t=yes
14050else
14051 echo "$as_me: failed program was:" >&5
14052sed 's/^/| /' conftest.$ac_ext >&5
14053
14054 ac_cv_type_pthread_t=no
14055fi
14056
14057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14058fi
14059{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14060echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14061
14062# The cast to long int works around a bug in the HP C Compiler
14063# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14064# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14065# This bug is HP SR number 8606223364.
14066{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14067echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14068if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14069 echo $ECHO_N "(cached) $ECHO_C" >&6
14070else
14071 if test "$cross_compiling" = yes; then
14072 # Depending upon the size, compute the lo and hi bounds.
14073cat >conftest.$ac_ext <<_ACEOF
14074/* confdefs.h. */
14075_ACEOF
14076cat confdefs.h >>conftest.$ac_ext
14077cat >>conftest.$ac_ext <<_ACEOF
14078/* end confdefs.h. */
14079
14080#ifdef HAVE_PTHREAD_H
14081#include <pthread.h>
14082#endif
14083
14084
14085 typedef pthread_t ac__type_sizeof_;
14086int
14087main ()
14088{
14089static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14090test_array [0] = 0
14091
14092 ;
14093 return 0;
14094}
14095_ACEOF
14096rm -f conftest.$ac_objext
14097if { (ac_try="$ac_compile"
14098case "(($ac_try" in
14099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14100 *) ac_try_echo=$ac_try;;
14101esac
14102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14103 (eval "$ac_compile") 2>conftest.er1
14104 ac_status=$?
14105 grep -v '^ *+' conftest.er1 >conftest.err
14106 rm -f conftest.er1
14107 cat conftest.err >&5
14108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14109 (exit $ac_status); } && {
14110 test -z "$ac_c_werror_flag" ||
14111 test ! -s conftest.err
14112 } && test -s conftest.$ac_objext; then
14113 ac_lo=0 ac_mid=0
14114 while :; do
14115 cat >conftest.$ac_ext <<_ACEOF
14116/* confdefs.h. */
14117_ACEOF
14118cat confdefs.h >>conftest.$ac_ext
14119cat >>conftest.$ac_ext <<_ACEOF
14120/* end confdefs.h. */
14121
14122#ifdef HAVE_PTHREAD_H
14123#include <pthread.h>
14124#endif
14125
14126
14127 typedef pthread_t ac__type_sizeof_;
14128int
14129main ()
14130{
14131static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14132test_array [0] = 0
14133
14134 ;
14135 return 0;
14136}
14137_ACEOF
14138rm -f conftest.$ac_objext
14139if { (ac_try="$ac_compile"
14140case "(($ac_try" in
14141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14142 *) ac_try_echo=$ac_try;;
14143esac
14144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14145 (eval "$ac_compile") 2>conftest.er1
14146 ac_status=$?
14147 grep -v '^ *+' conftest.er1 >conftest.err
14148 rm -f conftest.er1
14149 cat conftest.err >&5
14150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14151 (exit $ac_status); } && {
14152 test -z "$ac_c_werror_flag" ||
14153 test ! -s conftest.err
14154 } && test -s conftest.$ac_objext; then
14155 ac_hi=$ac_mid; break
14156else
14157 echo "$as_me: failed program was:" >&5
14158sed 's/^/| /' conftest.$ac_ext >&5
14159
14160 ac_lo=`expr $ac_mid + 1`
14161 if test $ac_lo -le $ac_mid; then
14162 ac_lo= ac_hi=
14163 break
14164 fi
14165 ac_mid=`expr 2 '*' $ac_mid + 1`
14166fi
14167
14168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14169 done
14170else
14171 echo "$as_me: failed program was:" >&5
14172sed 's/^/| /' conftest.$ac_ext >&5
14173
14174 cat >conftest.$ac_ext <<_ACEOF
14175/* confdefs.h. */
14176_ACEOF
14177cat confdefs.h >>conftest.$ac_ext
14178cat >>conftest.$ac_ext <<_ACEOF
14179/* end confdefs.h. */
14180
14181#ifdef HAVE_PTHREAD_H
14182#include <pthread.h>
14183#endif
14184
14185
14186 typedef pthread_t ac__type_sizeof_;
14187int
14188main ()
14189{
14190static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14191test_array [0] = 0
14192
14193 ;
14194 return 0;
14195}
14196_ACEOF
14197rm -f conftest.$ac_objext
14198if { (ac_try="$ac_compile"
14199case "(($ac_try" in
14200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14201 *) ac_try_echo=$ac_try;;
14202esac
14203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14204 (eval "$ac_compile") 2>conftest.er1
14205 ac_status=$?
14206 grep -v '^ *+' conftest.er1 >conftest.err
14207 rm -f conftest.er1
14208 cat conftest.err >&5
14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210 (exit $ac_status); } && {
14211 test -z "$ac_c_werror_flag" ||
14212 test ! -s conftest.err
14213 } && test -s conftest.$ac_objext; then
14214 ac_hi=-1 ac_mid=-1
14215 while :; do
14216 cat >conftest.$ac_ext <<_ACEOF
14217/* confdefs.h. */
14218_ACEOF
14219cat confdefs.h >>conftest.$ac_ext
14220cat >>conftest.$ac_ext <<_ACEOF
14221/* end confdefs.h. */
14222
14223#ifdef HAVE_PTHREAD_H
14224#include <pthread.h>
14225#endif
14226
14227
14228 typedef pthread_t ac__type_sizeof_;
14229int
14230main ()
14231{
14232static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14233test_array [0] = 0
14234
14235 ;
14236 return 0;
14237}
14238_ACEOF
14239rm -f conftest.$ac_objext
14240if { (ac_try="$ac_compile"
14241case "(($ac_try" in
14242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14243 *) ac_try_echo=$ac_try;;
14244esac
14245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14246 (eval "$ac_compile") 2>conftest.er1
14247 ac_status=$?
14248 grep -v '^ *+' conftest.er1 >conftest.err
14249 rm -f conftest.er1
14250 cat conftest.err >&5
14251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14252 (exit $ac_status); } && {
14253 test -z "$ac_c_werror_flag" ||
14254 test ! -s conftest.err
14255 } && test -s conftest.$ac_objext; then
14256 ac_lo=$ac_mid; break
14257else
14258 echo "$as_me: failed program was:" >&5
14259sed 's/^/| /' conftest.$ac_ext >&5
14260
14261 ac_hi=`expr '(' $ac_mid ')' - 1`
14262 if test $ac_mid -le $ac_hi; then
14263 ac_lo= ac_hi=
14264 break
14265 fi
14266 ac_mid=`expr 2 '*' $ac_mid`
14267fi
14268
14269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14270 done
14271else
14272 echo "$as_me: failed program was:" >&5
14273sed 's/^/| /' conftest.$ac_ext >&5
14274
14275 ac_lo= ac_hi=
14276fi
14277
14278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14279fi
14280
14281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14282# Binary search between lo and hi bounds.
14283while test "x$ac_lo" != "x$ac_hi"; do
14284 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14285 cat >conftest.$ac_ext <<_ACEOF
14286/* confdefs.h. */
14287_ACEOF
14288cat confdefs.h >>conftest.$ac_ext
14289cat >>conftest.$ac_ext <<_ACEOF
14290/* end confdefs.h. */
14291
14292#ifdef HAVE_PTHREAD_H
14293#include <pthread.h>
14294#endif
14295
14296
14297 typedef pthread_t ac__type_sizeof_;
14298int
14299main ()
14300{
14301static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14302test_array [0] = 0
14303
14304 ;
14305 return 0;
14306}
14307_ACEOF
14308rm -f conftest.$ac_objext
14309if { (ac_try="$ac_compile"
14310case "(($ac_try" in
14311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14312 *) ac_try_echo=$ac_try;;
14313esac
14314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14315 (eval "$ac_compile") 2>conftest.er1
14316 ac_status=$?
14317 grep -v '^ *+' conftest.er1 >conftest.err
14318 rm -f conftest.er1
14319 cat conftest.err >&5
14320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14321 (exit $ac_status); } && {
14322 test -z "$ac_c_werror_flag" ||
14323 test ! -s conftest.err
14324 } && test -s conftest.$ac_objext; then
14325 ac_hi=$ac_mid
14326else
14327 echo "$as_me: failed program was:" >&5
14328sed 's/^/| /' conftest.$ac_ext >&5
14329
14330 ac_lo=`expr '(' $ac_mid ')' + 1`
14331fi
14332
14333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14334done
14335case $ac_lo in
14336?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14337'') if test "$ac_cv_type_pthread_t" = yes; then
14338 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14339See \`config.log' for more details." >&5
14340echo "$as_me: error: cannot compute sizeof (pthread_t)
14341See \`config.log' for more details." >&2;}
14342 { (exit 77); exit 77; }; }
14343 else
14344 ac_cv_sizeof_pthread_t=0
14345 fi ;;
14346esac
14347else
14348 cat >conftest.$ac_ext <<_ACEOF
14349/* confdefs.h. */
14350_ACEOF
14351cat confdefs.h >>conftest.$ac_ext
14352cat >>conftest.$ac_ext <<_ACEOF
14353/* end confdefs.h. */
14354
14355#ifdef HAVE_PTHREAD_H
14356#include <pthread.h>
14357#endif
14358
14359
14360 typedef pthread_t ac__type_sizeof_;
14361static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14362static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14363#include <stdio.h>
14364#include <stdlib.h>
14365int
14366main ()
14367{
14368
14369 FILE *f = fopen ("conftest.val", "w");
14370 if (! f)
14371 return 1;
14372 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14373 {
14374 long int i = longval ();
14375 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14376 return 1;
14377 fprintf (f, "%ld\n", i);
14378 }
14379 else
14380 {
14381 unsigned long int i = ulongval ();
14382 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14383 return 1;
14384 fprintf (f, "%lu\n", i);
14385 }
14386 return ferror (f) || fclose (f) != 0;
14387
14388 ;
14389 return 0;
14390}
Martin v. Löwis11437992002-04-12 09:54:03 +000014391_ACEOF
14392rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014393if { (ac_try="$ac_link"
14394case "(($ac_try" in
14395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14396 *) ac_try_echo=$ac_try;;
14397esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014399 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014403 { (case "(($ac_try" in
14404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14405 *) ac_try_echo=$ac_try;;
14406esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014408 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014409 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014412 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014413else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014414 echo "$as_me: program exited with status $ac_status" >&5
14415echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014416sed 's/^/| /' conftest.$ac_ext >&5
14417
Martin v. Löwis11437992002-04-12 09:54:03 +000014418( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014419if test "$ac_cv_type_pthread_t" = yes; then
14420 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14421See \`config.log' for more details." >&5
14422echo "$as_me: error: cannot compute sizeof (pthread_t)
14423See \`config.log' for more details." >&2;}
14424 { (exit 77); exit 77; }; }
14425 else
14426 ac_cv_sizeof_pthread_t=0
14427 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014429rm -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 +000014430fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014431rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014432fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014433{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014434echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014436
14437
Martin v. Löwis11437992002-04-12 09:54:03 +000014438cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014439#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014440_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014441
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014442
Trent Mick635f6fb2000-08-23 21:33:05 +000014443fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014444CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014445
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014446{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14447echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014449if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014450 enableval=$enable_toolbox_glue;
14451fi
Jack Jansene578a632001-08-15 01:27:14 +000014452
14453
14454if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014455then
Jack Jansene578a632001-08-15 01:27:14 +000014456 case $ac_sys_system/$ac_sys_release in
14457 Darwin/*)
14458 enable_toolbox_glue="yes";;
14459 *)
14460 enable_toolbox_glue="no";;
14461 esac
14462fi
14463case "$enable_toolbox_glue" in
14464yes)
Jack Jansene578a632001-08-15 01:27:14 +000014465 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014466 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014467
14468cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014469#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014470_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014471
14472 ;;
14473*)
Jack Jansene578a632001-08-15 01:27:14 +000014474 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014475 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014476 ;;
14477esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014478{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14479echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014480
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014481
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014482
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014483case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014484 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014485 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14486 ;;
14487 Darwin/*)
14488 OTHER_LIBTOOL_OPT=""
14489 ;;
14490esac
14491
14492
Ronald Oussoren25967582009-09-06 10:00:26 +000014493ARCH_RUN_32BIT=""
14494
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014495case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014496 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014497 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14498 if test "${enable_universalsdk}"; then
14499 :
14500 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014501 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014502 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014503 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014504 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014505 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014506 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14507 if test ${gcc_version} '<' 4.0
14508 then
14509 LIBTOOL_CRUFT="-lcc_dynamic"
14510 else
14511 LIBTOOL_CRUFT=""
14512 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014513 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014514 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014515else
14516 cat >conftest.$ac_ext <<_ACEOF
14517/* confdefs.h. */
14518_ACEOF
14519cat confdefs.h >>conftest.$ac_ext
14520cat >>conftest.$ac_ext <<_ACEOF
14521/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014522
Ronald Oussoren25967582009-09-06 10:00:26 +000014523 #include <unistd.h>
14524 int main(int argc, char*argv[])
14525 {
14526 if (sizeof(long) == 4) {
14527 return 0;
14528 } else {
14529 return 1;
14530 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014531 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014532
Ronald Oussoren25967582009-09-06 10:00:26 +000014533_ACEOF
14534rm -f conftest$ac_exeext
14535if { (ac_try="$ac_link"
14536case "(($ac_try" in
14537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14538 *) ac_try_echo=$ac_try;;
14539esac
14540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14541 (eval "$ac_link") 2>&5
14542 ac_status=$?
14543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14545 { (case "(($ac_try" in
14546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14547 *) ac_try_echo=$ac_try;;
14548esac
14549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14550 (eval "$ac_try") 2>&5
14551 ac_status=$?
14552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14553 (exit $ac_status); }; }; then
14554 ac_osx_32bit=yes
14555else
14556 echo "$as_me: program exited with status $ac_status" >&5
14557echo "$as_me: failed program was:" >&5
14558sed 's/^/| /' conftest.$ac_ext >&5
14559
14560( exit $ac_status )
14561ac_osx_32bit=no
14562fi
14563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14564fi
14565
14566
14567
14568 if test "${ac_osx_32bit}" = "yes"; then
14569 case `arch` in
14570 i386)
14571 MACOSX_DEFAULT_ARCH="i386"
14572 ;;
14573 ppc)
14574 MACOSX_DEFAULT_ARCH="ppc"
14575 ;;
14576 *)
14577 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14578echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14579 { (exit 1); exit 1; }; }
14580 ;;
14581 esac
14582 else
14583 case `arch` in
14584 i386)
14585 MACOSX_DEFAULT_ARCH="x86_64"
14586 ;;
14587 ppc)
14588 MACOSX_DEFAULT_ARCH="ppc64"
14589 ;;
14590 *)
14591 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14592echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14593 { (exit 1); exit 1; }; }
14594 ;;
14595 esac
14596
14597 #ARCH_RUN_32BIT="true"
14598 fi
14599
14600 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014601 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014602 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014603esac
14604
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014605{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14606echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014607if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014608then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014609 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014610 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014611 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014612
Martin v. Löwis11437992002-04-12 09:54:03 +000014613cat >>confdefs.h <<\_ACEOF
14614#define WITH_NEXT_FRAMEWORK 1
14615_ACEOF
14616
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014617 { echo "$as_me:$LINENO: result: yes" >&5
14618echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014619 if test $enable_shared = "yes"
14620 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014621 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14622echo "$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 +000014623 { (exit 1); exit 1; }; }
14624 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014625else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014626 { echo "$as_me:$LINENO: result: no" >&5
14627echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014628fi
14629
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014630{ echo "$as_me:$LINENO: checking for dyld" >&5
14631echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014632case $ac_sys_system/$ac_sys_release in
14633 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014634
Martin v. Löwis11437992002-04-12 09:54:03 +000014635cat >>confdefs.h <<\_ACEOF
14636#define WITH_DYLD 1
14637_ACEOF
14638
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014639 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14640echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014641 ;;
14642 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014643 { echo "$as_me:$LINENO: result: no" >&5
14644echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014645 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014646esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014647
Guido van Rossum0a516c91994-09-12 10:58:40 +000014648# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014649
Michael W. Hudson54241132001-12-07 15:38:26 +000014650
14651
14652
14653
Guido van Rossum0a516c91994-09-12 10:58:40 +000014654# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014655# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014656{ echo "$as_me:$LINENO: checking SO" >&5
14657echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014658if test -z "$SO"
14659then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014660 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014661 hp*|HP*)
14662 case `uname -m` in
14663 ia64) SO=.so;;
14664 *) SO=.sl;;
14665 esac
14666 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014667 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014668 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014669 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014670else
14671 # this might also be a termcap variable, see #610332
14672 echo
14673 echo '====================================================================='
14674 echo '+ +'
14675 echo '+ WARNING: You have set SO in your environment. +'
14676 echo '+ Do you really mean to change the extension for shared libraries? +'
14677 echo '+ Continuing in 10 seconds to let you to ponder. +'
14678 echo '+ +'
14679 echo '====================================================================='
14680 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014681fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014682{ echo "$as_me:$LINENO: result: $SO" >&5
14683echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014684
Ronald Oussoren79f90492009-01-02 10:44:46 +000014685
Neal Norwitz58e28882006-05-19 07:00:58 +000014686cat >>confdefs.h <<_ACEOF
14687#define SHLIB_EXT "$SO"
14688_ACEOF
14689
Guido van Rossum0a516c91994-09-12 10:58:40 +000014690# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014691# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014692# (Shared libraries in this instance are shared modules to be loaded into
14693# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014694{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14695echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014696if test -z "$LDSHARED"
14697then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014698 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014699 AIX*)
14700 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014701 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014702 ;;
14703 BeOS*)
14704 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014705 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014706 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014707 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014708 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014709 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014710 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014711 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014712 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014713 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014714 hp*|HP*)
14715 if test "$GCC" = "yes"
14716 then LDSHARED='$(CC) -shared'
14717 else LDSHARED='ld -b';
14718 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014719 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014720 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014721 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14722 if test "$enable_framework" ; then
14723 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014724 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14725 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014726 else
14727 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014728 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014729 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014730 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014731 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14732 if test "$enable_framework" ; then
14733 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014734 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14735 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014736 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014737 # No framework, use the Python app as bundle-loader
14738 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014739 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014740 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014741 Darwin/*)
14742 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14743 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014744
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014745 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014746 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014747 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014748 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014749 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014750 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14751 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014752 else
14753 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14754 if test "$enable_framework" ; then
14755 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014756 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14757 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014758 else
14759 # No framework, use the Python app as bundle-loader
14760 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14761 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14762 fi
14763 fi
14764 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014765 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014766 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014767 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014768 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014769 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014770 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014771 else
14772 LDSHARED="ld -Bshareable ${LDFLAGS}"
14773 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014774 OpenBSD*)
14775 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14776 then
14777 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14778 else
14779 case `uname -r` in
14780 [01].* | 2.[0-7] | 2.[0-7].*)
14781 LDSHARED="ld -Bshareable ${LDFLAGS}"
14782 ;;
14783 *)
14784 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14785 ;;
14786 esac
14787 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014788 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014789 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014790 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014791 then LDSHARED='$(CC) -shared'
14792 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014793 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014794 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014795 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014796 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014797 *) LDSHARED="ld";;
14798 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014799fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014800{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14801echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014802BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014803# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014804# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014805{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14806echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014807if test -z "$CCSHARED"
14808then
Guido van Rossum07397971997-04-29 21:49:50 +000014809 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014810 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014811 then CCSHARED="-fPIC";
14812 elif test `uname -p` = sparc;
14813 then CCSHARED="-xcode=pic32";
14814 else CCSHARED="-Kpic";
14815 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014816 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014817 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014818 else CCSHARED="+z";
14819 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014820 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014821 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014822 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014823 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014824 if test "$GCC" = "yes"
14825 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014826 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014827 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014828 SCO_SV*)
14829 if test "$GCC" = "yes"
14830 then CCSHARED="-fPIC"
14831 else CCSHARED="-Kpic -belf"
14832 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014833 IRIX*/6*) case $CC in
14834 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014835 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014836 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014837 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014838 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014839fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014840{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14841echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014842# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014843# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014844{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14845echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014846if test -z "$LINKFORSHARED"
14847then
Guido van Rossum07397971997-04-29 21:49:50 +000014848 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014849 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014850 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014851 LINKFORSHARED="-Wl,-E -Wl,+s";;
14852# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014853 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014854 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014855 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014857 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14858 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014859 # not used by the core itself but which needs to be in the core so
14860 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014861 # -prebind is no longer used, because it actually seems to give a
14862 # slowdown in stead of a speedup, maybe due to the large number of
14863 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014864
14865 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014866 if test "$enable_framework"
14867 then
Jack Jansenda49e192005-01-07 13:08:22 +000014868 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014869 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014870 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014871 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014872 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014873 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014874 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014875 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14876 then
14877 LINKFORSHARED="-Wl,--export-dynamic"
14878 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014879 SunOS/5*) case $CC in
14880 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014881 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014882 then
14883 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014884 fi;;
14885 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014886 CYGWIN*)
14887 if test $enable_shared = "no"
14888 then
14889 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14890 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014891 QNX*)
14892 # -Wl,-E causes the symbols to be added to the dynamic
14893 # symbol table so that they can be found when a module
14894 # is loaded. -N 2048K causes the stack size to be set
14895 # to 2048 kilobytes so that the stack doesn't overflow
14896 # when running test_compile.py.
14897 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014898 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014899fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014900{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14901echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014902
Michael W. Hudson54241132001-12-07 15:38:26 +000014903
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014904
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014905{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14906echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014907if test ! "$LIBRARY" = "$LDLIBRARY"
14908then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014909 case $ac_sys_system in
14910 CYGWIN*)
14911 # Cygwin needs CCSHARED when building extension DLLs
14912 # but not when building the interpreter DLL.
14913 CFLAGSFORSHARED='';;
14914 *)
14915 CFLAGSFORSHARED='$(CCSHARED)'
14916 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014917fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014918{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14919echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014920
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014921# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14922# library (with --enable-shared).
14923# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014924# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14925# if it is not required, since it creates a dependency of the shared library
14926# to LIBS. This, in turn, means that applications linking the shared libpython
14927# don't need to link LIBS explicitly. The default should be only changed
14928# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014929
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014930{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14931echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014932case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014933 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014934 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014935esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014936{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14937echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014938
14939
Guido van Rossum627b2d71993-12-24 10:39:16 +000014940# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014941
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014942{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14943echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014944if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014946else
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014948LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014949cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014950/* confdefs.h. */
14951_ACEOF
14952cat confdefs.h >>conftest.$ac_ext
14953cat >>conftest.$ac_ext <<_ACEOF
14954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014955
Martin v. Löwiseba40652007-08-30 20:10:57 +000014956/* Override any GCC internal prototype to avoid an error.
14957 Use char because int might match the return type of a GCC
14958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014959#ifdef __cplusplus
14960extern "C"
14961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014962char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014963int
14964main ()
14965{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014966return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 ;
14968 return 0;
14969}
14970_ACEOF
14971rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014972if { (ac_try="$ac_link"
14973case "(($ac_try" in
14974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14975 *) ac_try_echo=$ac_try;;
14976esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014978 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014980 grep -v '^ *+' conftest.er1 >conftest.err
14981 rm -f conftest.er1
14982 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984 (exit $ac_status); } && {
14985 test -z "$ac_c_werror_flag" ||
14986 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014987 } && test -s conftest$ac_exeext &&
14988 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014989 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014990else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014992sed 's/^/| /' conftest.$ac_ext >&5
14993
Martin v. Löwiseba40652007-08-30 20:10:57 +000014994 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014996
14997rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014999LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015000fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015001{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15002echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15003if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 cat >>confdefs.h <<_ACEOF
15005#define HAVE_LIBDL 1
15006_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015007
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015008 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015009
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015010fi
15011 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015013{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15014echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015015if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015016 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015017else
Martin v. Löwis11437992002-04-12 09:54:03 +000015018 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015019LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015021/* confdefs.h. */
15022_ACEOF
15023cat confdefs.h >>conftest.$ac_ext
15024cat >>conftest.$ac_ext <<_ACEOF
15025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015026
Martin v. Löwiseba40652007-08-30 20:10:57 +000015027/* Override any GCC internal prototype to avoid an error.
15028 Use char because int might match the return type of a GCC
15029 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015030#ifdef __cplusplus
15031extern "C"
15032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015033char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015034int
15035main ()
15036{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 ;
15039 return 0;
15040}
15041_ACEOF
15042rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043if { (ac_try="$ac_link"
15044case "(($ac_try" in
15045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15046 *) ac_try_echo=$ac_try;;
15047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015049 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015051 grep -v '^ *+' conftest.er1 >conftest.err
15052 rm -f conftest.er1
15053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015055 (exit $ac_status); } && {
15056 test -z "$ac_c_werror_flag" ||
15057 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015058 } && test -s conftest$ac_exeext &&
15059 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015061else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015063sed 's/^/| /' conftest.$ac_ext >&5
15064
Martin v. Löwiseba40652007-08-30 20:10:57 +000015065 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015067
15068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015070LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015071fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015072{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15073echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15074if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 cat >>confdefs.h <<_ACEOF
15076#define HAVE_LIBDLD 1
15077_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015078
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015079 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015080
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015081fi
15082 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015083
Ronald Oussoren79f90492009-01-02 10:44:46 +000015084# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015085if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015086 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15087echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015088if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015089 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015090else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015091 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015092cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015093/* confdefs.h. */
15094_ACEOF
15095cat confdefs.h >>conftest.$ac_ext
15096cat >>conftest.$ac_ext <<_ACEOF
15097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015098
Martin v. Löwiseba40652007-08-30 20:10:57 +000015099/* Override any GCC internal prototype to avoid an error.
15100 Use char because int might match the return type of a GCC
15101 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015102#ifdef __cplusplus
15103extern "C"
15104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015105char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015106int
15107main ()
15108{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015109return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 ;
15111 return 0;
15112}
15113_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015114for ac_lib in '' pthread rt posix4; do
15115 if test -z "$ac_lib"; then
15116 ac_res="none required"
15117 else
15118 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015119 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015120 fi
15121 rm -f conftest.$ac_objext conftest$ac_exeext
15122if { (ac_try="$ac_link"
15123case "(($ac_try" in
15124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15125 *) ac_try_echo=$ac_try;;
15126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015129 ac_status=$?
15130 grep -v '^ *+' conftest.er1 >conftest.err
15131 rm -f conftest.er1
15132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134 (exit $ac_status); } && {
15135 test -z "$ac_c_werror_flag" ||
15136 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015137 } && test -s conftest$ac_exeext &&
15138 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015139 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015141 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015142sed 's/^/| /' conftest.$ac_ext >&5
15143
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144
Brett Cannon19fab762007-06-02 03:02:29 +000015145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015146
15147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15148 conftest$ac_exeext
15149 if test "${ac_cv_search_sem_init+set}" = set; then
15150 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015152done
15153if test "${ac_cv_search_sem_init+set}" = set; then
15154 :
15155else
15156 ac_cv_search_sem_init=no
15157fi
15158rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015159LIBS=$ac_func_search_save_LIBS
15160fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015161{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15162echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015163ac_res=$ac_cv_search_sem_init
15164if test "$ac_res" != no; then
15165 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015166
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015167fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015168 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015169 # posix4 on Solaris 2.6
15170 # pthread (first!) on Linux
15171fi
15172
Martin v. Löwis19d17342003-06-14 21:03:05 +000015173# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015174{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15175echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015176if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015177 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015178else
15179 ac_check_lib_save_LIBS=$LIBS
15180LIBS="-lintl $LIBS"
15181cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015182/* confdefs.h. */
15183_ACEOF
15184cat confdefs.h >>conftest.$ac_ext
15185cat >>conftest.$ac_ext <<_ACEOF
15186/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015187
Martin v. Löwiseba40652007-08-30 20:10:57 +000015188/* Override any GCC internal prototype to avoid an error.
15189 Use char because int might match the return type of a GCC
15190 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015191#ifdef __cplusplus
15192extern "C"
15193#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015194char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015195int
15196main ()
15197{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015199 ;
15200 return 0;
15201}
15202_ACEOF
15203rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015204if { (ac_try="$ac_link"
15205case "(($ac_try" in
15206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15207 *) ac_try_echo=$ac_try;;
15208esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015210 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015212 grep -v '^ *+' conftest.er1 >conftest.err
15213 rm -f conftest.er1
15214 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015216 (exit $ac_status); } && {
15217 test -z "$ac_c_werror_flag" ||
15218 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015219 } && test -s conftest$ac_exeext &&
15220 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015221 ac_cv_lib_intl_textdomain=yes
15222else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015224sed 's/^/| /' conftest.$ac_ext >&5
15225
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015228
15229rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015230 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015231LIBS=$ac_check_lib_save_LIBS
15232fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015233{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15234echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15235if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015236
15237cat >>confdefs.h <<\_ACEOF
15238#define WITH_LIBINTL 1
15239_ACEOF
15240
15241fi
15242
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015243
15244# checks for system dependent C++ extensions support
15245case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015246 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15247echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015249/* confdefs.h. */
15250_ACEOF
15251cat confdefs.h >>conftest.$ac_ext
15252cat >>conftest.$ac_ext <<_ACEOF
15253/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015254#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015255int
15256main ()
15257{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015258loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015259 ;
15260 return 0;
15261}
15262_ACEOF
15263rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015264if { (ac_try="$ac_link"
15265case "(($ac_try" in
15266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15267 *) ac_try_echo=$ac_try;;
15268esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015270 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015272 grep -v '^ *+' conftest.er1 >conftest.err
15273 rm -f conftest.er1
15274 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276 (exit $ac_status); } && {
15277 test -z "$ac_c_werror_flag" ||
15278 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015279 } && test -s conftest$ac_exeext &&
15280 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015281
Martin v. Löwis11437992002-04-12 09:54:03 +000015282cat >>confdefs.h <<\_ACEOF
15283#define AIX_GENUINE_CPLUSPLUS 1
15284_ACEOF
15285
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015286 { echo "$as_me:$LINENO: result: yes" >&5
15287echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015288else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015290sed 's/^/| /' conftest.$ac_ext >&5
15291
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015292 { echo "$as_me:$LINENO: result: no" >&5
15293echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015295
15296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015297 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015298 *) ;;
15299esac
15300
Guido van Rossum70c7f481998-03-26 18:44:10 +000015301# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015302# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015303{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15304echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015305if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015306 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015307else
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015309LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015310cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015311/* confdefs.h. */
15312_ACEOF
15313cat confdefs.h >>conftest.$ac_ext
15314cat >>conftest.$ac_ext <<_ACEOF
15315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015316
Martin v. Löwiseba40652007-08-30 20:10:57 +000015317/* Override any GCC internal prototype to avoid an error.
15318 Use char because int might match the return type of a GCC
15319 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015320#ifdef __cplusplus
15321extern "C"
15322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015323char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015324int
15325main ()
15326{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015327return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015328 ;
15329 return 0;
15330}
15331_ACEOF
15332rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333if { (ac_try="$ac_link"
15334case "(($ac_try" in
15335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15336 *) ac_try_echo=$ac_try;;
15337esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015339 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015341 grep -v '^ *+' conftest.er1 >conftest.err
15342 rm -f conftest.er1
15343 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015345 (exit $ac_status); } && {
15346 test -z "$ac_c_werror_flag" ||
15347 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015348 } && test -s conftest$ac_exeext &&
15349 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015351else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015353sed 's/^/| /' conftest.$ac_ext >&5
15354
Martin v. Löwiseba40652007-08-30 20:10:57 +000015355 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015357
15358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015360LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015361fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015362{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15363echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15364if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015365 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015366fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015367 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015368{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15369echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015370if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015371 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015372else
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015374LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015375cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015376/* confdefs.h. */
15377_ACEOF
15378cat confdefs.h >>conftest.$ac_ext
15379cat >>conftest.$ac_ext <<_ACEOF
15380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015381
Martin v. Löwiseba40652007-08-30 20:10:57 +000015382/* Override any GCC internal prototype to avoid an error.
15383 Use char because int might match the return type of a GCC
15384 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015385#ifdef __cplusplus
15386extern "C"
15387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015388char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015389int
15390main ()
15391{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015392return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015393 ;
15394 return 0;
15395}
15396_ACEOF
15397rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015398if { (ac_try="$ac_link"
15399case "(($ac_try" in
15400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15401 *) ac_try_echo=$ac_try;;
15402esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015406 grep -v '^ *+' conftest.er1 >conftest.err
15407 rm -f conftest.er1
15408 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015410 (exit $ac_status); } && {
15411 test -z "$ac_c_werror_flag" ||
15412 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015413 } && test -s conftest$ac_exeext &&
15414 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015415 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015418sed 's/^/| /' conftest.$ac_ext >&5
15419
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015422
15423rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015424 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015425LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015426fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015427{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15428echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15429if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015430 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015431fi
15432 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015433
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015434case "$ac_sys_system" in
15435BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015436{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15437echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015438if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015439 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015440else
Martin v. Löwis11437992002-04-12 09:54:03 +000015441 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015442LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015443cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015444/* confdefs.h. */
15445_ACEOF
15446cat confdefs.h >>conftest.$ac_ext
15447cat >>conftest.$ac_ext <<_ACEOF
15448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015449
Martin v. Löwiseba40652007-08-30 20:10:57 +000015450/* Override any GCC internal prototype to avoid an error.
15451 Use char because int might match the return type of a GCC
15452 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015453#ifdef __cplusplus
15454extern "C"
15455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015456char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015457int
15458main ()
15459{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015460return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015461 ;
15462 return 0;
15463}
15464_ACEOF
15465rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015466if { (ac_try="$ac_link"
15467case "(($ac_try" in
15468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15469 *) ac_try_echo=$ac_try;;
15470esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015472 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015474 grep -v '^ *+' conftest.er1 >conftest.err
15475 rm -f conftest.er1
15476 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015478 (exit $ac_status); } && {
15479 test -z "$ac_c_werror_flag" ||
15480 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015481 } && test -s conftest$ac_exeext &&
15482 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015483 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015484else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015486sed 's/^/| /' conftest.$ac_ext >&5
15487
Martin v. Löwiseba40652007-08-30 20:10:57 +000015488 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015490
15491rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015492 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015493LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015494fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015495{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15496echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15497if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015498 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015499fi
15500 # BeOS
15501;;
15502esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015503
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015504{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15505echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015506
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015508if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015509 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015510{ echo "$as_me:$LINENO: result: $withval" >&5
15511echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015512LIBS="$withval $LIBS"
15513
15514else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015515 { echo "$as_me:$LINENO: result: no" >&5
15516echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015517fi
15518
Guido van Rossum7f43da71994-08-01 12:15:30 +000015519
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015520# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015521{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15522echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015523
Martin v. Löwiseba40652007-08-30 20:10:57 +000015524# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015525if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015526 withval=$with_system_ffi;
15527fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015528
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015529
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015530{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15531echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015532
Benjamin Peterson867475c2009-04-29 20:36:25 +000015533# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015534{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15535echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015536
15537# Check whether --with-dbmliborder was given.
15538if test "${with_dbmliborder+set}" = set; then
15539 withval=$with_dbmliborder;
15540if test x$with_dbmliborder = xyes
15541then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015542{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15543echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015544 { (exit 1); exit 1; }; }
15545else
15546 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15547 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15548 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015549 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15550echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015551 { (exit 1); exit 1; }; }
15552 fi
15553 done
15554fi
15555fi
15556
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015557{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15558echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015559
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015560# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015561
15562
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015563{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15564echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015565
Martin v. Löwiseba40652007-08-30 20:10:57 +000015566# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015567if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015568 withval=$with_signal_module;
15569fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015570
15571
15572if test -z "$with_signal_module"
15573then with_signal_module="yes"
15574fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015575{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15576echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015577
15578if test "${with_signal_module}" = "yes"; then
15579 USE_SIGNAL_MODULE=""
15580 SIGNAL_OBJS=""
15581else
15582 USE_SIGNAL_MODULE="#"
15583 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15584fi
15585
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015586# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015587
Barry Warsawc0d24d82000-06-29 16:12:00 +000015588USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015589
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015590{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15591echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015592
Guido van Rossumec2f0731997-01-22 20:54:01 +000015593
Martin v. Löwiseba40652007-08-30 20:10:57 +000015594# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015595if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015596 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015597{ echo "$as_me:$LINENO: result: $withval" >&5
15598echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015599LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015600if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015601 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015602fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015604 { echo "$as_me:$LINENO: result: no" >&5
15605echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015606fi
15607
Martin v. Löwis11437992002-04-12 09:54:03 +000015608
15609# Templates for things AC_DEFINEd more than once.
15610# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015611
15612
Martin v. Löwis11437992002-04-12 09:54:03 +000015613
15614
15615
15616
15617
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015618{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15619echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015620
Martin v. Löwiseba40652007-08-30 20:10:57 +000015621# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015622if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015623 withval=$with_threads;
15624fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015625
15626
Barry Warsawc0d24d82000-06-29 16:12:00 +000015627# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015628
Martin v. Löwiseba40652007-08-30 20:10:57 +000015629# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015630if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015631 withval=$with_thread; with_threads=$with_thread
15632fi
15633
Barry Warsawc0d24d82000-06-29 16:12:00 +000015634
15635if test -z "$with_threads"
15636then with_threads="yes"
15637fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015638{ echo "$as_me:$LINENO: result: $with_threads" >&5
15639echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015640
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015641
Barry Warsawc0d24d82000-06-29 16:12:00 +000015642if test "$with_threads" = "no"
15643then
15644 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015645elif test "$ac_cv_pthread_is_default" = yes
15646then
Martin v. Löwis11437992002-04-12 09:54:03 +000015647 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015648#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015649_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015650
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015651 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015653#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015654_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015655
15656 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015657 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015658elif test "$ac_cv_kpthread" = "yes"
15659then
15660 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015661 if test "$ac_cv_cxx_thread" = "yes"; then
15662 CXX="$CXX -Kpthread"
15663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015665#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015666_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015667
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015668 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015669 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015670elif test "$ac_cv_kthread" = "yes"
15671then
15672 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015673 if test "$ac_cv_cxx_thread" = "yes"; then
15674 CXX="$CXX -Kthread"
15675 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015676 cat >>confdefs.h <<\_ACEOF
15677#define WITH_THREAD 1
15678_ACEOF
15679
15680 posix_threads=yes
15681 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015682elif test "$ac_cv_pthread" = "yes"
15683then
15684 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015685 if test "$ac_cv_cxx_thread" = "yes"; then
15686 CXX="$CXX -pthread"
15687 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015688 cat >>confdefs.h <<\_ACEOF
15689#define WITH_THREAD 1
15690_ACEOF
15691
15692 posix_threads=yes
15693 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015694else
15695 if test ! -z "$with_threads" -a -d "$with_threads"
15696 then LDFLAGS="$LDFLAGS -L$with_threads"
15697 fi
15698 if test ! -z "$withval" -a -d "$withval"
15699 then LDFLAGS="$LDFLAGS -L$withval"
15700 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015701
15702 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015703 # define _POSIX_THREADS in unistd.h. Some apparently don't
15704 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015705 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15706echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015708/* confdefs.h. */
15709_ACEOF
15710cat confdefs.h >>conftest.$ac_ext
15711cat >>conftest.$ac_ext <<_ACEOF
15712/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015713
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015714#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015715#ifdef _POSIX_THREADS
15716yes
15717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015718
15719_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015721 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015722 unistd_defines_pthreads=yes
15723else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015724 unistd_defines_pthreads=no
15725fi
Mark Dickinsonab442262009-11-20 19:27:43 +000015726rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015727
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015728 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15729echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015730
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015732#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015733_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015734
Martin v. Löwis11437992002-04-12 09:54:03 +000015735 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015736 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15737echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015738if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015740fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015741{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15742echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015743else
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015745{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15746echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015747cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015748/* confdefs.h. */
15749_ACEOF
15750cat confdefs.h >>conftest.$ac_ext
15751cat >>conftest.$ac_ext <<_ACEOF
15752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015753$ac_includes_default
15754#include <cthreads.h>
15755_ACEOF
15756rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015757if { (ac_try="$ac_compile"
15758case "(($ac_try" in
15759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15760 *) ac_try_echo=$ac_try;;
15761esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015765 grep -v '^ *+' conftest.er1 >conftest.err
15766 rm -f conftest.er1
15767 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015769 (exit $ac_status); } && {
15770 test -z "$ac_c_werror_flag" ||
15771 test ! -s conftest.err
15772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015773 ac_header_compiler=yes
15774else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015776sed 's/^/| /' conftest.$ac_ext >&5
15777
Martin v. Löwiseba40652007-08-30 20:10:57 +000015778 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780
15781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015782{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15783echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015784
15785# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015786{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15787echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015788cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015789/* confdefs.h. */
15790_ACEOF
15791cat confdefs.h >>conftest.$ac_ext
15792cat >>conftest.$ac_ext <<_ACEOF
15793/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015794#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015795_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015796if { (ac_try="$ac_cpp conftest.$ac_ext"
15797case "(($ac_try" in
15798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15799 *) ac_try_echo=$ac_try;;
15800esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015802 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015803 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015804 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 rm -f conftest.er1
15806 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015808 (exit $ac_status); } >/dev/null && {
15809 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15810 test ! -s conftest.err
15811 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 ac_header_preproc=yes
15813else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015815sed 's/^/| /' conftest.$ac_ext >&5
15816
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015819
Martin v. Löwis11437992002-04-12 09:54:03 +000015820rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015821{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15822echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015823
15824# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015825case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15826 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015827 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15828echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15829 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15830echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015831 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015832 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015833 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015834 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15835echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15836 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15837echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15838 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15839echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15840 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15841echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15842 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15843echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15844 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15845echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015846 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015847## -------------------------------------- ##
15848## Report this to http://bugs.python.org/ ##
15849## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015850_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015851 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015852 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015853esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015854{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15855echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015856if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015857 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015858else
15859 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015860fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015861{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15862echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015863
15864fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015865if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015867#define WITH_THREAD 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 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015871#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015872_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015873
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
15875cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015876#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015877_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015878
15879 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015880 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015881else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015882
Martin v. Löwis11437992002-04-12 09:54:03 +000015883 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015884 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15885echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015886if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015887 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015888fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015889{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15890echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015891else
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015893{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15894echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015895cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015896/* confdefs.h. */
15897_ACEOF
15898cat confdefs.h >>conftest.$ac_ext
15899cat >>conftest.$ac_ext <<_ACEOF
15900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015901$ac_includes_default
15902#include <mach/cthreads.h>
15903_ACEOF
15904rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905if { (ac_try="$ac_compile"
15906case "(($ac_try" in
15907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15908 *) ac_try_echo=$ac_try;;
15909esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015913 grep -v '^ *+' conftest.er1 >conftest.err
15914 rm -f conftest.er1
15915 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015917 (exit $ac_status); } && {
15918 test -z "$ac_c_werror_flag" ||
15919 test ! -s conftest.err
15920 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 ac_header_compiler=yes
15922else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015924sed 's/^/| /' conftest.$ac_ext >&5
15925
Martin v. Löwiseba40652007-08-30 20:10:57 +000015926 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015928
15929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015930{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15931echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015932
15933# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015934{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15935echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015936cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015937/* confdefs.h. */
15938_ACEOF
15939cat confdefs.h >>conftest.$ac_ext
15940cat >>conftest.$ac_ext <<_ACEOF
15941/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015942#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015943_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944if { (ac_try="$ac_cpp conftest.$ac_ext"
15945case "(($ac_try" in
15946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15947 *) ac_try_echo=$ac_try;;
15948esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015950 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015952 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 rm -f conftest.er1
15954 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015956 (exit $ac_status); } >/dev/null && {
15957 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15958 test ! -s conftest.err
15959 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 ac_header_preproc=yes
15961else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015963sed 's/^/| /' conftest.$ac_ext >&5
15964
Martin v. Löwis11437992002-04-12 09:54:03 +000015965 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015967
Martin v. Löwis11437992002-04-12 09:54:03 +000015968rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015969{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15970echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015971
15972# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015973case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15974 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015975 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15976echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15977 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15978echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015979 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015980 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015981 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015982 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15983echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15984 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15985echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15986 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15987echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15988 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15989echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15990 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15991echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15992 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15993echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015994 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015995## -------------------------------------- ##
15996## Report this to http://bugs.python.org/ ##
15997## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015998_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015999 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016000 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016001esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016002{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16003echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016004if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016005 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016006else
16007 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016009{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16010echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016011
16012fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016013if test $ac_cv_header_mach_cthreads_h = yes; then
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 WITH_THREAD 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 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016019#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016020_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016021
Martin v. Löwis11437992002-04-12 09:54:03 +000016022
16023cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016024#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016025_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016026
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016027 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016028else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016029
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016030 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16031echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016032
Martin v. Löwiseba40652007-08-30 20:10:57 +000016033# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016034if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016035 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16036echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016037 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016038#define WITH_THREAD 1
16039_ACEOF
16040
16041
16042cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016043#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016044_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016045
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016046 LIBS="-lpth $LIBS"
16047 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016048else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016049 { echo "$as_me:$LINENO: result: no" >&5
16050echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016051
16052 # Just looking for pthread_create in libpthread is not enough:
16053 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16054 # So we really have to include pthread.h, and then link.
16055 _libs=$LIBS
16056 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016057 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16058echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016060/* confdefs.h. */
16061_ACEOF
16062cat confdefs.h >>conftest.$ac_ext
16063cat >>conftest.$ac_ext <<_ACEOF
16064/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016065#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016066
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016067void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016068int
16069main ()
16070{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016071
16072pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016073 ;
16074 return 0;
16075}
16076_ACEOF
16077rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016078if { (ac_try="$ac_link"
16079case "(($ac_try" in
16080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16081 *) ac_try_echo=$ac_try;;
16082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016084 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016086 grep -v '^ *+' conftest.er1 >conftest.err
16087 rm -f conftest.er1
16088 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016090 (exit $ac_status); } && {
16091 test -z "$ac_c_werror_flag" ||
16092 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016093 } && test -s conftest$ac_exeext &&
16094 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016096 { echo "$as_me:$LINENO: result: yes" >&5
16097echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016098 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016099#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016100_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016101
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016102 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016103 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016106sed 's/^/| /' conftest.$ac_ext >&5
16107
Martin v. Löwis11437992002-04-12 09:54:03 +000016108
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016109 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016110 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16111echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016112if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016113 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016114else
Martin v. Löwis11437992002-04-12 09:54:03 +000016115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016116/* confdefs.h. */
16117_ACEOF
16118cat confdefs.h >>conftest.$ac_ext
16119cat >>conftest.$ac_ext <<_ACEOF
16120/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016121/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16122 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16123#define pthread_detach innocuous_pthread_detach
16124
Guido van Rossumad678af1998-10-02 14:42:15 +000016125/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016126 which can conflict with char pthread_detach (); below.
16127 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016128 <limits.h> exists even on freestanding compilers. */
16129
16130#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016131# include <limits.h>
16132#else
16133# include <assert.h>
16134#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016135
16136#undef pthread_detach
16137
Martin v. Löwiseba40652007-08-30 20:10:57 +000016138/* Override any GCC internal prototype to avoid an error.
16139 Use char because int might match the return type of a GCC
16140 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016141#ifdef __cplusplus
16142extern "C"
16143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016144char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016145/* The GNU C library defines this for functions which it implements
16146 to always fail with ENOSYS. Some functions are actually named
16147 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016148#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016149choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016150#endif
16151
Skip Montanaro6dead952003-09-25 14:50:04 +000016152int
16153main ()
16154{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016155return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016156 ;
16157 return 0;
16158}
16159_ACEOF
16160rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016161if { (ac_try="$ac_link"
16162case "(($ac_try" in
16163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16164 *) ac_try_echo=$ac_try;;
16165esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016167 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016169 grep -v '^ *+' conftest.er1 >conftest.err
16170 rm -f conftest.er1
16171 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016173 (exit $ac_status); } && {
16174 test -z "$ac_c_werror_flag" ||
16175 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016176 } && test -s conftest$ac_exeext &&
16177 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016178 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016179else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016181sed 's/^/| /' conftest.$ac_ext >&5
16182
Martin v. Löwiseba40652007-08-30 20:10:57 +000016183 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016185
16186rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016187 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016188fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016189{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16190echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16191if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016192 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016193#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016194_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016195
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016196 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016197 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016198else
Guido van Rossumad678af1998-10-02 14:42:15 +000016199
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016200 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016201 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16202echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016203if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016204 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016205fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016206{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16207echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016208else
16209 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016210{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16211echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016213/* confdefs.h. */
16214_ACEOF
16215cat confdefs.h >>conftest.$ac_ext
16216cat >>conftest.$ac_ext <<_ACEOF
16217/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016218$ac_includes_default
16219#include <atheos/threads.h>
16220_ACEOF
16221rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016222if { (ac_try="$ac_compile"
16223case "(($ac_try" in
16224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16225 *) ac_try_echo=$ac_try;;
16226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016228 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016230 grep -v '^ *+' conftest.er1 >conftest.err
16231 rm -f conftest.er1
16232 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016234 (exit $ac_status); } && {
16235 test -z "$ac_c_werror_flag" ||
16236 test ! -s conftest.err
16237 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016238 ac_header_compiler=yes
16239else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016241sed 's/^/| /' conftest.$ac_ext >&5
16242
Martin v. Löwiseba40652007-08-30 20:10:57 +000016243 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016245
16246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016247{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16248echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016249
16250# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016251{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16252echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016253cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016254/* confdefs.h. */
16255_ACEOF
16256cat confdefs.h >>conftest.$ac_ext
16257cat >>conftest.$ac_ext <<_ACEOF
16258/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016259#include <atheos/threads.h>
16260_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016261if { (ac_try="$ac_cpp conftest.$ac_ext"
16262case "(($ac_try" in
16263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16264 *) ac_try_echo=$ac_try;;
16265esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016267 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016268 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016269 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016270 rm -f conftest.er1
16271 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016273 (exit $ac_status); } >/dev/null && {
16274 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16275 test ! -s conftest.err
16276 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016277 ac_header_preproc=yes
16278else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016280sed 's/^/| /' conftest.$ac_ext >&5
16281
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016282 ac_header_preproc=no
16283fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016284
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016285rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016286{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16287echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016288
16289# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016290case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16291 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016292 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16293echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16294 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16295echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016296 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016297 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016298 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016299 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16300echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16301 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16302echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16303 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16304echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16305 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16306echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16307 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16308echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16309 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16310echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016311 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016312## -------------------------------------- ##
16313## Report this to http://bugs.python.org/ ##
16314## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016315_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016316 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016317 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016318esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016319{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16320echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016321if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016322 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016323else
16324 ac_cv_header_atheos_threads_h=$ac_header_preproc
16325fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016326{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16327echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016328
16329fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016330if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016331 cat >>confdefs.h <<\_ACEOF
16332#define WITH_THREAD 1
16333_ACEOF
16334
16335
16336cat >>confdefs.h <<\_ACEOF
16337#define ATHEOS_THREADS 1
16338_ACEOF
16339
16340 THREADOBJ="Python/thread.o"
16341else
16342
Martin v. Löwis11437992002-04-12 09:54:03 +000016343 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016344 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16345echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016346if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016347 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016348fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016349{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16350echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016351else
Martin v. Löwis11437992002-04-12 09:54:03 +000016352 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016353{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16354echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016355cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016356/* confdefs.h. */
16357_ACEOF
16358cat confdefs.h >>conftest.$ac_ext
16359cat >>conftest.$ac_ext <<_ACEOF
16360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016361$ac_includes_default
16362#include <kernel/OS.h>
16363_ACEOF
16364rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016365if { (ac_try="$ac_compile"
16366case "(($ac_try" in
16367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16368 *) ac_try_echo=$ac_try;;
16369esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016373 grep -v '^ *+' conftest.er1 >conftest.err
16374 rm -f conftest.er1
16375 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016377 (exit $ac_status); } && {
16378 test -z "$ac_c_werror_flag" ||
16379 test ! -s conftest.err
16380 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 ac_header_compiler=yes
16382else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016384sed 's/^/| /' conftest.$ac_ext >&5
16385
Martin v. Löwiseba40652007-08-30 20:10:57 +000016386 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016388
16389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016390{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16391echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016392
16393# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016394{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16395echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016397/* confdefs.h. */
16398_ACEOF
16399cat confdefs.h >>conftest.$ac_ext
16400cat >>conftest.$ac_ext <<_ACEOF
16401/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016402#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016403_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404if { (ac_try="$ac_cpp conftest.$ac_ext"
16405case "(($ac_try" in
16406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16407 *) ac_try_echo=$ac_try;;
16408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016410 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016411 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016412 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 rm -f conftest.er1
16414 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016416 (exit $ac_status); } >/dev/null && {
16417 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16418 test ! -s conftest.err
16419 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016420 ac_header_preproc=yes
16421else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016423sed 's/^/| /' conftest.$ac_ext >&5
16424
Martin v. Löwis11437992002-04-12 09:54:03 +000016425 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016427
Martin v. Löwis11437992002-04-12 09:54:03 +000016428rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016429{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16430echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016431
Martin v. Löwis11437992002-04-12 09:54:03 +000016432# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016433case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16434 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016435 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16436echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16437 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16438echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016439 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016440 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016441 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016442 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16443echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16444 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16445echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16446 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16447echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16448 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16449echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16450 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16451echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16452 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16453echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016454 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016455## -------------------------------------- ##
16456## Report this to http://bugs.python.org/ ##
16457## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016458_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016459 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016460 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016461esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016462{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16463echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016464if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016466else
16467 ac_cv_header_kernel_OS_h=$ac_header_preproc
16468fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016469{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16470echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016471
16472fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016473if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016474 cat >>confdefs.h <<\_ACEOF
16475#define WITH_THREAD 1
16476_ACEOF
16477
16478
16479cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016480#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016481_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016482
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016483 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016484else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016485
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016486 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16487echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016488if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016489 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016490else
Martin v. Löwis11437992002-04-12 09:54:03 +000016491 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016492LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016493cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016494/* confdefs.h. */
16495_ACEOF
16496cat confdefs.h >>conftest.$ac_ext
16497cat >>conftest.$ac_ext <<_ACEOF
16498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016499
Martin v. Löwiseba40652007-08-30 20:10:57 +000016500/* Override any GCC internal prototype to avoid an error.
16501 Use char because int might match the return type of a GCC
16502 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016503#ifdef __cplusplus
16504extern "C"
16505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016506char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016507int
16508main ()
16509{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016510return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016511 ;
16512 return 0;
16513}
16514_ACEOF
16515rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016516if { (ac_try="$ac_link"
16517case "(($ac_try" in
16518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16519 *) ac_try_echo=$ac_try;;
16520esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016522 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016524 grep -v '^ *+' conftest.er1 >conftest.err
16525 rm -f conftest.er1
16526 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016528 (exit $ac_status); } && {
16529 test -z "$ac_c_werror_flag" ||
16530 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016531 } && test -s conftest$ac_exeext &&
16532 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016533 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016536sed 's/^/| /' conftest.$ac_ext >&5
16537
Martin v. Löwiseba40652007-08-30 20:10:57 +000016538 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016540
16541rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016542 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016543LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016544fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016545{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16546echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16547if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016548 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016549#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016550_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016551
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016552 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016553 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016554 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016555else
Greg Steinadf63d62000-07-05 10:38:09 +000016556
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016557 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16558echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016559if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016560 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016561else
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016563LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016565/* confdefs.h. */
16566_ACEOF
16567cat confdefs.h >>conftest.$ac_ext
16568cat >>conftest.$ac_ext <<_ACEOF
16569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016570
Martin v. Löwiseba40652007-08-30 20:10:57 +000016571/* Override any GCC internal prototype to avoid an error.
16572 Use char because int might match the return type of a GCC
16573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016574#ifdef __cplusplus
16575extern "C"
16576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016577char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016578int
16579main ()
16580{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016581return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016582 ;
16583 return 0;
16584}
16585_ACEOF
16586rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587if { (ac_try="$ac_link"
16588case "(($ac_try" in
16589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16590 *) ac_try_echo=$ac_try;;
16591esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016593 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016595 grep -v '^ *+' conftest.er1 >conftest.err
16596 rm -f conftest.er1
16597 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016599 (exit $ac_status); } && {
16600 test -z "$ac_c_werror_flag" ||
16601 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016602 } && test -s conftest$ac_exeext &&
16603 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016604 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016607sed 's/^/| /' conftest.$ac_ext >&5
16608
Martin v. Löwiseba40652007-08-30 20:10:57 +000016609 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016611
16612rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016613 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016614LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016615fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016616{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16617echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16618if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016619 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016620#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016621_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016622
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016623 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016624 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016625 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016626else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016627
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016628 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16629echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016630if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016631 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016632else
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016634LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016635cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016636/* confdefs.h. */
16637_ACEOF
16638cat confdefs.h >>conftest.$ac_ext
16639cat >>conftest.$ac_ext <<_ACEOF
16640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016641
Martin v. Löwiseba40652007-08-30 20:10:57 +000016642/* Override any GCC internal prototype to avoid an error.
16643 Use char because int might match the return type of a GCC
16644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016645#ifdef __cplusplus
16646extern "C"
16647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016648char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016649int
16650main ()
16651{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016652return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016653 ;
16654 return 0;
16655}
16656_ACEOF
16657rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016658if { (ac_try="$ac_link"
16659case "(($ac_try" in
16660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16661 *) ac_try_echo=$ac_try;;
16662esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016664 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016666 grep -v '^ *+' conftest.er1 >conftest.err
16667 rm -f conftest.er1
16668 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016670 (exit $ac_status); } && {
16671 test -z "$ac_c_werror_flag" ||
16672 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016673 } && test -s conftest$ac_exeext &&
16674 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016675 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016676else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016678sed 's/^/| /' conftest.$ac_ext >&5
16679
Martin v. Löwiseba40652007-08-30 20:10:57 +000016680 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016682
16683rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016684 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016685LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016686fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016687{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16688echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16689if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016690 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016691#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016692_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016693
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016694 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016695 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016696 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016697else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016699 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16700echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016701if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016702 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016703else
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016705LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016706cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016707/* confdefs.h. */
16708_ACEOF
16709cat confdefs.h >>conftest.$ac_ext
16710cat >>conftest.$ac_ext <<_ACEOF
16711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016712
Martin v. Löwiseba40652007-08-30 20:10:57 +000016713/* Override any GCC internal prototype to avoid an error.
16714 Use char because int might match the return type of a GCC
16715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016716#ifdef __cplusplus
16717extern "C"
16718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016719char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016720int
16721main ()
16722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016723return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016724 ;
16725 return 0;
16726}
16727_ACEOF
16728rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729if { (ac_try="$ac_link"
16730case "(($ac_try" in
16731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16732 *) ac_try_echo=$ac_try;;
16733esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016735 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016737 grep -v '^ *+' conftest.er1 >conftest.err
16738 rm -f conftest.er1
16739 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016741 (exit $ac_status); } && {
16742 test -z "$ac_c_werror_flag" ||
16743 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016744 } && test -s conftest$ac_exeext &&
16745 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016747else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016749sed 's/^/| /' conftest.$ac_ext >&5
16750
Martin v. Löwiseba40652007-08-30 20:10:57 +000016751 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016753
16754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016756LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016757fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016758{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16759echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16760if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016761 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016762#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016763_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016764
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016765 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016766 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016767 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016768else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016769
Martin v. Löwis130fb172001-07-19 11:00:41 +000016770 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016771fi
16772
Guido van Rossum627b2d71993-12-24 10:39:16 +000016773
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016774fi
16775
Guido van Rossum0be3e491997-05-22 20:33:33 +000016776fi
16777
Guido van Rossum49545951997-12-02 19:28:29 +000016778fi
16779
Guido van Rossumb93a8621998-05-07 13:27:32 +000016780fi
16781
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016782
Michael W. Hudson54241132001-12-07 15:38:26 +000016783fi
16784
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016785
16786fi
16787
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016789
16790rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016792fi
16793
Martin v. Löwis11437992002-04-12 09:54:03 +000016794fi
16795
16796
16797fi
16798
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016799
Michael W. Hudson54241132001-12-07 15:38:26 +000016800
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016801 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16802echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016803if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016805else
Martin v. Löwis11437992002-04-12 09:54:03 +000016806 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016807LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016809/* confdefs.h. */
16810_ACEOF
16811cat confdefs.h >>conftest.$ac_ext
16812cat >>conftest.$ac_ext <<_ACEOF
16813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016814
Martin v. Löwiseba40652007-08-30 20:10:57 +000016815/* Override any GCC internal prototype to avoid an error.
16816 Use char because int might match the return type of a GCC
16817 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016818#ifdef __cplusplus
16819extern "C"
16820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016821char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016822int
16823main ()
16824{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016825return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016826 ;
16827 return 0;
16828}
16829_ACEOF
16830rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016831if { (ac_try="$ac_link"
16832case "(($ac_try" in
16833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16834 *) ac_try_echo=$ac_try;;
16835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016837 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016839 grep -v '^ *+' conftest.er1 >conftest.err
16840 rm -f conftest.er1
16841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016843 (exit $ac_status); } && {
16844 test -z "$ac_c_werror_flag" ||
16845 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016846 } && test -s conftest$ac_exeext &&
16847 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016849else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016851sed 's/^/| /' conftest.$ac_ext >&5
16852
Martin v. Löwiseba40652007-08-30 20:10:57 +000016853 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016855
16856rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016857 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016858LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016859fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016860{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16861echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16862if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016863 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016864#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016865_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016866
Martin v. Löwis130fb172001-07-19 11:00:41 +000016867 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016868 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016869 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016870fi
16871
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016872
Neal Norwitza978ab02002-11-02 16:58:05 +000016873 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016874 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16875echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016876if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016877 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016878else
Martin v. Löwis11437992002-04-12 09:54:03 +000016879 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016880LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016881cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016882/* confdefs.h. */
16883_ACEOF
16884cat confdefs.h >>conftest.$ac_ext
16885cat >>conftest.$ac_ext <<_ACEOF
16886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016887
Martin v. Löwiseba40652007-08-30 20:10:57 +000016888/* Override any GCC internal prototype to avoid an error.
16889 Use char because int might match the return type of a GCC
16890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016891#ifdef __cplusplus
16892extern "C"
16893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016894char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016895int
16896main ()
16897{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016898return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016899 ;
16900 return 0;
16901}
16902_ACEOF
16903rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016904if { (ac_try="$ac_link"
16905case "(($ac_try" in
16906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16907 *) ac_try_echo=$ac_try;;
16908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016910 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016912 grep -v '^ *+' conftest.er1 >conftest.err
16913 rm -f conftest.er1
16914 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016916 (exit $ac_status); } && {
16917 test -z "$ac_c_werror_flag" ||
16918 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016919 } && test -s conftest$ac_exeext &&
16920 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016921 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016922else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016924sed 's/^/| /' conftest.$ac_ext >&5
16925
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016928
16929rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016931LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016932fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016933{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16934echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16935if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016936 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016937#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016938_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016939
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016940 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016941 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016942 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016943fi
16944
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016945 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016946
Martin v. Löwis130fb172001-07-19 11:00:41 +000016947 if test "$USE_THREAD_MODULE" != "#"
16948 then
16949 # If the above checks didn't disable threads, (at least) OSF1
16950 # needs this '-threads' argument during linking.
16951 case $ac_sys_system in
16952 OSF1) LDLAST=-threads;;
16953 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016954 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016955fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016956
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016957if test "$posix_threads" = "yes"; then
16958 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016959
16960cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016961#define _POSIX_THREADS 1
16962_ACEOF
16963
16964 fi
16965
16966 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16967 case $ac_sys_system/$ac_sys_release in
16968 SunOS/5.6)
16969cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016970#define HAVE_PTHREAD_DESTRUCTOR 1
16971_ACEOF
16972
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016973 ;;
16974 SunOS/5.8)
16975cat >>confdefs.h <<\_ACEOF
16976#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16977_ACEOF
16978
16979 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016980 AIX/5)
16981cat >>confdefs.h <<\_ACEOF
16982#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16983_ACEOF
16984
16985 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016986 esac
16987
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016988 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16989echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016990 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016991 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016992else
16993 if test "$cross_compiling" = yes; then
16994 ac_cv_pthread_system_supported=no
16995else
16996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016997/* confdefs.h. */
16998_ACEOF
16999cat confdefs.h >>conftest.$ac_ext
17000cat >>conftest.$ac_ext <<_ACEOF
17001/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017002#include <pthread.h>
17003 void *foo(void *parm) {
17004 return NULL;
17005 }
17006 main() {
17007 pthread_attr_t attr;
17008 pthread_t id;
17009 if (pthread_attr_init(&attr)) exit(-1);
17010 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17011 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17012 exit(0);
17013 }
17014_ACEOF
17015rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017016if { (ac_try="$ac_link"
17017case "(($ac_try" in
17018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17019 *) ac_try_echo=$ac_try;;
17020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017022 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017023 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017025 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017026 { (case "(($ac_try" in
17027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17028 *) ac_try_echo=$ac_try;;
17029esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017031 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017032 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017034 (exit $ac_status); }; }; then
17035 ac_cv_pthread_system_supported=yes
17036else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017037 echo "$as_me: program exited with status $ac_status" >&5
17038echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017039sed 's/^/| /' conftest.$ac_ext >&5
17040
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017041( exit $ac_status )
17042ac_cv_pthread_system_supported=no
17043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017044rm -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 +000017045fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017046
Martin v. Löwiseba40652007-08-30 20:10:57 +000017047
17048
Guido van Rossum627b2d71993-12-24 10:39:16 +000017049fi
17050
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017051 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17052echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017053 if test "$ac_cv_pthread_system_supported" = "yes"; then
17054
17055cat >>confdefs.h <<\_ACEOF
17056#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17057_ACEOF
17058
17059 fi
17060
17061for ac_func in pthread_sigmask
17062do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017063as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17064{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17065echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017066if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017067 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017068else
17069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017070/* confdefs.h. */
17071_ACEOF
17072cat confdefs.h >>conftest.$ac_ext
17073cat >>conftest.$ac_ext <<_ACEOF
17074/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017075/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17076 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17077#define $ac_func innocuous_$ac_func
17078
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017079/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017080 which can conflict with char $ac_func (); below.
17081 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017082 <limits.h> exists even on freestanding compilers. */
17083
17084#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017085# include <limits.h>
17086#else
17087# include <assert.h>
17088#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017089
17090#undef $ac_func
17091
Martin v. Löwiseba40652007-08-30 20:10:57 +000017092/* Override any GCC internal prototype to avoid an error.
17093 Use char because int might match the return type of a GCC
17094 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017095#ifdef __cplusplus
17096extern "C"
17097#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017098char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017099/* The GNU C library defines this for functions which it implements
17100 to always fail with ENOSYS. Some functions are actually named
17101 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017102#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017103choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017104#endif
17105
Skip Montanaro6dead952003-09-25 14:50:04 +000017106int
17107main ()
17108{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017109return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017110 ;
17111 return 0;
17112}
17113_ACEOF
17114rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017115if { (ac_try="$ac_link"
17116case "(($ac_try" in
17117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17118 *) ac_try_echo=$ac_try;;
17119esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017121 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017123 grep -v '^ *+' conftest.er1 >conftest.err
17124 rm -f conftest.er1
17125 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017127 (exit $ac_status); } && {
17128 test -z "$ac_c_werror_flag" ||
17129 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017130 } && test -s conftest$ac_exeext &&
17131 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017132 eval "$as_ac_var=yes"
17133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017135sed 's/^/| /' conftest.$ac_ext >&5
17136
Martin v. Löwiseba40652007-08-30 20:10:57 +000017137 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017139
17140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017141 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017142fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017143ac_res=`eval echo '${'$as_ac_var'}'`
17144 { echo "$as_me:$LINENO: result: $ac_res" >&5
17145echo "${ECHO_T}$ac_res" >&6; }
17146if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017147 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017148#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017149_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017150 case $ac_sys_system in
17151 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017152
Jason Tishlerfac083d2003-07-22 15:20:49 +000017153cat >>confdefs.h <<\_ACEOF
17154#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17155_ACEOF
17156
17157 ;;
17158 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017159fi
17160done
17161
17162fi
17163
17164
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017165# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017166
17167
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017168{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17169echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017170# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017171if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017172 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017173 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017174 { echo "$as_me:$LINENO: result: no" >&5
17175echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017176 ipv6=no
17177 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017178 *) { echo "$as_me:$LINENO: result: yes" >&5
17179echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017180 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017181#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017182_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017183
17184 ipv6=yes
17185 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017186 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017187else
Martin v. Löwis11437992002-04-12 09:54:03 +000017188
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017189 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017190 { echo "$as_me:$LINENO: result: no" >&5
17191echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017192 ipv6=no
17193
17194else
Martin v. Löwis11437992002-04-12 09:54:03 +000017195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017196/* confdefs.h. */
17197_ACEOF
17198cat confdefs.h >>conftest.$ac_ext
17199cat >>conftest.$ac_ext <<_ACEOF
17200/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017201 /* AF_INET6 available check */
17202#include <sys/types.h>
17203#include <sys/socket.h>
17204main()
17205{
17206 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17207 exit(1);
17208 else
17209 exit(0);
17210}
17211
Martin v. Löwis11437992002-04-12 09:54:03 +000017212_ACEOF
17213rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017214if { (ac_try="$ac_link"
17215case "(($ac_try" in
17216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17217 *) ac_try_echo=$ac_try;;
17218esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017220 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017221 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017223 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017224 { (case "(($ac_try" in
17225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17226 *) ac_try_echo=$ac_try;;
17227esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017229 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017230 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017232 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017233 { echo "$as_me:$LINENO: result: yes" >&5
17234echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017235 ipv6=yes
17236else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017237 echo "$as_me: program exited with status $ac_status" >&5
17238echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017239sed 's/^/| /' conftest.$ac_ext >&5
17240
Martin v. Löwis11437992002-04-12 09:54:03 +000017241( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017242{ echo "$as_me:$LINENO: result: no" >&5
17243echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017244 ipv6=no
17245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017246rm -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 +000017247fi
17248
Martin v. Löwiseba40652007-08-30 20:10:57 +000017249
17250
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017251if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017252 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17253echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017255/* confdefs.h. */
17256_ACEOF
17257cat confdefs.h >>conftest.$ac_ext
17258cat >>conftest.$ac_ext <<_ACEOF
17259/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017260#include <sys/types.h>
17261#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017262int
17263main ()
17264{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017265struct sockaddr_in6 x;
17266x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017267 ;
17268 return 0;
17269}
17270_ACEOF
17271rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017272if { (ac_try="$ac_compile"
17273case "(($ac_try" in
17274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17275 *) ac_try_echo=$ac_try;;
17276esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017278 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017280 grep -v '^ *+' conftest.er1 >conftest.err
17281 rm -f conftest.er1
17282 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017284 (exit $ac_status); } && {
17285 test -z "$ac_c_werror_flag" ||
17286 test ! -s conftest.err
17287 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017288 { echo "$as_me:$LINENO: result: yes" >&5
17289echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017290 ipv6=yes
17291else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017293sed 's/^/| /' conftest.$ac_ext >&5
17294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017295 { echo "$as_me:$LINENO: result: no" >&5
17296echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017297 ipv6=no
17298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017299
17300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017301fi
17302
17303if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017304 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017305#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017306_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017307
17308fi
17309
Martin v. Löwiseba40652007-08-30 20:10:57 +000017310fi
17311
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017312
17313ipv6type=unknown
17314ipv6lib=none
17315ipv6trylibc=no
17316
17317if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017318 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17319echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017320 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17321 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017322 case $i in
17323 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017325/* confdefs.h. */
17326_ACEOF
17327cat confdefs.h >>conftest.$ac_ext
17328cat >>conftest.$ac_ext <<_ACEOF
17329/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017330
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017331#include <netinet/in.h>
17332#ifdef IPV6_INRIA_VERSION
17333yes
17334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017335_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017337 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017338 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017339fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017340rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017341
17342 ;;
17343 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017345/* confdefs.h. */
17346_ACEOF
17347cat confdefs.h >>conftest.$ac_ext
17348cat >>conftest.$ac_ext <<_ACEOF
17349/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017350
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017351#include <netinet/in.h>
17352#ifdef __KAME__
17353yes
17354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017355_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017357 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017358 ipv6type=$i;
17359 ipv6lib=inet6
17360 ipv6libdir=/usr/local/v6/lib
17361 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017362fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017363rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017364
17365 ;;
17366 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017368/* confdefs.h. */
17369_ACEOF
17370cat confdefs.h >>conftest.$ac_ext
17371cat >>conftest.$ac_ext <<_ACEOF
17372/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017373
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017374#include <features.h>
17375#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17376yes
17377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017378_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017379if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017380 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017381 ipv6type=$i;
17382 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017383fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017384rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017385
17386 ;;
17387 linux-inet6)
17388 if test -d /usr/inet6; then
17389 ipv6type=$i
17390 ipv6lib=inet6
17391 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017392 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017393 fi
17394 ;;
17395 solaris)
17396 if test -f /etc/netconfig; then
17397 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17398 ipv6type=$i
17399 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017400 fi
17401 fi
17402 ;;
17403 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017405/* confdefs.h. */
17406_ACEOF
17407cat confdefs.h >>conftest.$ac_ext
17408cat >>conftest.$ac_ext <<_ACEOF
17409/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017410
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017411#include <sys/param.h>
17412#ifdef _TOSHIBA_INET6
17413yes
17414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017415_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017416if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017417 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017418 ipv6type=$i;
17419 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017420 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017421fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017422rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017423
17424 ;;
17425 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017426 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017427/* confdefs.h. */
17428_ACEOF
17429cat confdefs.h >>conftest.$ac_ext
17430cat >>conftest.$ac_ext <<_ACEOF
17431/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017432
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017433#include </usr/local/v6/include/sys/v6config.h>
17434#ifdef __V6D__
17435yes
17436#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017437_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017439 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017440 ipv6type=$i;
17441 ipv6lib=v6;
17442 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017443 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017444fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017445rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017446
17447 ;;
17448 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017450/* confdefs.h. */
17451_ACEOF
17452cat confdefs.h >>conftest.$ac_ext
17453cat >>conftest.$ac_ext <<_ACEOF
17454/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017455
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017456#include <sys/param.h>
17457#ifdef _ZETA_MINAMI_INET6
17458yes
17459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017460_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017462 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017463 ipv6type=$i;
17464 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017465 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017466fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017467rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017468
17469 ;;
17470 esac
17471 if test "$ipv6type" != "unknown"; then
17472 break
17473 fi
17474 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017475 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17476echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017477fi
17478
17479if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17480 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17481 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17482 echo "using lib$ipv6lib"
17483 else
17484 if test $ipv6trylibc = "yes"; then
17485 echo "using libc"
17486 else
17487 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17488 echo "You need to fetch lib$ipv6lib.a from appropriate"
17489 echo 'ipv6 kit and compile beforehand.'
17490 exit 1
17491 fi
17492 fi
17493fi
17494
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017495{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17496echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017497cat >conftest.$ac_ext <<_ACEOF
17498/* confdefs.h. */
17499_ACEOF
17500cat confdefs.h >>conftest.$ac_ext
17501cat >>conftest.$ac_ext <<_ACEOF
17502/* end confdefs.h. */
17503#include <Carbon/Carbon.h>
17504int
17505main ()
17506{
17507FSIORefNum fRef = 0
17508 ;
17509 return 0;
17510}
17511_ACEOF
17512rm -f conftest.$ac_objext
17513if { (ac_try="$ac_compile"
17514case "(($ac_try" in
17515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17516 *) ac_try_echo=$ac_try;;
17517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017519 (eval "$ac_compile") 2>conftest.er1
17520 ac_status=$?
17521 grep -v '^ *+' conftest.er1 >conftest.err
17522 rm -f conftest.er1
17523 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017525 (exit $ac_status); } && {
17526 test -z "$ac_c_werror_flag" ||
17527 test ! -s conftest.err
17528 } && test -s conftest.$ac_objext; then
17529
17530cat >>confdefs.h <<\_ACEOF
17531#define HAVE_OSX105_SDK 1
17532_ACEOF
17533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017534 { echo "$as_me:$LINENO: result: yes" >&5
17535echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017536else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017537 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017538sed 's/^/| /' conftest.$ac_ext >&5
17539
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017540 { echo "$as_me:$LINENO: result: no" >&5
17541echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017542
17543fi
17544
17545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17546
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017547# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017548{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17549echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017550
Martin v. Löwiseba40652007-08-30 20:10:57 +000017551# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017552if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017553 withval=$with_doc_strings;
17554fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017555
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017556
17557if test -z "$with_doc_strings"
17558then with_doc_strings="yes"
17559fi
17560if test "$with_doc_strings" != "no"
17561then
17562
17563cat >>confdefs.h <<\_ACEOF
17564#define WITH_DOC_STRINGS 1
17565_ACEOF
17566
17567fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017568{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17569echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017570
Neil Schemenauera35c6882001-02-27 04:45:05 +000017571# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017572{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17573echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017574
Martin v. Löwiseba40652007-08-30 20:10:57 +000017575# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017576if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017577 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017578if test "$withval" != no
17579then
17580
17581cat >>confdefs.h <<\_ACEOF
17582#define WITH_TSC 1
17583_ACEOF
17584
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017585 { echo "$as_me:$LINENO: result: yes" >&5
17586echo "${ECHO_T}yes" >&6; }
17587else { echo "$as_me:$LINENO: result: no" >&5
17588echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017589fi
17590else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017591 { echo "$as_me:$LINENO: result: no" >&5
17592echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017593fi
17594
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017595
17596# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017597{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17598echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017599
Martin v. Löwiseba40652007-08-30 20:10:57 +000017600# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017601if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017602 withval=$with_pymalloc;
17603fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017604
Neil Schemenauera35c6882001-02-27 04:45:05 +000017605
Neil Schemenauer16c22972002-03-22 15:34:49 +000017606if test -z "$with_pymalloc"
17607then with_pymalloc="yes"
17608fi
17609if test "$with_pymalloc" != "no"
17610then
Martin v. Löwis11437992002-04-12 09:54:03 +000017611
17612cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017613#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017614_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017615
17616fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017617{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17618echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017619
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017620# Check for Valgrind support
17621{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17622echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17623
17624# Check whether --with-valgrind was given.
17625if test "${with_valgrind+set}" = set; then
17626 withval=$with_valgrind;
17627else
17628 with_valgrind=no
17629fi
17630
17631{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17632echo "${ECHO_T}$with_valgrind" >&6; }
17633if test "$with_valgrind" != no; then
17634 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17635 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17636echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17637if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17638 echo $ECHO_N "(cached) $ECHO_C" >&6
17639fi
17640{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17641echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17642else
17643 # Is the header compilable?
17644{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17645echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17646cat >conftest.$ac_ext <<_ACEOF
17647/* confdefs.h. */
17648_ACEOF
17649cat confdefs.h >>conftest.$ac_ext
17650cat >>conftest.$ac_ext <<_ACEOF
17651/* end confdefs.h. */
17652$ac_includes_default
17653#include <valgrind/valgrind.h>
17654_ACEOF
17655rm -f conftest.$ac_objext
17656if { (ac_try="$ac_compile"
17657case "(($ac_try" in
17658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17659 *) ac_try_echo=$ac_try;;
17660esac
17661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17662 (eval "$ac_compile") 2>conftest.er1
17663 ac_status=$?
17664 grep -v '^ *+' conftest.er1 >conftest.err
17665 rm -f conftest.er1
17666 cat conftest.err >&5
17667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17668 (exit $ac_status); } && {
17669 test -z "$ac_c_werror_flag" ||
17670 test ! -s conftest.err
17671 } && test -s conftest.$ac_objext; then
17672 ac_header_compiler=yes
17673else
17674 echo "$as_me: failed program was:" >&5
17675sed 's/^/| /' conftest.$ac_ext >&5
17676
17677 ac_header_compiler=no
17678fi
17679
17680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17681{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17682echo "${ECHO_T}$ac_header_compiler" >&6; }
17683
17684# Is the header present?
17685{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17686echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17687cat >conftest.$ac_ext <<_ACEOF
17688/* confdefs.h. */
17689_ACEOF
17690cat confdefs.h >>conftest.$ac_ext
17691cat >>conftest.$ac_ext <<_ACEOF
17692/* end confdefs.h. */
17693#include <valgrind/valgrind.h>
17694_ACEOF
17695if { (ac_try="$ac_cpp conftest.$ac_ext"
17696case "(($ac_try" in
17697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17698 *) ac_try_echo=$ac_try;;
17699esac
17700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17701 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17702 ac_status=$?
17703 grep -v '^ *+' conftest.er1 >conftest.err
17704 rm -f conftest.er1
17705 cat conftest.err >&5
17706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17707 (exit $ac_status); } >/dev/null && {
17708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17709 test ! -s conftest.err
17710 }; then
17711 ac_header_preproc=yes
17712else
17713 echo "$as_me: failed program was:" >&5
17714sed 's/^/| /' conftest.$ac_ext >&5
17715
17716 ac_header_preproc=no
17717fi
17718
17719rm -f conftest.err conftest.$ac_ext
17720{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17721echo "${ECHO_T}$ac_header_preproc" >&6; }
17722
17723# So? What about this header?
17724case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17725 yes:no: )
17726 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17727echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17728 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17729echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17730 ac_header_preproc=yes
17731 ;;
17732 no:yes:* )
17733 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17734echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17735 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17736echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17737 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17738echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17739 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17740echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17741 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17742echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17743 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17744echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17745 ( cat <<\_ASBOX
17746## -------------------------------------- ##
17747## Report this to http://bugs.python.org/ ##
17748## -------------------------------------- ##
17749_ASBOX
17750 ) | sed "s/^/$as_me: WARNING: /" >&2
17751 ;;
17752esac
17753{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17754echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17755if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17756 echo $ECHO_N "(cached) $ECHO_C" >&6
17757else
17758 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17759fi
17760{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17761echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17762
17763fi
17764if test $ac_cv_header_valgrind_valgrind_h = yes; then
17765
17766cat >>confdefs.h <<\_ACEOF
17767#define WITH_VALGRIND 1
17768_ACEOF
17769
17770else
17771 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17772echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17773 { (exit 1); exit 1; }; }
17774
17775fi
17776
17777
17778fi
17779
Barry Warsawef82cd72000-06-30 16:21:01 +000017780# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017781{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17782echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017783
Martin v. Löwiseba40652007-08-30 20:10:57 +000017784# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017785if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017786 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017787if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017788then
17789
17790cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017791#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017792_ACEOF
17793
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017794 { echo "$as_me:$LINENO: result: yes" >&5
17795echo "${ECHO_T}yes" >&6; }
17796else { echo "$as_me:$LINENO: result: no" >&5
17797echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017798fi
17799else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017800 { echo "$as_me:$LINENO: result: no" >&5
17801echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017802fi
17803
Barry Warsawef82cd72000-06-30 16:21:01 +000017804
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017805# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017806
Guido van Rossum98935bf2001-09-05 19:13:16 +000017807DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017808
Guido van Rossume97ee181999-12-20 21:27:22 +000017809# the dlopen() function means we might want to use dynload_shlib.o. some
17810# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017811
Thomas Wouters3a584202000-08-05 23:28:51 +000017812for ac_func in dlopen
17813do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017814as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17815{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17816echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017817if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017818 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017819else
Martin v. Löwis11437992002-04-12 09:54:03 +000017820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017821/* confdefs.h. */
17822_ACEOF
17823cat confdefs.h >>conftest.$ac_ext
17824cat >>conftest.$ac_ext <<_ACEOF
17825/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017826/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17827 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17828#define $ac_func innocuous_$ac_func
17829
Guido van Rossume97ee181999-12-20 21:27:22 +000017830/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017831 which can conflict with char $ac_func (); below.
17832 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017833 <limits.h> exists even on freestanding compilers. */
17834
17835#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017836# include <limits.h>
17837#else
17838# include <assert.h>
17839#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017840
17841#undef $ac_func
17842
Martin v. Löwiseba40652007-08-30 20:10:57 +000017843/* Override any GCC internal prototype to avoid an error.
17844 Use char because int might match the return type of a GCC
17845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017846#ifdef __cplusplus
17847extern "C"
17848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017849char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017850/* The GNU C library defines this for functions which it implements
17851 to always fail with ENOSYS. Some functions are actually named
17852 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017853#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017854choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017855#endif
17856
Skip Montanaro6dead952003-09-25 14:50:04 +000017857int
17858main ()
17859{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017860return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017861 ;
17862 return 0;
17863}
17864_ACEOF
17865rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017866if { (ac_try="$ac_link"
17867case "(($ac_try" in
17868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17869 *) ac_try_echo=$ac_try;;
17870esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017872 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017874 grep -v '^ *+' conftest.er1 >conftest.err
17875 rm -f conftest.er1
17876 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017878 (exit $ac_status); } && {
17879 test -z "$ac_c_werror_flag" ||
17880 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017881 } && test -s conftest$ac_exeext &&
17882 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017883 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017884else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017886sed 's/^/| /' conftest.$ac_ext >&5
17887
Martin v. Löwiseba40652007-08-30 20:10:57 +000017888 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017890
17891rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017892 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017893fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017894ac_res=`eval echo '${'$as_ac_var'}'`
17895 { echo "$as_me:$LINENO: result: $ac_res" >&5
17896echo "${ECHO_T}$ac_res" >&6; }
17897if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017898 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017899#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017900_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017901
Guido van Rossume97ee181999-12-20 21:27:22 +000017902fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017903done
Guido van Rossume97ee181999-12-20 21:27:22 +000017904
Michael W. Hudson54241132001-12-07 15:38:26 +000017905
Guido van Rossume97ee181999-12-20 21:27:22 +000017906# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17907# loading of modules.
17908
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017909{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17910echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017911if test -z "$DYNLOADFILE"
17912then
17913 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017914 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17915 if test "$ac_cv_func_dlopen" = yes
17916 then DYNLOADFILE="dynload_shlib.o"
17917 else DYNLOADFILE="dynload_aix.o"
17918 fi
17919 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017920 BeOS*) DYNLOADFILE="dynload_beos.o";;
17921 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017922 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17923 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017924 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017925 *)
17926 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17927 # out any dynamic loading
17928 if test "$ac_cv_func_dlopen" = yes
17929 then DYNLOADFILE="dynload_shlib.o"
17930 else DYNLOADFILE="dynload_stub.o"
17931 fi
17932 ;;
17933 esac
17934fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017935{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17936echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017937if test "$DYNLOADFILE" != "dynload_stub.o"
17938then
Martin v. Löwis11437992002-04-12 09:54:03 +000017939
17940cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017941#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017942_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017943
17944fi
17945
Neil Schemenauer4e425612001-06-19 15:44:15 +000017946# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17947
Michael W. Hudson54241132001-12-07 15:38:26 +000017948
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017949{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17950echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017951if test -z "$MACHDEP_OBJS"
17952then
Jack Jansene578a632001-08-15 01:27:14 +000017953 MACHDEP_OBJS=$extra_machdep_objs
17954else
17955 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017956fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017957{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17958echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017959
Guido van Rossum627b2d71993-12-24 10:39:16 +000017960# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017961
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
18028
18029
18030
18031
Martin v. Löwisd6320502004-08-12 13:45:08 +000018032
Martin v. Löwisc3001752005-01-23 09:27:24 +000018033
18034
Neal Norwitz05a45592006-03-20 06:30:08 +000018035
18036
Martin v. Löwis382abef2007-02-19 10:55:19 +000018037
18038
Christian Heimes36281872007-11-30 21:11:28 +000018039
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018040
18041
Jesse Noller355b1262009-04-02 00:03:28 +000018042
18043
18044
18045
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018059
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018060for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18061 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018062 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018063 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018064 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018065 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018066 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018067 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18068 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018069 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018070 setlocale setregid setreuid setresuid setresgid \
18071 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018072 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018073 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018074 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018075do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018076as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18077{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18078echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018079if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018081else
Martin v. Löwis11437992002-04-12 09:54:03 +000018082 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018083/* confdefs.h. */
18084_ACEOF
18085cat confdefs.h >>conftest.$ac_ext
18086cat >>conftest.$ac_ext <<_ACEOF
18087/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018088/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18089 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18090#define $ac_func innocuous_$ac_func
18091
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018092/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018093 which can conflict with char $ac_func (); below.
18094 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018095 <limits.h> exists even on freestanding compilers. */
18096
18097#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018098# include <limits.h>
18099#else
18100# include <assert.h>
18101#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018102
18103#undef $ac_func
18104
Martin v. Löwiseba40652007-08-30 20:10:57 +000018105/* Override any GCC internal prototype to avoid an error.
18106 Use char because int might match the return type of a GCC
18107 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018108#ifdef __cplusplus
18109extern "C"
18110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018111char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018112/* The GNU C library defines this for functions which it implements
18113 to always fail with ENOSYS. Some functions are actually named
18114 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018115#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018116choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018117#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018118
Skip Montanaro6dead952003-09-25 14:50:04 +000018119int
18120main ()
18121{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018122return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018123 ;
18124 return 0;
18125}
18126_ACEOF
18127rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018128if { (ac_try="$ac_link"
18129case "(($ac_try" in
18130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18131 *) ac_try_echo=$ac_try;;
18132esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018134 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018136 grep -v '^ *+' conftest.er1 >conftest.err
18137 rm -f conftest.er1
18138 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018140 (exit $ac_status); } && {
18141 test -z "$ac_c_werror_flag" ||
18142 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018143 } && test -s conftest$ac_exeext &&
18144 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018145 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018146else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018148sed 's/^/| /' conftest.$ac_ext >&5
18149
Martin v. Löwiseba40652007-08-30 20:10:57 +000018150 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018152
18153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018154 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018155fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018156ac_res=`eval echo '${'$as_ac_var'}'`
18157 { echo "$as_me:$LINENO: result: $ac_res" >&5
18158echo "${ECHO_T}$ac_res" >&6; }
18159if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018160 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018161#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018162_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018163
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018164fi
18165done
18166
Michael W. Hudson54241132001-12-07 15:38:26 +000018167
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018168# For some functions, having a definition is not sufficient, since
18169# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018170{ echo "$as_me:$LINENO: checking for chroot" >&5
18171echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018172cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018173/* confdefs.h. */
18174_ACEOF
18175cat confdefs.h >>conftest.$ac_ext
18176cat >>conftest.$ac_ext <<_ACEOF
18177/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018178#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018179int
18180main ()
18181{
18182void *x=chroot
18183 ;
18184 return 0;
18185}
18186_ACEOF
18187rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018188if { (ac_try="$ac_compile"
18189case "(($ac_try" in
18190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18191 *) ac_try_echo=$ac_try;;
18192esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018194 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018196 grep -v '^ *+' conftest.er1 >conftest.err
18197 rm -f conftest.er1
18198 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018200 (exit $ac_status); } && {
18201 test -z "$ac_c_werror_flag" ||
18202 test ! -s conftest.err
18203 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018204
18205cat >>confdefs.h <<\_ACEOF
18206#define HAVE_CHROOT 1
18207_ACEOF
18208
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018209 { echo "$as_me:$LINENO: result: yes" >&5
18210echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018211else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018213sed 's/^/| /' conftest.$ac_ext >&5
18214
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018215 { echo "$as_me:$LINENO: result: no" >&5
18216echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018217
18218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018219
18220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018221{ echo "$as_me:$LINENO: checking for link" >&5
18222echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018224/* confdefs.h. */
18225_ACEOF
18226cat confdefs.h >>conftest.$ac_ext
18227cat >>conftest.$ac_ext <<_ACEOF
18228/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018229#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018230int
18231main ()
18232{
18233void *x=link
18234 ;
18235 return 0;
18236}
18237_ACEOF
18238rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018239if { (ac_try="$ac_compile"
18240case "(($ac_try" in
18241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18242 *) ac_try_echo=$ac_try;;
18243esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018245 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018247 grep -v '^ *+' conftest.er1 >conftest.err
18248 rm -f conftest.er1
18249 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018251 (exit $ac_status); } && {
18252 test -z "$ac_c_werror_flag" ||
18253 test ! -s conftest.err
18254 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018255
18256cat >>confdefs.h <<\_ACEOF
18257#define HAVE_LINK 1
18258_ACEOF
18259
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018260 { echo "$as_me:$LINENO: result: yes" >&5
18261echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018262else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018264sed 's/^/| /' conftest.$ac_ext >&5
18265
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018266 { echo "$as_me:$LINENO: result: no" >&5
18267echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018268
18269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018270
18271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018272{ echo "$as_me:$LINENO: checking for symlink" >&5
18273echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018274cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018275/* confdefs.h. */
18276_ACEOF
18277cat confdefs.h >>conftest.$ac_ext
18278cat >>conftest.$ac_ext <<_ACEOF
18279/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018280#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018281int
18282main ()
18283{
18284void *x=symlink
18285 ;
18286 return 0;
18287}
18288_ACEOF
18289rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018290if { (ac_try="$ac_compile"
18291case "(($ac_try" in
18292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18293 *) ac_try_echo=$ac_try;;
18294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018298 grep -v '^ *+' conftest.er1 >conftest.err
18299 rm -f conftest.er1
18300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018302 (exit $ac_status); } && {
18303 test -z "$ac_c_werror_flag" ||
18304 test ! -s conftest.err
18305 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018306
18307cat >>confdefs.h <<\_ACEOF
18308#define HAVE_SYMLINK 1
18309_ACEOF
18310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018311 { echo "$as_me:$LINENO: result: yes" >&5
18312echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018315sed 's/^/| /' conftest.$ac_ext >&5
18316
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018317 { echo "$as_me:$LINENO: result: no" >&5
18318echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018319
18320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018321
18322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018323{ echo "$as_me:$LINENO: checking for fchdir" >&5
18324echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018325cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018326/* confdefs.h. */
18327_ACEOF
18328cat confdefs.h >>conftest.$ac_ext
18329cat >>conftest.$ac_ext <<_ACEOF
18330/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018331#include <unistd.h>
18332int
18333main ()
18334{
18335void *x=fchdir
18336 ;
18337 return 0;
18338}
18339_ACEOF
18340rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018341if { (ac_try="$ac_compile"
18342case "(($ac_try" in
18343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18344 *) ac_try_echo=$ac_try;;
18345esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018347 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018349 grep -v '^ *+' conftest.er1 >conftest.err
18350 rm -f conftest.er1
18351 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018353 (exit $ac_status); } && {
18354 test -z "$ac_c_werror_flag" ||
18355 test ! -s conftest.err
18356 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018357
18358cat >>confdefs.h <<\_ACEOF
18359#define HAVE_FCHDIR 1
18360_ACEOF
18361
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018362 { echo "$as_me:$LINENO: result: yes" >&5
18363echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018366sed 's/^/| /' conftest.$ac_ext >&5
18367
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018368 { echo "$as_me:$LINENO: result: no" >&5
18369echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018370
18371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018372
18373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018374{ echo "$as_me:$LINENO: checking for fsync" >&5
18375echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018376cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018377/* confdefs.h. */
18378_ACEOF
18379cat confdefs.h >>conftest.$ac_ext
18380cat >>conftest.$ac_ext <<_ACEOF
18381/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018382#include <unistd.h>
18383int
18384main ()
18385{
18386void *x=fsync
18387 ;
18388 return 0;
18389}
18390_ACEOF
18391rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018392if { (ac_try="$ac_compile"
18393case "(($ac_try" in
18394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18395 *) ac_try_echo=$ac_try;;
18396esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018400 grep -v '^ *+' conftest.er1 >conftest.err
18401 rm -f conftest.er1
18402 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018404 (exit $ac_status); } && {
18405 test -z "$ac_c_werror_flag" ||
18406 test ! -s conftest.err
18407 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018408
18409cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018410#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018411_ACEOF
18412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018413 { echo "$as_me:$LINENO: result: yes" >&5
18414echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018415else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018417sed 's/^/| /' conftest.$ac_ext >&5
18418
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018419 { echo "$as_me:$LINENO: result: no" >&5
18420echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018421
18422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018423
18424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018425{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18426echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018427cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018428/* confdefs.h. */
18429_ACEOF
18430cat confdefs.h >>conftest.$ac_ext
18431cat >>conftest.$ac_ext <<_ACEOF
18432/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018433#include <unistd.h>
18434int
18435main ()
18436{
18437void *x=fdatasync
18438 ;
18439 return 0;
18440}
18441_ACEOF
18442rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018443if { (ac_try="$ac_compile"
18444case "(($ac_try" in
18445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18446 *) ac_try_echo=$ac_try;;
18447esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018451 grep -v '^ *+' conftest.er1 >conftest.err
18452 rm -f conftest.er1
18453 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018455 (exit $ac_status); } && {
18456 test -z "$ac_c_werror_flag" ||
18457 test ! -s conftest.err
18458 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018459
18460cat >>confdefs.h <<\_ACEOF
18461#define HAVE_FDATASYNC 1
18462_ACEOF
18463
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018464 { echo "$as_me:$LINENO: result: yes" >&5
18465echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018466else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018468sed 's/^/| /' conftest.$ac_ext >&5
18469
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018470 { echo "$as_me:$LINENO: result: no" >&5
18471echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018472
18473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018474
18475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018476{ echo "$as_me:$LINENO: checking for epoll" >&5
18477echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018478cat >conftest.$ac_ext <<_ACEOF
18479/* confdefs.h. */
18480_ACEOF
18481cat confdefs.h >>conftest.$ac_ext
18482cat >>conftest.$ac_ext <<_ACEOF
18483/* end confdefs.h. */
18484#include <sys/epoll.h>
18485int
18486main ()
18487{
18488void *x=epoll_create
18489 ;
18490 return 0;
18491}
18492_ACEOF
18493rm -f conftest.$ac_objext
18494if { (ac_try="$ac_compile"
18495case "(($ac_try" in
18496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18497 *) ac_try_echo=$ac_try;;
18498esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018500 (eval "$ac_compile") 2>conftest.er1
18501 ac_status=$?
18502 grep -v '^ *+' conftest.er1 >conftest.err
18503 rm -f conftest.er1
18504 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018506 (exit $ac_status); } && {
18507 test -z "$ac_c_werror_flag" ||
18508 test ! -s conftest.err
18509 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018510
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018511cat >>confdefs.h <<\_ACEOF
18512#define HAVE_EPOLL 1
18513_ACEOF
18514
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018515 { echo "$as_me:$LINENO: result: yes" >&5
18516echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018518 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018519sed 's/^/| /' conftest.$ac_ext >&5
18520
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018521 { echo "$as_me:$LINENO: result: no" >&5
18522echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018523
18524fi
18525
18526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018527{ echo "$as_me:$LINENO: checking for kqueue" >&5
18528echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018529cat >conftest.$ac_ext <<_ACEOF
18530/* confdefs.h. */
18531_ACEOF
18532cat confdefs.h >>conftest.$ac_ext
18533cat >>conftest.$ac_ext <<_ACEOF
18534/* end confdefs.h. */
18535
18536#include <sys/types.h>
18537#include <sys/event.h>
18538
18539int
18540main ()
18541{
18542int x=kqueue()
18543 ;
18544 return 0;
18545}
18546_ACEOF
18547rm -f conftest.$ac_objext
18548if { (ac_try="$ac_compile"
18549case "(($ac_try" in
18550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18551 *) ac_try_echo=$ac_try;;
18552esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018554 (eval "$ac_compile") 2>conftest.er1
18555 ac_status=$?
18556 grep -v '^ *+' conftest.er1 >conftest.err
18557 rm -f conftest.er1
18558 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018560 (exit $ac_status); } && {
18561 test -z "$ac_c_werror_flag" ||
18562 test ! -s conftest.err
18563 } && test -s conftest.$ac_objext; then
18564
18565cat >>confdefs.h <<\_ACEOF
18566#define HAVE_KQUEUE 1
18567_ACEOF
18568
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018569 { echo "$as_me:$LINENO: result: yes" >&5
18570echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018571else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018572 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018573sed 's/^/| /' conftest.$ac_ext >&5
18574
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018575 { echo "$as_me:$LINENO: result: no" >&5
18576echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018577
18578fi
18579
18580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018581# On some systems (eg. FreeBSD 5), we would find a definition of the
18582# functions ctermid_r, setgroups in the library, but no prototype
18583# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18584# address to avoid compiler warnings and potential miscompilations
18585# because of the missing prototypes.
18586
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018587{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18588echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018589cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018590/* confdefs.h. */
18591_ACEOF
18592cat confdefs.h >>conftest.$ac_ext
18593cat >>conftest.$ac_ext <<_ACEOF
18594/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018595
18596#include "confdefs.h"
18597#include <stdio.h>
18598
Martin v. Löwisd5843682002-11-21 20:41:28 +000018599int
18600main ()
18601{
18602void* p = ctermid_r
18603 ;
18604 return 0;
18605}
18606_ACEOF
18607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018608if { (ac_try="$ac_compile"
18609case "(($ac_try" in
18610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18611 *) ac_try_echo=$ac_try;;
18612esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018616 grep -v '^ *+' conftest.er1 >conftest.err
18617 rm -f conftest.er1
18618 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018620 (exit $ac_status); } && {
18621 test -z "$ac_c_werror_flag" ||
18622 test ! -s conftest.err
18623 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018624
18625cat >>confdefs.h <<\_ACEOF
18626#define HAVE_CTERMID_R 1
18627_ACEOF
18628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018629 { echo "$as_me:$LINENO: result: yes" >&5
18630echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018631else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018633sed 's/^/| /' conftest.$ac_ext >&5
18634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018635 { echo "$as_me:$LINENO: result: no" >&5
18636echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018637
18638fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018639
Martin v. Löwiseba40652007-08-30 20:10:57 +000018640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018642{ echo "$as_me:$LINENO: checking for flock" >&5
18643echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018645/* confdefs.h. */
18646_ACEOF
18647cat confdefs.h >>conftest.$ac_ext
18648cat >>conftest.$ac_ext <<_ACEOF
18649/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018650
18651#include "confdefs.h"
18652#include <sys/file.h>
18653
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018654int
18655main ()
18656{
18657void* p = flock
18658 ;
18659 return 0;
18660}
18661_ACEOF
18662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018663if { (ac_try="$ac_compile"
18664case "(($ac_try" in
18665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18666 *) ac_try_echo=$ac_try;;
18667esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018671 grep -v '^ *+' conftest.er1 >conftest.err
18672 rm -f conftest.er1
18673 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018675 (exit $ac_status); } && {
18676 test -z "$ac_c_werror_flag" ||
18677 test ! -s conftest.err
18678 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018679
18680cat >>confdefs.h <<\_ACEOF
18681#define HAVE_FLOCK 1
18682_ACEOF
18683
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018684 { echo "$as_me:$LINENO: result: yes" >&5
18685echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018686else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018688sed 's/^/| /' conftest.$ac_ext >&5
18689
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018690 { echo "$as_me:$LINENO: result: no" >&5
18691echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018692
18693fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018694
Martin v. Löwiseba40652007-08-30 20:10:57 +000018695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18696
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018697{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18698echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018700/* confdefs.h. */
18701_ACEOF
18702cat confdefs.h >>conftest.$ac_ext
18703cat >>conftest.$ac_ext <<_ACEOF
18704/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018705
18706#include "confdefs.h"
18707#include <unistd.h>
18708
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018709int
18710main ()
18711{
18712void* p = getpagesize
18713 ;
18714 return 0;
18715}
18716_ACEOF
18717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018718if { (ac_try="$ac_compile"
18719case "(($ac_try" in
18720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18721 *) ac_try_echo=$ac_try;;
18722esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018726 grep -v '^ *+' conftest.er1 >conftest.err
18727 rm -f conftest.er1
18728 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018730 (exit $ac_status); } && {
18731 test -z "$ac_c_werror_flag" ||
18732 test ! -s conftest.err
18733 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018734
18735cat >>confdefs.h <<\_ACEOF
18736#define HAVE_GETPAGESIZE 1
18737_ACEOF
18738
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018739 { echo "$as_me:$LINENO: result: yes" >&5
18740echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018741else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018743sed 's/^/| /' conftest.$ac_ext >&5
18744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018745 { echo "$as_me:$LINENO: result: no" >&5
18746echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018747
18748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018749
18750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018751
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018752for ac_prog in true
18753do
18754 # Extract the first word of "$ac_prog", so it can be a program name with args.
18755set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018756{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18757echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018758if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018759 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018760else
18761 if test -n "$TRUE"; then
18762 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18763else
18764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18765for as_dir in $PATH
18766do
18767 IFS=$as_save_IFS
18768 test -z "$as_dir" && as_dir=.
18769 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018770 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 +000018771 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018772 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018773 break 2
18774 fi
18775done
18776done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018777IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018778
18779fi
18780fi
18781TRUE=$ac_cv_prog_TRUE
18782if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018783 { echo "$as_me:$LINENO: result: $TRUE" >&5
18784echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018785else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018786 { echo "$as_me:$LINENO: result: no" >&5
18787echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018788fi
18789
Martin v. Löwiseba40652007-08-30 20:10:57 +000018790
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018791 test -n "$TRUE" && break
18792done
18793test -n "$TRUE" || TRUE="/bin/true"
18794
18795
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018796{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18797echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018798if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018799 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018800else
18801 ac_check_lib_save_LIBS=$LIBS
18802LIBS="-lc $LIBS"
18803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018804/* confdefs.h. */
18805_ACEOF
18806cat confdefs.h >>conftest.$ac_ext
18807cat >>conftest.$ac_ext <<_ACEOF
18808/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018809
Martin v. Löwiseba40652007-08-30 20:10:57 +000018810/* Override any GCC internal prototype to avoid an error.
18811 Use char because int might match the return type of a GCC
18812 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018813#ifdef __cplusplus
18814extern "C"
18815#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018816char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018817int
18818main ()
18819{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018820return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018821 ;
18822 return 0;
18823}
18824_ACEOF
18825rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018826if { (ac_try="$ac_link"
18827case "(($ac_try" in
18828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18829 *) ac_try_echo=$ac_try;;
18830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018832 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018834 grep -v '^ *+' conftest.er1 >conftest.err
18835 rm -f conftest.er1
18836 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018838 (exit $ac_status); } && {
18839 test -z "$ac_c_werror_flag" ||
18840 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018841 } && test -s conftest$ac_exeext &&
18842 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018843 ac_cv_lib_c_inet_aton=yes
18844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018846sed 's/^/| /' conftest.$ac_ext >&5
18847
Martin v. Löwiseba40652007-08-30 20:10:57 +000018848 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018850
18851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018853LIBS=$ac_check_lib_save_LIBS
18854fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018855{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18856echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18857if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018858 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018859else
18860
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018861{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18862echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018863if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018864 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018865else
18866 ac_check_lib_save_LIBS=$LIBS
18867LIBS="-lresolv $LIBS"
18868cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018869/* confdefs.h. */
18870_ACEOF
18871cat confdefs.h >>conftest.$ac_ext
18872cat >>conftest.$ac_ext <<_ACEOF
18873/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018874
Martin v. Löwiseba40652007-08-30 20:10:57 +000018875/* Override any GCC internal prototype to avoid an error.
18876 Use char because int might match the return type of a GCC
18877 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018878#ifdef __cplusplus
18879extern "C"
18880#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018881char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018882int
18883main ()
18884{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018885return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018886 ;
18887 return 0;
18888}
18889_ACEOF
18890rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018891if { (ac_try="$ac_link"
18892case "(($ac_try" in
18893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18894 *) ac_try_echo=$ac_try;;
18895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018897 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018899 grep -v '^ *+' conftest.er1 >conftest.err
18900 rm -f conftest.er1
18901 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018903 (exit $ac_status); } && {
18904 test -z "$ac_c_werror_flag" ||
18905 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018906 } && test -s conftest$ac_exeext &&
18907 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018908 ac_cv_lib_resolv_inet_aton=yes
18909else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018911sed 's/^/| /' conftest.$ac_ext >&5
18912
Martin v. Löwiseba40652007-08-30 20:10:57 +000018913 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018915
18916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018917 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018918LIBS=$ac_check_lib_save_LIBS
18919fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018920{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18921echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18922if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018923 cat >>confdefs.h <<_ACEOF
18924#define HAVE_LIBRESOLV 1
18925_ACEOF
18926
18927 LIBS="-lresolv $LIBS"
18928
18929fi
18930
18931
18932fi
18933
18934
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018935# On Tru64, chflags seems to be present, but calling it will
18936# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018937{ echo "$as_me:$LINENO: checking for chflags" >&5
18938echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018939if test "${ac_cv_have_chflags+set}" = set; then
18940 echo $ECHO_N "(cached) $ECHO_C" >&6
18941else
18942 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000018943 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018944else
18945 cat >conftest.$ac_ext <<_ACEOF
18946/* confdefs.h. */
18947_ACEOF
18948cat confdefs.h >>conftest.$ac_ext
18949cat >>conftest.$ac_ext <<_ACEOF
18950/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000018951[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018952#include <sys/stat.h>
18953#include <unistd.h>
18954int main(int argc, char*argv[])
18955{
18956 if(chflags(argv[0], 0) != 0)
18957 return 1;
18958 return 0;
18959}
Gregory P. Smith49437c22009-11-02 01:38:35 +000018960]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018961_ACEOF
18962rm -f conftest$ac_exeext
18963if { (ac_try="$ac_link"
18964case "(($ac_try" in
18965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18966 *) ac_try_echo=$ac_try;;
18967esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018969 (eval "$ac_link") 2>&5
18970 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18973 { (case "(($ac_try" in
18974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18975 *) ac_try_echo=$ac_try;;
18976esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018978 (eval "$ac_try") 2>&5
18979 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018981 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018982 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018983else
18984 echo "$as_me: program exited with status $ac_status" >&5
18985echo "$as_me: failed program was:" >&5
18986sed 's/^/| /' conftest.$ac_ext >&5
18987
18988( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018989ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018990fi
18991rm -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 +000018992fi
18993
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018994
18995
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018996fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018997{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18998echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000018999if test "$ac_cv_have_chflags" = cross ; then
19000 { echo "$as_me:$LINENO: checking for chflags" >&5
19001echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19002if test "${ac_cv_func_chflags+set}" = set; then
19003 echo $ECHO_N "(cached) $ECHO_C" >&6
19004else
19005 cat >conftest.$ac_ext <<_ACEOF
19006/* confdefs.h. */
19007_ACEOF
19008cat confdefs.h >>conftest.$ac_ext
19009cat >>conftest.$ac_ext <<_ACEOF
19010/* end confdefs.h. */
19011/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19012 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19013#define chflags innocuous_chflags
19014
19015/* System header to define __stub macros and hopefully few prototypes,
19016 which can conflict with char chflags (); below.
19017 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19018 <limits.h> exists even on freestanding compilers. */
19019
19020#ifdef __STDC__
19021# include <limits.h>
19022#else
19023# include <assert.h>
19024#endif
19025
19026#undef chflags
19027
19028/* Override any GCC internal prototype to avoid an error.
19029 Use char because int might match the return type of a GCC
19030 builtin and then its argument prototype would still apply. */
19031#ifdef __cplusplus
19032extern "C"
19033#endif
19034char chflags ();
19035/* The GNU C library defines this for functions which it implements
19036 to always fail with ENOSYS. Some functions are actually named
19037 something starting with __ and the normal name is an alias. */
19038#if defined __stub_chflags || defined __stub___chflags
19039choke me
19040#endif
19041
19042int
19043main ()
19044{
19045return chflags ();
19046 ;
19047 return 0;
19048}
19049_ACEOF
19050rm -f conftest.$ac_objext conftest$ac_exeext
19051if { (ac_try="$ac_link"
19052case "(($ac_try" in
19053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19054 *) ac_try_echo=$ac_try;;
19055esac
19056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19057 (eval "$ac_link") 2>conftest.er1
19058 ac_status=$?
19059 grep -v '^ *+' conftest.er1 >conftest.err
19060 rm -f conftest.er1
19061 cat conftest.err >&5
19062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19063 (exit $ac_status); } && {
19064 test -z "$ac_c_werror_flag" ||
19065 test ! -s conftest.err
19066 } && test -s conftest$ac_exeext &&
19067 $as_test_x conftest$ac_exeext; then
19068 ac_cv_func_chflags=yes
19069else
19070 echo "$as_me: failed program was:" >&5
19071sed 's/^/| /' conftest.$ac_ext >&5
19072
19073 ac_cv_func_chflags=no
19074fi
19075
19076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19077 conftest$ac_exeext conftest.$ac_ext
19078fi
19079{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19080echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19081if test $ac_cv_func_chflags = yes; then
19082 ac_cv_have_chflags="yes"
19083else
19084 ac_cv_have_chflags="no"
19085fi
19086
19087fi
19088if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019089
19090cat >>confdefs.h <<\_ACEOF
19091#define HAVE_CHFLAGS 1
19092_ACEOF
19093
19094fi
19095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019096{ echo "$as_me:$LINENO: checking for lchflags" >&5
19097echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019098if test "${ac_cv_have_lchflags+set}" = set; then
19099 echo $ECHO_N "(cached) $ECHO_C" >&6
19100else
19101 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019102 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019103else
19104 cat >conftest.$ac_ext <<_ACEOF
19105/* confdefs.h. */
19106_ACEOF
19107cat confdefs.h >>conftest.$ac_ext
19108cat >>conftest.$ac_ext <<_ACEOF
19109/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019110[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019111#include <sys/stat.h>
19112#include <unistd.h>
19113int main(int argc, char*argv[])
19114{
19115 if(lchflags(argv[0], 0) != 0)
19116 return 1;
19117 return 0;
19118}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019119]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019120_ACEOF
19121rm -f conftest$ac_exeext
19122if { (ac_try="$ac_link"
19123case "(($ac_try" in
19124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19125 *) ac_try_echo=$ac_try;;
19126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019128 (eval "$ac_link") 2>&5
19129 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19132 { (case "(($ac_try" in
19133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19134 *) ac_try_echo=$ac_try;;
19135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019137 (eval "$ac_try") 2>&5
19138 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019140 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019141 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019142else
19143 echo "$as_me: program exited with status $ac_status" >&5
19144echo "$as_me: failed program was:" >&5
19145sed 's/^/| /' conftest.$ac_ext >&5
19146
19147( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019148ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019149fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19151fi
19152
19153
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019154
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019155fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019156{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19157echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019158if test "$ac_cv_have_lchflags" = cross ; then
19159 { echo "$as_me:$LINENO: checking for lchflags" >&5
19160echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19161if test "${ac_cv_func_lchflags+set}" = set; then
19162 echo $ECHO_N "(cached) $ECHO_C" >&6
19163else
19164 cat >conftest.$ac_ext <<_ACEOF
19165/* confdefs.h. */
19166_ACEOF
19167cat confdefs.h >>conftest.$ac_ext
19168cat >>conftest.$ac_ext <<_ACEOF
19169/* end confdefs.h. */
19170/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19171 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19172#define lchflags innocuous_lchflags
19173
19174/* System header to define __stub macros and hopefully few prototypes,
19175 which can conflict with char lchflags (); below.
19176 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19177 <limits.h> exists even on freestanding compilers. */
19178
19179#ifdef __STDC__
19180# include <limits.h>
19181#else
19182# include <assert.h>
19183#endif
19184
19185#undef lchflags
19186
19187/* Override any GCC internal prototype to avoid an error.
19188 Use char because int might match the return type of a GCC
19189 builtin and then its argument prototype would still apply. */
19190#ifdef __cplusplus
19191extern "C"
19192#endif
19193char lchflags ();
19194/* The GNU C library defines this for functions which it implements
19195 to always fail with ENOSYS. Some functions are actually named
19196 something starting with __ and the normal name is an alias. */
19197#if defined __stub_lchflags || defined __stub___lchflags
19198choke me
19199#endif
19200
19201int
19202main ()
19203{
19204return lchflags ();
19205 ;
19206 return 0;
19207}
19208_ACEOF
19209rm -f conftest.$ac_objext conftest$ac_exeext
19210if { (ac_try="$ac_link"
19211case "(($ac_try" in
19212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19213 *) ac_try_echo=$ac_try;;
19214esac
19215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19216 (eval "$ac_link") 2>conftest.er1
19217 ac_status=$?
19218 grep -v '^ *+' conftest.er1 >conftest.err
19219 rm -f conftest.er1
19220 cat conftest.err >&5
19221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19222 (exit $ac_status); } && {
19223 test -z "$ac_c_werror_flag" ||
19224 test ! -s conftest.err
19225 } && test -s conftest$ac_exeext &&
19226 $as_test_x conftest$ac_exeext; then
19227 ac_cv_func_lchflags=yes
19228else
19229 echo "$as_me: failed program was:" >&5
19230sed 's/^/| /' conftest.$ac_ext >&5
19231
19232 ac_cv_func_lchflags=no
19233fi
19234
19235rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19236 conftest$ac_exeext conftest.$ac_ext
19237fi
19238{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19239echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19240if test $ac_cv_func_lchflags = yes; then
19241 ac_cv_have_lchflags="yes"
19242else
19243 ac_cv_have_lchflags="no"
19244fi
19245
19246fi
19247if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019248
19249cat >>confdefs.h <<\_ACEOF
19250#define HAVE_LCHFLAGS 1
19251_ACEOF
19252
19253fi
19254
Ronald Oussorenf8752642006-07-06 10:13:35 +000019255case $ac_sys_system/$ac_sys_release in
19256Darwin/*)
19257 _CUR_CFLAGS="${CFLAGS}"
19258 _CUR_LDFLAGS="${LDFLAGS}"
19259 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19260 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19261 ;;
19262esac
19263
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019264{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19265echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019266if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019267 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019268else
19269 ac_check_lib_save_LIBS=$LIBS
19270LIBS="-lz $LIBS"
19271cat >conftest.$ac_ext <<_ACEOF
19272/* confdefs.h. */
19273_ACEOF
19274cat confdefs.h >>conftest.$ac_ext
19275cat >>conftest.$ac_ext <<_ACEOF
19276/* end confdefs.h. */
19277
Martin v. Löwiseba40652007-08-30 20:10:57 +000019278/* Override any GCC internal prototype to avoid an error.
19279 Use char because int might match the return type of a GCC
19280 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019281#ifdef __cplusplus
19282extern "C"
19283#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019284char inflateCopy ();
19285int
19286main ()
19287{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019288return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019289 ;
19290 return 0;
19291}
19292_ACEOF
19293rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019294if { (ac_try="$ac_link"
19295case "(($ac_try" in
19296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19297 *) ac_try_echo=$ac_try;;
19298esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019300 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019301 ac_status=$?
19302 grep -v '^ *+' conftest.er1 >conftest.err
19303 rm -f conftest.er1
19304 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019306 (exit $ac_status); } && {
19307 test -z "$ac_c_werror_flag" ||
19308 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019309 } && test -s conftest$ac_exeext &&
19310 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019311 ac_cv_lib_z_inflateCopy=yes
19312else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019313 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019314sed 's/^/| /' conftest.$ac_ext >&5
19315
Martin v. Löwiseba40652007-08-30 20:10:57 +000019316 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019318
19319rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019320 conftest$ac_exeext conftest.$ac_ext
19321LIBS=$ac_check_lib_save_LIBS
19322fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019323{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19324echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19325if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019326
19327cat >>confdefs.h <<\_ACEOF
19328#define HAVE_ZLIB_COPY 1
19329_ACEOF
19330
19331fi
19332
19333
Ronald Oussorenf8752642006-07-06 10:13:35 +000019334case $ac_sys_system/$ac_sys_release in
19335Darwin/*)
19336 CFLAGS="${_CUR_CFLAGS}"
19337 LDFLAGS="${_CUR_LDFLAGS}"
19338 ;;
19339esac
19340
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019341{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19342echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019343cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019344/* confdefs.h. */
19345_ACEOF
19346cat confdefs.h >>conftest.$ac_ext
19347cat >>conftest.$ac_ext <<_ACEOF
19348/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019349
19350#include "confdefs.h"
19351#include <netdb.h>
19352
Martin v. Löwise9416172003-05-03 10:12:45 +000019353int
19354main ()
19355{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019356void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019357 ;
19358 return 0;
19359}
19360_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019361rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019362if { (ac_try="$ac_link"
19363case "(($ac_try" in
19364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19365 *) ac_try_echo=$ac_try;;
19366esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019368 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019369 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019370 grep -v '^ *+' conftest.er1 >conftest.err
19371 rm -f conftest.er1
19372 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019374 (exit $ac_status); } && {
19375 test -z "$ac_c_werror_flag" ||
19376 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019377 } && test -s conftest$ac_exeext &&
19378 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019379
19380cat >>confdefs.h <<\_ACEOF
19381#define HAVE_HSTRERROR 1
19382_ACEOF
19383
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019384 { echo "$as_me:$LINENO: result: yes" >&5
19385echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019386else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019388sed 's/^/| /' conftest.$ac_ext >&5
19389
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019390 { echo "$as_me:$LINENO: result: no" >&5
19391echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019392
19393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019394
19395rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019396 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019397
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019398{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19399echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019400cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019401/* confdefs.h. */
19402_ACEOF
19403cat confdefs.h >>conftest.$ac_ext
19404cat >>conftest.$ac_ext <<_ACEOF
19405/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019406
19407#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019408#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019409#include <sys/socket.h>
19410#include <netinet/in.h>
19411#include <arpa/inet.h>
19412
Martin v. Löwise9416172003-05-03 10:12:45 +000019413int
19414main ()
19415{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019416void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019417 ;
19418 return 0;
19419}
19420_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019421rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019422if { (ac_try="$ac_link"
19423case "(($ac_try" in
19424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19425 *) ac_try_echo=$ac_try;;
19426esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019428 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019430 grep -v '^ *+' conftest.er1 >conftest.err
19431 rm -f conftest.er1
19432 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019434 (exit $ac_status); } && {
19435 test -z "$ac_c_werror_flag" ||
19436 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019437 } && test -s conftest$ac_exeext &&
19438 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019439
19440cat >>confdefs.h <<\_ACEOF
19441#define HAVE_INET_ATON 1
19442_ACEOF
19443
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019444 { echo "$as_me:$LINENO: result: yes" >&5
19445echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019446else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019448sed 's/^/| /' conftest.$ac_ext >&5
19449
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019450 { echo "$as_me:$LINENO: result: no" >&5
19451echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019452
19453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019454
19455rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019456 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019457
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019458{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19459echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019460cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019461/* confdefs.h. */
19462_ACEOF
19463cat confdefs.h >>conftest.$ac_ext
19464cat >>conftest.$ac_ext <<_ACEOF
19465/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019466
19467#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019468#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019469#include <sys/socket.h>
19470#include <netinet/in.h>
19471#include <arpa/inet.h>
19472
Martin v. Löwise9416172003-05-03 10:12:45 +000019473int
19474main ()
19475{
19476void* p = inet_pton
19477 ;
19478 return 0;
19479}
19480_ACEOF
19481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019482if { (ac_try="$ac_compile"
19483case "(($ac_try" in
19484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19485 *) ac_try_echo=$ac_try;;
19486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019490 grep -v '^ *+' conftest.er1 >conftest.err
19491 rm -f conftest.er1
19492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019494 (exit $ac_status); } && {
19495 test -z "$ac_c_werror_flag" ||
19496 test ! -s conftest.err
19497 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019498
19499cat >>confdefs.h <<\_ACEOF
19500#define HAVE_INET_PTON 1
19501_ACEOF
19502
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019503 { echo "$as_me:$LINENO: result: yes" >&5
19504echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019505else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019507sed 's/^/| /' conftest.$ac_ext >&5
19508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019509 { echo "$as_me:$LINENO: result: no" >&5
19510echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019511
19512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019513
19514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019515
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019516# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019517{ echo "$as_me:$LINENO: checking for setgroups" >&5
19518echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019519cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019520/* confdefs.h. */
19521_ACEOF
19522cat confdefs.h >>conftest.$ac_ext
19523cat >>conftest.$ac_ext <<_ACEOF
19524/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019525
19526#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019527#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019528#ifdef HAVE_GRP_H
19529#include <grp.h>
19530#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019531
Martin v. Löwisd5843682002-11-21 20:41:28 +000019532int
19533main ()
19534{
19535void* p = setgroups
19536 ;
19537 return 0;
19538}
19539_ACEOF
19540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019541if { (ac_try="$ac_compile"
19542case "(($ac_try" in
19543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19544 *) ac_try_echo=$ac_try;;
19545esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019549 grep -v '^ *+' conftest.er1 >conftest.err
19550 rm -f conftest.er1
19551 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019553 (exit $ac_status); } && {
19554 test -z "$ac_c_werror_flag" ||
19555 test ! -s conftest.err
19556 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019557
19558cat >>confdefs.h <<\_ACEOF
19559#define HAVE_SETGROUPS 1
19560_ACEOF
19561
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019562 { echo "$as_me:$LINENO: result: yes" >&5
19563echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019566sed 's/^/| /' conftest.$ac_ext >&5
19567
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019568 { echo "$as_me:$LINENO: result: no" >&5
19569echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019570
19571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019572
19573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019574
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019575# check for openpty and forkpty
19576
Martin v. Löwis11437992002-04-12 09:54:03 +000019577
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019578for ac_func in openpty
19579do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019580as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19581{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19582echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019584 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019585else
Martin v. Löwis11437992002-04-12 09:54:03 +000019586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019587/* confdefs.h. */
19588_ACEOF
19589cat confdefs.h >>conftest.$ac_ext
19590cat >>conftest.$ac_ext <<_ACEOF
19591/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019592/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19593 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19594#define $ac_func innocuous_$ac_func
19595
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019596/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019597 which can conflict with char $ac_func (); below.
19598 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019599 <limits.h> exists even on freestanding compilers. */
19600
19601#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019602# include <limits.h>
19603#else
19604# include <assert.h>
19605#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019606
19607#undef $ac_func
19608
Martin v. Löwiseba40652007-08-30 20:10:57 +000019609/* Override any GCC internal prototype to avoid an error.
19610 Use char because int might match the return type of a GCC
19611 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019612#ifdef __cplusplus
19613extern "C"
19614#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019615char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019616/* The GNU C library defines this for functions which it implements
19617 to always fail with ENOSYS. Some functions are actually named
19618 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019619#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019620choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019621#endif
19622
Skip Montanaro6dead952003-09-25 14:50:04 +000019623int
19624main ()
19625{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019626return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019627 ;
19628 return 0;
19629}
19630_ACEOF
19631rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019632if { (ac_try="$ac_link"
19633case "(($ac_try" in
19634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19635 *) ac_try_echo=$ac_try;;
19636esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019638 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019640 grep -v '^ *+' conftest.er1 >conftest.err
19641 rm -f conftest.er1
19642 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019644 (exit $ac_status); } && {
19645 test -z "$ac_c_werror_flag" ||
19646 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019647 } && test -s conftest$ac_exeext &&
19648 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019649 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019650else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019652sed 's/^/| /' conftest.$ac_ext >&5
19653
Martin v. Löwiseba40652007-08-30 20:10:57 +000019654 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019656
19657rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019658 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019659fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019660ac_res=`eval echo '${'$as_ac_var'}'`
19661 { echo "$as_me:$LINENO: result: $ac_res" >&5
19662echo "${ECHO_T}$ac_res" >&6; }
19663if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019664 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019665#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019666_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019667
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019668else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019669 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19670echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019671if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019672 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019673else
Martin v. Löwis11437992002-04-12 09:54:03 +000019674 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019675LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019676cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019677/* confdefs.h. */
19678_ACEOF
19679cat confdefs.h >>conftest.$ac_ext
19680cat >>conftest.$ac_ext <<_ACEOF
19681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019682
Martin v. Löwiseba40652007-08-30 20:10:57 +000019683/* Override any GCC internal prototype to avoid an error.
19684 Use char because int might match the return type of a GCC
19685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019686#ifdef __cplusplus
19687extern "C"
19688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019689char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019690int
19691main ()
19692{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019693return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019694 ;
19695 return 0;
19696}
19697_ACEOF
19698rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019699if { (ac_try="$ac_link"
19700case "(($ac_try" in
19701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19702 *) ac_try_echo=$ac_try;;
19703esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019705 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019707 grep -v '^ *+' conftest.er1 >conftest.err
19708 rm -f conftest.er1
19709 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019711 (exit $ac_status); } && {
19712 test -z "$ac_c_werror_flag" ||
19713 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019714 } && test -s conftest$ac_exeext &&
19715 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019716 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019717else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019719sed 's/^/| /' conftest.$ac_ext >&5
19720
Martin v. Löwiseba40652007-08-30 20:10:57 +000019721 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019723
19724rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019726LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019727fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019728{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19729echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19730if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019731 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019732#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019733_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019734 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019735else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019736 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19737echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019738if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019740else
19741 ac_check_lib_save_LIBS=$LIBS
19742LIBS="-lbsd $LIBS"
19743cat >conftest.$ac_ext <<_ACEOF
19744/* confdefs.h. */
19745_ACEOF
19746cat confdefs.h >>conftest.$ac_ext
19747cat >>conftest.$ac_ext <<_ACEOF
19748/* end confdefs.h. */
19749
Martin v. Löwiseba40652007-08-30 20:10:57 +000019750/* Override any GCC internal prototype to avoid an error.
19751 Use char because int might match the return type of a GCC
19752 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019753#ifdef __cplusplus
19754extern "C"
19755#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019756char openpty ();
19757int
19758main ()
19759{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019760return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019761 ;
19762 return 0;
19763}
19764_ACEOF
19765rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019766if { (ac_try="$ac_link"
19767case "(($ac_try" in
19768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19769 *) ac_try_echo=$ac_try;;
19770esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019772 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019773 ac_status=$?
19774 grep -v '^ *+' conftest.er1 >conftest.err
19775 rm -f conftest.er1
19776 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019778 (exit $ac_status); } && {
19779 test -z "$ac_c_werror_flag" ||
19780 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019781 } && test -s conftest$ac_exeext &&
19782 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019783 ac_cv_lib_bsd_openpty=yes
19784else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019785 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019786sed 's/^/| /' conftest.$ac_ext >&5
19787
Martin v. Löwiseba40652007-08-30 20:10:57 +000019788 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019790
19791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019792 conftest$ac_exeext conftest.$ac_ext
19793LIBS=$ac_check_lib_save_LIBS
19794fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019795{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19796echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19797if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019798 cat >>confdefs.h <<\_ACEOF
19799#define HAVE_OPENPTY 1
19800_ACEOF
19801 LIBS="$LIBS -lbsd"
19802fi
19803
19804
19805fi
19806
Fred Drake8cef4cf2000-06-28 16:40:38 +000019807
19808fi
19809done
19810
Martin v. Löwis11437992002-04-12 09:54:03 +000019811
Fred Drake8cef4cf2000-06-28 16:40:38 +000019812for ac_func in forkpty
19813do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019814as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19815{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19816echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019817if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019818 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019819else
Martin v. Löwis11437992002-04-12 09:54:03 +000019820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019821/* confdefs.h. */
19822_ACEOF
19823cat confdefs.h >>conftest.$ac_ext
19824cat >>conftest.$ac_ext <<_ACEOF
19825/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019826/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19827 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19828#define $ac_func innocuous_$ac_func
19829
Fred Drake8cef4cf2000-06-28 16:40:38 +000019830/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019831 which can conflict with char $ac_func (); below.
19832 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019833 <limits.h> exists even on freestanding compilers. */
19834
19835#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019836# include <limits.h>
19837#else
19838# include <assert.h>
19839#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019840
19841#undef $ac_func
19842
Martin v. Löwiseba40652007-08-30 20:10:57 +000019843/* Override any GCC internal prototype to avoid an error.
19844 Use char because int might match the return type of a GCC
19845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019846#ifdef __cplusplus
19847extern "C"
19848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019849char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019850/* The GNU C library defines this for functions which it implements
19851 to always fail with ENOSYS. Some functions are actually named
19852 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019853#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019854choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019855#endif
19856
Skip Montanaro6dead952003-09-25 14:50:04 +000019857int
19858main ()
19859{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019860return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019861 ;
19862 return 0;
19863}
19864_ACEOF
19865rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019866if { (ac_try="$ac_link"
19867case "(($ac_try" in
19868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19869 *) ac_try_echo=$ac_try;;
19870esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019872 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019874 grep -v '^ *+' conftest.er1 >conftest.err
19875 rm -f conftest.er1
19876 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019878 (exit $ac_status); } && {
19879 test -z "$ac_c_werror_flag" ||
19880 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019881 } && test -s conftest$ac_exeext &&
19882 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019883 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019884else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019886sed 's/^/| /' conftest.$ac_ext >&5
19887
Martin v. Löwiseba40652007-08-30 20:10:57 +000019888 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019890
19891rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019892 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019893fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019894ac_res=`eval echo '${'$as_ac_var'}'`
19895 { echo "$as_me:$LINENO: result: $ac_res" >&5
19896echo "${ECHO_T}$ac_res" >&6; }
19897if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019898 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019899#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019900_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019901
Fred Drake8cef4cf2000-06-28 16:40:38 +000019902else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019903 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19904echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019905if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019906 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019907else
Martin v. Löwis11437992002-04-12 09:54:03 +000019908 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019909LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019910cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019911/* confdefs.h. */
19912_ACEOF
19913cat confdefs.h >>conftest.$ac_ext
19914cat >>conftest.$ac_ext <<_ACEOF
19915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019916
Martin v. Löwiseba40652007-08-30 20:10:57 +000019917/* Override any GCC internal prototype to avoid an error.
19918 Use char because int might match the return type of a GCC
19919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019920#ifdef __cplusplus
19921extern "C"
19922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019923char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019924int
19925main ()
19926{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019928 ;
19929 return 0;
19930}
19931_ACEOF
19932rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019933if { (ac_try="$ac_link"
19934case "(($ac_try" in
19935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19936 *) ac_try_echo=$ac_try;;
19937esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019939 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019941 grep -v '^ *+' conftest.er1 >conftest.err
19942 rm -f conftest.er1
19943 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019945 (exit $ac_status); } && {
19946 test -z "$ac_c_werror_flag" ||
19947 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019948 } && test -s conftest$ac_exeext &&
19949 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019950 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019951else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019953sed 's/^/| /' conftest.$ac_ext >&5
19954
Martin v. Löwiseba40652007-08-30 20:10:57 +000019955 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019957
19958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019960LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019961fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019962{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19963echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19964if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019965 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019966#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019967_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019968 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019970 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19971echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019972if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019973 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019974else
19975 ac_check_lib_save_LIBS=$LIBS
19976LIBS="-lbsd $LIBS"
19977cat >conftest.$ac_ext <<_ACEOF
19978/* confdefs.h. */
19979_ACEOF
19980cat confdefs.h >>conftest.$ac_ext
19981cat >>conftest.$ac_ext <<_ACEOF
19982/* end confdefs.h. */
19983
Martin v. Löwiseba40652007-08-30 20:10:57 +000019984/* Override any GCC internal prototype to avoid an error.
19985 Use char because int might match the return type of a GCC
19986 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019987#ifdef __cplusplus
19988extern "C"
19989#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019990char forkpty ();
19991int
19992main ()
19993{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019994return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019995 ;
19996 return 0;
19997}
19998_ACEOF
19999rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020000if { (ac_try="$ac_link"
20001case "(($ac_try" in
20002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20003 *) ac_try_echo=$ac_try;;
20004esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020006 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020007 ac_status=$?
20008 grep -v '^ *+' conftest.er1 >conftest.err
20009 rm -f conftest.er1
20010 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020012 (exit $ac_status); } && {
20013 test -z "$ac_c_werror_flag" ||
20014 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020015 } && test -s conftest$ac_exeext &&
20016 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020017 ac_cv_lib_bsd_forkpty=yes
20018else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020019 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020020sed 's/^/| /' conftest.$ac_ext >&5
20021
Martin v. Löwiseba40652007-08-30 20:10:57 +000020022 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020024
20025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020026 conftest$ac_exeext conftest.$ac_ext
20027LIBS=$ac_check_lib_save_LIBS
20028fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020029{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20030echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20031if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020032 cat >>confdefs.h <<\_ACEOF
20033#define HAVE_FORKPTY 1
20034_ACEOF
20035 LIBS="$LIBS -lbsd"
20036fi
20037
20038
20039fi
20040
Fred Drake8cef4cf2000-06-28 16:40:38 +000020041
20042fi
20043done
20044
Jack Jansendd19cf82001-12-06 22:36:17 +000020045
Brett Cannonaa5778d2008-03-18 04:09:00 +000020046# Stuff for expat.
20047
20048for ac_func in memmove
20049do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020050as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20051{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20052echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020053if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020054 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020055else
20056 cat >conftest.$ac_ext <<_ACEOF
20057/* confdefs.h. */
20058_ACEOF
20059cat confdefs.h >>conftest.$ac_ext
20060cat >>conftest.$ac_ext <<_ACEOF
20061/* end confdefs.h. */
20062/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20063 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20064#define $ac_func innocuous_$ac_func
20065
20066/* System header to define __stub macros and hopefully few prototypes,
20067 which can conflict with char $ac_func (); below.
20068 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20069 <limits.h> exists even on freestanding compilers. */
20070
20071#ifdef __STDC__
20072# include <limits.h>
20073#else
20074# include <assert.h>
20075#endif
20076
20077#undef $ac_func
20078
20079/* Override any GCC internal prototype to avoid an error.
20080 Use char because int might match the return type of a GCC
20081 builtin and then its argument prototype would still apply. */
20082#ifdef __cplusplus
20083extern "C"
20084#endif
20085char $ac_func ();
20086/* The GNU C library defines this for functions which it implements
20087 to always fail with ENOSYS. Some functions are actually named
20088 something starting with __ and the normal name is an alias. */
20089#if defined __stub_$ac_func || defined __stub___$ac_func
20090choke me
20091#endif
20092
20093int
20094main ()
20095{
20096return $ac_func ();
20097 ;
20098 return 0;
20099}
20100_ACEOF
20101rm -f conftest.$ac_objext conftest$ac_exeext
20102if { (ac_try="$ac_link"
20103case "(($ac_try" in
20104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20105 *) ac_try_echo=$ac_try;;
20106esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020108 (eval "$ac_link") 2>conftest.er1
20109 ac_status=$?
20110 grep -v '^ *+' conftest.er1 >conftest.err
20111 rm -f conftest.er1
20112 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020114 (exit $ac_status); } && {
20115 test -z "$ac_c_werror_flag" ||
20116 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020117 } && test -s conftest$ac_exeext &&
20118 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020119 eval "$as_ac_var=yes"
20120else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020121 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020122sed 's/^/| /' conftest.$ac_ext >&5
20123
20124 eval "$as_ac_var=no"
20125fi
20126
20127rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20128 conftest$ac_exeext conftest.$ac_ext
20129fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020130ac_res=`eval echo '${'$as_ac_var'}'`
20131 { echo "$as_me:$LINENO: result: $ac_res" >&5
20132echo "${ECHO_T}$ac_res" >&6; }
20133if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020134 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020135#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020136_ACEOF
20137
20138fi
20139done
20140
20141
Michael W. Hudson54241132001-12-07 15:38:26 +000020142# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020143
20144
20145
20146
20147
20148
Fred Drake8cef4cf2000-06-28 16:40:38 +000020149for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20150do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020151as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20152{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20153echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020154if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020155 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020156else
Martin v. Löwis11437992002-04-12 09:54:03 +000020157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020158/* confdefs.h. */
20159_ACEOF
20160cat confdefs.h >>conftest.$ac_ext
20161cat >>conftest.$ac_ext <<_ACEOF
20162/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020163/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20164 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20165#define $ac_func innocuous_$ac_func
20166
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020167/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020168 which can conflict with char $ac_func (); below.
20169 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020170 <limits.h> exists even on freestanding compilers. */
20171
20172#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020173# include <limits.h>
20174#else
20175# include <assert.h>
20176#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020177
20178#undef $ac_func
20179
Martin v. Löwiseba40652007-08-30 20:10:57 +000020180/* Override any GCC internal prototype to avoid an error.
20181 Use char because int might match the return type of a GCC
20182 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020183#ifdef __cplusplus
20184extern "C"
20185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020186char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020187/* The GNU C library defines this for functions which it implements
20188 to always fail with ENOSYS. Some functions are actually named
20189 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020190#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020191choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020192#endif
20193
Skip Montanaro6dead952003-09-25 14:50:04 +000020194int
20195main ()
20196{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020197return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020198 ;
20199 return 0;
20200}
20201_ACEOF
20202rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020203if { (ac_try="$ac_link"
20204case "(($ac_try" in
20205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20206 *) ac_try_echo=$ac_try;;
20207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020209 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020211 grep -v '^ *+' conftest.er1 >conftest.err
20212 rm -f conftest.er1
20213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020215 (exit $ac_status); } && {
20216 test -z "$ac_c_werror_flag" ||
20217 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020218 } && test -s conftest$ac_exeext &&
20219 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020220 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020223sed 's/^/| /' conftest.$ac_ext >&5
20224
Martin v. Löwiseba40652007-08-30 20:10:57 +000020225 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020227
20228rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020229 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020230fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020231ac_res=`eval echo '${'$as_ac_var'}'`
20232 { echo "$as_me:$LINENO: result: $ac_res" >&5
20233echo "${ECHO_T}$ac_res" >&6; }
20234if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020235 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020236#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020237_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020238
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020239fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020240done
20241
Michael W. Hudson54241132001-12-07 15:38:26 +000020242
Martin v. Löwis11437992002-04-12 09:54:03 +000020243
20244
20245
Brett Cannonaa5778d2008-03-18 04:09:00 +000020246for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020247do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020248as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20249{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20250echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020251if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020252 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020253else
Martin v. Löwis11437992002-04-12 09:54:03 +000020254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020255/* confdefs.h. */
20256_ACEOF
20257cat confdefs.h >>conftest.$ac_ext
20258cat >>conftest.$ac_ext <<_ACEOF
20259/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020260/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20261 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20262#define $ac_func innocuous_$ac_func
20263
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020264/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020265 which can conflict with char $ac_func (); below.
20266 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020267 <limits.h> exists even on freestanding compilers. */
20268
20269#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020270# include <limits.h>
20271#else
20272# include <assert.h>
20273#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020274
20275#undef $ac_func
20276
Martin v. Löwiseba40652007-08-30 20:10:57 +000020277/* Override any GCC internal prototype to avoid an error.
20278 Use char because int might match the return type of a GCC
20279 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020280#ifdef __cplusplus
20281extern "C"
20282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020283char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020284/* The GNU C library defines this for functions which it implements
20285 to always fail with ENOSYS. Some functions are actually named
20286 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020287#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020288choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020289#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020290
Skip Montanaro6dead952003-09-25 14:50:04 +000020291int
20292main ()
20293{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020294return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020295 ;
20296 return 0;
20297}
20298_ACEOF
20299rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020300if { (ac_try="$ac_link"
20301case "(($ac_try" in
20302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20303 *) ac_try_echo=$ac_try;;
20304esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020306 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020308 grep -v '^ *+' conftest.er1 >conftest.err
20309 rm -f conftest.er1
20310 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020312 (exit $ac_status); } && {
20313 test -z "$ac_c_werror_flag" ||
20314 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020315 } && test -s conftest$ac_exeext &&
20316 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020317 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020318else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020320sed 's/^/| /' conftest.$ac_ext >&5
20321
Martin v. Löwiseba40652007-08-30 20:10:57 +000020322 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020324
20325rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020326 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020327fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020328ac_res=`eval echo '${'$as_ac_var'}'`
20329 { echo "$as_me:$LINENO: result: $ac_res" >&5
20330echo "${ECHO_T}$ac_res" >&6; }
20331if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020332 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020333#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020334_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020335
Martin v. Löwis1142de32002-03-29 16:28:31 +000020336else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020338 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020339 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20340 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020341esac
20342
Martin v. Löwis1142de32002-03-29 16:28:31 +000020343fi
20344done
20345
20346
Martin v. Löwis11437992002-04-12 09:54:03 +000020347
Martin v. Löwis1142de32002-03-29 16:28:31 +000020348for ac_func in getpgrp
20349do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020350as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20351{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20352echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020353if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020354 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020355else
Martin v. Löwis11437992002-04-12 09:54:03 +000020356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020357/* confdefs.h. */
20358_ACEOF
20359cat confdefs.h >>conftest.$ac_ext
20360cat >>conftest.$ac_ext <<_ACEOF
20361/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020362/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20363 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20364#define $ac_func innocuous_$ac_func
20365
Martin v. Löwis1142de32002-03-29 16:28:31 +000020366/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020367 which can conflict with char $ac_func (); below.
20368 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020369 <limits.h> exists even on freestanding compilers. */
20370
20371#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020372# include <limits.h>
20373#else
20374# include <assert.h>
20375#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020376
20377#undef $ac_func
20378
Martin v. Löwiseba40652007-08-30 20:10:57 +000020379/* Override any GCC internal prototype to avoid an error.
20380 Use char because int might match the return type of a GCC
20381 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020382#ifdef __cplusplus
20383extern "C"
20384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020385char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020386/* The GNU C library defines this for functions which it implements
20387 to always fail with ENOSYS. Some functions are actually named
20388 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020389#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020390choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020391#endif
20392
Skip Montanaro6dead952003-09-25 14:50:04 +000020393int
20394main ()
20395{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020396return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020397 ;
20398 return 0;
20399}
20400_ACEOF
20401rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020402if { (ac_try="$ac_link"
20403case "(($ac_try" in
20404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20405 *) ac_try_echo=$ac_try;;
20406esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020408 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020410 grep -v '^ *+' conftest.er1 >conftest.err
20411 rm -f conftest.er1
20412 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020414 (exit $ac_status); } && {
20415 test -z "$ac_c_werror_flag" ||
20416 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020417 } && test -s conftest$ac_exeext &&
20418 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020419 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020422sed 's/^/| /' conftest.$ac_ext >&5
20423
Martin v. Löwiseba40652007-08-30 20:10:57 +000020424 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020426
20427rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020428 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020429fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020430ac_res=`eval echo '${'$as_ac_var'}'`
20431 { echo "$as_me:$LINENO: result: $ac_res" >&5
20432echo "${ECHO_T}$ac_res" >&6; }
20433if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020434 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020435#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020436_ACEOF
20437 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020438/* confdefs.h. */
20439_ACEOF
20440cat confdefs.h >>conftest.$ac_ext
20441cat >>conftest.$ac_ext <<_ACEOF
20442/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020443#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020444int
20445main ()
20446{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020447getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020448 ;
20449 return 0;
20450}
20451_ACEOF
20452rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020453if { (ac_try="$ac_compile"
20454case "(($ac_try" in
20455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20456 *) ac_try_echo=$ac_try;;
20457esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020461 grep -v '^ *+' conftest.er1 >conftest.err
20462 rm -f conftest.er1
20463 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020465 (exit $ac_status); } && {
20466 test -z "$ac_c_werror_flag" ||
20467 test ! -s conftest.err
20468 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020469
20470cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020471#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020472_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020473
Martin v. Löwis11437992002-04-12 09:54:03 +000020474
Guido van Rossumf78abae1997-01-21 22:02:36 +000020475else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020477sed 's/^/| /' conftest.$ac_ext >&5
20478
Martin v. Löwiseba40652007-08-30 20:10:57 +000020479
Guido van Rossum627b2d71993-12-24 10:39:16 +000020480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020481
20482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020483
Guido van Rossum627b2d71993-12-24 10:39:16 +000020484fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020485done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020486
Jack Jansen150753c2003-03-29 22:07:47 +000020487
20488for ac_func in setpgrp
20489do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020490as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20491{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20492echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020493if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020494 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020495else
Martin v. Löwis11437992002-04-12 09:54:03 +000020496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020497/* confdefs.h. */
20498_ACEOF
20499cat confdefs.h >>conftest.$ac_ext
20500cat >>conftest.$ac_ext <<_ACEOF
20501/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020502/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20503 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20504#define $ac_func innocuous_$ac_func
20505
Jack Jansen150753c2003-03-29 22:07:47 +000020506/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020507 which can conflict with char $ac_func (); below.
20508 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020509 <limits.h> exists even on freestanding compilers. */
20510
20511#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020512# include <limits.h>
20513#else
20514# include <assert.h>
20515#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020516
20517#undef $ac_func
20518
Martin v. Löwiseba40652007-08-30 20:10:57 +000020519/* Override any GCC internal prototype to avoid an error.
20520 Use char because int might match the return type of a GCC
20521 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020522#ifdef __cplusplus
20523extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020524#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020525char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020526/* The GNU C library defines this for functions which it implements
20527 to always fail with ENOSYS. Some functions are actually named
20528 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020529#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020530choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020531#endif
20532
Skip Montanaro6dead952003-09-25 14:50:04 +000020533int
20534main ()
20535{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020536return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020537 ;
20538 return 0;
20539}
20540_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020541rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020542if { (ac_try="$ac_link"
20543case "(($ac_try" in
20544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20545 *) ac_try_echo=$ac_try;;
20546esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020548 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020550 grep -v '^ *+' conftest.er1 >conftest.err
20551 rm -f conftest.er1
20552 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020554 (exit $ac_status); } && {
20555 test -z "$ac_c_werror_flag" ||
20556 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020557 } && test -s conftest$ac_exeext &&
20558 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020559 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020560else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020562sed 's/^/| /' conftest.$ac_ext >&5
20563
Martin v. Löwiseba40652007-08-30 20:10:57 +000020564 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020566
20567rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020568 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020569fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020570ac_res=`eval echo '${'$as_ac_var'}'`
20571 { echo "$as_me:$LINENO: result: $ac_res" >&5
20572echo "${ECHO_T}$ac_res" >&6; }
20573if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020574 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020575#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020576_ACEOF
20577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020578/* confdefs.h. */
20579_ACEOF
20580cat confdefs.h >>conftest.$ac_ext
20581cat >>conftest.$ac_ext <<_ACEOF
20582/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020583#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020584int
20585main ()
20586{
20587setpgrp(0,0);
20588 ;
20589 return 0;
20590}
20591_ACEOF
20592rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020593if { (ac_try="$ac_compile"
20594case "(($ac_try" in
20595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20596 *) ac_try_echo=$ac_try;;
20597esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020599 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020601 grep -v '^ *+' conftest.er1 >conftest.err
20602 rm -f conftest.er1
20603 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020605 (exit $ac_status); } && {
20606 test -z "$ac_c_werror_flag" ||
20607 test ! -s conftest.err
20608 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020609
20610cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020611#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020612_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020613
Jack Jansen150753c2003-03-29 22:07:47 +000020614
20615else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020617sed 's/^/| /' conftest.$ac_ext >&5
20618
Martin v. Löwiseba40652007-08-30 20:10:57 +000020619
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020621
20622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020623
20624fi
20625done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020626
Martin v. Löwis11437992002-04-12 09:54:03 +000020627
Thomas Wouters3a584202000-08-05 23:28:51 +000020628for ac_func in gettimeofday
20629do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020630as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20631{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20632echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020633if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020634 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020635else
Martin v. Löwis11437992002-04-12 09:54:03 +000020636 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020637/* confdefs.h. */
20638_ACEOF
20639cat confdefs.h >>conftest.$ac_ext
20640cat >>conftest.$ac_ext <<_ACEOF
20641/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020642/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20643 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20644#define $ac_func innocuous_$ac_func
20645
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020646/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020647 which can conflict with char $ac_func (); below.
20648 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020649 <limits.h> exists even on freestanding compilers. */
20650
20651#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020652# include <limits.h>
20653#else
20654# include <assert.h>
20655#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020656
20657#undef $ac_func
20658
Martin v. Löwiseba40652007-08-30 20:10:57 +000020659/* Override any GCC internal prototype to avoid an error.
20660 Use char because int might match the return type of a GCC
20661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020662#ifdef __cplusplus
20663extern "C"
20664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020665char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020666/* The GNU C library defines this for functions which it implements
20667 to always fail with ENOSYS. Some functions are actually named
20668 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020670choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020671#endif
20672
Skip Montanaro6dead952003-09-25 14:50:04 +000020673int
20674main ()
20675{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020676return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020677 ;
20678 return 0;
20679}
20680_ACEOF
20681rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020682if { (ac_try="$ac_link"
20683case "(($ac_try" in
20684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20685 *) ac_try_echo=$ac_try;;
20686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020688 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020690 grep -v '^ *+' conftest.er1 >conftest.err
20691 rm -f conftest.er1
20692 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694 (exit $ac_status); } && {
20695 test -z "$ac_c_werror_flag" ||
20696 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020697 } && test -s conftest$ac_exeext &&
20698 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020699 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020700else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020702sed 's/^/| /' conftest.$ac_ext >&5
20703
Martin v. Löwiseba40652007-08-30 20:10:57 +000020704 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020706
20707rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020708 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020709fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020710ac_res=`eval echo '${'$as_ac_var'}'`
20711 { echo "$as_me:$LINENO: result: $ac_res" >&5
20712echo "${ECHO_T}$ac_res" >&6; }
20713if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020714 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020715#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020716_ACEOF
20717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020718/* confdefs.h. */
20719_ACEOF
20720cat confdefs.h >>conftest.$ac_ext
20721cat >>conftest.$ac_ext <<_ACEOF
20722/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020723#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020724int
20725main ()
20726{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020727gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020728 ;
20729 return 0;
20730}
20731_ACEOF
20732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020733if { (ac_try="$ac_compile"
20734case "(($ac_try" in
20735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20736 *) ac_try_echo=$ac_try;;
20737esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020739 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020741 grep -v '^ *+' conftest.er1 >conftest.err
20742 rm -f conftest.er1
20743 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020745 (exit $ac_status); } && {
20746 test -z "$ac_c_werror_flag" ||
20747 test ! -s conftest.err
20748 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020749 :
20750else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020752sed 's/^/| /' conftest.$ac_ext >&5
20753
Martin v. Löwis11437992002-04-12 09:54:03 +000020754
20755cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020756#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020757_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020758
Martin v. Löwis11437992002-04-12 09:54:03 +000020759
Guido van Rossum627b2d71993-12-24 10:39:16 +000020760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020761
20762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020764fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020765done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020766
Michael W. Hudson54241132001-12-07 15:38:26 +000020767
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020768{ echo "$as_me:$LINENO: checking for major" >&5
20769echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020770cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020771/* confdefs.h. */
20772_ACEOF
20773cat confdefs.h >>conftest.$ac_ext
20774cat >>conftest.$ac_ext <<_ACEOF
20775/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020776
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020777#if defined(MAJOR_IN_MKDEV)
20778#include <sys/mkdev.h>
20779#elif defined(MAJOR_IN_SYSMACROS)
20780#include <sys/sysmacros.h>
20781#else
20782#include <sys/types.h>
20783#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020784
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020785int
20786main ()
20787{
20788
20789 makedev(major(0),minor(0));
20790
20791 ;
20792 return 0;
20793}
20794_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020795rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020796if { (ac_try="$ac_link"
20797case "(($ac_try" in
20798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20799 *) ac_try_echo=$ac_try;;
20800esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020802 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020804 grep -v '^ *+' conftest.er1 >conftest.err
20805 rm -f conftest.er1
20806 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020808 (exit $ac_status); } && {
20809 test -z "$ac_c_werror_flag" ||
20810 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020811 } && test -s conftest$ac_exeext &&
20812 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020813
20814
20815cat >>confdefs.h <<\_ACEOF
20816#define HAVE_DEVICE_MACROS 1
20817_ACEOF
20818
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020819 { echo "$as_me:$LINENO: result: yes" >&5
20820echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020821
20822else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020824sed 's/^/| /' conftest.$ac_ext >&5
20825
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020826
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020827 { echo "$as_me:$LINENO: result: no" >&5
20828echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020829
20830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020831
20832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020833 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020834
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020835# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020836# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020837{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20838echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020839cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020840/* confdefs.h. */
20841_ACEOF
20842cat confdefs.h >>conftest.$ac_ext
20843cat >>conftest.$ac_ext <<_ACEOF
20844/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020845
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020846#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020847#include <sys/socket.h>
20848#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020849#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020850
Martin v. Löwis11437992002-04-12 09:54:03 +000020851int
20852main ()
20853{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020854getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020855 ;
20856 return 0;
20857}
20858_ACEOF
20859rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020860if { (ac_try="$ac_link"
20861case "(($ac_try" in
20862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20863 *) ac_try_echo=$ac_try;;
20864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020866 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020868 grep -v '^ *+' conftest.er1 >conftest.err
20869 rm -f conftest.er1
20870 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020872 (exit $ac_status); } && {
20873 test -z "$ac_c_werror_flag" ||
20874 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020875 } && test -s conftest$ac_exeext &&
20876 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020877 have_getaddrinfo=yes
20878else
20879 echo "$as_me: failed program was:" >&5
20880sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020881
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020882 have_getaddrinfo=no
20883fi
20884
20885rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20886 conftest$ac_exeext conftest.$ac_ext
20887{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20888echo "${ECHO_T}$have_getaddrinfo" >&6; }
20889if test $have_getaddrinfo = yes
20890then
20891 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020892echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020893 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20894 echo $ECHO_N "(cached) $ECHO_C" >&6
20895else
20896 if test "$cross_compiling" = yes; then
20897 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020898else
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020900/* confdefs.h. */
20901_ACEOF
20902cat confdefs.h >>conftest.$ac_ext
20903cat >>conftest.$ac_ext <<_ACEOF
20904/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020905
20906#include <sys/types.h>
20907#include <netdb.h>
20908#include <string.h>
20909#include <sys/socket.h>
20910#include <netinet/in.h>
20911
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020912int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020913{
20914 int passive, gaierr, inet4 = 0, inet6 = 0;
20915 struct addrinfo hints, *ai, *aitop;
20916 char straddr[INET6_ADDRSTRLEN], strport[16];
20917
20918 for (passive = 0; passive <= 1; passive++) {
20919 memset(&hints, 0, sizeof(hints));
20920 hints.ai_family = AF_UNSPEC;
20921 hints.ai_flags = passive ? AI_PASSIVE : 0;
20922 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020923 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020924 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20925 (void)gai_strerror(gaierr);
20926 goto bad;
20927 }
20928 for (ai = aitop; ai; ai = ai->ai_next) {
20929 if (ai->ai_addr == NULL ||
20930 ai->ai_addrlen == 0 ||
20931 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20932 straddr, sizeof(straddr), strport, sizeof(strport),
20933 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20934 goto bad;
20935 }
20936 switch (ai->ai_family) {
20937 case AF_INET:
20938 if (strcmp(strport, "54321") != 0) {
20939 goto bad;
20940 }
20941 if (passive) {
20942 if (strcmp(straddr, "0.0.0.0") != 0) {
20943 goto bad;
20944 }
20945 } else {
20946 if (strcmp(straddr, "127.0.0.1") != 0) {
20947 goto bad;
20948 }
20949 }
20950 inet4++;
20951 break;
20952 case AF_INET6:
20953 if (strcmp(strport, "54321") != 0) {
20954 goto bad;
20955 }
20956 if (passive) {
20957 if (strcmp(straddr, "::") != 0) {
20958 goto bad;
20959 }
20960 } else {
20961 if (strcmp(straddr, "::1") != 0) {
20962 goto bad;
20963 }
20964 }
20965 inet6++;
20966 break;
20967 case AF_UNSPEC:
20968 goto bad;
20969 break;
20970 default:
20971 /* another family support? */
20972 break;
20973 }
20974 }
20975 }
20976
20977 if (!(inet4 == 0 || inet4 == 2))
20978 goto bad;
20979 if (!(inet6 == 0 || inet6 == 2))
20980 goto bad;
20981
20982 if (aitop)
20983 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020984 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020985
20986 bad:
20987 if (aitop)
20988 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020989 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020990}
20991
Martin v. Löwis11437992002-04-12 09:54:03 +000020992_ACEOF
20993rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020994if { (ac_try="$ac_link"
20995case "(($ac_try" in
20996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20997 *) ac_try_echo=$ac_try;;
20998esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021000 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021001 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021004 { (case "(($ac_try" in
21005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21006 *) ac_try_echo=$ac_try;;
21007esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021009 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021010 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021012 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021013 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021015 echo "$as_me: program exited with status $ac_status" >&5
21016echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021017sed 's/^/| /' conftest.$ac_ext >&5
21018
Martin v. Löwis11437992002-04-12 09:54:03 +000021019( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021020ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021022rm -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 +000021023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021024
21025
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021026fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021027
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021029
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021030if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
21031then
21032 if test $ipv6 = yes
21033 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021034 echo 'Fatal: You must get working getaddrinfo() function.'
21035 echo ' or you can specify "--disable-ipv6"'.
21036 exit 1
21037 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021038else
Martin v. Löwis11437992002-04-12 09:54:03 +000021039
21040cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021041#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021042_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021043
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021045
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021046for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021047do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021048as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21049{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21050echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021051if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021052 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021053else
Martin v. Löwis11437992002-04-12 09:54:03 +000021054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021055/* confdefs.h. */
21056_ACEOF
21057cat confdefs.h >>conftest.$ac_ext
21058cat >>conftest.$ac_ext <<_ACEOF
21059/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021060/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21061 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21062#define $ac_func innocuous_$ac_func
21063
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021064/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021065 which can conflict with char $ac_func (); below.
21066 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021067 <limits.h> exists even on freestanding compilers. */
21068
21069#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021070# include <limits.h>
21071#else
21072# include <assert.h>
21073#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021074
21075#undef $ac_func
21076
Martin v. Löwiseba40652007-08-30 20:10:57 +000021077/* Override any GCC internal prototype to avoid an error.
21078 Use char because int might match the return type of a GCC
21079 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021080#ifdef __cplusplus
21081extern "C"
21082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021083char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021084/* The GNU C library defines this for functions which it implements
21085 to always fail with ENOSYS. Some functions are actually named
21086 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021087#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021088choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021089#endif
21090
Skip Montanaro6dead952003-09-25 14:50:04 +000021091int
21092main ()
21093{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021094return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021095 ;
21096 return 0;
21097}
21098_ACEOF
21099rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021100if { (ac_try="$ac_link"
21101case "(($ac_try" in
21102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21103 *) ac_try_echo=$ac_try;;
21104esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021106 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021108 grep -v '^ *+' conftest.er1 >conftest.err
21109 rm -f conftest.er1
21110 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021112 (exit $ac_status); } && {
21113 test -z "$ac_c_werror_flag" ||
21114 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021115 } && test -s conftest$ac_exeext &&
21116 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021117 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021120sed 's/^/| /' conftest.$ac_ext >&5
21121
Martin v. Löwiseba40652007-08-30 20:10:57 +000021122 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021124
21125rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021126 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021127fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021128ac_res=`eval echo '${'$as_ac_var'}'`
21129 { echo "$as_me:$LINENO: result: $ac_res" >&5
21130echo "${ECHO_T}$ac_res" >&6; }
21131if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021132 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021133#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021134_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021135
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021136fi
21137done
21138
Michael W. Hudson54241132001-12-07 15:38:26 +000021139
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021140# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021141{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21142echo $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 +000021143if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021145else
Martin v. Löwis11437992002-04-12 09:54:03 +000021146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021147/* confdefs.h. */
21148_ACEOF
21149cat confdefs.h >>conftest.$ac_ext
21150cat >>conftest.$ac_ext <<_ACEOF
21151/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021152#include <sys/types.h>
21153#include <sys/time.h>
21154#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021155
Martin v. Löwis11437992002-04-12 09:54:03 +000021156int
21157main ()
21158{
21159if ((struct tm *) 0)
21160return 0;
21161 ;
21162 return 0;
21163}
21164_ACEOF
21165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021166if { (ac_try="$ac_compile"
21167case "(($ac_try" in
21168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21169 *) ac_try_echo=$ac_try;;
21170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021174 grep -v '^ *+' conftest.er1 >conftest.err
21175 rm -f conftest.er1
21176 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021178 (exit $ac_status); } && {
21179 test -z "$ac_c_werror_flag" ||
21180 test ! -s conftest.err
21181 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021182 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021183else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021185sed 's/^/| /' conftest.$ac_ext >&5
21186
Martin v. Löwiseba40652007-08-30 20:10:57 +000021187 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021189
21190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021191fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021192{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21193echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021194if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021195
21196cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021197#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021198_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021199
21200fi
21201
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021202{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21203echo $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 +000021204if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021205 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021206else
Martin v. Löwis11437992002-04-12 09:54:03 +000021207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021208/* confdefs.h. */
21209_ACEOF
21210cat confdefs.h >>conftest.$ac_ext
21211cat >>conftest.$ac_ext <<_ACEOF
21212/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021213#include <sys/types.h>
21214#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021215
Martin v. Löwis11437992002-04-12 09:54:03 +000021216int
21217main ()
21218{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021219struct tm tm;
21220 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021221 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021222 ;
21223 return 0;
21224}
21225_ACEOF
21226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021227if { (ac_try="$ac_compile"
21228case "(($ac_try" in
21229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21230 *) ac_try_echo=$ac_try;;
21231esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021235 grep -v '^ *+' conftest.er1 >conftest.err
21236 rm -f conftest.er1
21237 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021239 (exit $ac_status); } && {
21240 test -z "$ac_c_werror_flag" ||
21241 test ! -s conftest.err
21242 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021243 ac_cv_struct_tm=time.h
21244else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021246sed 's/^/| /' conftest.$ac_ext >&5
21247
Martin v. Löwiseba40652007-08-30 20:10:57 +000021248 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021250
21251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021252fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021253{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21254echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021255if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021256
21257cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021258#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021259_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021260
21261fi
21262
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021263{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21264echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021265if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021266 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021267else
Martin v. Löwis11437992002-04-12 09:54:03 +000021268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021269/* confdefs.h. */
21270_ACEOF
21271cat confdefs.h >>conftest.$ac_ext
21272cat >>conftest.$ac_ext <<_ACEOF
21273/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021274#include <sys/types.h>
21275#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021276
21277
Martin v. Löwis11437992002-04-12 09:54:03 +000021278int
21279main ()
21280{
21281static struct tm ac_aggr;
21282if (ac_aggr.tm_zone)
21283return 0;
21284 ;
21285 return 0;
21286}
21287_ACEOF
21288rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021289if { (ac_try="$ac_compile"
21290case "(($ac_try" in
21291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21292 *) ac_try_echo=$ac_try;;
21293esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021295 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021297 grep -v '^ *+' conftest.er1 >conftest.err
21298 rm -f conftest.er1
21299 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021301 (exit $ac_status); } && {
21302 test -z "$ac_c_werror_flag" ||
21303 test ! -s conftest.err
21304 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021305 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021306else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021308sed 's/^/| /' conftest.$ac_ext >&5
21309
Martin v. Löwiseba40652007-08-30 20:10:57 +000021310 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021311/* confdefs.h. */
21312_ACEOF
21313cat confdefs.h >>conftest.$ac_ext
21314cat >>conftest.$ac_ext <<_ACEOF
21315/* end confdefs.h. */
21316#include <sys/types.h>
21317#include <$ac_cv_struct_tm>
21318
21319
21320int
21321main ()
21322{
21323static struct tm ac_aggr;
21324if (sizeof ac_aggr.tm_zone)
21325return 0;
21326 ;
21327 return 0;
21328}
21329_ACEOF
21330rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021331if { (ac_try="$ac_compile"
21332case "(($ac_try" in
21333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21334 *) ac_try_echo=$ac_try;;
21335esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021337 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021339 grep -v '^ *+' conftest.er1 >conftest.err
21340 rm -f conftest.er1
21341 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021343 (exit $ac_status); } && {
21344 test -z "$ac_c_werror_flag" ||
21345 test ! -s conftest.err
21346 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021347 ac_cv_member_struct_tm_tm_zone=yes
21348else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021350sed 's/^/| /' conftest.$ac_ext >&5
21351
Martin v. Löwiseba40652007-08-30 20:10:57 +000021352 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021354
21355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021357
21358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021359fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021360{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21361echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21362if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021363
21364cat >>confdefs.h <<_ACEOF
21365#define HAVE_STRUCT_TM_TM_ZONE 1
21366_ACEOF
21367
21368
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021369fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021370
Martin v. Löwis11437992002-04-12 09:54:03 +000021371if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21372
21373cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021374#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021375_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021376
21377else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021378 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21379echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021380if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021381 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021382else
21383 cat >conftest.$ac_ext <<_ACEOF
21384/* confdefs.h. */
21385_ACEOF
21386cat confdefs.h >>conftest.$ac_ext
21387cat >>conftest.$ac_ext <<_ACEOF
21388/* end confdefs.h. */
21389#include <time.h>
21390
21391int
21392main ()
21393{
21394#ifndef tzname
21395 (void) tzname;
21396#endif
21397
21398 ;
21399 return 0;
21400}
21401_ACEOF
21402rm -f conftest.$ac_objext
21403if { (ac_try="$ac_compile"
21404case "(($ac_try" in
21405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21406 *) ac_try_echo=$ac_try;;
21407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021409 (eval "$ac_compile") 2>conftest.er1
21410 ac_status=$?
21411 grep -v '^ *+' conftest.er1 >conftest.err
21412 rm -f conftest.er1
21413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021415 (exit $ac_status); } && {
21416 test -z "$ac_c_werror_flag" ||
21417 test ! -s conftest.err
21418 } && test -s conftest.$ac_objext; then
21419 ac_cv_have_decl_tzname=yes
21420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021421 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021422sed 's/^/| /' conftest.$ac_ext >&5
21423
21424 ac_cv_have_decl_tzname=no
21425fi
21426
21427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21428fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021429{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21430echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21431if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021432
21433cat >>confdefs.h <<_ACEOF
21434#define HAVE_DECL_TZNAME 1
21435_ACEOF
21436
21437
21438else
21439 cat >>confdefs.h <<_ACEOF
21440#define HAVE_DECL_TZNAME 0
21441_ACEOF
21442
21443
21444fi
21445
21446
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021447 { echo "$as_me:$LINENO: checking for tzname" >&5
21448echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021449if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021450 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021451else
Martin v. Löwis11437992002-04-12 09:54:03 +000021452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021453/* confdefs.h. */
21454_ACEOF
21455cat confdefs.h >>conftest.$ac_ext
21456cat >>conftest.$ac_ext <<_ACEOF
21457/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021458#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021459#if !HAVE_DECL_TZNAME
21460extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021462
Martin v. Löwis11437992002-04-12 09:54:03 +000021463int
21464main ()
21465{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021466return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021467 ;
21468 return 0;
21469}
21470_ACEOF
21471rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021472if { (ac_try="$ac_link"
21473case "(($ac_try" in
21474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21475 *) ac_try_echo=$ac_try;;
21476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021478 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021480 grep -v '^ *+' conftest.er1 >conftest.err
21481 rm -f conftest.er1
21482 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021484 (exit $ac_status); } && {
21485 test -z "$ac_c_werror_flag" ||
21486 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021487 } && test -s conftest$ac_exeext &&
21488 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021489 ac_cv_var_tzname=yes
21490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021492sed 's/^/| /' conftest.$ac_ext >&5
21493
Martin v. Löwiseba40652007-08-30 20:10:57 +000021494 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021495fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021496
21497rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021498 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021500{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21501echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021502 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021503
21504cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021505#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021506_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021507
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021508 fi
21509fi
21510
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021511{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21512echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021513if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021514 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021515else
21516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021517/* confdefs.h. */
21518_ACEOF
21519cat confdefs.h >>conftest.$ac_ext
21520cat >>conftest.$ac_ext <<_ACEOF
21521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021522$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021523int
21524main ()
21525{
21526static struct stat ac_aggr;
21527if (ac_aggr.st_rdev)
21528return 0;
21529 ;
21530 return 0;
21531}
21532_ACEOF
21533rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021534if { (ac_try="$ac_compile"
21535case "(($ac_try" in
21536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21537 *) ac_try_echo=$ac_try;;
21538esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021542 grep -v '^ *+' conftest.er1 >conftest.err
21543 rm -f conftest.er1
21544 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021546 (exit $ac_status); } && {
21547 test -z "$ac_c_werror_flag" ||
21548 test ! -s conftest.err
21549 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021550 ac_cv_member_struct_stat_st_rdev=yes
21551else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021553sed 's/^/| /' conftest.$ac_ext >&5
21554
Martin v. Löwiseba40652007-08-30 20:10:57 +000021555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021556/* confdefs.h. */
21557_ACEOF
21558cat confdefs.h >>conftest.$ac_ext
21559cat >>conftest.$ac_ext <<_ACEOF
21560/* end confdefs.h. */
21561$ac_includes_default
21562int
21563main ()
21564{
21565static struct stat ac_aggr;
21566if (sizeof ac_aggr.st_rdev)
21567return 0;
21568 ;
21569 return 0;
21570}
21571_ACEOF
21572rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021573if { (ac_try="$ac_compile"
21574case "(($ac_try" in
21575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21576 *) ac_try_echo=$ac_try;;
21577esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021579 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021581 grep -v '^ *+' conftest.er1 >conftest.err
21582 rm -f conftest.er1
21583 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021585 (exit $ac_status); } && {
21586 test -z "$ac_c_werror_flag" ||
21587 test ! -s conftest.err
21588 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021589 ac_cv_member_struct_stat_st_rdev=yes
21590else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021592sed 's/^/| /' conftest.$ac_ext >&5
21593
Martin v. Löwiseba40652007-08-30 20:10:57 +000021594 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021596
21597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021599
21600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021601fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021602{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21603echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21604if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021605
21606cat >>confdefs.h <<_ACEOF
21607#define HAVE_STRUCT_STAT_ST_RDEV 1
21608_ACEOF
21609
21610
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021611fi
21612
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021613{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21614echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021615if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021616 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021617else
Martin v. Löwis11437992002-04-12 09:54:03 +000021618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021619/* confdefs.h. */
21620_ACEOF
21621cat confdefs.h >>conftest.$ac_ext
21622cat >>conftest.$ac_ext <<_ACEOF
21623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021624$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021625int
21626main ()
21627{
21628static struct stat ac_aggr;
21629if (ac_aggr.st_blksize)
21630return 0;
21631 ;
21632 return 0;
21633}
21634_ACEOF
21635rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636if { (ac_try="$ac_compile"
21637case "(($ac_try" in
21638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21639 *) ac_try_echo=$ac_try;;
21640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021642 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021644 grep -v '^ *+' conftest.er1 >conftest.err
21645 rm -f conftest.er1
21646 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021648 (exit $ac_status); } && {
21649 test -z "$ac_c_werror_flag" ||
21650 test ! -s conftest.err
21651 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021652 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021653else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021655sed 's/^/| /' conftest.$ac_ext >&5
21656
Martin v. Löwiseba40652007-08-30 20:10:57 +000021657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021658/* confdefs.h. */
21659_ACEOF
21660cat confdefs.h >>conftest.$ac_ext
21661cat >>conftest.$ac_ext <<_ACEOF
21662/* end confdefs.h. */
21663$ac_includes_default
21664int
21665main ()
21666{
21667static struct stat ac_aggr;
21668if (sizeof ac_aggr.st_blksize)
21669return 0;
21670 ;
21671 return 0;
21672}
21673_ACEOF
21674rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021675if { (ac_try="$ac_compile"
21676case "(($ac_try" in
21677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21678 *) ac_try_echo=$ac_try;;
21679esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021681 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021683 grep -v '^ *+' conftest.er1 >conftest.err
21684 rm -f conftest.er1
21685 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021687 (exit $ac_status); } && {
21688 test -z "$ac_c_werror_flag" ||
21689 test ! -s conftest.err
21690 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021691 ac_cv_member_struct_stat_st_blksize=yes
21692else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021694sed 's/^/| /' conftest.$ac_ext >&5
21695
Martin v. Löwiseba40652007-08-30 20:10:57 +000021696 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021698
21699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021701
21702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021703fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021704{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21705echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21706if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021707
Martin v. Löwis11437992002-04-12 09:54:03 +000021708cat >>confdefs.h <<_ACEOF
21709#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21710_ACEOF
21711
21712
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021713fi
21714
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021715{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21716echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021717if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021718 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021719else
21720 cat >conftest.$ac_ext <<_ACEOF
21721/* confdefs.h. */
21722_ACEOF
21723cat confdefs.h >>conftest.$ac_ext
21724cat >>conftest.$ac_ext <<_ACEOF
21725/* end confdefs.h. */
21726$ac_includes_default
21727int
21728main ()
21729{
21730static struct stat ac_aggr;
21731if (ac_aggr.st_flags)
21732return 0;
21733 ;
21734 return 0;
21735}
21736_ACEOF
21737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021738if { (ac_try="$ac_compile"
21739case "(($ac_try" in
21740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21741 *) ac_try_echo=$ac_try;;
21742esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021744 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021745 ac_status=$?
21746 grep -v '^ *+' conftest.er1 >conftest.err
21747 rm -f conftest.er1
21748 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021750 (exit $ac_status); } && {
21751 test -z "$ac_c_werror_flag" ||
21752 test ! -s conftest.err
21753 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021754 ac_cv_member_struct_stat_st_flags=yes
21755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021756 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021757sed 's/^/| /' conftest.$ac_ext >&5
21758
Martin v. Löwiseba40652007-08-30 20:10:57 +000021759 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021760/* confdefs.h. */
21761_ACEOF
21762cat confdefs.h >>conftest.$ac_ext
21763cat >>conftest.$ac_ext <<_ACEOF
21764/* end confdefs.h. */
21765$ac_includes_default
21766int
21767main ()
21768{
21769static struct stat ac_aggr;
21770if (sizeof ac_aggr.st_flags)
21771return 0;
21772 ;
21773 return 0;
21774}
21775_ACEOF
21776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021777if { (ac_try="$ac_compile"
21778case "(($ac_try" in
21779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21780 *) ac_try_echo=$ac_try;;
21781esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021783 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021784 ac_status=$?
21785 grep -v '^ *+' conftest.er1 >conftest.err
21786 rm -f conftest.er1
21787 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021789 (exit $ac_status); } && {
21790 test -z "$ac_c_werror_flag" ||
21791 test ! -s conftest.err
21792 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021793 ac_cv_member_struct_stat_st_flags=yes
21794else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021795 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021796sed 's/^/| /' conftest.$ac_ext >&5
21797
Martin v. Löwiseba40652007-08-30 20:10:57 +000021798 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021800
21801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021803
21804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021805fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021806{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21807echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21808if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021809
21810cat >>confdefs.h <<_ACEOF
21811#define HAVE_STRUCT_STAT_ST_FLAGS 1
21812_ACEOF
21813
21814
21815fi
21816
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021817{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21818echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021819if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021820 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021821else
21822 cat >conftest.$ac_ext <<_ACEOF
21823/* confdefs.h. */
21824_ACEOF
21825cat confdefs.h >>conftest.$ac_ext
21826cat >>conftest.$ac_ext <<_ACEOF
21827/* end confdefs.h. */
21828$ac_includes_default
21829int
21830main ()
21831{
21832static struct stat ac_aggr;
21833if (ac_aggr.st_gen)
21834return 0;
21835 ;
21836 return 0;
21837}
21838_ACEOF
21839rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021840if { (ac_try="$ac_compile"
21841case "(($ac_try" in
21842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21843 *) ac_try_echo=$ac_try;;
21844esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021846 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021847 ac_status=$?
21848 grep -v '^ *+' conftest.er1 >conftest.err
21849 rm -f conftest.er1
21850 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021852 (exit $ac_status); } && {
21853 test -z "$ac_c_werror_flag" ||
21854 test ! -s conftest.err
21855 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021856 ac_cv_member_struct_stat_st_gen=yes
21857else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021858 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021859sed 's/^/| /' conftest.$ac_ext >&5
21860
Martin v. Löwiseba40652007-08-30 20:10:57 +000021861 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021862/* confdefs.h. */
21863_ACEOF
21864cat confdefs.h >>conftest.$ac_ext
21865cat >>conftest.$ac_ext <<_ACEOF
21866/* end confdefs.h. */
21867$ac_includes_default
21868int
21869main ()
21870{
21871static struct stat ac_aggr;
21872if (sizeof ac_aggr.st_gen)
21873return 0;
21874 ;
21875 return 0;
21876}
21877_ACEOF
21878rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021879if { (ac_try="$ac_compile"
21880case "(($ac_try" in
21881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21882 *) ac_try_echo=$ac_try;;
21883esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021886 ac_status=$?
21887 grep -v '^ *+' conftest.er1 >conftest.err
21888 rm -f conftest.er1
21889 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021891 (exit $ac_status); } && {
21892 test -z "$ac_c_werror_flag" ||
21893 test ! -s conftest.err
21894 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021895 ac_cv_member_struct_stat_st_gen=yes
21896else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021897 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021898sed 's/^/| /' conftest.$ac_ext >&5
21899
Martin v. Löwiseba40652007-08-30 20:10:57 +000021900 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021902
21903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021905
21906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021907fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021908{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21909echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21910if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021911
21912cat >>confdefs.h <<_ACEOF
21913#define HAVE_STRUCT_STAT_ST_GEN 1
21914_ACEOF
21915
21916
21917fi
21918
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021919{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21920echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021921if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021922 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021923else
21924 cat >conftest.$ac_ext <<_ACEOF
21925/* confdefs.h. */
21926_ACEOF
21927cat confdefs.h >>conftest.$ac_ext
21928cat >>conftest.$ac_ext <<_ACEOF
21929/* end confdefs.h. */
21930$ac_includes_default
21931int
21932main ()
21933{
21934static struct stat ac_aggr;
21935if (ac_aggr.st_birthtime)
21936return 0;
21937 ;
21938 return 0;
21939}
21940_ACEOF
21941rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021942if { (ac_try="$ac_compile"
21943case "(($ac_try" in
21944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21945 *) ac_try_echo=$ac_try;;
21946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021949 ac_status=$?
21950 grep -v '^ *+' conftest.er1 >conftest.err
21951 rm -f conftest.er1
21952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021954 (exit $ac_status); } && {
21955 test -z "$ac_c_werror_flag" ||
21956 test ! -s conftest.err
21957 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021958 ac_cv_member_struct_stat_st_birthtime=yes
21959else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021960 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021961sed 's/^/| /' conftest.$ac_ext >&5
21962
Martin v. Löwiseba40652007-08-30 20:10:57 +000021963 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021964/* confdefs.h. */
21965_ACEOF
21966cat confdefs.h >>conftest.$ac_ext
21967cat >>conftest.$ac_ext <<_ACEOF
21968/* end confdefs.h. */
21969$ac_includes_default
21970int
21971main ()
21972{
21973static struct stat ac_aggr;
21974if (sizeof ac_aggr.st_birthtime)
21975return 0;
21976 ;
21977 return 0;
21978}
21979_ACEOF
21980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021981if { (ac_try="$ac_compile"
21982case "(($ac_try" in
21983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21984 *) ac_try_echo=$ac_try;;
21985esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021988 ac_status=$?
21989 grep -v '^ *+' conftest.er1 >conftest.err
21990 rm -f conftest.er1
21991 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021993 (exit $ac_status); } && {
21994 test -z "$ac_c_werror_flag" ||
21995 test ! -s conftest.err
21996 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021997 ac_cv_member_struct_stat_st_birthtime=yes
21998else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021999 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022000sed 's/^/| /' conftest.$ac_ext >&5
22001
Martin v. Löwiseba40652007-08-30 20:10:57 +000022002 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022004
22005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022007
22008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022009fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022010{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22011echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22012if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022013
22014cat >>confdefs.h <<_ACEOF
22015#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22016_ACEOF
22017
22018
22019fi
22020
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022021{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22022echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022023if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022025else
Martin v. Löwis11437992002-04-12 09:54:03 +000022026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022027/* confdefs.h. */
22028_ACEOF
22029cat confdefs.h >>conftest.$ac_ext
22030cat >>conftest.$ac_ext <<_ACEOF
22031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022032$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022033int
22034main ()
22035{
22036static struct stat ac_aggr;
22037if (ac_aggr.st_blocks)
22038return 0;
22039 ;
22040 return 0;
22041}
22042_ACEOF
22043rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022044if { (ac_try="$ac_compile"
22045case "(($ac_try" in
22046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22047 *) ac_try_echo=$ac_try;;
22048esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022052 grep -v '^ *+' conftest.er1 >conftest.err
22053 rm -f conftest.er1
22054 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022056 (exit $ac_status); } && {
22057 test -z "$ac_c_werror_flag" ||
22058 test ! -s conftest.err
22059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022060 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022061else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022063sed 's/^/| /' conftest.$ac_ext >&5
22064
Martin v. Löwiseba40652007-08-30 20:10:57 +000022065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022066/* confdefs.h. */
22067_ACEOF
22068cat confdefs.h >>conftest.$ac_ext
22069cat >>conftest.$ac_ext <<_ACEOF
22070/* end confdefs.h. */
22071$ac_includes_default
22072int
22073main ()
22074{
22075static struct stat ac_aggr;
22076if (sizeof ac_aggr.st_blocks)
22077return 0;
22078 ;
22079 return 0;
22080}
22081_ACEOF
22082rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022083if { (ac_try="$ac_compile"
22084case "(($ac_try" in
22085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22086 *) ac_try_echo=$ac_try;;
22087esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022089 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022091 grep -v '^ *+' conftest.er1 >conftest.err
22092 rm -f conftest.er1
22093 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022095 (exit $ac_status); } && {
22096 test -z "$ac_c_werror_flag" ||
22097 test ! -s conftest.err
22098 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022099 ac_cv_member_struct_stat_st_blocks=yes
22100else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022102sed 's/^/| /' conftest.$ac_ext >&5
22103
Martin v. Löwiseba40652007-08-30 20:10:57 +000022104 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022106
22107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022108fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022109
22110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022111fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022112{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22113echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22114if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022115
Martin v. Löwis11437992002-04-12 09:54:03 +000022116cat >>confdefs.h <<_ACEOF
22117#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22118_ACEOF
22119
22120
22121cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022122#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022123_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022124
22125else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022126 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022127 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022128 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22129 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022130esac
22131
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022132fi
22133
Michael W. Hudson54241132001-12-07 15:38:26 +000022134
Martin v. Löwis11437992002-04-12 09:54:03 +000022135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022136{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22137echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022138if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022139 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022140else
Martin v. Löwis11437992002-04-12 09:54:03 +000022141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022142/* confdefs.h. */
22143_ACEOF
22144cat confdefs.h >>conftest.$ac_ext
22145cat >>conftest.$ac_ext <<_ACEOF
22146/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022147#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022148int
22149main ()
22150{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022151return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022152 ;
22153 return 0;
22154}
22155_ACEOF
22156rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022157if { (ac_try="$ac_compile"
22158case "(($ac_try" in
22159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22160 *) ac_try_echo=$ac_try;;
22161esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022165 grep -v '^ *+' conftest.er1 >conftest.err
22166 rm -f conftest.er1
22167 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022169 (exit $ac_status); } && {
22170 test -z "$ac_c_werror_flag" ||
22171 test ! -s conftest.err
22172 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022173 ac_cv_header_time_altzone=yes
22174else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022176sed 's/^/| /' conftest.$ac_ext >&5
22177
Martin v. Löwiseba40652007-08-30 20:10:57 +000022178 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022179fi
22180
Martin v. Löwiseba40652007-08-30 20:10:57 +000022181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22182fi
22183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022184{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22185echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022186if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022187
22188cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022189#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022190_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022191
22192fi
22193
Guido van Rossumda88dad1995-01-26 00:46:29 +000022194was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022195{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22196echo $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 +000022197cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022198/* confdefs.h. */
22199_ACEOF
22200cat confdefs.h >>conftest.$ac_ext
22201cat >>conftest.$ac_ext <<_ACEOF
22202/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022203
22204#include <sys/types.h>
22205#include <sys/select.h>
22206#include <sys/time.h>
22207
Martin v. Löwis11437992002-04-12 09:54:03 +000022208int
22209main ()
22210{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022211;
Martin v. Löwis11437992002-04-12 09:54:03 +000022212 ;
22213 return 0;
22214}
22215_ACEOF
22216rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022217if { (ac_try="$ac_compile"
22218case "(($ac_try" in
22219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22220 *) ac_try_echo=$ac_try;;
22221esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022225 grep -v '^ *+' conftest.er1 >conftest.err
22226 rm -f conftest.er1
22227 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022229 (exit $ac_status); } && {
22230 test -z "$ac_c_werror_flag" ||
22231 test ! -s conftest.err
22232 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022233
22234
22235cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022236#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022237_ACEOF
22238
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022239 was_it_defined=yes
22240
Guido van Rossumf78abae1997-01-21 22:02:36 +000022241else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022243sed 's/^/| /' conftest.$ac_ext >&5
22244
Brett Cannon19fab762007-06-02 03:02:29 +000022245
Martin v. Löwiseba40652007-08-30 20:10:57 +000022246fi
22247
22248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022249{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22250echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022251
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022252{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22253echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022254if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022255 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022256else
Martin v. Löwis11437992002-04-12 09:54:03 +000022257 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022258/* confdefs.h. */
22259_ACEOF
22260cat confdefs.h >>conftest.$ac_ext
22261cat >>conftest.$ac_ext <<_ACEOF
22262/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022263
22264# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022265int
22266main ()
22267{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022268struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022269 ;
22270 return 0;
22271}
22272_ACEOF
22273rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022274if { (ac_try="$ac_compile"
22275case "(($ac_try" in
22276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22277 *) ac_try_echo=$ac_try;;
22278esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022282 grep -v '^ *+' conftest.er1 >conftest.err
22283 rm -f conftest.er1
22284 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022286 (exit $ac_status); } && {
22287 test -z "$ac_c_werror_flag" ||
22288 test ! -s conftest.err
22289 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022290 ac_cv_struct_addrinfo=yes
22291else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022293sed 's/^/| /' conftest.$ac_ext >&5
22294
Martin v. Löwiseba40652007-08-30 20:10:57 +000022295 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022296fi
22297
Martin v. Löwiseba40652007-08-30 20:10:57 +000022298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22299fi
22300
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022301{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22302echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022303if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022304
22305cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022306#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022307_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022308
22309fi
22310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022311{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22312echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022313if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022314 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022315else
Martin v. Löwis11437992002-04-12 09:54:03 +000022316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022317/* confdefs.h. */
22318_ACEOF
22319cat confdefs.h >>conftest.$ac_ext
22320cat >>conftest.$ac_ext <<_ACEOF
22321/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022322
22323# include <sys/types.h>
22324# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022325int
22326main ()
22327{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022328struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022329 ;
22330 return 0;
22331}
22332_ACEOF
22333rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022334if { (ac_try="$ac_compile"
22335case "(($ac_try" in
22336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22337 *) ac_try_echo=$ac_try;;
22338esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022342 grep -v '^ *+' conftest.er1 >conftest.err
22343 rm -f conftest.er1
22344 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346 (exit $ac_status); } && {
22347 test -z "$ac_c_werror_flag" ||
22348 test ! -s conftest.err
22349 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022350 ac_cv_struct_sockaddr_storage=yes
22351else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022353sed 's/^/| /' conftest.$ac_ext >&5
22354
Martin v. Löwiseba40652007-08-30 20:10:57 +000022355 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022356fi
22357
Martin v. Löwiseba40652007-08-30 20:10:57 +000022358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22359fi
22360
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022361{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22362echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022363if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022364
22365cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022366#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022367_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022368
22369fi
22370
Guido van Rossum627b2d71993-12-24 10:39:16 +000022371# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022372
Michael W. Hudson54241132001-12-07 15:38:26 +000022373
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022374{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22375echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022376if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022377 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022378else
Martin v. Löwis11437992002-04-12 09:54:03 +000022379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022380/* confdefs.h. */
22381_ACEOF
22382cat confdefs.h >>conftest.$ac_ext
22383cat >>conftest.$ac_ext <<_ACEOF
22384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022385$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022386int
22387main ()
22388{
22389static int test_array [1 - 2 * !(((char) -1) < 0)];
22390test_array [0] = 0
22391
22392 ;
22393 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022394}
Martin v. Löwis11437992002-04-12 09:54:03 +000022395_ACEOF
22396rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022397if { (ac_try="$ac_compile"
22398case "(($ac_try" in
22399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22400 *) ac_try_echo=$ac_try;;
22401esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022405 grep -v '^ *+' conftest.er1 >conftest.err
22406 rm -f conftest.er1
22407 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022409 (exit $ac_status); } && {
22410 test -z "$ac_c_werror_flag" ||
22411 test ! -s conftest.err
22412 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022413 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022416sed 's/^/| /' conftest.$ac_ext >&5
22417
Martin v. Löwiseba40652007-08-30 20:10:57 +000022418 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022420
22421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022422fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022423{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22424echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022425if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022426 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022427#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022428_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022429
22430fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022431
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022432{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22433echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022434if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022435 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022436else
22437 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022438/* confdefs.h. */
22439_ACEOF
22440cat confdefs.h >>conftest.$ac_ext
22441cat >>conftest.$ac_ext <<_ACEOF
22442/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022443
Martin v. Löwis11437992002-04-12 09:54:03 +000022444int
22445main ()
22446{
22447/* FIXME: Include the comments suggested by Paul. */
22448#ifndef __cplusplus
22449 /* Ultrix mips cc rejects this. */
22450 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022451 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022452 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022453 char const *const *pcpcc;
22454 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022455 /* NEC SVR4.0.2 mips cc rejects this. */
22456 struct point {int x, y;};
22457 static struct point const zero = {0,0};
22458 /* AIX XL C 1.02.0.0 rejects this.
22459 It does not let you subtract one const X* pointer from another in
22460 an arm of an if-expression whose if-part is not a constant
22461 expression */
22462 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022463 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022464 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022465 ++pcpcc;
22466 ppc = (char**) pcpcc;
22467 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022468 { /* SCO 3.2v4 cc rejects this. */
22469 char *t;
22470 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022471
Martin v. Löwis11437992002-04-12 09:54:03 +000022472 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022473 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022474 }
22475 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22476 int x[] = {25, 17};
22477 const int *foo = &x[0];
22478 ++foo;
22479 }
22480 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22481 typedef const int *iptr;
22482 iptr p = 0;
22483 ++p;
22484 }
22485 { /* AIX XL C 1.02.0.0 rejects this saying
22486 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22487 struct s { int j; const int *ap[3]; };
22488 struct s *b; b->j = 5;
22489 }
22490 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22491 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022492 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022493 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022494 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022495#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022496
Martin v. Löwis11437992002-04-12 09:54:03 +000022497 ;
22498 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022499}
Martin v. Löwis11437992002-04-12 09:54:03 +000022500_ACEOF
22501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022502if { (ac_try="$ac_compile"
22503case "(($ac_try" in
22504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22505 *) ac_try_echo=$ac_try;;
22506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022510 grep -v '^ *+' conftest.er1 >conftest.err
22511 rm -f conftest.er1
22512 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022514 (exit $ac_status); } && {
22515 test -z "$ac_c_werror_flag" ||
22516 test ! -s conftest.err
22517 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022518 ac_cv_c_const=yes
22519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022521sed 's/^/| /' conftest.$ac_ext >&5
22522
Martin v. Löwiseba40652007-08-30 20:10:57 +000022523 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022525
22526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022527fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022528{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22529echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022530if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022531
22532cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022533#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022534_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022535
22536fi
22537
Michael W. Hudson54241132001-12-07 15:38:26 +000022538
Guido van Rossumda88dad1995-01-26 00:46:29 +000022539works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022540{ echo "$as_me:$LINENO: checking for working volatile" >&5
22541echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022543/* confdefs.h. */
22544_ACEOF
22545cat confdefs.h >>conftest.$ac_ext
22546cat >>conftest.$ac_ext <<_ACEOF
22547/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022548
Martin v. Löwis11437992002-04-12 09:54:03 +000022549int
22550main ()
22551{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022552volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022553 ;
22554 return 0;
22555}
22556_ACEOF
22557rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022558if { (ac_try="$ac_compile"
22559case "(($ac_try" in
22560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22561 *) ac_try_echo=$ac_try;;
22562esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022566 grep -v '^ *+' conftest.er1 >conftest.err
22567 rm -f conftest.er1
22568 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022570 (exit $ac_status); } && {
22571 test -z "$ac_c_werror_flag" ||
22572 test ! -s conftest.err
22573 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022574 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022575else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022577sed 's/^/| /' conftest.$ac_ext >&5
22578
Martin v. Löwis11437992002-04-12 09:54:03 +000022579
22580cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022581#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022582_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022583
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022584
Guido van Rossum627b2d71993-12-24 10:39:16 +000022585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022586
22587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022588{ echo "$as_me:$LINENO: result: $works" >&5
22589echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022590
Guido van Rossumda88dad1995-01-26 00:46:29 +000022591works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022592{ echo "$as_me:$LINENO: checking for working signed char" >&5
22593echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022595/* confdefs.h. */
22596_ACEOF
22597cat confdefs.h >>conftest.$ac_ext
22598cat >>conftest.$ac_ext <<_ACEOF
22599/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022600
Martin v. Löwis11437992002-04-12 09:54:03 +000022601int
22602main ()
22603{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022604signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022605 ;
22606 return 0;
22607}
22608_ACEOF
22609rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022610if { (ac_try="$ac_compile"
22611case "(($ac_try" in
22612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22613 *) ac_try_echo=$ac_try;;
22614esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022618 grep -v '^ *+' conftest.er1 >conftest.err
22619 rm -f conftest.er1
22620 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022622 (exit $ac_status); } && {
22623 test -z "$ac_c_werror_flag" ||
22624 test ! -s conftest.err
22625 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022626 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022627else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022629sed 's/^/| /' conftest.$ac_ext >&5
22630
Martin v. Löwis11437992002-04-12 09:54:03 +000022631
22632cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022633#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022634_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022635
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022636
Guido van Rossum7f43da71994-08-01 12:15:30 +000022637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022638
22639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022640{ echo "$as_me:$LINENO: result: $works" >&5
22641echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022642
Guido van Rossumda88dad1995-01-26 00:46:29 +000022643have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022644{ echo "$as_me:$LINENO: checking for prototypes" >&5
22645echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022646cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022647/* confdefs.h. */
22648_ACEOF
22649cat confdefs.h >>conftest.$ac_ext
22650cat >>conftest.$ac_ext <<_ACEOF
22651/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022652int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022653int
22654main ()
22655{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022656return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022657 ;
22658 return 0;
22659}
22660_ACEOF
22661rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022662if { (ac_try="$ac_compile"
22663case "(($ac_try" in
22664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22665 *) ac_try_echo=$ac_try;;
22666esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022670 grep -v '^ *+' conftest.er1 >conftest.err
22671 rm -f conftest.er1
22672 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022674 (exit $ac_status); } && {
22675 test -z "$ac_c_werror_flag" ||
22676 test ! -s conftest.err
22677 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022678
22679
22680cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022681#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022682_ACEOF
22683
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022684 have_prototypes=yes
22685
Guido van Rossumf78abae1997-01-21 22:02:36 +000022686else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022688sed 's/^/| /' conftest.$ac_ext >&5
22689
Martin v. Löwiseba40652007-08-30 20:10:57 +000022690
Guido van Rossum7f43da71994-08-01 12:15:30 +000022691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022692
22693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022694{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22695echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022696
Guido van Rossumda88dad1995-01-26 00:46:29 +000022697works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022698{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22699echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022701/* confdefs.h. */
22702_ACEOF
22703cat confdefs.h >>conftest.$ac_ext
22704cat >>conftest.$ac_ext <<_ACEOF
22705/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022706
22707#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022708int foo(int x, ...) {
22709 va_list va;
22710 va_start(va, x);
22711 va_arg(va, int);
22712 va_arg(va, char *);
22713 va_arg(va, double);
22714 return 0;
22715}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022716
Martin v. Löwis11437992002-04-12 09:54:03 +000022717int
22718main ()
22719{
Guido van Rossum90eea071996-08-30 20:58:57 +000022720return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022721 ;
22722 return 0;
22723}
22724_ACEOF
22725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022726if { (ac_try="$ac_compile"
22727case "(($ac_try" in
22728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22729 *) ac_try_echo=$ac_try;;
22730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022734 grep -v '^ *+' conftest.er1 >conftest.err
22735 rm -f conftest.er1
22736 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022738 (exit $ac_status); } && {
22739 test -z "$ac_c_werror_flag" ||
22740 test ! -s conftest.err
22741 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022742
22743
22744cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022745#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022746_ACEOF
22747
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022748 works=yes
22749
Guido van Rossumf78abae1997-01-21 22:02:36 +000022750else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022752sed 's/^/| /' conftest.$ac_ext >&5
22753
Martin v. Löwiseba40652007-08-30 20:10:57 +000022754
Guido van Rossum627b2d71993-12-24 10:39:16 +000022755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022756
22757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022758{ echo "$as_me:$LINENO: result: $works" >&5
22759echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022760
Martin v. Löwisd6320502004-08-12 13:45:08 +000022761# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022762{ echo "$as_me:$LINENO: checking for socketpair" >&5
22763echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022764cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022765/* confdefs.h. */
22766_ACEOF
22767cat confdefs.h >>conftest.$ac_ext
22768cat >>conftest.$ac_ext <<_ACEOF
22769/* end confdefs.h. */
22770
22771#include <sys/types.h>
22772#include <sys/socket.h>
22773
22774int
22775main ()
22776{
22777void *x=socketpair
22778 ;
22779 return 0;
22780}
22781_ACEOF
22782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022783if { (ac_try="$ac_compile"
22784case "(($ac_try" in
22785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22786 *) ac_try_echo=$ac_try;;
22787esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022791 grep -v '^ *+' conftest.er1 >conftest.err
22792 rm -f conftest.er1
22793 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022795 (exit $ac_status); } && {
22796 test -z "$ac_c_werror_flag" ||
22797 test ! -s conftest.err
22798 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022799
22800cat >>confdefs.h <<\_ACEOF
22801#define HAVE_SOCKETPAIR 1
22802_ACEOF
22803
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022804 { echo "$as_me:$LINENO: result: yes" >&5
22805echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022806else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022807 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022808sed 's/^/| /' conftest.$ac_ext >&5
22809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022810 { echo "$as_me:$LINENO: result: no" >&5
22811echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022812
22813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022814
22815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022816
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022817# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022818{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22819echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022820cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022821/* confdefs.h. */
22822_ACEOF
22823cat confdefs.h >>conftest.$ac_ext
22824cat >>conftest.$ac_ext <<_ACEOF
22825/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022826#include <sys/types.h>
22827#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022828int
22829main ()
22830{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022831struct sockaddr x;
22832x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022833 ;
22834 return 0;
22835}
22836_ACEOF
22837rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022838if { (ac_try="$ac_compile"
22839case "(($ac_try" in
22840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22841 *) ac_try_echo=$ac_try;;
22842esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022846 grep -v '^ *+' conftest.er1 >conftest.err
22847 rm -f conftest.er1
22848 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022850 (exit $ac_status); } && {
22851 test -z "$ac_c_werror_flag" ||
22852 test ! -s conftest.err
22853 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022854 { echo "$as_me:$LINENO: result: yes" >&5
22855echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022856
22857cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022858#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022859_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022860
22861else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022863sed 's/^/| /' conftest.$ac_ext >&5
22864
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022865 { echo "$as_me:$LINENO: result: no" >&5
22866echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022868
22869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022870
Guido van Rossumda88dad1995-01-26 00:46:29 +000022871va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022872{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22873echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022875/* confdefs.h. */
22876_ACEOF
22877cat confdefs.h >>conftest.$ac_ext
22878cat >>conftest.$ac_ext <<_ACEOF
22879/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022880
22881#ifdef HAVE_STDARG_PROTOTYPES
22882#include <stdarg.h>
22883#else
22884#include <varargs.h>
22885#endif
22886
Martin v. Löwis11437992002-04-12 09:54:03 +000022887int
22888main ()
22889{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022890va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022891 ;
22892 return 0;
22893}
22894_ACEOF
22895rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022896if { (ac_try="$ac_compile"
22897case "(($ac_try" in
22898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22899 *) ac_try_echo=$ac_try;;
22900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022902 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022904 grep -v '^ *+' conftest.er1 >conftest.err
22905 rm -f conftest.er1
22906 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022908 (exit $ac_status); } && {
22909 test -z "$ac_c_werror_flag" ||
22910 test ! -s conftest.err
22911 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022912 :
22913else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022915sed 's/^/| /' conftest.$ac_ext >&5
22916
Martin v. Löwis11437992002-04-12 09:54:03 +000022917
22918
22919cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022920#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022921_ACEOF
22922
Guido van Rossumda88dad1995-01-26 00:46:29 +000022923 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022924
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022926
22927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022928{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22929echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022930
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022931# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022932
22933
22934
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022935{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22936echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022937if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022938 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022939else
Martin v. Löwis11437992002-04-12 09:54:03 +000022940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022941/* confdefs.h. */
22942_ACEOF
22943cat confdefs.h >>conftest.$ac_ext
22944cat >>conftest.$ac_ext <<_ACEOF
22945/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022946/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22947 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22948#define gethostbyname_r innocuous_gethostbyname_r
22949
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022950/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022951 which can conflict with char gethostbyname_r (); below.
22952 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022953 <limits.h> exists even on freestanding compilers. */
22954
22955#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022956# include <limits.h>
22957#else
22958# include <assert.h>
22959#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022960
22961#undef gethostbyname_r
22962
Martin v. Löwiseba40652007-08-30 20:10:57 +000022963/* Override any GCC internal prototype to avoid an error.
22964 Use char because int might match the return type of a GCC
22965 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022966#ifdef __cplusplus
22967extern "C"
22968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022969char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022970/* The GNU C library defines this for functions which it implements
22971 to always fail with ENOSYS. Some functions are actually named
22972 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022973#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022974choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022975#endif
22976
Skip Montanaro6dead952003-09-25 14:50:04 +000022977int
22978main ()
22979{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022980return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022981 ;
22982 return 0;
22983}
22984_ACEOF
22985rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022986if { (ac_try="$ac_link"
22987case "(($ac_try" in
22988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22989 *) ac_try_echo=$ac_try;;
22990esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022992 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022994 grep -v '^ *+' conftest.er1 >conftest.err
22995 rm -f conftest.er1
22996 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022998 (exit $ac_status); } && {
22999 test -z "$ac_c_werror_flag" ||
23000 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023001 } && test -s conftest$ac_exeext &&
23002 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023003 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023004else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023006sed 's/^/| /' conftest.$ac_ext >&5
23007
Martin v. Löwiseba40652007-08-30 20:10:57 +000023008 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023010
23011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023012 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023013fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023014{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23015echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23016if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023017
Martin v. Löwis11437992002-04-12 09:54:03 +000023018 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023019#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023020_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023021
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023022 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23023echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023024 OLD_CFLAGS=$CFLAGS
23025 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023027/* confdefs.h. */
23028_ACEOF
23029cat confdefs.h >>conftest.$ac_ext
23030cat >>conftest.$ac_ext <<_ACEOF
23031/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023032
23033# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023034
Martin v. Löwis11437992002-04-12 09:54:03 +000023035int
23036main ()
23037{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023038
23039 char *name;
23040 struct hostent *he, *res;
23041 char buffer[2048];
23042 int buflen = 2048;
23043 int h_errnop;
23044
23045 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023046
23047 ;
23048 return 0;
23049}
23050_ACEOF
23051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023052if { (ac_try="$ac_compile"
23053case "(($ac_try" in
23054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23055 *) ac_try_echo=$ac_try;;
23056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023060 grep -v '^ *+' conftest.er1 >conftest.err
23061 rm -f conftest.er1
23062 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023064 (exit $ac_status); } && {
23065 test -z "$ac_c_werror_flag" ||
23066 test ! -s conftest.err
23067 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023068
23069 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023070#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023071_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023072
Martin v. Löwis11437992002-04-12 09:54:03 +000023073
23074cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023075#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023076_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023077
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023078 { echo "$as_me:$LINENO: result: yes" >&5
23079echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023080
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023083sed 's/^/| /' conftest.$ac_ext >&5
23084
Martin v. Löwis11437992002-04-12 09:54:03 +000023085
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023086 { echo "$as_me:$LINENO: result: no" >&5
23087echo "${ECHO_T}no" >&6; }
23088 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23089echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023091/* confdefs.h. */
23092_ACEOF
23093cat confdefs.h >>conftest.$ac_ext
23094cat >>conftest.$ac_ext <<_ACEOF
23095/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023096
23097# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023098
Martin v. Löwis11437992002-04-12 09:54:03 +000023099int
23100main ()
23101{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023102
23103 char *name;
23104 struct hostent *he;
23105 char buffer[2048];
23106 int buflen = 2048;
23107 int h_errnop;
23108
23109 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023110
23111 ;
23112 return 0;
23113}
23114_ACEOF
23115rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023116if { (ac_try="$ac_compile"
23117case "(($ac_try" in
23118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23119 *) ac_try_echo=$ac_try;;
23120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023124 grep -v '^ *+' conftest.er1 >conftest.err
23125 rm -f conftest.er1
23126 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023128 (exit $ac_status); } && {
23129 test -z "$ac_c_werror_flag" ||
23130 test ! -s conftest.err
23131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023132
23133 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023134#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023135_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023136
Martin v. Löwis11437992002-04-12 09:54:03 +000023137
23138cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023139#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023140_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023141
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023142 { echo "$as_me:$LINENO: result: yes" >&5
23143echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023144
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023145else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023147sed 's/^/| /' conftest.$ac_ext >&5
23148
Martin v. Löwis11437992002-04-12 09:54:03 +000023149
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023150 { echo "$as_me:$LINENO: result: no" >&5
23151echo "${ECHO_T}no" >&6; }
23152 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23153echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023154 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023155/* confdefs.h. */
23156_ACEOF
23157cat confdefs.h >>conftest.$ac_ext
23158cat >>conftest.$ac_ext <<_ACEOF
23159/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023160
23161# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023162
Martin v. Löwis11437992002-04-12 09:54:03 +000023163int
23164main ()
23165{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023166
23167 char *name;
23168 struct hostent *he;
23169 struct hostent_data data;
23170
23171 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023172
23173 ;
23174 return 0;
23175}
23176_ACEOF
23177rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023178if { (ac_try="$ac_compile"
23179case "(($ac_try" in
23180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23181 *) ac_try_echo=$ac_try;;
23182esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023186 grep -v '^ *+' conftest.er1 >conftest.err
23187 rm -f conftest.er1
23188 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023190 (exit $ac_status); } && {
23191 test -z "$ac_c_werror_flag" ||
23192 test ! -s conftest.err
23193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023194
23195 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023196#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023197_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023198
Martin v. Löwis11437992002-04-12 09:54:03 +000023199
23200cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023201#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023202_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023203
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023204 { echo "$as_me:$LINENO: result: yes" >&5
23205echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023206
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023207else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023209sed 's/^/| /' conftest.$ac_ext >&5
23210
Martin v. Löwis11437992002-04-12 09:54:03 +000023211
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023212 { echo "$as_me:$LINENO: result: no" >&5
23213echo "${ECHO_T}no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000023222
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023224
23225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023226 CFLAGS=$OLD_CFLAGS
23227
23228else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023229
Martin v. Löwis11437992002-04-12 09:54:03 +000023230
23231for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023232do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023233as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23234{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23235echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023236if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023237 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023238else
Martin v. Löwis11437992002-04-12 09:54:03 +000023239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023240/* confdefs.h. */
23241_ACEOF
23242cat confdefs.h >>conftest.$ac_ext
23243cat >>conftest.$ac_ext <<_ACEOF
23244/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023245/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23246 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23247#define $ac_func innocuous_$ac_func
23248
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023249/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023250 which can conflict with char $ac_func (); below.
23251 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023252 <limits.h> exists even on freestanding compilers. */
23253
23254#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023255# include <limits.h>
23256#else
23257# include <assert.h>
23258#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023259
23260#undef $ac_func
23261
Martin v. Löwiseba40652007-08-30 20:10:57 +000023262/* Override any GCC internal prototype to avoid an error.
23263 Use char because int might match the return type of a GCC
23264 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023265#ifdef __cplusplus
23266extern "C"
23267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023268char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023269/* The GNU C library defines this for functions which it implements
23270 to always fail with ENOSYS. Some functions are actually named
23271 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023272#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023273choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023274#endif
23275
Skip Montanaro6dead952003-09-25 14:50:04 +000023276int
23277main ()
23278{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023279return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023280 ;
23281 return 0;
23282}
23283_ACEOF
23284rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023285if { (ac_try="$ac_link"
23286case "(($ac_try" in
23287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23288 *) ac_try_echo=$ac_try;;
23289esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023291 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023293 grep -v '^ *+' conftest.er1 >conftest.err
23294 rm -f conftest.er1
23295 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023297 (exit $ac_status); } && {
23298 test -z "$ac_c_werror_flag" ||
23299 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023300 } && test -s conftest$ac_exeext &&
23301 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023302 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023303else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023305sed 's/^/| /' conftest.$ac_ext >&5
23306
Martin v. Löwiseba40652007-08-30 20:10:57 +000023307 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023309
23310rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023311 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023312fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023313ac_res=`eval echo '${'$as_ac_var'}'`
23314 { echo "$as_me:$LINENO: result: $ac_res" >&5
23315echo "${ECHO_T}$ac_res" >&6; }
23316if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023317 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023318#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023319_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023320
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023321fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023322done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023323
Michael W. Hudson54241132001-12-07 15:38:26 +000023324
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023325fi
23326
Michael W. Hudson54241132001-12-07 15:38:26 +000023327
23328
23329
23330
23331
23332
Guido van Rossum627b2d71993-12-24 10:39:16 +000023333# checks for system services
23334# (none yet)
23335
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023336# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023337{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23338echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023339if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023340 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023341else
Martin v. Löwis11437992002-04-12 09:54:03 +000023342 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023343/* confdefs.h. */
23344_ACEOF
23345cat confdefs.h >>conftest.$ac_ext
23346cat >>conftest.$ac_ext <<_ACEOF
23347/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023348/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23349 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23350#define __fpu_control innocuous___fpu_control
23351
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023352/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023353 which can conflict with char __fpu_control (); below.
23354 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023355 <limits.h> exists even on freestanding compilers. */
23356
23357#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023358# include <limits.h>
23359#else
23360# include <assert.h>
23361#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023362
23363#undef __fpu_control
23364
Martin v. Löwiseba40652007-08-30 20:10:57 +000023365/* Override any GCC internal prototype to avoid an error.
23366 Use char because int might match the return type of a GCC
23367 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023368#ifdef __cplusplus
23369extern "C"
23370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023371char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023372/* The GNU C library defines this for functions which it implements
23373 to always fail with ENOSYS. Some functions are actually named
23374 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023375#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023376choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023377#endif
23378
Skip Montanaro6dead952003-09-25 14:50:04 +000023379int
23380main ()
23381{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023382return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023383 ;
23384 return 0;
23385}
23386_ACEOF
23387rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023388if { (ac_try="$ac_link"
23389case "(($ac_try" in
23390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23391 *) ac_try_echo=$ac_try;;
23392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023394 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023396 grep -v '^ *+' conftest.er1 >conftest.err
23397 rm -f conftest.er1
23398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023400 (exit $ac_status); } && {
23401 test -z "$ac_c_werror_flag" ||
23402 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023403 } && test -s conftest$ac_exeext &&
23404 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023405 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023406else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023408sed 's/^/| /' conftest.$ac_ext >&5
23409
Martin v. Löwiseba40652007-08-30 20:10:57 +000023410 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023412
23413rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023414 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023415fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023416{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23417echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23418if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023419 :
23420else
Martin v. Löwis11437992002-04-12 09:54:03 +000023421
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023422{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23423echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023424if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023425 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023426else
Martin v. Löwis11437992002-04-12 09:54:03 +000023427 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023428LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023429cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023430/* confdefs.h. */
23431_ACEOF
23432cat confdefs.h >>conftest.$ac_ext
23433cat >>conftest.$ac_ext <<_ACEOF
23434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023435
Martin v. Löwiseba40652007-08-30 20:10:57 +000023436/* Override any GCC internal prototype to avoid an error.
23437 Use char because int might match the return type of a GCC
23438 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023439#ifdef __cplusplus
23440extern "C"
23441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023442char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023443int
23444main ()
23445{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023446return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023447 ;
23448 return 0;
23449}
23450_ACEOF
23451rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023452if { (ac_try="$ac_link"
23453case "(($ac_try" in
23454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23455 *) ac_try_echo=$ac_try;;
23456esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023458 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023460 grep -v '^ *+' conftest.er1 >conftest.err
23461 rm -f conftest.er1
23462 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023464 (exit $ac_status); } && {
23465 test -z "$ac_c_werror_flag" ||
23466 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023467 } && test -s conftest$ac_exeext &&
23468 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023469 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023470else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023472sed 's/^/| /' conftest.$ac_ext >&5
23473
Martin v. Löwiseba40652007-08-30 20:10:57 +000023474 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023476
23477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023479LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023480fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023481{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23482echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23483if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023484 cat >>confdefs.h <<_ACEOF
23485#define HAVE_LIBIEEE 1
23486_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023487
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023488 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023489
Guido van Rossum627b2d71993-12-24 10:39:16 +000023490fi
23491
Michael W. Hudson54241132001-12-07 15:38:26 +000023492
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023493fi
23494
Michael W. Hudson54241132001-12-07 15:38:26 +000023495
Guido van Rossum7f253911997-05-09 02:42:48 +000023496# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023497{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23498echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023499
Martin v. Löwiseba40652007-08-30 20:10:57 +000023500# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023501if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023502 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023503if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023504then
23505
23506cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023507#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023508_ACEOF
23509
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023510 { echo "$as_me:$LINENO: result: yes" >&5
23511echo "${ECHO_T}yes" >&6; }
23512else { echo "$as_me:$LINENO: result: no" >&5
23513echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023514fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023516 { echo "$as_me:$LINENO: result: no" >&5
23517echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023518fi
23519
Guido van Rossum7f253911997-05-09 02:42:48 +000023520
Guido van Rossum7f43da71994-08-01 12:15:30 +000023521# check for --with-libm=...
23522
Guido van Rossum563e7081996-09-10 18:20:48 +000023523case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023524Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023525BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023526*) LIBM=-lm
23527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023528{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23529echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023530
Martin v. Löwiseba40652007-08-30 20:10:57 +000023531# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023532if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023533 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023534if test "$withval" = no
23535then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023536 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23537echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023538elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023539then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023540 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23541echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23542else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23543echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023544 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023545fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023547 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23548echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023549fi
23550
Guido van Rossum7f43da71994-08-01 12:15:30 +000023551
23552# check for --with-libc=...
23553
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023554{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23555echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023556
Martin v. Löwiseba40652007-08-30 20:10:57 +000023557# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023558if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023559 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023560if test "$withval" = no
23561then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023562 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23563echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023564elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023565then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023566 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23567echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23568else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23569echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023570 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023571fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023572else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023573 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23574echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023575fi
23576
Guido van Rossum7f43da71994-08-01 12:15:30 +000023577
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023578# **************************************************
23579# * Check for various properties of floating point *
23580# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023581
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023582{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23583echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23584if test "${ac_cv_little_endian_double+set}" = set; then
23585 echo $ECHO_N "(cached) $ECHO_C" >&6
23586else
23587
23588if test "$cross_compiling" = yes; then
23589 ac_cv_little_endian_double=no
23590else
23591 cat >conftest.$ac_ext <<_ACEOF
23592/* confdefs.h. */
23593_ACEOF
23594cat confdefs.h >>conftest.$ac_ext
23595cat >>conftest.$ac_ext <<_ACEOF
23596/* end confdefs.h. */
23597
23598#include <string.h>
23599int main() {
23600 double x = 9006104071832581.0;
23601 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23602 return 0;
23603 else
23604 return 1;
23605}
23606
23607_ACEOF
23608rm -f conftest$ac_exeext
23609if { (ac_try="$ac_link"
23610case "(($ac_try" in
23611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23612 *) ac_try_echo=$ac_try;;
23613esac
23614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23615 (eval "$ac_link") 2>&5
23616 ac_status=$?
23617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23618 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23619 { (case "(($ac_try" in
23620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23621 *) ac_try_echo=$ac_try;;
23622esac
23623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23624 (eval "$ac_try") 2>&5
23625 ac_status=$?
23626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23627 (exit $ac_status); }; }; then
23628 ac_cv_little_endian_double=yes
23629else
23630 echo "$as_me: program exited with status $ac_status" >&5
23631echo "$as_me: failed program was:" >&5
23632sed 's/^/| /' conftest.$ac_ext >&5
23633
23634( exit $ac_status )
23635ac_cv_little_endian_double=no
23636fi
23637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23638fi
23639
23640
23641fi
23642
23643{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23644echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23645if test "$ac_cv_little_endian_double" = yes
23646then
23647
23648cat >>confdefs.h <<\_ACEOF
23649#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23650_ACEOF
23651
23652fi
23653
23654{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23655echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23656if test "${ac_cv_big_endian_double+set}" = set; then
23657 echo $ECHO_N "(cached) $ECHO_C" >&6
23658else
23659
23660if test "$cross_compiling" = yes; then
23661 ac_cv_big_endian_double=no
23662else
23663 cat >conftest.$ac_ext <<_ACEOF
23664/* confdefs.h. */
23665_ACEOF
23666cat confdefs.h >>conftest.$ac_ext
23667cat >>conftest.$ac_ext <<_ACEOF
23668/* end confdefs.h. */
23669
23670#include <string.h>
23671int main() {
23672 double x = 9006104071832581.0;
23673 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23674 return 0;
23675 else
23676 return 1;
23677}
23678
23679_ACEOF
23680rm -f conftest$ac_exeext
23681if { (ac_try="$ac_link"
23682case "(($ac_try" in
23683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23684 *) ac_try_echo=$ac_try;;
23685esac
23686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23687 (eval "$ac_link") 2>&5
23688 ac_status=$?
23689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23690 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23691 { (case "(($ac_try" in
23692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23693 *) ac_try_echo=$ac_try;;
23694esac
23695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23696 (eval "$ac_try") 2>&5
23697 ac_status=$?
23698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23699 (exit $ac_status); }; }; then
23700 ac_cv_big_endian_double=yes
23701else
23702 echo "$as_me: program exited with status $ac_status" >&5
23703echo "$as_me: failed program was:" >&5
23704sed 's/^/| /' conftest.$ac_ext >&5
23705
23706( exit $ac_status )
23707ac_cv_big_endian_double=no
23708fi
23709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23710fi
23711
23712
23713fi
23714
23715{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23716echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23717if test "$ac_cv_big_endian_double" = yes
23718then
23719
23720cat >>confdefs.h <<\_ACEOF
23721#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23722_ACEOF
23723
23724fi
23725
23726# Some ARM platforms use a mixed-endian representation for doubles.
23727# While Python doesn't currently have full support for these platforms
23728# (see e.g., issue 1762561), we can at least make sure that float <-> string
23729# conversions work.
23730{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23731echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23732if test "${ac_cv_mixed_endian_double+set}" = set; then
23733 echo $ECHO_N "(cached) $ECHO_C" >&6
23734else
23735
23736if test "$cross_compiling" = yes; then
23737 ac_cv_mixed_endian_double=no
23738else
23739 cat >conftest.$ac_ext <<_ACEOF
23740/* confdefs.h. */
23741_ACEOF
23742cat confdefs.h >>conftest.$ac_ext
23743cat >>conftest.$ac_ext <<_ACEOF
23744/* end confdefs.h. */
23745
23746#include <string.h>
23747int main() {
23748 double x = 9006104071832581.0;
23749 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23750 return 0;
23751 else
23752 return 1;
23753}
23754
23755_ACEOF
23756rm -f conftest$ac_exeext
23757if { (ac_try="$ac_link"
23758case "(($ac_try" in
23759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23760 *) ac_try_echo=$ac_try;;
23761esac
23762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23763 (eval "$ac_link") 2>&5
23764 ac_status=$?
23765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23766 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23767 { (case "(($ac_try" in
23768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23769 *) ac_try_echo=$ac_try;;
23770esac
23771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23772 (eval "$ac_try") 2>&5
23773 ac_status=$?
23774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23775 (exit $ac_status); }; }; then
23776 ac_cv_mixed_endian_double=yes
23777else
23778 echo "$as_me: program exited with status $ac_status" >&5
23779echo "$as_me: failed program was:" >&5
23780sed 's/^/| /' conftest.$ac_ext >&5
23781
23782( exit $ac_status )
23783ac_cv_mixed_endian_double=no
23784fi
23785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23786fi
23787
23788
23789fi
23790
23791{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23792echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
23793if test "$ac_cv_mixed_endian_double" = yes
23794then
23795
23796cat >>confdefs.h <<\_ACEOF
23797#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23798_ACEOF
23799
23800fi
23801
23802# The short float repr introduced in Python 3.1 requires the
23803# correctly-rounded string <-> double conversion functions from
23804# Python/dtoa.c, which in turn require that the FPU uses 53-bit
23805# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000023806# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023807# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000023808
23809# This inline assembler syntax may also work for suncc and icc,
23810# so we try it on all platforms.
23811
23812{ 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 +000023813echo $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 +000023814cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023815/* confdefs.h. */
23816_ACEOF
23817cat confdefs.h >>conftest.$ac_ext
23818cat >>conftest.$ac_ext <<_ACEOF
23819/* end confdefs.h. */
23820
23821int
23822main ()
23823{
23824
Mark Dickinsona548dee2009-11-15 13:12:43 +000023825 unsigned short cw;
23826 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23827 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023828
23829 ;
23830 return 0;
23831}
23832_ACEOF
23833rm -f conftest.$ac_objext
23834if { (ac_try="$ac_compile"
23835case "(($ac_try" in
23836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23837 *) ac_try_echo=$ac_try;;
23838esac
23839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23840 (eval "$ac_compile") 2>conftest.er1
23841 ac_status=$?
23842 grep -v '^ *+' conftest.er1 >conftest.err
23843 rm -f conftest.er1
23844 cat conftest.err >&5
23845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23846 (exit $ac_status); } && {
23847 test -z "$ac_c_werror_flag" ||
23848 test ! -s conftest.err
23849 } && test -s conftest.$ac_objext; then
23850 have_gcc_asm_for_x87=yes
23851else
23852 echo "$as_me: failed program was:" >&5
23853sed 's/^/| /' conftest.$ac_ext >&5
23854
23855 have_gcc_asm_for_x87=no
23856fi
23857
23858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000023859{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023860echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000023861if test "$have_gcc_asm_for_x87" = yes
23862then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023863
23864cat >>confdefs.h <<\_ACEOF
23865#define HAVE_GCC_ASM_FOR_X87 1
23866_ACEOF
23867
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023868fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023869
Mark Dickinson04b27232009-01-04 12:29:36 +000023870# Detect whether system arithmetic is subject to x87-style double
23871# rounding issues. The result of this test has little meaning on non
23872# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23873# mode is round-to-nearest and double rounding issues are present, and
23874# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023875{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23876echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000023877# $BASECFLAGS may affect the result
23878ac_save_cc="$CC"
23879CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000023880if test "$cross_compiling" = yes; then
23881 ac_cv_x87_double_rounding=no
23882else
23883 cat >conftest.$ac_ext <<_ACEOF
23884/* confdefs.h. */
23885_ACEOF
23886cat confdefs.h >>conftest.$ac_ext
23887cat >>conftest.$ac_ext <<_ACEOF
23888/* end confdefs.h. */
23889
23890#include <stdlib.h>
23891#include <math.h>
23892int main() {
23893 volatile double x, y, z;
23894 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23895 x = 0.99999999999999989; /* 1-2**-53 */
23896 y = 1./x;
23897 if (y != 1.)
23898 exit(0);
23899 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23900 x = 1e16;
23901 y = 2.99999;
23902 z = x + y;
23903 if (z != 1e16+4.)
23904 exit(0);
23905 /* both tests show evidence of double rounding */
23906 exit(1);
23907}
23908
23909_ACEOF
23910rm -f conftest$ac_exeext
23911if { (ac_try="$ac_link"
23912case "(($ac_try" in
23913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23914 *) ac_try_echo=$ac_try;;
23915esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023917 (eval "$ac_link") 2>&5
23918 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23921 { (case "(($ac_try" in
23922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23923 *) ac_try_echo=$ac_try;;
23924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023926 (eval "$ac_try") 2>&5
23927 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023929 (exit $ac_status); }; }; then
23930 ac_cv_x87_double_rounding=no
23931else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023932 echo "$as_me: program exited with status $ac_status" >&5
23933echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023934sed 's/^/| /' conftest.$ac_ext >&5
23935
23936( exit $ac_status )
23937ac_cv_x87_double_rounding=yes
23938fi
23939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23940fi
23941
23942
Mark Dickinson99abd142009-10-24 13:44:16 +000023943CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023944{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23945echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023946if test "$ac_cv_x87_double_rounding" = yes
23947then
23948
23949cat >>confdefs.h <<\_ACEOF
23950#define X87_DOUBLE_ROUNDING 1
23951_ACEOF
23952
23953fi
23954
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023955# ************************************
23956# * Check for mathematical functions *
23957# ************************************
23958
23959LIBS_SAVE=$LIBS
23960LIBS="$LIBS $LIBM"
23961
Mark Dickinson265d7382008-04-21 22:32:24 +000023962# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23963# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023964{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23965echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023966if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023967 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023968else
23969
23970if test "$cross_compiling" = yes; then
23971 ac_cv_tanh_preserves_zero_sign=no
23972else
23973 cat >conftest.$ac_ext <<_ACEOF
23974/* confdefs.h. */
23975_ACEOF
23976cat confdefs.h >>conftest.$ac_ext
23977cat >>conftest.$ac_ext <<_ACEOF
23978/* end confdefs.h. */
23979
23980#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023981#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023982int main() {
23983 /* return 0 if either negative zeros don't exist
23984 on this platform or if negative zeros exist
23985 and tanh(-0.) == -0. */
23986 if (atan2(0., -1.) == atan2(-0., -1.) ||
23987 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23988 else exit(1);
23989}
23990
23991_ACEOF
23992rm -f conftest$ac_exeext
23993if { (ac_try="$ac_link"
23994case "(($ac_try" in
23995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23996 *) ac_try_echo=$ac_try;;
23997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023999 (eval "$ac_link") 2>&5
24000 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024002 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24003 { (case "(($ac_try" in
24004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24005 *) ac_try_echo=$ac_try;;
24006esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024008 (eval "$ac_try") 2>&5
24009 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024011 (exit $ac_status); }; }; then
24012 ac_cv_tanh_preserves_zero_sign=yes
24013else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024014 echo "$as_me: program exited with status $ac_status" >&5
24015echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024016sed 's/^/| /' conftest.$ac_ext >&5
24017
24018( exit $ac_status )
24019ac_cv_tanh_preserves_zero_sign=no
24020fi
24021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24022fi
24023
24024
24025fi
24026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024027{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24028echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024029if test "$ac_cv_tanh_preserves_zero_sign" = yes
24030then
24031
24032cat >>confdefs.h <<\_ACEOF
24033#define TANH_PRESERVES_ZERO_SIGN 1
24034_ACEOF
24035
24036fi
24037
Martin v. Löwis11437992002-04-12 09:54:03 +000024038
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024039
Michael W. Hudson54241132001-12-07 15:38:26 +000024040
Christian Heimes0a8143f2007-12-18 23:22:54 +000024041
24042
24043
24044
24045
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024046
Mark Dickinson65898e02009-09-05 10:27:00 +000024047for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24048do
24049as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24050{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24051echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24052if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24053 echo $ECHO_N "(cached) $ECHO_C" >&6
24054else
24055 cat >conftest.$ac_ext <<_ACEOF
24056/* confdefs.h. */
24057_ACEOF
24058cat confdefs.h >>conftest.$ac_ext
24059cat >>conftest.$ac_ext <<_ACEOF
24060/* end confdefs.h. */
24061/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24062 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24063#define $ac_func innocuous_$ac_func
24064
24065/* System header to define __stub macros and hopefully few prototypes,
24066 which can conflict with char $ac_func (); below.
24067 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24068 <limits.h> exists even on freestanding compilers. */
24069
24070#ifdef __STDC__
24071# include <limits.h>
24072#else
24073# include <assert.h>
24074#endif
24075
24076#undef $ac_func
24077
24078/* Override any GCC internal prototype to avoid an error.
24079 Use char because int might match the return type of a GCC
24080 builtin and then its argument prototype would still apply. */
24081#ifdef __cplusplus
24082extern "C"
24083#endif
24084char $ac_func ();
24085/* The GNU C library defines this for functions which it implements
24086 to always fail with ENOSYS. Some functions are actually named
24087 something starting with __ and the normal name is an alias. */
24088#if defined __stub_$ac_func || defined __stub___$ac_func
24089choke me
24090#endif
24091
24092int
24093main ()
24094{
24095return $ac_func ();
24096 ;
24097 return 0;
24098}
24099_ACEOF
24100rm -f conftest.$ac_objext conftest$ac_exeext
24101if { (ac_try="$ac_link"
24102case "(($ac_try" in
24103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24104 *) ac_try_echo=$ac_try;;
24105esac
24106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24107 (eval "$ac_link") 2>conftest.er1
24108 ac_status=$?
24109 grep -v '^ *+' conftest.er1 >conftest.err
24110 rm -f conftest.er1
24111 cat conftest.err >&5
24112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24113 (exit $ac_status); } && {
24114 test -z "$ac_c_werror_flag" ||
24115 test ! -s conftest.err
24116 } && test -s conftest$ac_exeext &&
24117 $as_test_x conftest$ac_exeext; then
24118 eval "$as_ac_var=yes"
24119else
24120 echo "$as_me: failed program was:" >&5
24121sed 's/^/| /' conftest.$ac_ext >&5
24122
24123 eval "$as_ac_var=no"
24124fi
24125
24126rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24127 conftest$ac_exeext conftest.$ac_ext
24128fi
24129ac_res=`eval echo '${'$as_ac_var'}'`
24130 { echo "$as_me:$LINENO: result: $ac_res" >&5
24131echo "${ECHO_T}$ac_res" >&6; }
24132if test `eval echo '${'$as_ac_var'}'` = yes; then
24133 cat >>confdefs.h <<_ACEOF
24134#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24135_ACEOF
24136
24137fi
24138done
24139
24140
24141
24142
24143
24144
24145for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024146do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024147as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24148{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24149echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024150if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024151 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024152else
24153 cat >conftest.$ac_ext <<_ACEOF
24154/* confdefs.h. */
24155_ACEOF
24156cat confdefs.h >>conftest.$ac_ext
24157cat >>conftest.$ac_ext <<_ACEOF
24158/* end confdefs.h. */
24159/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24160 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24161#define $ac_func innocuous_$ac_func
24162
24163/* System header to define __stub macros and hopefully few prototypes,
24164 which can conflict with char $ac_func (); below.
24165 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24166 <limits.h> exists even on freestanding compilers. */
24167
24168#ifdef __STDC__
24169# include <limits.h>
24170#else
24171# include <assert.h>
24172#endif
24173
24174#undef $ac_func
24175
24176/* Override any GCC internal prototype to avoid an error.
24177 Use char because int might match the return type of a GCC
24178 builtin and then its argument prototype would still apply. */
24179#ifdef __cplusplus
24180extern "C"
24181#endif
24182char $ac_func ();
24183/* The GNU C library defines this for functions which it implements
24184 to always fail with ENOSYS. Some functions are actually named
24185 something starting with __ and the normal name is an alias. */
24186#if defined __stub_$ac_func || defined __stub___$ac_func
24187choke me
24188#endif
24189
24190int
24191main ()
24192{
24193return $ac_func ();
24194 ;
24195 return 0;
24196}
24197_ACEOF
24198rm -f conftest.$ac_objext conftest$ac_exeext
24199if { (ac_try="$ac_link"
24200case "(($ac_try" in
24201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24202 *) ac_try_echo=$ac_try;;
24203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024205 (eval "$ac_link") 2>conftest.er1
24206 ac_status=$?
24207 grep -v '^ *+' conftest.er1 >conftest.err
24208 rm -f conftest.er1
24209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024211 (exit $ac_status); } && {
24212 test -z "$ac_c_werror_flag" ||
24213 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024214 } && test -s conftest$ac_exeext &&
24215 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024216 eval "$as_ac_var=yes"
24217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024218 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024219sed 's/^/| /' conftest.$ac_ext >&5
24220
24221 eval "$as_ac_var=no"
24222fi
24223
24224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24225 conftest$ac_exeext conftest.$ac_ext
24226fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024227ac_res=`eval echo '${'$as_ac_var'}'`
24228 { echo "$as_me:$LINENO: result: $ac_res" >&5
24229echo "${ECHO_T}$ac_res" >&6; }
24230if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024231 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024232#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024233_ACEOF
24234
24235fi
24236done
24237
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024238{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24239echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024240if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024241 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024242else
24243 cat >conftest.$ac_ext <<_ACEOF
24244/* confdefs.h. */
24245_ACEOF
24246cat confdefs.h >>conftest.$ac_ext
24247cat >>conftest.$ac_ext <<_ACEOF
24248/* end confdefs.h. */
24249#include <math.h>
24250
24251int
24252main ()
24253{
24254#ifndef isinf
24255 (void) isinf;
24256#endif
24257
24258 ;
24259 return 0;
24260}
24261_ACEOF
24262rm -f conftest.$ac_objext
24263if { (ac_try="$ac_compile"
24264case "(($ac_try" in
24265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24266 *) ac_try_echo=$ac_try;;
24267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024269 (eval "$ac_compile") 2>conftest.er1
24270 ac_status=$?
24271 grep -v '^ *+' conftest.er1 >conftest.err
24272 rm -f conftest.er1
24273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024275 (exit $ac_status); } && {
24276 test -z "$ac_c_werror_flag" ||
24277 test ! -s conftest.err
24278 } && test -s conftest.$ac_objext; then
24279 ac_cv_have_decl_isinf=yes
24280else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024281 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024282sed 's/^/| /' conftest.$ac_ext >&5
24283
24284 ac_cv_have_decl_isinf=no
24285fi
24286
24287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24288fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024289{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24290echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24291if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024292
24293cat >>confdefs.h <<_ACEOF
24294#define HAVE_DECL_ISINF 1
24295_ACEOF
24296
24297
24298else
24299 cat >>confdefs.h <<_ACEOF
24300#define HAVE_DECL_ISINF 0
24301_ACEOF
24302
24303
24304fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024305{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24306echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024307if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024308 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024309else
24310 cat >conftest.$ac_ext <<_ACEOF
24311/* confdefs.h. */
24312_ACEOF
24313cat confdefs.h >>conftest.$ac_ext
24314cat >>conftest.$ac_ext <<_ACEOF
24315/* end confdefs.h. */
24316#include <math.h>
24317
24318int
24319main ()
24320{
24321#ifndef isnan
24322 (void) isnan;
24323#endif
24324
24325 ;
24326 return 0;
24327}
24328_ACEOF
24329rm -f conftest.$ac_objext
24330if { (ac_try="$ac_compile"
24331case "(($ac_try" in
24332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24333 *) ac_try_echo=$ac_try;;
24334esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024336 (eval "$ac_compile") 2>conftest.er1
24337 ac_status=$?
24338 grep -v '^ *+' conftest.er1 >conftest.err
24339 rm -f conftest.er1
24340 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024342 (exit $ac_status); } && {
24343 test -z "$ac_c_werror_flag" ||
24344 test ! -s conftest.err
24345 } && test -s conftest.$ac_objext; then
24346 ac_cv_have_decl_isnan=yes
24347else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024348 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024349sed 's/^/| /' conftest.$ac_ext >&5
24350
24351 ac_cv_have_decl_isnan=no
24352fi
24353
24354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24355fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024356{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24357echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24358if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024359
24360cat >>confdefs.h <<_ACEOF
24361#define HAVE_DECL_ISNAN 1
24362_ACEOF
24363
24364
24365else
24366 cat >>confdefs.h <<_ACEOF
24367#define HAVE_DECL_ISNAN 0
24368_ACEOF
24369
24370
24371fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024372{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24373echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024374if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024375 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024376else
24377 cat >conftest.$ac_ext <<_ACEOF
24378/* confdefs.h. */
24379_ACEOF
24380cat confdefs.h >>conftest.$ac_ext
24381cat >>conftest.$ac_ext <<_ACEOF
24382/* end confdefs.h. */
24383#include <math.h>
24384
24385int
24386main ()
24387{
24388#ifndef isfinite
24389 (void) isfinite;
24390#endif
24391
24392 ;
24393 return 0;
24394}
24395_ACEOF
24396rm -f conftest.$ac_objext
24397if { (ac_try="$ac_compile"
24398case "(($ac_try" in
24399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24400 *) ac_try_echo=$ac_try;;
24401esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024403 (eval "$ac_compile") 2>conftest.er1
24404 ac_status=$?
24405 grep -v '^ *+' conftest.er1 >conftest.err
24406 rm -f conftest.er1
24407 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024409 (exit $ac_status); } && {
24410 test -z "$ac_c_werror_flag" ||
24411 test ! -s conftest.err
24412 } && test -s conftest.$ac_objext; then
24413 ac_cv_have_decl_isfinite=yes
24414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024415 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024416sed 's/^/| /' conftest.$ac_ext >&5
24417
24418 ac_cv_have_decl_isfinite=no
24419fi
24420
24421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24422fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024423{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24424echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24425if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024426
24427cat >>confdefs.h <<_ACEOF
24428#define HAVE_DECL_ISFINITE 1
24429_ACEOF
24430
24431
24432else
24433 cat >>confdefs.h <<_ACEOF
24434#define HAVE_DECL_ISFINITE 0
24435_ACEOF
24436
24437
24438fi
24439
24440
Christian Heimes0a8143f2007-12-18 23:22:54 +000024441
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024442LIBS=$LIBS_SAVE
24443
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024444# For multiprocessing module, check that sem_open
24445# actually works. For FreeBSD versions <= 7.2,
24446# the kernel module that provides POSIX semaphores
24447# isn't loaded by default, so an attempt to call
24448# sem_open results in a 'Signal 12' error.
24449{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24450echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24451if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24452 echo $ECHO_N "(cached) $ECHO_C" >&6
24453else
24454 if test "$cross_compiling" = yes; then
24455 ac_cv_posix_semaphores_enabled=yes
24456else
24457 cat >conftest.$ac_ext <<_ACEOF
24458/* confdefs.h. */
24459_ACEOF
24460cat confdefs.h >>conftest.$ac_ext
24461cat >>conftest.$ac_ext <<_ACEOF
24462/* end confdefs.h. */
24463
24464#include <unistd.h>
24465#include <fcntl.h>
24466#include <stdio.h>
24467#include <semaphore.h>
24468#include <sys/stat.h>
24469
24470int main(void) {
24471 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24472 if (a == SEM_FAILED) {
24473 perror("sem_open");
24474 return 1;
24475 }
24476 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024477 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024478 return 0;
24479}
24480
24481_ACEOF
24482rm -f conftest$ac_exeext
24483if { (ac_try="$ac_link"
24484case "(($ac_try" in
24485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24486 *) ac_try_echo=$ac_try;;
24487esac
24488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24489 (eval "$ac_link") 2>&5
24490 ac_status=$?
24491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24493 { (case "(($ac_try" in
24494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24495 *) ac_try_echo=$ac_try;;
24496esac
24497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24498 (eval "$ac_try") 2>&5
24499 ac_status=$?
24500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24501 (exit $ac_status); }; }; then
24502 ac_cv_posix_semaphores_enabled=yes
24503else
24504 echo "$as_me: program exited with status $ac_status" >&5
24505echo "$as_me: failed program was:" >&5
24506sed 's/^/| /' conftest.$ac_ext >&5
24507
24508( exit $ac_status )
24509ac_cv_posix_semaphores_enabled=no
24510fi
24511rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24512fi
24513
24514
24515
24516fi
24517
24518{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24519echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24520if test $ac_cv_posix_semaphores_enabled = no
24521then
24522
24523cat >>confdefs.h <<\_ACEOF
24524#define POSIX_SEMAPHORES_NOT_ENABLED 1
24525_ACEOF
24526
24527fi
24528
24529# Multiprocessing check for broken sem_getvalue
24530{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24531echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24532if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24533 echo $ECHO_N "(cached) $ECHO_C" >&6
24534else
24535 if test "$cross_compiling" = yes; then
24536 ac_cv_broken_sem_getvalue=yes
24537else
24538 cat >conftest.$ac_ext <<_ACEOF
24539/* confdefs.h. */
24540_ACEOF
24541cat confdefs.h >>conftest.$ac_ext
24542cat >>conftest.$ac_ext <<_ACEOF
24543/* end confdefs.h. */
24544
24545#include <unistd.h>
24546#include <fcntl.h>
24547#include <stdio.h>
24548#include <semaphore.h>
24549#include <sys/stat.h>
24550
24551int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024552 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024553 int count;
24554 int res;
24555 if(a==SEM_FAILED){
24556 perror("sem_open");
24557 return 1;
24558
24559 }
24560 res = sem_getvalue(a, &count);
24561 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024562 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024563 return res==-1 ? 1 : 0;
24564}
24565
24566_ACEOF
24567rm -f conftest$ac_exeext
24568if { (ac_try="$ac_link"
24569case "(($ac_try" in
24570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24571 *) ac_try_echo=$ac_try;;
24572esac
24573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24574 (eval "$ac_link") 2>&5
24575 ac_status=$?
24576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24577 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24578 { (case "(($ac_try" in
24579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24580 *) ac_try_echo=$ac_try;;
24581esac
24582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24583 (eval "$ac_try") 2>&5
24584 ac_status=$?
24585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24586 (exit $ac_status); }; }; then
24587 ac_cv_broken_sem_getvalue=no
24588else
24589 echo "$as_me: program exited with status $ac_status" >&5
24590echo "$as_me: failed program was:" >&5
24591sed 's/^/| /' conftest.$ac_ext >&5
24592
24593( exit $ac_status )
24594ac_cv_broken_sem_getvalue=yes
24595fi
24596rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24597fi
24598
24599
24600
24601fi
24602
24603{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24604echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24605if test $ac_cv_broken_sem_getvalue = yes
24606then
24607
24608cat >>confdefs.h <<\_ACEOF
24609#define HAVE_BROKEN_SEM_GETVALUE 1
24610_ACEOF
24611
24612fi
24613
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024614# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024615{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24616echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024617# Check whether --enable-big-digits was given.
24618if test "${enable_big_digits+set}" = set; then
24619 enableval=$enable_big_digits; case $enable_big_digits in
24620yes)
24621 enable_big_digits=30 ;;
24622no)
24623 enable_big_digits=15 ;;
2462415|30)
24625 ;;
24626*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024627 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24628echo "$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 +000024629 { (exit 1); exit 1; }; } ;;
24630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024631{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24632echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024633
24634cat >>confdefs.h <<_ACEOF
24635#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24636_ACEOF
24637
24638
24639else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024640 { echo "$as_me:$LINENO: result: no value specified" >&5
24641echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024642fi
24643
24644
Guido van Rossumef2255b2000-03-10 22:30:29 +000024645# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024646if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024647 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24648echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024649if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024650 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024651fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024652{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24653echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024654else
Martin v. Löwis11437992002-04-12 09:54:03 +000024655 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024656{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24657echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024659/* confdefs.h. */
24660_ACEOF
24661cat confdefs.h >>conftest.$ac_ext
24662cat >>conftest.$ac_ext <<_ACEOF
24663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024664$ac_includes_default
24665#include <wchar.h>
24666_ACEOF
24667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024668if { (ac_try="$ac_compile"
24669case "(($ac_try" in
24670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24671 *) ac_try_echo=$ac_try;;
24672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024676 grep -v '^ *+' conftest.er1 >conftest.err
24677 rm -f conftest.er1
24678 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024680 (exit $ac_status); } && {
24681 test -z "$ac_c_werror_flag" ||
24682 test ! -s conftest.err
24683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024684 ac_header_compiler=yes
24685else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024687sed 's/^/| /' conftest.$ac_ext >&5
24688
Martin v. Löwiseba40652007-08-30 20:10:57 +000024689 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024691
24692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024693{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24694echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024695
24696# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024697{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24698echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024700/* confdefs.h. */
24701_ACEOF
24702cat confdefs.h >>conftest.$ac_ext
24703cat >>conftest.$ac_ext <<_ACEOF
24704/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024705#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024706_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024707if { (ac_try="$ac_cpp conftest.$ac_ext"
24708case "(($ac_try" in
24709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24710 *) ac_try_echo=$ac_try;;
24711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024713 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024714 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024715 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024716 rm -f conftest.er1
24717 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024719 (exit $ac_status); } >/dev/null && {
24720 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24721 test ! -s conftest.err
24722 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024723 ac_header_preproc=yes
24724else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024726sed 's/^/| /' conftest.$ac_ext >&5
24727
Martin v. Löwis11437992002-04-12 09:54:03 +000024728 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024730
Martin v. Löwis11437992002-04-12 09:54:03 +000024731rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024732{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24733echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024734
24735# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024736case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24737 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024738 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24739echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24740 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24741echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024742 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024743 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024744 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024745 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24746echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24747 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24748echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24749 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24750echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24751 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24752echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24753 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24754echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24755 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24756echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024757 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024758## -------------------------------------- ##
24759## Report this to http://bugs.python.org/ ##
24760## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024761_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024762 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024763 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024765{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24766echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024767if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024768 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024769else
24770 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024771fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024772{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24773echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024774
24775fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024776if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024777
24778
24779cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024780#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024781_ACEOF
24782
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024783 wchar_h="yes"
24784
Guido van Rossumef2255b2000-03-10 22:30:29 +000024785else
Martin v. Löwis11437992002-04-12 09:54:03 +000024786 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024787
24788fi
24789
Michael W. Hudson54241132001-12-07 15:38:26 +000024790
Martin v. Löwis11437992002-04-12 09:54:03 +000024791
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024792# determine wchar_t size
24793if test "$wchar_h" = yes
24794then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024795 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24796echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24797if test "${ac_cv_type_wchar_t+set}" = set; then
24798 echo $ECHO_N "(cached) $ECHO_C" >&6
24799else
24800 cat >conftest.$ac_ext <<_ACEOF
24801/* confdefs.h. */
24802_ACEOF
24803cat confdefs.h >>conftest.$ac_ext
24804cat >>conftest.$ac_ext <<_ACEOF
24805/* end confdefs.h. */
24806#include <wchar.h>
24807
24808typedef wchar_t ac__type_new_;
24809int
24810main ()
24811{
24812if ((ac__type_new_ *) 0)
24813 return 0;
24814if (sizeof (ac__type_new_))
24815 return 0;
24816 ;
24817 return 0;
24818}
24819_ACEOF
24820rm -f conftest.$ac_objext
24821if { (ac_try="$ac_compile"
24822case "(($ac_try" in
24823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24824 *) ac_try_echo=$ac_try;;
24825esac
24826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24827 (eval "$ac_compile") 2>conftest.er1
24828 ac_status=$?
24829 grep -v '^ *+' conftest.er1 >conftest.err
24830 rm -f conftest.er1
24831 cat conftest.err >&5
24832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24833 (exit $ac_status); } && {
24834 test -z "$ac_c_werror_flag" ||
24835 test ! -s conftest.err
24836 } && test -s conftest.$ac_objext; then
24837 ac_cv_type_wchar_t=yes
24838else
24839 echo "$as_me: failed program was:" >&5
24840sed 's/^/| /' conftest.$ac_ext >&5
24841
24842 ac_cv_type_wchar_t=no
24843fi
24844
24845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24846fi
24847{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24848echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24849
24850# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024851# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24852# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24853# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024854{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24855echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024856if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024857 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024858else
Martin v. Löwis11437992002-04-12 09:54:03 +000024859 if test "$cross_compiling" = yes; then
24860 # Depending upon the size, compute the lo and hi bounds.
24861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024862/* confdefs.h. */
24863_ACEOF
24864cat confdefs.h >>conftest.$ac_ext
24865cat >>conftest.$ac_ext <<_ACEOF
24866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024867#include <wchar.h>
24868
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024869 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024870int
24871main ()
24872{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024873static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024874test_array [0] = 0
24875
24876 ;
24877 return 0;
24878}
24879_ACEOF
24880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024881if { (ac_try="$ac_compile"
24882case "(($ac_try" in
24883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24884 *) ac_try_echo=$ac_try;;
24885esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024889 grep -v '^ *+' conftest.er1 >conftest.err
24890 rm -f conftest.er1
24891 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024893 (exit $ac_status); } && {
24894 test -z "$ac_c_werror_flag" ||
24895 test ! -s conftest.err
24896 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024897 ac_lo=0 ac_mid=0
24898 while :; do
24899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024900/* confdefs.h. */
24901_ACEOF
24902cat confdefs.h >>conftest.$ac_ext
24903cat >>conftest.$ac_ext <<_ACEOF
24904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024905#include <wchar.h>
24906
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024907 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024908int
24909main ()
24910{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024912test_array [0] = 0
24913
24914 ;
24915 return 0;
24916}
24917_ACEOF
24918rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024919if { (ac_try="$ac_compile"
24920case "(($ac_try" in
24921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24922 *) ac_try_echo=$ac_try;;
24923esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024927 grep -v '^ *+' conftest.er1 >conftest.err
24928 rm -f conftest.er1
24929 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024931 (exit $ac_status); } && {
24932 test -z "$ac_c_werror_flag" ||
24933 test ! -s conftest.err
24934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024935 ac_hi=$ac_mid; break
24936else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024938sed 's/^/| /' conftest.$ac_ext >&5
24939
Martin v. Löwiseba40652007-08-30 20:10:57 +000024940 ac_lo=`expr $ac_mid + 1`
24941 if test $ac_lo -le $ac_mid; then
24942 ac_lo= ac_hi=
24943 break
24944 fi
24945 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024947
24948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024949 done
24950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024952sed 's/^/| /' conftest.$ac_ext >&5
24953
Martin v. Löwiseba40652007-08-30 20:10:57 +000024954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024955/* confdefs.h. */
24956_ACEOF
24957cat confdefs.h >>conftest.$ac_ext
24958cat >>conftest.$ac_ext <<_ACEOF
24959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024960#include <wchar.h>
24961
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024962 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024963int
24964main ()
24965{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024967test_array [0] = 0
24968
24969 ;
24970 return 0;
24971}
24972_ACEOF
24973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024974if { (ac_try="$ac_compile"
24975case "(($ac_try" in
24976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24977 *) ac_try_echo=$ac_try;;
24978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024982 grep -v '^ *+' conftest.er1 >conftest.err
24983 rm -f conftest.er1
24984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024986 (exit $ac_status); } && {
24987 test -z "$ac_c_werror_flag" ||
24988 test ! -s conftest.err
24989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024990 ac_hi=-1 ac_mid=-1
24991 while :; do
24992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024993/* confdefs.h. */
24994_ACEOF
24995cat confdefs.h >>conftest.$ac_ext
24996cat >>conftest.$ac_ext <<_ACEOF
24997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024998#include <wchar.h>
24999
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025000 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025001int
25002main ()
25003{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025004static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025005test_array [0] = 0
25006
25007 ;
25008 return 0;
25009}
25010_ACEOF
25011rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025012if { (ac_try="$ac_compile"
25013case "(($ac_try" in
25014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25015 *) ac_try_echo=$ac_try;;
25016esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025020 grep -v '^ *+' conftest.er1 >conftest.err
25021 rm -f conftest.er1
25022 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025024 (exit $ac_status); } && {
25025 test -z "$ac_c_werror_flag" ||
25026 test ! -s conftest.err
25027 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025028 ac_lo=$ac_mid; break
25029else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025031sed 's/^/| /' conftest.$ac_ext >&5
25032
Martin v. Löwiseba40652007-08-30 20:10:57 +000025033 ac_hi=`expr '(' $ac_mid ')' - 1`
25034 if test $ac_mid -le $ac_hi; then
25035 ac_lo= ac_hi=
25036 break
25037 fi
25038 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025040
25041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025042 done
25043else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025045sed 's/^/| /' conftest.$ac_ext >&5
25046
Martin v. Löwiseba40652007-08-30 20:10:57 +000025047 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025049
25050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025052
25053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025054# Binary search between lo and hi bounds.
25055while test "x$ac_lo" != "x$ac_hi"; do
25056 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025058/* confdefs.h. */
25059_ACEOF
25060cat confdefs.h >>conftest.$ac_ext
25061cat >>conftest.$ac_ext <<_ACEOF
25062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025063#include <wchar.h>
25064
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025065 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025066int
25067main ()
25068{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025069static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025070test_array [0] = 0
25071
25072 ;
25073 return 0;
25074}
25075_ACEOF
25076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025077if { (ac_try="$ac_compile"
25078case "(($ac_try" in
25079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25080 *) ac_try_echo=$ac_try;;
25081esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025085 grep -v '^ *+' conftest.er1 >conftest.err
25086 rm -f conftest.er1
25087 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025089 (exit $ac_status); } && {
25090 test -z "$ac_c_werror_flag" ||
25091 test ! -s conftest.err
25092 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025093 ac_hi=$ac_mid
25094else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025096sed 's/^/| /' conftest.$ac_ext >&5
25097
Martin v. Löwiseba40652007-08-30 20:10:57 +000025098 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025100
25101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025102done
25103case $ac_lo in
25104?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025105'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025106 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025107See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025108echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025109See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025110 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025111 else
25112 ac_cv_sizeof_wchar_t=0
25113 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025114esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025115else
Martin v. Löwis11437992002-04-12 09:54:03 +000025116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025117/* confdefs.h. */
25118_ACEOF
25119cat confdefs.h >>conftest.$ac_ext
25120cat >>conftest.$ac_ext <<_ACEOF
25121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025122#include <wchar.h>
25123
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025124 typedef wchar_t ac__type_sizeof_;
25125static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25126static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025127#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025128#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025129int
25130main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025131{
Martin v. Löwis11437992002-04-12 09:54:03 +000025132
25133 FILE *f = fopen ("conftest.val", "w");
25134 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025135 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025136 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025137 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025138 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025139 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025140 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025141 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025142 }
25143 else
25144 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025145 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025146 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025147 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025148 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025149 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025150 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025151
25152 ;
25153 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025154}
Martin v. Löwis11437992002-04-12 09:54:03 +000025155_ACEOF
25156rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025157if { (ac_try="$ac_link"
25158case "(($ac_try" in
25159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25160 *) ac_try_echo=$ac_try;;
25161esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025163 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025164 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025166 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025167 { (case "(($ac_try" in
25168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25169 *) ac_try_echo=$ac_try;;
25170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025172 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025173 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025175 (exit $ac_status); }; }; then
25176 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025177else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025178 echo "$as_me: program exited with status $ac_status" >&5
25179echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025180sed 's/^/| /' conftest.$ac_ext >&5
25181
Martin v. Löwis11437992002-04-12 09:54:03 +000025182( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025183if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025184 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025185See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025186echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025187See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025188 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025189 else
25190 ac_cv_sizeof_wchar_t=0
25191 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025193rm -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 +000025194fi
25195rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025196fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025197{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25198echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025199
25200
25201
Martin v. Löwis11437992002-04-12 09:54:03 +000025202cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025203#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025204_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025205
Michael W. Hudson54241132001-12-07 15:38:26 +000025206
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025207fi
25208
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025209{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25210echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025211have_ucs4_tcl=no
25212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025213/* confdefs.h. */
25214_ACEOF
25215cat confdefs.h >>conftest.$ac_ext
25216cat >>conftest.$ac_ext <<_ACEOF
25217/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025218
25219#include <tcl.h>
25220#if TCL_UTF_MAX != 6
25221# error "NOT UCS4_TCL"
25222#endif
25223int
25224main ()
25225{
25226
25227 ;
25228 return 0;
25229}
25230_ACEOF
25231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025232if { (ac_try="$ac_compile"
25233case "(($ac_try" in
25234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25235 *) ac_try_echo=$ac_try;;
25236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025240 grep -v '^ *+' conftest.er1 >conftest.err
25241 rm -f conftest.er1
25242 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025244 (exit $ac_status); } && {
25245 test -z "$ac_c_werror_flag" ||
25246 test ! -s conftest.err
25247 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025248
25249
25250cat >>confdefs.h <<\_ACEOF
25251#define HAVE_UCS4_TCL 1
25252_ACEOF
25253
25254 have_ucs4_tcl=yes
25255
25256else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025258sed 's/^/| /' conftest.$ac_ext >&5
25259
Martin v. Löwiseba40652007-08-30 20:10:57 +000025260
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025262
25263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025264{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25265echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025266
Skip Montanaro6dead952003-09-25 14:50:04 +000025267# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025268if test "$wchar_h" = yes
25269then
25270 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025271 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25272echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025273 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025274 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025275else
25276
25277 if test "$cross_compiling" = yes; then
25278 ac_cv_wchar_t_signed=yes
25279else
25280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025281/* confdefs.h. */
25282_ACEOF
25283cat confdefs.h >>conftest.$ac_ext
25284cat >>conftest.$ac_ext <<_ACEOF
25285/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025286
25287 #include <wchar.h>
25288 int main()
25289 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025290 /* Success: exit code 0 */
25291 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025292 }
25293
25294_ACEOF
25295rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025296if { (ac_try="$ac_link"
25297case "(($ac_try" in
25298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25299 *) ac_try_echo=$ac_try;;
25300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025302 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025303 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025305 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025306 { (case "(($ac_try" in
25307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25308 *) ac_try_echo=$ac_try;;
25309esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025311 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025312 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025314 (exit $ac_status); }; }; then
25315 ac_cv_wchar_t_signed=yes
25316else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025317 echo "$as_me: program exited with status $ac_status" >&5
25318echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025319sed 's/^/| /' conftest.$ac_ext >&5
25320
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025321( exit $ac_status )
25322ac_cv_wchar_t_signed=no
25323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025324rm -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 +000025325fi
25326
Martin v. Löwiseba40652007-08-30 20:10:57 +000025327
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025328fi
25329
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025330 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25331echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025332fi
25333
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025334{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25335echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025336# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025337if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025338 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025339else
25340 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025341fi
25342
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025343
25344if test $enable_unicode = yes
25345then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025346 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025347 case "$have_ucs4_tcl" in
25348 yes) enable_unicode="ucs4"
25349 ;;
25350 *) enable_unicode="ucs2"
25351 ;;
25352 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025353fi
25354
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025355
25356
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025357case "$enable_unicode" in
25358ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025359 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025360#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025361_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025362
25363 ;;
25364ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025365 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025366#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025367_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025368
25369 ;;
25370esac
25371
Michael W. Hudson54241132001-12-07 15:38:26 +000025372
Martin v. Löwis11437992002-04-12 09:54:03 +000025373
25374
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025375
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025376if test "$enable_unicode" = "no"
25377then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025378 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025379 { echo "$as_me:$LINENO: result: not used" >&5
25380echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025381else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025382 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025383
25384cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025385#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025386_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025387
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025388
25389 # wchar_t is only usable if it maps to an unsigned type
25390 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025391 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025392 then
25393 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025394
Martin v. Löwis11437992002-04-12 09:54:03 +000025395cat >>confdefs.h <<\_ACEOF
25396#define HAVE_USABLE_WCHAR_T 1
25397_ACEOF
25398
25399 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025400#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025401_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025402
25403 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25404 then
25405 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025406 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025407#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025408_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025409
25410 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25411 then
25412 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025413 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025414#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025415_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025416
25417 else
25418 PY_UNICODE_TYPE="no type found"
25419 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025420 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25421echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025422fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025423
25424# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025425{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25426echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025427if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025429else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025430 # See if sys/param.h defines the BYTE_ORDER macro.
25431cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025432/* confdefs.h. */
25433_ACEOF
25434cat confdefs.h >>conftest.$ac_ext
25435cat >>conftest.$ac_ext <<_ACEOF
25436/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025437#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025438#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025439
Martin v. Löwis11437992002-04-12 09:54:03 +000025440int
25441main ()
25442{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025443#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25444 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25445 bogus endian macros
25446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025447
25448 ;
25449 return 0;
25450}
25451_ACEOF
25452rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025453if { (ac_try="$ac_compile"
25454case "(($ac_try" in
25455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25456 *) ac_try_echo=$ac_try;;
25457esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025461 grep -v '^ *+' conftest.er1 >conftest.err
25462 rm -f conftest.er1
25463 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025465 (exit $ac_status); } && {
25466 test -z "$ac_c_werror_flag" ||
25467 test ! -s conftest.err
25468 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025469 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025471/* confdefs.h. */
25472_ACEOF
25473cat confdefs.h >>conftest.$ac_ext
25474cat >>conftest.$ac_ext <<_ACEOF
25475/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025476#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025477#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025478
Martin v. Löwis11437992002-04-12 09:54:03 +000025479int
25480main ()
25481{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025482#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025483 not big endian
25484#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025485
25486 ;
25487 return 0;
25488}
25489_ACEOF
25490rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025491if { (ac_try="$ac_compile"
25492case "(($ac_try" in
25493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25494 *) ac_try_echo=$ac_try;;
25495esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025499 grep -v '^ *+' conftest.er1 >conftest.err
25500 rm -f conftest.er1
25501 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025503 (exit $ac_status); } && {
25504 test -z "$ac_c_werror_flag" ||
25505 test ! -s conftest.err
25506 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025507 ac_cv_c_bigendian=yes
25508else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025510sed 's/^/| /' conftest.$ac_ext >&5
25511
Martin v. Löwiseba40652007-08-30 20:10:57 +000025512 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025514
25515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025516else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025518sed 's/^/| /' conftest.$ac_ext >&5
25519
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025520 # It does not; compile a test program.
25521if test "$cross_compiling" = yes; then
25522 # try to guess the endianness by grepping values into an object file
25523 ac_cv_c_bigendian=unknown
25524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025525/* confdefs.h. */
25526_ACEOF
25527cat confdefs.h >>conftest.$ac_ext
25528cat >>conftest.$ac_ext <<_ACEOF
25529/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025530short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25531short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25532void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25533short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25534short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25535void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025536int
25537main ()
25538{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025539 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025540 ;
25541 return 0;
25542}
25543_ACEOF
25544rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025545if { (ac_try="$ac_compile"
25546case "(($ac_try" in
25547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25548 *) ac_try_echo=$ac_try;;
25549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025553 grep -v '^ *+' conftest.er1 >conftest.err
25554 rm -f conftest.er1
25555 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025557 (exit $ac_status); } && {
25558 test -z "$ac_c_werror_flag" ||
25559 test ! -s conftest.err
25560 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025561 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025562 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025563fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025564if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25565 if test "$ac_cv_c_bigendian" = unknown; then
25566 ac_cv_c_bigendian=no
25567 else
25568 # finding both strings is unlikely to happen, but who knows?
25569 ac_cv_c_bigendian=unknown
25570 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025571fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025572else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025574sed 's/^/| /' conftest.$ac_ext >&5
25575
Martin v. Löwiseba40652007-08-30 20:10:57 +000025576
Martin v. Löwis11437992002-04-12 09:54:03 +000025577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025578
25579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025580else
25581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025582/* confdefs.h. */
25583_ACEOF
25584cat confdefs.h >>conftest.$ac_ext
25585cat >>conftest.$ac_ext <<_ACEOF
25586/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025587$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025588int
25589main ()
25590{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025591
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025592 /* Are we little or big endian? From Harbison&Steele. */
25593 union
25594 {
25595 long int l;
25596 char c[sizeof (long int)];
25597 } u;
25598 u.l = 1;
25599 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025600
25601 ;
25602 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025603}
Martin v. Löwis11437992002-04-12 09:54:03 +000025604_ACEOF
25605rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025606if { (ac_try="$ac_link"
25607case "(($ac_try" in
25608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25609 *) ac_try_echo=$ac_try;;
25610esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025612 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025613 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025615 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025616 { (case "(($ac_try" in
25617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25618 *) ac_try_echo=$ac_try;;
25619esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025621 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025622 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025624 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025625 ac_cv_c_bigendian=no
25626else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025627 echo "$as_me: program exited with status $ac_status" >&5
25628echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025629sed 's/^/| /' conftest.$ac_ext >&5
25630
Martin v. Löwis11437992002-04-12 09:54:03 +000025631( exit $ac_status )
25632ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025634rm -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 +000025635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025636
25637
Martin v. Löwis11437992002-04-12 09:54:03 +000025638fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025639
25640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25641fi
25642{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25643echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25644case $ac_cv_c_bigendian in
25645 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025646
25647cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025648#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025649_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025650 ;;
25651 no)
25652 ;;
25653 *)
25654 { { echo "$as_me:$LINENO: error: unknown endianness
25655presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25656echo "$as_me: error: unknown endianness
25657presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025658 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025659esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025660
Michael W. Hudson54241132001-12-07 15:38:26 +000025661
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025662# Check whether right shifting a negative integer extends the sign bit
25663# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025664{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25665echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025666if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025667 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025668else
Martin v. Löwis11437992002-04-12 09:54:03 +000025669
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025670if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025671 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025672else
Martin v. Löwis11437992002-04-12 09:54:03 +000025673 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025674/* confdefs.h. */
25675_ACEOF
25676cat confdefs.h >>conftest.$ac_ext
25677cat >>conftest.$ac_ext <<_ACEOF
25678/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025679
25680int main()
25681{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025682 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025683}
25684
Martin v. Löwis11437992002-04-12 09:54:03 +000025685_ACEOF
25686rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025687if { (ac_try="$ac_link"
25688case "(($ac_try" in
25689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25690 *) ac_try_echo=$ac_try;;
25691esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025693 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025694 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025697 { (case "(($ac_try" in
25698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25699 *) ac_try_echo=$ac_try;;
25700esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025702 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025703 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025705 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025706 ac_cv_rshift_extends_sign=yes
25707else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025708 echo "$as_me: program exited with status $ac_status" >&5
25709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025710sed 's/^/| /' conftest.$ac_ext >&5
25711
Martin v. Löwis11437992002-04-12 09:54:03 +000025712( exit $ac_status )
25713ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025715rm -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 +000025716fi
25717
Martin v. Löwiseba40652007-08-30 20:10:57 +000025718
25719fi
25720
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025721{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25722echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025723if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025724then
Martin v. Löwis11437992002-04-12 09:54:03 +000025725
25726cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025727#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025728_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025729
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025730fi
25731
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025732# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025733{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25734echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025735if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025736 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025737else
Martin v. Löwis11437992002-04-12 09:54:03 +000025738
25739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025740/* confdefs.h. */
25741_ACEOF
25742cat confdefs.h >>conftest.$ac_ext
25743cat >>conftest.$ac_ext <<_ACEOF
25744/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025745#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025746int
25747main ()
25748{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025749
25750 FILE *f = fopen("/dev/null", "r");
25751 flockfile(f);
25752 getc_unlocked(f);
25753 funlockfile(f);
25754
Martin v. Löwis11437992002-04-12 09:54:03 +000025755 ;
25756 return 0;
25757}
25758_ACEOF
25759rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025760if { (ac_try="$ac_link"
25761case "(($ac_try" in
25762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25763 *) ac_try_echo=$ac_try;;
25764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025766 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025768 grep -v '^ *+' conftest.er1 >conftest.err
25769 rm -f conftest.er1
25770 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025772 (exit $ac_status); } && {
25773 test -z "$ac_c_werror_flag" ||
25774 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025775 } && test -s conftest$ac_exeext &&
25776 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025777 ac_cv_have_getc_unlocked=yes
25778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025780sed 's/^/| /' conftest.$ac_ext >&5
25781
Martin v. Löwiseba40652007-08-30 20:10:57 +000025782 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025784
25785rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025786 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025787fi
25788
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025789{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25790echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025791if test "$ac_cv_have_getc_unlocked" = yes
25792then
Martin v. Löwis11437992002-04-12 09:54:03 +000025793
25794cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025795#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025796_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025797
25798fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025799
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025800# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025801# save the value of LIBS so we don't actually link Python with readline
25802LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025803
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025804# On some systems we need to link readline to a termcap compatible
25805# library. NOTE: Keep the precedence of listed libraries synchronised
25806# with setup.py.
25807py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025808{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25809echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025810for py_libtermcap in "" ncursesw ncurses curses termcap; do
25811 if test -z "$py_libtermcap"; then
25812 READLINE_LIBS="-lreadline"
25813 else
25814 READLINE_LIBS="-lreadline -l$py_libtermcap"
25815 fi
25816 LIBS="$READLINE_LIBS $LIBS_no_readline"
25817 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025818/* confdefs.h. */
25819_ACEOF
25820cat confdefs.h >>conftest.$ac_ext
25821cat >>conftest.$ac_ext <<_ACEOF
25822/* end confdefs.h. */
25823
Martin v. Löwiseba40652007-08-30 20:10:57 +000025824/* Override any GCC internal prototype to avoid an error.
25825 Use char because int might match the return type of a GCC
25826 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025827#ifdef __cplusplus
25828extern "C"
25829#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025830char readline ();
25831int
25832main ()
25833{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025834return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025835 ;
25836 return 0;
25837}
25838_ACEOF
25839rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025840if { (ac_try="$ac_link"
25841case "(($ac_try" in
25842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25843 *) ac_try_echo=$ac_try;;
25844esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025846 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025847 ac_status=$?
25848 grep -v '^ *+' conftest.er1 >conftest.err
25849 rm -f conftest.er1
25850 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025852 (exit $ac_status); } && {
25853 test -z "$ac_c_werror_flag" ||
25854 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025855 } && test -s conftest$ac_exeext &&
25856 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025857 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025859 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025860sed 's/^/| /' conftest.$ac_ext >&5
25861
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025862
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025864
25865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025866 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025867 if test $py_cv_lib_readline = yes; then
25868 break
25869 fi
25870done
25871# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25872#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025873if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025874 { echo "$as_me:$LINENO: result: none" >&5
25875echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025876else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025877 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25878echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025879
25880cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025881#define HAVE_LIBREADLINE 1
25882_ACEOF
25883
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025884fi
25885
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025886# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025887{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25888echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025889if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025890 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025891else
25892 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025893LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025894cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025895/* confdefs.h. */
25896_ACEOF
25897cat confdefs.h >>conftest.$ac_ext
25898cat >>conftest.$ac_ext <<_ACEOF
25899/* end confdefs.h. */
25900
Martin v. Löwiseba40652007-08-30 20:10:57 +000025901/* Override any GCC internal prototype to avoid an error.
25902 Use char because int might match the return type of a GCC
25903 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025904#ifdef __cplusplus
25905extern "C"
25906#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025907char rl_callback_handler_install ();
25908int
25909main ()
25910{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025911return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025912 ;
25913 return 0;
25914}
25915_ACEOF
25916rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025917if { (ac_try="$ac_link"
25918case "(($ac_try" in
25919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25920 *) ac_try_echo=$ac_try;;
25921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025923 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025925 grep -v '^ *+' conftest.er1 >conftest.err
25926 rm -f conftest.er1
25927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025929 (exit $ac_status); } && {
25930 test -z "$ac_c_werror_flag" ||
25931 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025932 } && test -s conftest$ac_exeext &&
25933 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025934 ac_cv_lib_readline_rl_callback_handler_install=yes
25935else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025936 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025937sed 's/^/| /' conftest.$ac_ext >&5
25938
Martin v. Löwiseba40652007-08-30 20:10:57 +000025939 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025941
25942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025943 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025944LIBS=$ac_check_lib_save_LIBS
25945fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025946{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25947echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25948if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025949
25950cat >>confdefs.h <<\_ACEOF
25951#define HAVE_RL_CALLBACK 1
25952_ACEOF
25953
25954fi
25955
25956
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025957# check for readline 2.2
25958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025959/* confdefs.h. */
25960_ACEOF
25961cat confdefs.h >>conftest.$ac_ext
25962cat >>conftest.$ac_ext <<_ACEOF
25963/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025964#include <readline/readline.h>
25965_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025966if { (ac_try="$ac_cpp conftest.$ac_ext"
25967case "(($ac_try" in
25968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25969 *) ac_try_echo=$ac_try;;
25970esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025972 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025973 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025974 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025975 rm -f conftest.er1
25976 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025978 (exit $ac_status); } >/dev/null && {
25979 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25980 test ! -s conftest.err
25981 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025982 have_readline=yes
25983else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025985sed 's/^/| /' conftest.$ac_ext >&5
25986
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025987 have_readline=no
25988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025989
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025990rm -f conftest.err conftest.$ac_ext
25991if test $have_readline = yes
25992then
25993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025994/* confdefs.h. */
25995_ACEOF
25996cat confdefs.h >>conftest.$ac_ext
25997cat >>conftest.$ac_ext <<_ACEOF
25998/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025999#include <readline/readline.h>
26000
26001_ACEOF
26002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026003 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026004
26005cat >>confdefs.h <<\_ACEOF
26006#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26007_ACEOF
26008
26009fi
Mark Dickinsonab442262009-11-20 19:27:43 +000026010rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026011
26012 cat >conftest.$ac_ext <<_ACEOF
26013/* confdefs.h. */
26014_ACEOF
26015cat confdefs.h >>conftest.$ac_ext
26016cat >>conftest.$ac_ext <<_ACEOF
26017/* end confdefs.h. */
26018#include <readline/readline.h>
26019
26020_ACEOF
26021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26022 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26023
26024cat >>confdefs.h <<\_ACEOF
26025#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26026_ACEOF
26027
26028fi
Mark Dickinsonab442262009-11-20 19:27:43 +000026029rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026030
26031fi
26032
Martin v. Löwis0daad592001-09-30 21:09:59 +000026033# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026034{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26035echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026036if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026037 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026038else
Martin v. Löwis11437992002-04-12 09:54:03 +000026039 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026040LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026042/* confdefs.h. */
26043_ACEOF
26044cat confdefs.h >>conftest.$ac_ext
26045cat >>conftest.$ac_ext <<_ACEOF
26046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026047
Martin v. Löwiseba40652007-08-30 20:10:57 +000026048/* Override any GCC internal prototype to avoid an error.
26049 Use char because int might match the return type of a GCC
26050 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026051#ifdef __cplusplus
26052extern "C"
26053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026054char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026055int
26056main ()
26057{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026058return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026059 ;
26060 return 0;
26061}
26062_ACEOF
26063rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026064if { (ac_try="$ac_link"
26065case "(($ac_try" in
26066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26067 *) ac_try_echo=$ac_try;;
26068esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026070 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026072 grep -v '^ *+' conftest.er1 >conftest.err
26073 rm -f conftest.er1
26074 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026076 (exit $ac_status); } && {
26077 test -z "$ac_c_werror_flag" ||
26078 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026079 } && test -s conftest$ac_exeext &&
26080 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026081 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026082else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026084sed 's/^/| /' conftest.$ac_ext >&5
26085
Martin v. Löwiseba40652007-08-30 20:10:57 +000026086 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026088
26089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026091LIBS=$ac_check_lib_save_LIBS
26092fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026093{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26094echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26095if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026096
Martin v. Löwis11437992002-04-12 09:54:03 +000026097cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026098#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026099_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026100
Martin v. Löwis0daad592001-09-30 21:09:59 +000026101fi
26102
Michael W. Hudson54241132001-12-07 15:38:26 +000026103
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026104# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026105{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26106echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026107if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026108 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026109else
26110 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026111LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026112cat >conftest.$ac_ext <<_ACEOF
26113/* confdefs.h. */
26114_ACEOF
26115cat confdefs.h >>conftest.$ac_ext
26116cat >>conftest.$ac_ext <<_ACEOF
26117/* end confdefs.h. */
26118
26119/* Override any GCC internal prototype to avoid an error.
26120 Use char because int might match the return type of a GCC
26121 builtin and then its argument prototype would still apply. */
26122#ifdef __cplusplus
26123extern "C"
26124#endif
26125char rl_completion_display_matches_hook ();
26126int
26127main ()
26128{
26129return rl_completion_display_matches_hook ();
26130 ;
26131 return 0;
26132}
26133_ACEOF
26134rm -f conftest.$ac_objext conftest$ac_exeext
26135if { (ac_try="$ac_link"
26136case "(($ac_try" in
26137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26138 *) ac_try_echo=$ac_try;;
26139esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026141 (eval "$ac_link") 2>conftest.er1
26142 ac_status=$?
26143 grep -v '^ *+' conftest.er1 >conftest.err
26144 rm -f conftest.er1
26145 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026147 (exit $ac_status); } && {
26148 test -z "$ac_c_werror_flag" ||
26149 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026150 } && test -s conftest$ac_exeext &&
26151 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026152 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26153else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026154 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026155sed 's/^/| /' conftest.$ac_ext >&5
26156
26157 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26158fi
26159
26160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26161 conftest$ac_exeext conftest.$ac_ext
26162LIBS=$ac_check_lib_save_LIBS
26163fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026164{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26165echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26166if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026167
26168cat >>confdefs.h <<\_ACEOF
26169#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26170_ACEOF
26171
26172fi
26173
26174
Martin v. Löwis0daad592001-09-30 21:09:59 +000026175# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026176{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26177echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026178if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026179 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026180else
Martin v. Löwis11437992002-04-12 09:54:03 +000026181 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026182LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026184/* confdefs.h. */
26185_ACEOF
26186cat confdefs.h >>conftest.$ac_ext
26187cat >>conftest.$ac_ext <<_ACEOF
26188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026189
Martin v. Löwiseba40652007-08-30 20:10:57 +000026190/* Override any GCC internal prototype to avoid an error.
26191 Use char because int might match the return type of a GCC
26192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026193#ifdef __cplusplus
26194extern "C"
26195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026196char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026197int
26198main ()
26199{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026200return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026201 ;
26202 return 0;
26203}
26204_ACEOF
26205rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026206if { (ac_try="$ac_link"
26207case "(($ac_try" in
26208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26209 *) ac_try_echo=$ac_try;;
26210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026212 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026214 grep -v '^ *+' conftest.er1 >conftest.err
26215 rm -f conftest.er1
26216 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026218 (exit $ac_status); } && {
26219 test -z "$ac_c_werror_flag" ||
26220 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026221 } && test -s conftest$ac_exeext &&
26222 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026223 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026224else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026226sed 's/^/| /' conftest.$ac_ext >&5
26227
Martin v. Löwiseba40652007-08-30 20:10:57 +000026228 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026230
26231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026233LIBS=$ac_check_lib_save_LIBS
26234fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026235{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26236echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26237if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026238
Martin v. Löwis11437992002-04-12 09:54:03 +000026239cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026240#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026241_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026242
Guido van Rossum353ae582001-07-10 16:45:32 +000026243fi
26244
Jack Jansendd19cf82001-12-06 22:36:17 +000026245
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026246# also in readline 4.2
26247cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026248/* confdefs.h. */
26249_ACEOF
26250cat confdefs.h >>conftest.$ac_ext
26251cat >>conftest.$ac_ext <<_ACEOF
26252/* end confdefs.h. */
26253#include <readline/readline.h>
26254_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026255if { (ac_try="$ac_cpp conftest.$ac_ext"
26256case "(($ac_try" in
26257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26258 *) ac_try_echo=$ac_try;;
26259esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026261 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026262 ac_status=$?
26263 grep -v '^ *+' conftest.er1 >conftest.err
26264 rm -f conftest.er1
26265 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026267 (exit $ac_status); } >/dev/null && {
26268 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26269 test ! -s conftest.err
26270 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026271 have_readline=yes
26272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026273 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026274sed 's/^/| /' conftest.$ac_ext >&5
26275
26276 have_readline=no
26277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026278
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026279rm -f conftest.err conftest.$ac_ext
26280if test $have_readline = yes
26281then
26282 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026283/* confdefs.h. */
26284_ACEOF
26285cat confdefs.h >>conftest.$ac_ext
26286cat >>conftest.$ac_ext <<_ACEOF
26287/* end confdefs.h. */
26288#include <readline/readline.h>
26289
26290_ACEOF
26291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26292 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26293
26294cat >>confdefs.h <<\_ACEOF
26295#define HAVE_RL_CATCH_SIGNAL 1
26296_ACEOF
26297
26298fi
Mark Dickinsonab442262009-11-20 19:27:43 +000026299rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026300
26301fi
26302
Martin v. Löwis82bca632006-02-10 20:49:30 +000026303# End of readline checks: restore LIBS
26304LIBS=$LIBS_no_readline
26305
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026306{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26307echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026308if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026309 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026310else
Martin v. Löwis11437992002-04-12 09:54:03 +000026311
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026312if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026313 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026314else
Martin v. Löwis11437992002-04-12 09:54:03 +000026315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026316/* confdefs.h. */
26317_ACEOF
26318cat confdefs.h >>conftest.$ac_ext
26319cat >>conftest.$ac_ext <<_ACEOF
26320/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026321
26322int main()
26323{
26324 int val1 = nice(1);
26325 if (val1 != -1 && val1 == nice(2))
26326 exit(0);
26327 exit(1);
26328}
26329
Martin v. Löwis11437992002-04-12 09:54:03 +000026330_ACEOF
26331rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026332if { (ac_try="$ac_link"
26333case "(($ac_try" in
26334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26335 *) ac_try_echo=$ac_try;;
26336esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026338 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026339 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026342 { (case "(($ac_try" in
26343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26344 *) ac_try_echo=$ac_try;;
26345esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026347 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026348 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026350 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026351 ac_cv_broken_nice=yes
26352else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026353 echo "$as_me: program exited with status $ac_status" >&5
26354echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026355sed 's/^/| /' conftest.$ac_ext >&5
26356
Martin v. Löwis11437992002-04-12 09:54:03 +000026357( exit $ac_status )
26358ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026360rm -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 +000026361fi
26362
Martin v. Löwiseba40652007-08-30 20:10:57 +000026363
26364fi
26365
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026366{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26367echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026368if test "$ac_cv_broken_nice" = yes
26369then
Martin v. Löwis11437992002-04-12 09:54:03 +000026370
26371cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026372#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026373_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026374
26375fi
26376
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026377{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26378echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026379if test "${ac_cv_broken_poll+set}" = set; then
26380 echo $ECHO_N "(cached) $ECHO_C" >&6
26381else
26382 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026383 ac_cv_broken_poll=no
26384else
26385 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026386/* confdefs.h. */
26387_ACEOF
26388cat confdefs.h >>conftest.$ac_ext
26389cat >>conftest.$ac_ext <<_ACEOF
26390/* end confdefs.h. */
26391
26392#include <poll.h>
26393
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026394int main()
26395{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026396 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026397 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026398
26399 close (42);
26400
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026401 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026402 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026403 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026404 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026405 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026406 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026407 return 1;
26408}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026409
26410_ACEOF
26411rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026412if { (ac_try="$ac_link"
26413case "(($ac_try" in
26414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26415 *) ac_try_echo=$ac_try;;
26416esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026418 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026419 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026422 { (case "(($ac_try" in
26423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26424 *) ac_try_echo=$ac_try;;
26425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026427 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026428 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026430 (exit $ac_status); }; }; then
26431 ac_cv_broken_poll=yes
26432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026433 echo "$as_me: program exited with status $ac_status" >&5
26434echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026435sed 's/^/| /' conftest.$ac_ext >&5
26436
26437( exit $ac_status )
26438ac_cv_broken_poll=no
26439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026440rm -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 +000026441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026442
26443
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026444fi
26445
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026446{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26447echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026448if test "$ac_cv_broken_poll" = yes
26449then
26450
26451cat >>confdefs.h <<\_ACEOF
26452#define HAVE_BROKEN_POLL 1
26453_ACEOF
26454
26455fi
26456
Brett Cannon43802422005-02-10 20:48:03 +000026457# 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 +000026458# (which is not required by ISO C or UNIX spec) and/or if we support
26459# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026460{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26461echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026462if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026463 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026464else
26465 cat >conftest.$ac_ext <<_ACEOF
26466/* confdefs.h. */
26467_ACEOF
26468cat confdefs.h >>conftest.$ac_ext
26469cat >>conftest.$ac_ext <<_ACEOF
26470/* end confdefs.h. */
26471#include <sys/types.h>
26472#include <$ac_cv_struct_tm>
26473
26474
26475int
26476main ()
26477{
26478static struct tm ac_aggr;
26479if (ac_aggr.tm_zone)
26480return 0;
26481 ;
26482 return 0;
26483}
26484_ACEOF
26485rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026486if { (ac_try="$ac_compile"
26487case "(($ac_try" in
26488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26489 *) ac_try_echo=$ac_try;;
26490esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026492 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026493 ac_status=$?
26494 grep -v '^ *+' conftest.er1 >conftest.err
26495 rm -f conftest.er1
26496 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026498 (exit $ac_status); } && {
26499 test -z "$ac_c_werror_flag" ||
26500 test ! -s conftest.err
26501 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026502 ac_cv_member_struct_tm_tm_zone=yes
26503else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026504 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026505sed 's/^/| /' conftest.$ac_ext >&5
26506
Martin v. Löwiseba40652007-08-30 20:10:57 +000026507 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026508/* confdefs.h. */
26509_ACEOF
26510cat confdefs.h >>conftest.$ac_ext
26511cat >>conftest.$ac_ext <<_ACEOF
26512/* end confdefs.h. */
26513#include <sys/types.h>
26514#include <$ac_cv_struct_tm>
26515
26516
26517int
26518main ()
26519{
26520static struct tm ac_aggr;
26521if (sizeof ac_aggr.tm_zone)
26522return 0;
26523 ;
26524 return 0;
26525}
26526_ACEOF
26527rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026528if { (ac_try="$ac_compile"
26529case "(($ac_try" in
26530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26531 *) ac_try_echo=$ac_try;;
26532esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026534 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026535 ac_status=$?
26536 grep -v '^ *+' conftest.er1 >conftest.err
26537 rm -f conftest.er1
26538 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026540 (exit $ac_status); } && {
26541 test -z "$ac_c_werror_flag" ||
26542 test ! -s conftest.err
26543 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026544 ac_cv_member_struct_tm_tm_zone=yes
26545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026546 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026547sed 's/^/| /' conftest.$ac_ext >&5
26548
Martin v. Löwiseba40652007-08-30 20:10:57 +000026549 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026551
26552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026554
26555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026557{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26558echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26559if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026560
26561cat >>confdefs.h <<_ACEOF
26562#define HAVE_STRUCT_TM_TM_ZONE 1
26563_ACEOF
26564
26565
26566fi
26567
26568if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26569
26570cat >>confdefs.h <<\_ACEOF
26571#define HAVE_TM_ZONE 1
26572_ACEOF
26573
26574else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026575 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26576echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026577if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026578 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026579else
26580 cat >conftest.$ac_ext <<_ACEOF
26581/* confdefs.h. */
26582_ACEOF
26583cat confdefs.h >>conftest.$ac_ext
26584cat >>conftest.$ac_ext <<_ACEOF
26585/* end confdefs.h. */
26586#include <time.h>
26587
26588int
26589main ()
26590{
26591#ifndef tzname
26592 (void) tzname;
26593#endif
26594
26595 ;
26596 return 0;
26597}
26598_ACEOF
26599rm -f conftest.$ac_objext
26600if { (ac_try="$ac_compile"
26601case "(($ac_try" in
26602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26603 *) ac_try_echo=$ac_try;;
26604esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026606 (eval "$ac_compile") 2>conftest.er1
26607 ac_status=$?
26608 grep -v '^ *+' conftest.er1 >conftest.err
26609 rm -f conftest.er1
26610 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026612 (exit $ac_status); } && {
26613 test -z "$ac_c_werror_flag" ||
26614 test ! -s conftest.err
26615 } && test -s conftest.$ac_objext; then
26616 ac_cv_have_decl_tzname=yes
26617else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026618 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026619sed 's/^/| /' conftest.$ac_ext >&5
26620
26621 ac_cv_have_decl_tzname=no
26622fi
26623
26624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26625fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026626{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26627echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26628if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026629
26630cat >>confdefs.h <<_ACEOF
26631#define HAVE_DECL_TZNAME 1
26632_ACEOF
26633
26634
26635else
26636 cat >>confdefs.h <<_ACEOF
26637#define HAVE_DECL_TZNAME 0
26638_ACEOF
26639
26640
26641fi
26642
26643
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026644 { echo "$as_me:$LINENO: checking for tzname" >&5
26645echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026646if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026647 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026648else
26649 cat >conftest.$ac_ext <<_ACEOF
26650/* confdefs.h. */
26651_ACEOF
26652cat confdefs.h >>conftest.$ac_ext
26653cat >>conftest.$ac_ext <<_ACEOF
26654/* end confdefs.h. */
26655#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026656#if !HAVE_DECL_TZNAME
26657extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026658#endif
26659
26660int
26661main ()
26662{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026663return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026664 ;
26665 return 0;
26666}
26667_ACEOF
26668rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026669if { (ac_try="$ac_link"
26670case "(($ac_try" in
26671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26672 *) ac_try_echo=$ac_try;;
26673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026675 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026676 ac_status=$?
26677 grep -v '^ *+' conftest.er1 >conftest.err
26678 rm -f conftest.er1
26679 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026681 (exit $ac_status); } && {
26682 test -z "$ac_c_werror_flag" ||
26683 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026684 } && test -s conftest$ac_exeext &&
26685 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026686 ac_cv_var_tzname=yes
26687else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026688 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026689sed 's/^/| /' conftest.$ac_ext >&5
26690
Martin v. Löwiseba40652007-08-30 20:10:57 +000026691 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026693
26694rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026695 conftest$ac_exeext conftest.$ac_ext
26696fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026697{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26698echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026699 if test $ac_cv_var_tzname = yes; then
26700
26701cat >>confdefs.h <<\_ACEOF
26702#define HAVE_TZNAME 1
26703_ACEOF
26704
26705 fi
26706fi
26707
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026708
Martin v. Löwis1d459062005-03-14 21:23:33 +000026709# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026710{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26711echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026712if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026713 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026714else
26715
26716if test "$cross_compiling" = yes; then
26717 ac_cv_working_tzset=no
26718else
26719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026720/* confdefs.h. */
26721_ACEOF
26722cat confdefs.h >>conftest.$ac_ext
26723cat >>conftest.$ac_ext <<_ACEOF
26724/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026725
26726#include <stdlib.h>
26727#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026728#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026729
26730#if HAVE_TZNAME
26731extern char *tzname[];
26732#endif
26733
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026734int main()
26735{
Brett Cannon18367812003-09-19 00:59:16 +000026736 /* Note that we need to ensure that not only does tzset(3)
26737 do 'something' with localtime, but it works as documented
26738 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026739 This includes making sure that tzname is set properly if
26740 tm->tm_zone does not exist since it is the alternative way
26741 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026742
26743 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026744 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026745 */
26746
Martin v. Löwis1d459062005-03-14 21:23:33 +000026747 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026748 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26749
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026750 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026751 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026752 if (localtime(&groundhogday)->tm_hour != 0)
26753 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026754#if HAVE_TZNAME
26755 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26756 if (strcmp(tzname[0], "UTC") ||
26757 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26758 exit(1);
26759#endif
Brett Cannon18367812003-09-19 00:59:16 +000026760
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026761 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026762 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026763 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026764 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026765#if HAVE_TZNAME
26766 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26767 exit(1);
26768#endif
Brett Cannon18367812003-09-19 00:59:16 +000026769
26770 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26771 tzset();
26772 if (localtime(&groundhogday)->tm_hour != 11)
26773 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026774#if HAVE_TZNAME
26775 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26776 exit(1);
26777#endif
26778
26779#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026780 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26781 exit(1);
26782 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26783 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026784#endif
Brett Cannon18367812003-09-19 00:59:16 +000026785
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026786 exit(0);
26787}
26788
26789_ACEOF
26790rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026791if { (ac_try="$ac_link"
26792case "(($ac_try" in
26793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26794 *) ac_try_echo=$ac_try;;
26795esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026797 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026798 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026801 { (case "(($ac_try" in
26802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26803 *) ac_try_echo=$ac_try;;
26804esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026806 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026807 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026809 (exit $ac_status); }; }; then
26810 ac_cv_working_tzset=yes
26811else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026812 echo "$as_me: program exited with status $ac_status" >&5
26813echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026814sed 's/^/| /' conftest.$ac_ext >&5
26815
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026816( exit $ac_status )
26817ac_cv_working_tzset=no
26818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026819rm -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 +000026820fi
26821
Martin v. Löwiseba40652007-08-30 20:10:57 +000026822
26823fi
26824
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026825{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26826echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026827if test "$ac_cv_working_tzset" = yes
26828then
26829
26830cat >>confdefs.h <<\_ACEOF
26831#define HAVE_WORKING_TZSET 1
26832_ACEOF
26833
26834fi
26835
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026836# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026837{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26838echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026839if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026840 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026841else
26842 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026843/* confdefs.h. */
26844_ACEOF
26845cat confdefs.h >>conftest.$ac_ext
26846cat >>conftest.$ac_ext <<_ACEOF
26847/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026848#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026849int
26850main ()
26851{
26852
26853struct stat st;
26854st.st_mtim.tv_nsec = 1;
26855
26856 ;
26857 return 0;
26858}
26859_ACEOF
26860rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026861if { (ac_try="$ac_compile"
26862case "(($ac_try" in
26863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26864 *) ac_try_echo=$ac_try;;
26865esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026867 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026869 grep -v '^ *+' conftest.er1 >conftest.err
26870 rm -f conftest.er1
26871 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026873 (exit $ac_status); } && {
26874 test -z "$ac_c_werror_flag" ||
26875 test ! -s conftest.err
26876 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026877 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026878else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026880sed 's/^/| /' conftest.$ac_ext >&5
26881
Martin v. Löwiseba40652007-08-30 20:10:57 +000026882 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026883fi
26884
Martin v. Löwiseba40652007-08-30 20:10:57 +000026885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26886fi
26887
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026888{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26889echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026890if test "$ac_cv_stat_tv_nsec" = yes
26891then
26892
26893cat >>confdefs.h <<\_ACEOF
26894#define HAVE_STAT_TV_NSEC 1
26895_ACEOF
26896
26897fi
26898
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026899# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026900{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26901echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026902if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026903 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026904else
26905 cat >conftest.$ac_ext <<_ACEOF
26906/* confdefs.h. */
26907_ACEOF
26908cat confdefs.h >>conftest.$ac_ext
26909cat >>conftest.$ac_ext <<_ACEOF
26910/* end confdefs.h. */
26911#include <sys/stat.h>
26912int
26913main ()
26914{
26915
26916struct stat st;
26917st.st_mtimespec.tv_nsec = 1;
26918
26919 ;
26920 return 0;
26921}
26922_ACEOF
26923rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026924if { (ac_try="$ac_compile"
26925case "(($ac_try" in
26926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26927 *) ac_try_echo=$ac_try;;
26928esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026931 ac_status=$?
26932 grep -v '^ *+' conftest.er1 >conftest.err
26933 rm -f conftest.er1
26934 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026936 (exit $ac_status); } && {
26937 test -z "$ac_c_werror_flag" ||
26938 test ! -s conftest.err
26939 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026940 ac_cv_stat_tv_nsec2=yes
26941else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026942 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026943sed 's/^/| /' conftest.$ac_ext >&5
26944
Martin v. Löwiseba40652007-08-30 20:10:57 +000026945 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026946fi
26947
Martin v. Löwiseba40652007-08-30 20:10:57 +000026948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26949fi
26950
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026951{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26952echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026953if test "$ac_cv_stat_tv_nsec2" = yes
26954then
26955
26956cat >>confdefs.h <<\_ACEOF
26957#define HAVE_STAT_TV_NSEC2 1
26958_ACEOF
26959
26960fi
26961
Jack Jansen666b1e72001-10-31 12:11:48 +000026962# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026963{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26964echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026965if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026966 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026967else
Martin v. Löwis11437992002-04-12 09:54:03 +000026968 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026969/* confdefs.h. */
26970_ACEOF
26971cat confdefs.h >>conftest.$ac_ext
26972cat >>conftest.$ac_ext <<_ACEOF
26973/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026974#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026975int
26976main ()
26977{
Jack Jansen666b1e72001-10-31 12:11:48 +000026978
26979 int rtn;
26980 rtn = mvwdelch(0,0,0);
26981
Martin v. Löwis11437992002-04-12 09:54:03 +000026982 ;
26983 return 0;
26984}
26985_ACEOF
26986rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026987if { (ac_try="$ac_compile"
26988case "(($ac_try" in
26989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26990 *) ac_try_echo=$ac_try;;
26991esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026995 grep -v '^ *+' conftest.er1 >conftest.err
26996 rm -f conftest.er1
26997 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026999 (exit $ac_status); } && {
27000 test -z "$ac_c_werror_flag" ||
27001 test ! -s conftest.err
27002 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027003 ac_cv_mvwdelch_is_expression=yes
27004else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027006sed 's/^/| /' conftest.$ac_ext >&5
27007
Martin v. Löwiseba40652007-08-30 20:10:57 +000027008 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027009fi
27010
Martin v. Löwiseba40652007-08-30 20:10:57 +000027011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27012fi
27013
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027014{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27015echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027016
27017if test "$ac_cv_mvwdelch_is_expression" = yes
27018then
Martin v. Löwis11437992002-04-12 09:54:03 +000027019
27020cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027021#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027022_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027023
27024fi
27025
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027026{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27027echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027028if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027029 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027030else
Martin v. Löwis11437992002-04-12 09:54:03 +000027031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027032/* confdefs.h. */
27033_ACEOF
27034cat confdefs.h >>conftest.$ac_ext
27035cat >>conftest.$ac_ext <<_ACEOF
27036/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027037#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027038int
27039main ()
27040{
Jack Jansen666b1e72001-10-31 12:11:48 +000027041
27042 WINDOW *w;
27043 w->_flags = 0;
27044
Martin v. Löwis11437992002-04-12 09:54:03 +000027045 ;
27046 return 0;
27047}
27048_ACEOF
27049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027050if { (ac_try="$ac_compile"
27051case "(($ac_try" in
27052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27053 *) ac_try_echo=$ac_try;;
27054esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027058 grep -v '^ *+' conftest.er1 >conftest.err
27059 rm -f conftest.er1
27060 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027062 (exit $ac_status); } && {
27063 test -z "$ac_c_werror_flag" ||
27064 test ! -s conftest.err
27065 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027066 ac_cv_window_has_flags=yes
27067else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027069sed 's/^/| /' conftest.$ac_ext >&5
27070
Martin v. Löwiseba40652007-08-30 20:10:57 +000027071 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027072fi
27073
Martin v. Löwiseba40652007-08-30 20:10:57 +000027074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27075fi
27076
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027077{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27078echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027079
Jack Jansen666b1e72001-10-31 12:11:48 +000027080
27081if test "$ac_cv_window_has_flags" = yes
27082then
Martin v. Löwis11437992002-04-12 09:54:03 +000027083
27084cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027085#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027086_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027087
27088fi
27089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027090{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27091echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027092cat >conftest.$ac_ext <<_ACEOF
27093/* confdefs.h. */
27094_ACEOF
27095cat confdefs.h >>conftest.$ac_ext
27096cat >>conftest.$ac_ext <<_ACEOF
27097/* end confdefs.h. */
27098#include <curses.h>
27099int
27100main ()
27101{
27102void *x=is_term_resized
27103 ;
27104 return 0;
27105}
27106_ACEOF
27107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027108if { (ac_try="$ac_compile"
27109case "(($ac_try" in
27110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27111 *) ac_try_echo=$ac_try;;
27112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027114 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027115 ac_status=$?
27116 grep -v '^ *+' conftest.er1 >conftest.err
27117 rm -f conftest.er1
27118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027120 (exit $ac_status); } && {
27121 test -z "$ac_c_werror_flag" ||
27122 test ! -s conftest.err
27123 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027124
27125cat >>confdefs.h <<\_ACEOF
27126#define HAVE_CURSES_IS_TERM_RESIZED 1
27127_ACEOF
27128
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027129 { echo "$as_me:$LINENO: result: yes" >&5
27130echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027132 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027133sed 's/^/| /' conftest.$ac_ext >&5
27134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027135 { echo "$as_me:$LINENO: result: no" >&5
27136echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027137
27138fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027139
Martin v. Löwiseba40652007-08-30 20:10:57 +000027140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27141
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027142{ echo "$as_me:$LINENO: checking for resize_term" >&5
27143echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027144cat >conftest.$ac_ext <<_ACEOF
27145/* confdefs.h. */
27146_ACEOF
27147cat confdefs.h >>conftest.$ac_ext
27148cat >>conftest.$ac_ext <<_ACEOF
27149/* end confdefs.h. */
27150#include <curses.h>
27151int
27152main ()
27153{
27154void *x=resize_term
27155 ;
27156 return 0;
27157}
27158_ACEOF
27159rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027160if { (ac_try="$ac_compile"
27161case "(($ac_try" in
27162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27163 *) ac_try_echo=$ac_try;;
27164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027166 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027167 ac_status=$?
27168 grep -v '^ *+' conftest.er1 >conftest.err
27169 rm -f conftest.er1
27170 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027172 (exit $ac_status); } && {
27173 test -z "$ac_c_werror_flag" ||
27174 test ! -s conftest.err
27175 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027176
27177cat >>confdefs.h <<\_ACEOF
27178#define HAVE_CURSES_RESIZE_TERM 1
27179_ACEOF
27180
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027181 { echo "$as_me:$LINENO: result: yes" >&5
27182echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027183else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027184 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027185sed 's/^/| /' conftest.$ac_ext >&5
27186
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027187 { echo "$as_me:$LINENO: result: no" >&5
27188echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027189
27190fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027191
Martin v. Löwiseba40652007-08-30 20:10:57 +000027192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27193
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027194{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27195echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027196cat >conftest.$ac_ext <<_ACEOF
27197/* confdefs.h. */
27198_ACEOF
27199cat confdefs.h >>conftest.$ac_ext
27200cat >>conftest.$ac_ext <<_ACEOF
27201/* end confdefs.h. */
27202#include <curses.h>
27203int
27204main ()
27205{
27206void *x=resizeterm
27207 ;
27208 return 0;
27209}
27210_ACEOF
27211rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027212if { (ac_try="$ac_compile"
27213case "(($ac_try" in
27214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27215 *) ac_try_echo=$ac_try;;
27216esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027218 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027219 ac_status=$?
27220 grep -v '^ *+' conftest.er1 >conftest.err
27221 rm -f conftest.er1
27222 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027224 (exit $ac_status); } && {
27225 test -z "$ac_c_werror_flag" ||
27226 test ! -s conftest.err
27227 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027228
27229cat >>confdefs.h <<\_ACEOF
27230#define HAVE_CURSES_RESIZETERM 1
27231_ACEOF
27232
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027233 { echo "$as_me:$LINENO: result: yes" >&5
27234echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027236 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027237sed 's/^/| /' conftest.$ac_ext >&5
27238
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027239 { echo "$as_me:$LINENO: result: no" >&5
27240echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027241
27242fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027243
Martin v. Löwiseba40652007-08-30 20:10:57 +000027244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27245
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027246{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27247echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027248
27249if test -r /dev/ptmx
27250then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027251 { echo "$as_me:$LINENO: result: yes" >&5
27252echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027253
27254cat >>confdefs.h <<\_ACEOF
27255#define HAVE_DEV_PTMX 1
27256_ACEOF
27257
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027258else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027259 { echo "$as_me:$LINENO: result: no" >&5
27260echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027261fi
27262
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027263{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27264echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027265
27266if test -r /dev/ptc
27267then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027268 { echo "$as_me:$LINENO: result: yes" >&5
27269echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027270
27271cat >>confdefs.h <<\_ACEOF
27272#define HAVE_DEV_PTC 1
27273_ACEOF
27274
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027275else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027276 { echo "$as_me:$LINENO: result: no" >&5
27277echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027278fi
27279
Mark Dickinson82864d12009-11-15 16:18:58 +000027280if test "$have_long_long" = yes
27281then
27282 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27283echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27284 if test "${ac_cv_have_long_long_format+set}" = set; then
27285 echo $ECHO_N "(cached) $ECHO_C" >&6
27286else
27287 if test "$cross_compiling" = yes; then
27288 ac_cv_have_long_long_format=no
27289else
27290 cat >conftest.$ac_ext <<_ACEOF
27291/* confdefs.h. */
27292_ACEOF
27293cat confdefs.h >>conftest.$ac_ext
27294cat >>conftest.$ac_ext <<_ACEOF
27295/* end confdefs.h. */
27296
27297 #include <stdio.h>
27298 #include <stddef.h>
27299 #include <string.h>
27300
27301 #ifdef HAVE_SYS_TYPES_H
27302 #include <sys/types.h>
27303 #endif
27304
27305 int main()
27306 {
27307 char buffer[256];
27308
27309 if (sprintf(buffer, "%lld", (long long)123) < 0)
27310 return 1;
27311 if (strcmp(buffer, "123"))
27312 return 1;
27313
27314 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27315 return 1;
27316 if (strcmp(buffer, "-123"))
27317 return 1;
27318
27319 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27320 return 1;
27321 if (strcmp(buffer, "123"))
27322 return 1;
27323
27324 return 0;
27325 }
27326
27327_ACEOF
27328rm -f conftest$ac_exeext
27329if { (ac_try="$ac_link"
27330case "(($ac_try" in
27331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27332 *) ac_try_echo=$ac_try;;
27333esac
27334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27335 (eval "$ac_link") 2>&5
27336 ac_status=$?
27337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27338 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27339 { (case "(($ac_try" in
27340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27341 *) ac_try_echo=$ac_try;;
27342esac
27343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27344 (eval "$ac_try") 2>&5
27345 ac_status=$?
27346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27347 (exit $ac_status); }; }; then
27348 ac_cv_have_long_long_format=yes
27349else
27350 echo "$as_me: program exited with status $ac_status" >&5
27351echo "$as_me: failed program was:" >&5
27352sed 's/^/| /' conftest.$ac_ext >&5
27353
27354( exit $ac_status )
27355ac_cv_have_long_long_format=no
27356fi
27357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27358fi
27359
27360
27361
27362fi
27363
27364 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27365echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27366fi
27367
27368if test $ac_cv_have_long_long_format = yes
27369then
27370
27371cat >>confdefs.h <<\_ACEOF
27372#define PY_FORMAT_LONG_LONG "ll"
27373_ACEOF
27374
27375fi
27376
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027377if test $ac_sys_system = Darwin
27378then
27379 LIBS="$LIBS -framework CoreFoundation"
27380fi
27381
Mark Dickinson82864d12009-11-15 16:18:58 +000027382
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027383{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27384echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027385if test "${ac_cv_have_size_t_format+set}" = set; then
27386 echo $ECHO_N "(cached) $ECHO_C" >&6
27387else
27388 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027389 ac_cv_have_size_t_format="cross -- assuming yes"
27390
Brett Cannon09d12362006-05-11 05:11:33 +000027391else
27392 cat >conftest.$ac_ext <<_ACEOF
27393/* confdefs.h. */
27394_ACEOF
27395cat confdefs.h >>conftest.$ac_ext
27396cat >>conftest.$ac_ext <<_ACEOF
27397/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027398
Brett Cannon09d12362006-05-11 05:11:33 +000027399#include <stdio.h>
27400#include <stddef.h>
27401#include <string.h>
27402
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027403#ifdef HAVE_SYS_TYPES_H
27404#include <sys/types.h>
27405#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027406
27407#ifdef HAVE_SSIZE_T
27408typedef ssize_t Py_ssize_t;
27409#elif SIZEOF_VOID_P == SIZEOF_LONG
27410typedef long Py_ssize_t;
27411#else
27412typedef int Py_ssize_t;
27413#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027414
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027415int main()
27416{
27417 char buffer[256];
27418
Brett Cannon09d12362006-05-11 05:11:33 +000027419 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27420 return 1;
27421
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027422 if (strcmp(buffer, "123"))
27423 return 1;
27424
27425 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27426 return 1;
27427
27428 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027429 return 1;
27430
27431 return 0;
27432}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027433
Brett Cannon09d12362006-05-11 05:11:33 +000027434_ACEOF
27435rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027436if { (ac_try="$ac_link"
27437case "(($ac_try" in
27438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27439 *) ac_try_echo=$ac_try;;
27440esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027442 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027443 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027446 { (case "(($ac_try" in
27447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27448 *) ac_try_echo=$ac_try;;
27449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027451 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027452 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027454 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027455 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027456else
27457 echo "$as_me: program exited with status $ac_status" >&5
27458echo "$as_me: failed program was:" >&5
27459sed 's/^/| /' conftest.$ac_ext >&5
27460
27461( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027462ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027463fi
27464rm -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 +000027465fi
27466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027467
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027468fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027469{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27470echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027471if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027472
27473cat >>confdefs.h <<\_ACEOF
27474#define PY_FORMAT_SIZE_T "z"
27475_ACEOF
27476
27477fi
27478
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027479{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27480echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027481if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027483else
Martin v. Löwis11437992002-04-12 09:54:03 +000027484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027485/* confdefs.h. */
27486_ACEOF
27487cat confdefs.h >>conftest.$ac_ext
27488cat >>conftest.$ac_ext <<_ACEOF
27489/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027490
27491#ifdef HAVE_SYS_TYPES_H
27492#include <sys/types.h>
27493#endif
27494#ifdef HAVE_SYS_SOCKET_H
27495#include <sys/socket.h>
27496#endif
27497
27498
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027499typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027500int
27501main ()
27502{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027503if ((ac__type_new_ *) 0)
27504 return 0;
27505if (sizeof (ac__type_new_))
27506 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027507 ;
27508 return 0;
27509}
27510_ACEOF
27511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027512if { (ac_try="$ac_compile"
27513case "(($ac_try" in
27514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27515 *) ac_try_echo=$ac_try;;
27516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027520 grep -v '^ *+' conftest.er1 >conftest.err
27521 rm -f conftest.er1
27522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027524 (exit $ac_status); } && {
27525 test -z "$ac_c_werror_flag" ||
27526 test ! -s conftest.err
27527 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027528 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027531sed 's/^/| /' conftest.$ac_ext >&5
27532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027533 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027535
27536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027537fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027538{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27539echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27540if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027541 :
27542else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027543
Martin v. Löwis01c04012002-11-11 14:58:44 +000027544cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027545#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027546_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027547
27548fi
27549
Michael W. Hudson54241132001-12-07 15:38:26 +000027550
Michael W. Hudson54241132001-12-07 15:38:26 +000027551
27552
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027553for h in `(cd $srcdir;echo Python/thread_*.h)`
27554do
27555 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27556done
27557
Michael W. Hudson54241132001-12-07 15:38:26 +000027558
Neal Norwitzd24499d2005-12-18 21:36:39 +000027559SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027560{ echo "$as_me:$LINENO: checking for build directories" >&5
27561echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027562for dir in $SRCDIRS; do
27563 if test ! -d $dir; then
27564 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027565 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027566done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027567{ echo "$as_me:$LINENO: result: done" >&5
27568echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027569
Guido van Rossum627b2d71993-12-24 10:39:16 +000027570# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027571ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027572
Martin v. Löwis11437992002-04-12 09:54:03 +000027573cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027574# This file is a shell script that caches the results of configure
27575# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027576# scripts and configure runs, see configure's option --config-cache.
27577# It is not useful on other systems. If it contains results you don't
27578# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027579#
Martin v. Löwis11437992002-04-12 09:54:03 +000027580# config.status only pays attention to the cache file if you give it
27581# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027582#
Skip Montanaro6dead952003-09-25 14:50:04 +000027583# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027584# loading this file, other *unset* `ac_cv_foo' will be assigned the
27585# following values.
27586
27587_ACEOF
27588
Guido van Rossumf78abae1997-01-21 22:02:36 +000027589# The following way of writing the cache mishandles newlines in values,
27590# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027591# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027592# Ultrix sh set writes to stderr and can't be redirected directly,
27593# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027594(
27595 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27596 eval ac_val=\$$ac_var
27597 case $ac_val in #(
27598 *${as_nl}*)
27599 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027600 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27601echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027602 esac
27603 case $ac_var in #(
27604 _ | IFS | as_nl) ;; #(
27605 *) $as_unset $ac_var ;;
27606 esac ;;
27607 esac
27608 done
27609
Martin v. Löwis11437992002-04-12 09:54:03 +000027610 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027611 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27612 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027613 # `set' does not quote correctly, so add quotes (double-quote
27614 # substitution turns \\\\ into \\, and sed turns \\ into \).
27615 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027616 "s/'/'\\\\''/g;
27617 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027618 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027619 *)
27620 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027621 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027622 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027623 esac |
27624 sort
27625) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027626 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027627 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027628 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027629 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027630 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27631 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027632 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27633 :end' >>confcache
27634if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27635 if test -w "$cache_file"; then
27636 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027637 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27638echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027639 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027640 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027641 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27642echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027643 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027644fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027645rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027646
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027647test "x$prefix" = xNONE && prefix=$ac_default_prefix
27648# Let make expand exec_prefix.
27649test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027650
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027651DEFS=-DHAVE_CONFIG_H
27652
Skip Montanaro6dead952003-09-25 14:50:04 +000027653ac_libobjs=
27654ac_ltlibobjs=
27655for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27656 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027657 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027658 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027659 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27660 # will be set to the directory where LIBOBJS objects are built.
27661 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27662 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027663done
27664LIBOBJS=$ac_libobjs
27665
27666LTLIBOBJS=$ac_ltlibobjs
27667
27668
Martin v. Löwis11437992002-04-12 09:54:03 +000027669
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027670: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027671ac_clean_files_save=$ac_clean_files
27672ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027673{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27674echo "$as_me: creating $CONFIG_STATUS" >&6;}
27675cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027676#! $SHELL
27677# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027678# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027679# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027680# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027681
Martin v. Löwis11437992002-04-12 09:54:03 +000027682debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027683ac_cs_recheck=false
27684ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027685SHELL=\${CONFIG_SHELL-$SHELL}
27686_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027687
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027688cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027689## --------------------- ##
27690## M4sh Initialization. ##
27691## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027692
Martin v. Löwiseba40652007-08-30 20:10:57 +000027693# Be more Bourne compatible
27694DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027695if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27696 emulate sh
27697 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027698 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027699 # is contrary to our usage. Disable this feature.
27700 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027701 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027702else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027703 case `(set -o) 2>/dev/null` in
27704 *posix*) set -o posix ;;
27705esac
27706
Martin v. Löwis11437992002-04-12 09:54:03 +000027707fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027708
Skip Montanaro6dead952003-09-25 14:50:04 +000027709
Martin v. Löwis11437992002-04-12 09:54:03 +000027710
27711
Martin v. Löwiseba40652007-08-30 20:10:57 +000027712# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027713# Avoid depending upon Character Ranges.
27714as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27715as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27716as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27717as_cr_digits='0123456789'
27718as_cr_alnum=$as_cr_Letters$as_cr_digits
27719
27720# The user is always right.
27721if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027722 echo "#! /bin/sh" >conf$$.sh
27723 echo "exit 0" >>conf$$.sh
27724 chmod +x conf$$.sh
27725 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27726 PATH_SEPARATOR=';'
27727 else
27728 PATH_SEPARATOR=:
27729 fi
27730 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027731fi
27732
Martin v. Löwiseba40652007-08-30 20:10:57 +000027733# Support unset when possible.
27734if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27735 as_unset=unset
27736else
27737 as_unset=false
27738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027739
Martin v. Löwiseba40652007-08-30 20:10:57 +000027740
27741# IFS
27742# We need space, tab and new line, in precisely that order. Quoting is
27743# there to prevent editors from complaining about space-tab.
27744# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27745# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027746as_nl='
27747'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027748IFS=" "" $as_nl"
27749
27750# Find who we are. Look in the path if we contain no directory separator.
27751case $0 in
27752 *[\\/]* ) as_myself=$0 ;;
27753 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027754for as_dir in $PATH
27755do
27756 IFS=$as_save_IFS
27757 test -z "$as_dir" && as_dir=.
27758 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27759done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027760IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027761
Martin v. Löwiseba40652007-08-30 20:10:57 +000027762 ;;
27763esac
27764# We did not find ourselves, most probably we were run as `sh COMMAND'
27765# in which case we are not to be found in the path.
27766if test "x$as_myself" = x; then
27767 as_myself=$0
27768fi
27769if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027770 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027771 { (exit 1); exit 1; }
27772fi
27773
27774# Work around bugs in pre-3.0 UWIN ksh.
27775for as_var in ENV MAIL MAILPATH
27776do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27777done
27778PS1='$ '
27779PS2='> '
27780PS4='+ '
27781
27782# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027783for as_var in \
27784 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27785 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27786 LC_TELEPHONE LC_TIME
27787do
27788 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27789 eval $as_var=C; export $as_var
27790 else
27791 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27792 fi
27793done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027794
27795# Required to use basename.
27796if expr a : '\(a\)' >/dev/null 2>&1 &&
27797 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27798 as_expr=expr
27799else
27800 as_expr=false
27801fi
27802
27803if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27804 as_basename=basename
27805else
27806 as_basename=false
27807fi
27808
27809
27810# Name of the executable.
27811as_me=`$as_basename -- "$0" ||
27812$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27813 X"$0" : 'X\(//\)$' \| \
27814 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027815echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027816 sed '/^.*\/\([^/][^/]*\)\/*$/{
27817 s//\1/
27818 q
27819 }
27820 /^X\/\(\/\/\)$/{
27821 s//\1/
27822 q
27823 }
27824 /^X\/\(\/\).*/{
27825 s//\1/
27826 q
27827 }
27828 s/.*/./; q'`
27829
27830# CDPATH.
27831$as_unset CDPATH
27832
27833
27834
Martin v. Löwis11437992002-04-12 09:54:03 +000027835 as_lineno_1=$LINENO
27836 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027837 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027838 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027839
Martin v. Löwis11437992002-04-12 09:54:03 +000027840 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27841 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000027842 # line-number line after each line using $LINENO; the second 'sed'
27843 # does the real work. The second script uses 'N' to pair each
27844 # line-number line with the line containing $LINENO, and appends
27845 # trailing '-' during substitution so that $LINENO is not a special
27846 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027847 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027848 # scripts with optimization help from Paolo Bonzini. Blame Lee
27849 # E. McMahon (1931-1989) for sed's syntax. :-)
27850 sed -n '
27851 p
27852 /[$]LINENO/=
27853 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027854 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027855 s/[$]LINENO.*/&-/
27856 t lineno
27857 b
27858 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027859 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027860 :loop
27861 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027862 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027863 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027864 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027865 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027866 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027867 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027868
Martin v. Löwis11437992002-04-12 09:54:03 +000027869 # Don't try to exec as it changes $[0], causing all sort of problems
27870 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027871 # original and so on. Autoconf is especially sensitive to this).
27872 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027873 # Exit status is that of the last command.
27874 exit
27875}
27876
27877
Martin v. Löwiseba40652007-08-30 20:10:57 +000027878if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27879 as_dirname=dirname
27880else
27881 as_dirname=false
27882fi
27883
27884ECHO_C= ECHO_N= ECHO_T=
27885case `echo -n x` in
27886-n*)
27887 case `echo 'x\c'` in
27888 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27889 *) ECHO_C='\c';;
27890 esac;;
27891*)
27892 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027893esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027894
Martin v. Löwiseba40652007-08-30 20:10:57 +000027895if expr a : '\(a\)' >/dev/null 2>&1 &&
27896 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027897 as_expr=expr
27898else
27899 as_expr=false
27900fi
27901
27902rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027903if test -d conf$$.dir; then
27904 rm -f conf$$.dir/conf$$.file
27905else
27906 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027907 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027908fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027909echo >conf$$.file
27910if ln -s conf$$.file conf$$ 2>/dev/null; then
27911 as_ln_s='ln -s'
27912 # ... but there are two gotchas:
27913 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27914 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27915 # In both cases, we have to default to `cp -p'.
27916 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027917 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027918elif ln conf$$.file conf$$ 2>/dev/null; then
27919 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027920else
27921 as_ln_s='cp -p'
27922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027923rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27924rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027925
Skip Montanaro6dead952003-09-25 14:50:04 +000027926if mkdir -p . 2>/dev/null; then
27927 as_mkdir_p=:
27928else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027929 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027930 as_mkdir_p=false
27931fi
27932
Martin v. Löwiseba40652007-08-30 20:10:57 +000027933if test -x / >/dev/null 2>&1; then
27934 as_test_x='test -x'
27935else
27936 if ls -dL / >/dev/null 2>&1; then
27937 as_ls_L_option=L
27938 else
27939 as_ls_L_option=
27940 fi
27941 as_test_x='
27942 eval sh -c '\''
27943 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027944 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027945 else
27946 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027947 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027948 esac;
27949 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27950 ???[sx]*):;;*)false;;esac;fi
27951 '\'' sh
27952 '
27953fi
27954as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027955
27956# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027957as_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 +000027958
27959# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027960as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027961
27962
Martin v. Löwis11437992002-04-12 09:54:03 +000027963exec 6>&1
27964
Martin v. Löwiseba40652007-08-30 20:10:57 +000027965# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027966# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027967# values after options handling.
27968ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027969This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027970generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027971
27972 CONFIG_FILES = $CONFIG_FILES
27973 CONFIG_HEADERS = $CONFIG_HEADERS
27974 CONFIG_LINKS = $CONFIG_LINKS
27975 CONFIG_COMMANDS = $CONFIG_COMMANDS
27976 $ $0 $@
27977
Martin v. Löwiseba40652007-08-30 20:10:57 +000027978on `(hostname || uname -n) 2>/dev/null | sed 1q`
27979"
27980
Martin v. Löwis11437992002-04-12 09:54:03 +000027981_ACEOF
27982
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027983cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027984# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000027985config_files="$ac_config_files"
27986config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027987
Martin v. Löwiseba40652007-08-30 20:10:57 +000027988_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027989
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027990cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027991ac_cs_usage="\
27992\`$as_me' instantiates files from templates according to the
27993current configuration.
27994
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027995Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027996
27997 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000027998 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027999 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028000 -d, --debug don't remove temporary files
28001 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028002 --file=FILE[:TEMPLATE]
28003 instantiate the configuration file FILE
28004 --header=FILE[:TEMPLATE]
28005 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028006
28007Configuration files:
28008$config_files
28009
28010Configuration headers:
28011$config_headers
28012
28013Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028014
Martin v. Löwiseba40652007-08-30 20:10:57 +000028015_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028016cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028017ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028018python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028019configured by $0, generated by GNU Autoconf 2.61,
28020 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028021
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028022Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028023This config.status script is free software; the Free Software Foundation
28024gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028025
28026ac_pwd='$ac_pwd'
28027srcdir='$srcdir'
28028INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028029_ACEOF
28030
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028031cat >>$CONFIG_STATUS <<\_ACEOF
28032# If no file are specified by the user, then we need to provide default
28033# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028034ac_need_defaults=:
28035while test $# != 0
28036do
28037 case $1 in
28038 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028039 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28040 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028041 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028042 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028043 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028044 ac_option=$1
28045 ac_optarg=$2
28046 ac_shift=shift
28047 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028048 esac
28049
Skip Montanaro6dead952003-09-25 14:50:04 +000028050 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028051 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028052 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28053 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028054 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028055 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028056 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028057 debug=: ;;
28058 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028059 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028060 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028061 ac_need_defaults=false;;
28062 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028063 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028064 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028065 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028066 --he | --h)
28067 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028068 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028069Try \`$0 --help' for more information." >&2
28070 { (exit 1); exit 1; }; };;
28071 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028072 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028073 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28074 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28075 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028076
28077 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028078 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028079Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028080 { (exit 1); exit 1; }; } ;;
28081
Martin v. Löwiseba40652007-08-30 20:10:57 +000028082 *) ac_config_targets="$ac_config_targets $1"
28083 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028084
28085 esac
28086 shift
28087done
28088
Skip Montanaro6dead952003-09-25 14:50:04 +000028089ac_configure_extra_args=
28090
28091if $ac_cs_silent; then
28092 exec 6>/dev/null
28093 ac_configure_extra_args="$ac_configure_extra_args --silent"
28094fi
28095
28096_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028097cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028098if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028099 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28100 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028101 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028102 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028103fi
28104
Martin v. Löwis11437992002-04-12 09:54:03 +000028105_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028106cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028107exec 5>>config.log
28108{
28109 echo
28110 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28111## Running $as_me. ##
28112_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028113 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028114} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028115
Martin v. Löwiseba40652007-08-30 20:10:57 +000028116_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028117cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028118_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028119
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028120cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028121
28122# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028123for ac_config_target in $ac_config_targets
28124do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028125 case $ac_config_target in
28126 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28127 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28128 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28129 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028130 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28131 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028132 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28133 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028134 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028136 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28137echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028138 { (exit 1); exit 1; }; };;
28139 esac
28140done
28141
Martin v. Löwiseba40652007-08-30 20:10:57 +000028142
Martin v. Löwis11437992002-04-12 09:54:03 +000028143# If the user did not use the arguments to specify the items to instantiate,
28144# then the envvar interface is used. Set only those that are not.
28145# We use the long form for the default assignment because of an extremely
28146# bizarre bug on SunOS 4.1.3.
28147if $ac_need_defaults; then
28148 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28149 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28150fi
28151
Skip Montanaro6dead952003-09-25 14:50:04 +000028152# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028153# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028154# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028155# Hook for its removal unless debugging.
28156# Note that there is a small window in which the directory will not be cleaned:
28157# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028158$debug ||
28159{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028160 tmp=
28161 trap 'exit_status=$?
28162 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28163' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028164 trap '{ (exit 1); exit 1; }' 1 2 13 15
28165}
Martin v. Löwis11437992002-04-12 09:54:03 +000028166# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028167
Martin v. Löwis11437992002-04-12 09:54:03 +000028168{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028169 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028170 test -n "$tmp" && test -d "$tmp"
28171} ||
28172{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028173 tmp=./conf$$-$RANDOM
28174 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028175} ||
28176{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028177 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028178 { (exit 1); exit 1; }
28179}
28180
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028181#
28182# Set up the sed scripts for CONFIG_FILES section.
28183#
28184
28185# No need to generate the scripts if there are no CONFIG_FILES.
28186# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028187if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028188
28189_ACEOF
28190
Martin v. Löwiseba40652007-08-30 20:10:57 +000028191
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028192
Martin v. Löwiseba40652007-08-30 20:10:57 +000028193ac_delim='%!_!# '
28194for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028195 cat >conf$$subs.sed <<_ACEOF
28196SHELL!$SHELL$ac_delim
28197PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28198PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28199PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28200PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28201PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28202PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28203exec_prefix!$exec_prefix$ac_delim
28204prefix!$prefix$ac_delim
28205program_transform_name!$program_transform_name$ac_delim
28206bindir!$bindir$ac_delim
28207sbindir!$sbindir$ac_delim
28208libexecdir!$libexecdir$ac_delim
28209datarootdir!$datarootdir$ac_delim
28210datadir!$datadir$ac_delim
28211sysconfdir!$sysconfdir$ac_delim
28212sharedstatedir!$sharedstatedir$ac_delim
28213localstatedir!$localstatedir$ac_delim
28214includedir!$includedir$ac_delim
28215oldincludedir!$oldincludedir$ac_delim
28216docdir!$docdir$ac_delim
28217infodir!$infodir$ac_delim
28218htmldir!$htmldir$ac_delim
28219dvidir!$dvidir$ac_delim
28220pdfdir!$pdfdir$ac_delim
28221psdir!$psdir$ac_delim
28222libdir!$libdir$ac_delim
28223localedir!$localedir$ac_delim
28224mandir!$mandir$ac_delim
28225DEFS!$DEFS$ac_delim
28226ECHO_C!$ECHO_C$ac_delim
28227ECHO_N!$ECHO_N$ac_delim
28228ECHO_T!$ECHO_T$ac_delim
28229LIBS!$LIBS$ac_delim
28230build_alias!$build_alias$ac_delim
28231host_alias!$host_alias$ac_delim
28232target_alias!$target_alias$ac_delim
28233VERSION!$VERSION$ac_delim
28234SOVERSION!$SOVERSION$ac_delim
28235CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28236UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28237ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
28238PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28239PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28240PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28241PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28242PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28243FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28244FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28245FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28246FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28247FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28248MACHDEP!$MACHDEP$ac_delim
28249SGI_ABI!$SGI_ABI$ac_delim
28250EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28251EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28252CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28253EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28254CC!$CC$ac_delim
28255CFLAGS!$CFLAGS$ac_delim
28256LDFLAGS!$LDFLAGS$ac_delim
28257CPPFLAGS!$CPPFLAGS$ac_delim
28258ac_ct_CC!$ac_ct_CC$ac_delim
28259EXEEXT!$EXEEXT$ac_delim
28260OBJEXT!$OBJEXT$ac_delim
28261CXX!$CXX$ac_delim
28262MAINCC!$MAINCC$ac_delim
28263CPP!$CPP$ac_delim
28264GREP!$GREP$ac_delim
28265EGREP!$EGREP$ac_delim
28266BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28267LIBRARY!$LIBRARY$ac_delim
28268LDLIBRARY!$LDLIBRARY$ac_delim
28269DLLLIBRARY!$DLLLIBRARY$ac_delim
28270BLDLIBRARY!$BLDLIBRARY$ac_delim
28271LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28272INSTSONAME!$INSTSONAME$ac_delim
28273RUNSHARED!$RUNSHARED$ac_delim
28274LINKCC!$LINKCC$ac_delim
28275GNULD!$GNULD$ac_delim
28276RANLIB!$RANLIB$ac_delim
28277AR!$AR$ac_delim
28278ARFLAGS!$ARFLAGS$ac_delim
28279SVNVERSION!$SVNVERSION$ac_delim
28280INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28281INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28282INSTALL_DATA!$INSTALL_DATA$ac_delim
28283LN!$LN$ac_delim
28284OPT!$OPT$ac_delim
28285BASECFLAGS!$BASECFLAGS$ac_delim
28286UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28287OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28288LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28289SO!$SO$ac_delim
28290LDSHARED!$LDSHARED$ac_delim
28291BLDSHARED!$BLDSHARED$ac_delim
28292CCSHARED!$CCSHARED$ac_delim
28293_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028295 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 +000028296 break
28297 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028298 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28299echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028300 { (exit 1); exit 1; }; }
28301 else
28302 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028303 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028304done
28305
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028306ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28307if test -n "$ac_eof"; then
28308 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28309 ac_eof=`expr $ac_eof + 1`
28310fi
28311
28312cat >>$CONFIG_STATUS <<_ACEOF
28313cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28314/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028315_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028316sed '
28317s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28318s/^/s,@/; s/!/@,|#_!!_#|/
28319:n
28320t n
28321s/'"$ac_delim"'$/,g/; t
28322s/$/\\/; p
28323N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28324' >>$CONFIG_STATUS <conf$$subs.sed
28325rm -f conf$$subs.sed
28326cat >>$CONFIG_STATUS <<_ACEOF
28327CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028328_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028329
28330
28331ac_delim='%!_!# '
28332for ac_last_try in false false false false false :; do
28333 cat >conf$$subs.sed <<_ACEOF
28334LINKFORSHARED!$LINKFORSHARED$ac_delim
28335CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28336SHLIBS!$SHLIBS$ac_delim
28337USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28338SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28339USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28340LDLAST!$LDLAST$ac_delim
28341THREADOBJ!$THREADOBJ$ac_delim
28342DLINCLDIR!$DLINCLDIR$ac_delim
28343DYNLOADFILE!$DYNLOADFILE$ac_delim
28344MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28345TRUE!$TRUE$ac_delim
28346LIBOBJS!$LIBOBJS$ac_delim
28347HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28348HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28349HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28350HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28351HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28352LIBM!$LIBM$ac_delim
28353LIBC!$LIBC$ac_delim
28354UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28355THREADHEADERS!$THREADHEADERS$ac_delim
28356SRCDIRS!$SRCDIRS$ac_delim
28357LTLIBOBJS!$LTLIBOBJS$ac_delim
28358_ACEOF
28359
28360 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
28361 break
28362 elif $ac_last_try; then
28363 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28364echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028365 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028366 else
28367 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28368 fi
28369done
28370
28371ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28372if test -n "$ac_eof"; then
28373 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28374 ac_eof=`expr $ac_eof + 1`
28375fi
28376
28377cat >>$CONFIG_STATUS <<_ACEOF
28378cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28379/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028380_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028381sed '
28382s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28383s/^/s,@/; s/!/@,|#_!!_#|/
28384:n
28385t n
28386s/'"$ac_delim"'$/,g/; t
28387s/$/\\/; p
28388N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28389' >>$CONFIG_STATUS <conf$$subs.sed
28390rm -f conf$$subs.sed
28391cat >>$CONFIG_STATUS <<_ACEOF
28392:end
28393s/|#_!!_#|//g
28394CEOF$ac_eof
28395_ACEOF
28396
Martin v. Löwiseba40652007-08-30 20:10:57 +000028397
28398# VPATH may cause trouble with some makes, so we remove $(srcdir),
28399# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28400# trailing colons and then remove the whole line if VPATH becomes empty
28401# (actually we leave an empty line to preserve line numbers).
28402if test "x$srcdir" = x.; then
28403 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28404s/:*\$(srcdir):*/:/
28405s/:*\${srcdir}:*/:/
28406s/:*@srcdir@:*/:/
28407s/^\([^=]*=[ ]*\):*/\1/
28408s/:*$//
28409s/^[^=]*=[ ]*$//
28410}'
28411fi
28412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028413cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028414fi # test -n "$CONFIG_FILES"
28415
Martin v. Löwiseba40652007-08-30 20:10:57 +000028416
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028417for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028418do
28419 case $ac_tag in
28420 :[FHLC]) ac_mode=$ac_tag; continue;;
28421 esac
28422 case $ac_mode$ac_tag in
28423 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028424 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28425echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028426 { (exit 1); exit 1; }; };;
28427 :[FH]-) ac_tag=-:-;;
28428 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28429 esac
28430 ac_save_IFS=$IFS
28431 IFS=:
28432 set x $ac_tag
28433 IFS=$ac_save_IFS
28434 shift
28435 ac_file=$1
28436 shift
28437
28438 case $ac_mode in
28439 :L) ac_source=$1;;
28440 :[FH])
28441 ac_file_inputs=
28442 for ac_f
28443 do
28444 case $ac_f in
28445 -) ac_f="$tmp/stdin";;
28446 *) # Look for the file first in the build tree, then in the source tree
28447 # (if the path is not absolute). The absolute path cannot be DOS-style,
28448 # because $ac_f cannot contain `:'.
28449 test -f "$ac_f" ||
28450 case $ac_f in
28451 [\\/$]*) false;;
28452 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28453 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028454 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28455echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028456 { (exit 1); exit 1; }; };;
28457 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028458 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028459 done
28460
28461 # Let's still pretend it is `configure' which instantiates (i.e., don't
28462 # use $as_me), people would be surprised to read:
28463 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028464 configure_input="Generated from "`IFS=:
28465 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028466 if test x"$ac_file" != x-; then
28467 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028468 { echo "$as_me:$LINENO: creating $ac_file" >&5
28469echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028470 fi
28471
28472 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028473 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028474 esac
28475 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028476 esac
28477
Martin v. Löwiseba40652007-08-30 20:10:57 +000028478 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028479$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028480 X"$ac_file" : 'X\(//\)[^/]' \| \
28481 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028482 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028483echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028484 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28485 s//\1/
28486 q
28487 }
28488 /^X\(\/\/\)[^/].*/{
28489 s//\1/
28490 q
28491 }
28492 /^X\(\/\/\)$/{
28493 s//\1/
28494 q
28495 }
28496 /^X\(\/\).*/{
28497 s//\1/
28498 q
28499 }
28500 s/.*/./; q'`
28501 { as_dir="$ac_dir"
28502 case $as_dir in #(
28503 -*) as_dir=./$as_dir;;
28504 esac
28505 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028506 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028507 while :; do
28508 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028509 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028510 *) as_qdir=$as_dir;;
28511 esac
28512 as_dirs="'$as_qdir' $as_dirs"
28513 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028514$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028515 X"$as_dir" : 'X\(//\)[^/]' \| \
28516 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028517 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028518echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028519 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28520 s//\1/
28521 q
28522 }
28523 /^X\(\/\/\)[^/].*/{
28524 s//\1/
28525 q
28526 }
28527 /^X\(\/\/\)$/{
28528 s//\1/
28529 q
28530 }
28531 /^X\(\/\).*/{
28532 s//\1/
28533 q
28534 }
28535 s/.*/./; q'`
28536 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028537 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028538 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028539 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28540echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028541 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028542 ac_builddir=.
28543
Martin v. Löwiseba40652007-08-30 20:10:57 +000028544case "$ac_dir" in
28545.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28546*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028547 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028548 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028549 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028550 case $ac_top_builddir_sub in
28551 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28552 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28553 esac ;;
28554esac
28555ac_abs_top_builddir=$ac_pwd
28556ac_abs_builddir=$ac_pwd$ac_dir_suffix
28557# for backward compatibility:
28558ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028559
28560case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028561 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028562 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028563 ac_top_srcdir=$ac_top_builddir_sub
28564 ac_abs_top_srcdir=$ac_pwd ;;
28565 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028566 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028567 ac_top_srcdir=$srcdir
28568 ac_abs_top_srcdir=$srcdir ;;
28569 *) # Relative name.
28570 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28571 ac_top_srcdir=$ac_top_build_prefix$srcdir
28572 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028573esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028574ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028575
Martin v. Löwis11437992002-04-12 09:54:03 +000028576
Martin v. Löwiseba40652007-08-30 20:10:57 +000028577 case $ac_mode in
28578 :F)
28579 #
28580 # CONFIG_FILE
28581 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028582
28583 case $INSTALL in
28584 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028585 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028586 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028587_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028588
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028589cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028590# If the template does not know about datarootdir, expand it.
28591# FIXME: This hack should be removed a few years after 2.60.
28592ac_datarootdir_hack=; ac_datarootdir_seen=
28593
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028594case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028595 p
28596 q
28597}
28598/@datadir@/p
28599/@docdir@/p
28600/@infodir@/p
28601/@localedir@/p
28602/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028603' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028604*datarootdir*) ac_datarootdir_seen=yes;;
28605*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028606 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28607echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028608_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028609cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028610 ac_datarootdir_hack='
28611 s&@datadir@&$datadir&g
28612 s&@docdir@&$docdir&g
28613 s&@infodir@&$infodir&g
28614 s&@localedir@&$localedir&g
28615 s&@mandir@&$mandir&g
28616 s&\\\${datarootdir}&$datarootdir&g' ;;
28617esac
28618_ACEOF
28619
28620# Neutralize VPATH when `$srcdir' = `.'.
28621# Shell code in configure.ac might set extrasub.
28622# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028623cat >>$CONFIG_STATUS <<_ACEOF
28624 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028625$extrasub
28626_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028627cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028628:t
28629/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028630s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028631s&@top_builddir@&$ac_top_builddir_sub&;t t
28632s&@srcdir@&$ac_srcdir&;t t
28633s&@abs_srcdir@&$ac_abs_srcdir&;t t
28634s&@top_srcdir@&$ac_top_srcdir&;t t
28635s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28636s&@builddir@&$ac_builddir&;t t
28637s&@abs_builddir@&$ac_abs_builddir&;t t
28638s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28639s&@INSTALL@&$ac_INSTALL&;t t
28640$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028641" $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 +000028642
Martin v. Löwiseba40652007-08-30 20:10:57 +000028643test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28644 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28645 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028646 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028647which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028648echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028649which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028650
Martin v. Löwiseba40652007-08-30 20:10:57 +000028651 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028652 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028653 -) cat "$tmp/out"; rm -f "$tmp/out";;
28654 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28655 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028656 ;;
28657 :H)
28658 #
28659 # CONFIG_HEADER
28660 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028661_ACEOF
28662
28663# Transform confdefs.h into a sed script `conftest.defines', that
28664# substitutes the proper values into config.h.in to produce config.h.
28665rm -f conftest.defines conftest.tail
28666# First, append a space to every undef/define line, to ease matching.
28667echo 's/$/ /' >conftest.defines
28668# Then, protect against being on the right side of a sed subst, or in
28669# an unquoted here document, in config.status. If some macros were
28670# called several times there might be several #defines for the same
28671# symbol, which is useless. But do not sort them, since the last
28672# AC_DEFINE must be honored.
28673ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28674# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28675# NAME is the cpp macro being defined, VALUE is the value it is being given.
28676# PARAMS is the parameter list in the macro definition--in most cases, it's
28677# just an empty string.
28678ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28679ac_dB='\\)[ (].*,\\1define\\2'
28680ac_dC=' '
28681ac_dD=' ,'
28682
28683uniq confdefs.h |
28684 sed -n '
28685 t rset
28686 :rset
28687 s/^[ ]*#[ ]*define[ ][ ]*//
28688 t ok
28689 d
28690 :ok
28691 s/[\\&,]/\\&/g
28692 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28693 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28694 ' >>conftest.defines
28695
28696# Remove the space that was appended to ease matching.
28697# Then replace #undef with comments. This is necessary, for
28698# example, in the case of _POSIX_SOURCE, which is predefined and required
28699# on some systems where configure will not decide to define it.
28700# (The regexp can be short, since the line contains either #define or #undef.)
28701echo 's/ $//
28702s,^[ #]*u.*,/* & */,' >>conftest.defines
28703
28704# Break up conftest.defines:
28705ac_max_sed_lines=50
28706
28707# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28708# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28709# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28710# et cetera.
28711ac_in='$ac_file_inputs'
28712ac_out='"$tmp/out1"'
28713ac_nxt='"$tmp/out2"'
28714
28715while :
28716do
28717 # Write a here document:
28718 cat >>$CONFIG_STATUS <<_ACEOF
28719 # First, check the format of the line:
28720 cat >"\$tmp/defines.sed" <<\\CEOF
28721/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28722/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28723b
28724:def
28725_ACEOF
28726 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28727 echo 'CEOF
28728 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28729 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28730 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28731 grep . conftest.tail >/dev/null || break
28732 rm -f conftest.defines
28733 mv conftest.tail conftest.defines
28734done
28735rm -f conftest.defines conftest.tail
28736
28737echo "ac_result=$ac_in" >>$CONFIG_STATUS
28738cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028739 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028740 echo "/* $configure_input */" >"$tmp/config.h"
28741 cat "$ac_result" >>"$tmp/config.h"
28742 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28743 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28744echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028745 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028746 rm -f $ac_file
28747 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028748 fi
28749 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028750 echo "/* $configure_input */"
28751 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028752 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028753 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028754 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028755
Martin v. Löwiseba40652007-08-30 20:10:57 +000028756
28757 esac
28758
28759done # for ac_tag
28760
Guido van Rossum627b2d71993-12-24 10:39:16 +000028761
Martin v. Löwis11437992002-04-12 09:54:03 +000028762{ (exit 0); exit 0; }
28763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028764chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028765ac_clean_files=$ac_clean_files_save
28766
28767
28768# configure is writing to config.log, and then calls config.status.
28769# config.status does its own redirection, appending to config.log.
28770# Unfortunately, on DOS this fails, as config.log is still kept open
28771# by configure, so config.status won't be able to write to it; its
28772# output is simply discarded. So we exec the FD to /dev/null,
28773# effectively closing config.log, so it can be properly (re)opened and
28774# appended to by config.status. When coming back to configure, we
28775# need to make the FD available again.
28776if test "$no_create" != yes; then
28777 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028778 ac_config_status_args=
28779 test "$silent" = yes &&
28780 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028781 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028782 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028783 exec 5>>config.log
28784 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28785 # would make configure fail if this is the last instruction.
28786 $ac_cs_success || { (exit 1); exit 1; }
28787fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028788
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028789
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028790echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028791if test ! -f Modules/Setup
28792then
28793 cp $srcdir/Modules/Setup.dist Modules/Setup
28794fi
28795
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028796echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028797if test ! -f Modules/Setup.local
28798then
28799 echo "# Edit this file for local setup changes" >Modules/Setup.local
28800fi
28801
28802echo "creating Makefile"
28803$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28804 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028805 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000028806
28807case $ac_sys_system in
28808BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028809 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028810
28811 Support for BeOS is deprecated as of Python 2.6.
28812 See PEP 11 for the gory details.
28813 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028814echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028815
28816 Support for BeOS is deprecated as of Python 2.6.
28817 See PEP 11 for the gory details.
28818 " >&2;}
28819 ;;
28820*) ;;
28821esac
28822
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028823mv config.c Modules