blob: 9d9252600b550e689452098a88ff2c8b480f520f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren25967582009-09-06 10:00:26 +00002# From configure.in Revision: 74667 .
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",
1339 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001340 --with-framework-name=FRAMEWORK
1341 specify an alternate name of the framework built
1342 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001344 --with-cxx-main=<compiler>
1345 compile main() and link python executable with C++
1346 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-suffix=.exe set executable suffix
1348 --with-pydebug build with Py_DEBUG defined
1349 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001350 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001351 --with-dbmliborder=db1:db2:...
1352 order to check db backends for dbm. Valid value is a
1353 colon separated string with the backend names
1354 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with-signal-module disable/enable signal module
1356 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1357 --with(out)-threads[=DIRECTORY]
1358 disable/enable thread support
1359 --with(out)-thread[=DIRECTORY]
1360 deprecated; use --with(out)-threads
1361 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001363 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with(out)-pymalloc disable/enable specialized mallocs
1365 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001366 --with-fpectl enable SIGFPE catching
1367 --with-libm=STRING math library
1368 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Some influential environment variables:
1371 CC C compiler command
1372 CFLAGS C compiler flags
1373 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1374 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001375 LIBS libraries to pass to the linker, e.g. -l<library>
1376 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1377 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 CPP C preprocessor
1379
1380Use these variables to override the choices made by `configure' or to help
1381it to find libraries and programs with nonstandard names/locations.
1382
Georg Brandl464432d2009-05-20 18:24:08 +00001383Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi
1387
1388if test "$ac_init_help" = "recursive"; then
1389 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001391 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 ac_builddir=.
1393
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001397 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001399 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 case $ac_top_builddir_sub in
1401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403 esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 ac_top_srcdir=$ac_top_builddir_sub
1414 ac_abs_top_srcdir=$ac_pwd ;;
1415 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 ac_top_srcdir=$srcdir
1418 ac_abs_top_srcdir=$srcdir ;;
1419 *) # Relative name.
1420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421 ac_top_srcdir=$ac_top_build_prefix$srcdir
1422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001423esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001425
Martin v. Löwiseba40652007-08-30 20:10:57 +00001426 cd "$ac_dir" || { ac_status=$?; continue; }
1427 # Check for guested configure.
1428 if test -f "$ac_srcdir/configure.gnu"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431 elif test -f "$ac_srcdir/configure"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001435 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001436 fi || ac_status=$?
1437 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 done
1439fi
1440
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001442if $ac_init_version; then
1443 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001444python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001445generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014482002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This configure script is free software; the Free Software Foundation
1450gives unlimited permission to copy, distribute and modify it.
1451_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This file contains any messages produced by compilers while
1456running configure, to aid debugging if configure makes a mistake.
1457
Martin v. Löwis174440b2008-10-03 08:59:41 +00001458It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001459generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
1461 $ $0 $@
1462
1463_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001464exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001465{
1466cat <<_ASUNAME
1467## --------- ##
1468## Platform. ##
1469## --------- ##
1470
1471hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1472uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1478/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1479
1480/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1481/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001483/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001484/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1485/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1486/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1487
1488_ASUNAME
1489
1490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491for as_dir in $PATH
1492do
1493 IFS=$as_save_IFS
1494 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001495 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499} >&5
1500
1501cat >&5 <<_ACEOF
1502
1503
1504## ----------- ##
1505## Core tests. ##
1506## ----------- ##
1507
1508_ACEOF
1509
1510
1511# Keep a trace of the command line.
1512# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_configure_args0=
1518ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_must_keep_next=false
1520for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001521do
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 for ac_arg
1523 do
1524 case $ac_arg in
1525 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527 | -silent | --silent | --silen | --sile | --sil)
1528 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001529 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001530 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001531 esac
1532 case $ac_pass in
1533 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1534 2)
1535 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1536 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 case $ac_arg in
1540 *=* | --config-cache | -C | -disable-* | --disable-* \
1541 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1542 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1543 | -with-* | --with-* | -without-* | --without-* | --x)
1544 case "$ac_configure_args0 " in
1545 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1546 esac
1547 ;;
1548 -* ) ac_must_keep_next=true ;;
1549 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 ;;
1553 esac
1554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001555done
Skip Montanaro6dead952003-09-25 14:50:04 +00001556$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1557$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
1559# When interrupted or exit'd, cleanup temporary files, and complete
1560# config.log. We remove comments because anyway the quotes in there
1561# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562# WARNING: Use '\'' to represent an apostrophe within the trap.
1563# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001564trap 'exit_status=$?
1565 # Save into config.log some information that might help in debugging.
1566 {
1567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001568
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 cat <<\_ASBOX
1570## ---------------- ##
1571## Cache variables. ##
1572## ---------------- ##
1573_ASBOX
1574 echo
1575 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576(
1577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578 eval ac_val=\$$ac_var
1579 case $ac_val in #(
1580 *${as_nl}*)
1581 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001582 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac
1585 case $ac_var in #(
1586 _ | IFS | as_nl) ;; #(
1587 *) $as_unset $ac_var ;;
1588 esac ;;
1589 esac
1590 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1593 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 "s/'\''/'\''\\\\'\'''\''/g;
1596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1597 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001598 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001600 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 esac |
1602 sort
1603)
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001605
1606 cat <<\_ASBOX
1607## ----------------- ##
1608## Output variables. ##
1609## ----------------- ##
1610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_vars
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001617 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621
1622 if test -n "$ac_subst_files"; then
1623 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001624## ------------------- ##
1625## File substitutions. ##
1626## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001627_ASBOX
1628 echo
1629 for ac_var in $ac_subst_files
1630 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001631 eval ac_val=\$$ac_var
1632 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001635 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001636 done | sort
1637 echo
1638 fi
1639
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 if test -s confdefs.h; then
1641 cat <<\_ASBOX
1642## ----------- ##
1643## confdefs.h. ##
1644## ----------- ##
1645_ASBOX
1646 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 echo
1649 fi
1650 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001651 echo "$as_me: caught signal $ac_signal"
1652 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001654 rm -f core *.core core.conftest.* &&
1655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001658for ac_signal in 1 2 13 15; do
1659 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1660done
1661ac_signal=0
1662
1663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
1666# Predefined preprocessor variables.
1667
1668cat >>confdefs.h <<_ACEOF
1669#define PACKAGE_NAME "$PACKAGE_NAME"
1670_ACEOF
1671
1672
1673cat >>confdefs.h <<_ACEOF
1674#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1675_ACEOF
1676
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_VERSION "$PACKAGE_VERSION"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_STRING "$PACKAGE_STRING"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1690_ACEOF
1691
1692
1693# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001694# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001696 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001698 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700 set x "$ac_default_prefix/share/config.site" \
1701 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001703shift
1704for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001705do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1708echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 . "$ac_site_file"
1711 fi
1712done
1713
1714if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 # Some versions of bash will fail to source /dev/null (special
1716 # files actually), so we avoid doing that.
1717 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001718 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1719echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 esac
1724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001726 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1727echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 >$cache_file
1729fi
1730
1731# Check that the precious variables saved in the cache have kept the same
1732# value.
1733ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1736 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 case $ac_old_set,$ac_new_set in
1740 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1746echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 ac_cache_corrupted=: ;;
1748 ,);;
1749 *)
1750 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1752echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1753 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1754echo "$as_me: former value: $ac_old_val" >&2;}
1755 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1756echo "$as_me: current value: $ac_new_val" >&2;}
1757 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 fi;;
1759 esac
1760 # Pass precious variables to config.status.
1761 if test "$ac_new_set" = set; then
1762 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001763 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 *) ac_arg=$ac_var=$ac_new_val ;;
1765 esac
1766 case " $ac_configure_args " in
1767 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1768 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1769 esac
1770 fi
1771done
1772if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001773 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1774echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1775 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1776echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
1779
Martin v. Löwiseba40652007-08-30 20:10:57 +00001780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810
Michael W. Hudson54241132001-12-07 15:38:26 +00001811
Martin v. Löwiseba40652007-08-30 20:10:57 +00001812ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
Georg Brandlbcd64a32009-03-31 21:45:18 +00001816if test "$prefix" != "/"; then
1817 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1818fi
1819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
1822
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001823
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001824
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001825# We don't use PACKAGE_ variables, and they cause conflicts
1826# with other autoconf-based packages that include Python.h
1827grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1828rm confdefs.h
1829mv confdefs.h.new confdefs.h
1830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Martin v. Löwis174440b2008-10-03 08:59:41 +00001832VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001833
Martin v. Löwis1142de32002-03-29 16:28:31 +00001834
1835SOVERSION=1.0
1836
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001837# The later defininition of _XOPEN_SOURCE disables certain features
1838# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define _GNU_SOURCE 1
1842_ACEOF
1843
1844
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1847# them.
1848
1849cat >>confdefs.h <<\_ACEOF
1850#define _NETBSD_SOURCE 1
1851_ACEOF
1852
1853
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001854# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1855# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1856# them.
1857
1858cat >>confdefs.h <<\_ACEOF
1859#define __BSD_VISIBLE 1
1860_ACEOF
1861
1862
Martin v. Löwisd6320502004-08-12 13:45:08 +00001863# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1864# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1865
1866cat >>confdefs.h <<\_ACEOF
1867#define _BSD_TYPES 1
1868_ACEOF
1869
1870
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001871# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1872# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1873# them.
1874
1875cat >>confdefs.h <<\_ACEOF
1876#define _DARWIN_C_SOURCE 1
1877_ACEOF
1878
1879
1880
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001881define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001882
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001883# Arguments passed to configure.
1884
1885CONFIG_ARGS="$ac_configure_args"
1886
Martin v. Löwiseba40652007-08-30 20:10:57 +00001887# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001888if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001889 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001890 case $enableval in
1891 yes)
1892 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1893 ;;
1894 esac
1895 case $enableval in
1896 no)
1897 UNIVERSALSDK=
1898 enable_universalsdk=
1899 ;;
1900 *)
1901 UNIVERSALSDK=$enableval
1902 ;;
1903 esac
1904
1905else
1906
1907 UNIVERSALSDK=
1908 enable_universalsdk=
1909
Martin v. Löwiseba40652007-08-30 20:10:57 +00001910fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001911
1912
Martin v. Löwiseba40652007-08-30 20:10:57 +00001913
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001914
1915
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001916UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001917{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1918echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001919
1920# Check whether --with-universal-archs was given.
1921if test "${with_universal_archs+set}" = set; then
1922 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001923 { echo "$as_me:$LINENO: result: $withval" >&5
1924echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001925 UNIVERSAL_ARCHS="$withval"
1926
1927else
1928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001929 { echo "$as_me:$LINENO: result: 32-bit" >&5
1930echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001931
1932fi
1933
1934
1935
1936
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001937
1938# Check whether --with-framework-name was given.
1939if test "${with_framework_name+set}" = set; then
1940 withval=$with_framework_name;
1941 PYTHONFRAMEWORK=${withval}
1942 PYTHONFRAMEWORKDIR=${withval}.framework
1943 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1944
1945else
1946
1947 PYTHONFRAMEWORK=Python
1948 PYTHONFRAMEWORKDIR=Python.framework
1949 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1950
1951fi
1952
Martin v. Löwiseba40652007-08-30 20:10:57 +00001953# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001954if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001955 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001956 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001957 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001958 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001959 esac
1960 case $enableval in
1961 no)
1962 PYTHONFRAMEWORK=
1963 PYTHONFRAMEWORKDIR=no-framework
1964 PYTHONFRAMEWORKPREFIX=
1965 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001966 FRAMEWORKINSTALLFIRST=
1967 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001968 FRAMEWORKALTINSTALLFIRST=
1969 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001970 if test "x${prefix}" = "xNONE"; then
1971 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1972 else
1973 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1974 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001975 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001976 ;;
1977 *)
1978 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001979 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001980 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001981 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1982 if test "$UNIVERSAL_ARCHS" = "all"
1983 then
1984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001986 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001987 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001988 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1989 fi
1990
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001991 if test "x${prefix}" = "xNONE" ; then
1992 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1993 else
1994 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1995 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001996 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001997
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001998 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001999 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002000 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002001
Martin v. Löwiseba40652007-08-30 20:10:57 +00002002 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002003
Martin v. Löwiseba40652007-08-30 20:10:57 +00002004 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002005
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002006 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2007
2008 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2009
Jack Jansene578a632001-08-15 01:27:14 +00002010 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002011
Guido van Rossum563e7081996-09-10 18:20:48 +00002012else
Martin v. Löwis11437992002-04-12 09:54:03 +00002013
Jack Jansene578a632001-08-15 01:27:14 +00002014 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002015 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002016 PYTHONFRAMEWORKPREFIX=
2017 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002018 FRAMEWORKINSTALLFIRST=
2019 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002020 FRAMEWORKALTINSTALLFIRST=
2021 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002022 if test "x${prefix}" = "xNONE" ; then
2023 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2024 else
2025 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2026 fi
Jack Jansene578a632001-08-15 01:27:14 +00002027 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002028
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002029 if test "$UNIVERSAL_ARCHS" = "all"
2030 then
2031 FRAMEWORKINSTALLLAST=update4wayuniversal
2032 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2033 fi
2034
Martin v. Löwiseba40652007-08-30 20:10:57 +00002035fi
2036
Michael W. Hudson54241132001-12-07 15:38:26 +00002037
2038
2039
2040
Jack Jansene578a632001-08-15 01:27:14 +00002041
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002042
2043
Ronald Oussoren5b787322006-06-06 19:50:24 +00002044
2045
2046
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002047
Jack Jansene578a632001-08-15 01:27:14 +00002048##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002049## AC_HELP_STRING(--with-dyld,
2050## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002051##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052# Set name for machine-dependent library files
2053
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002054{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2055echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002056if test -z "$MACHDEP"
2057then
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002059 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002060 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002061 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002062 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002063 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002065 ac_md_system=`echo $ac_sys_system |
2066 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2067 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002068 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002069 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002070
Guido van Rossum07397971997-04-29 21:49:50 +00002071 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002072 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002073 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002074 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002075 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002076 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002077 esac
2078fi
Guido van Rossum91922671997-10-09 20:24:13 +00002079
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002080# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2081# disable features if it is defined, without any means to access these
2082# features as extensions. For these systems, we skip the definition of
2083# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2084# some feature, make sure there is no alternative way to access this
2085# feature. Also, when using wildcards, make sure you have verified the
2086# need for not defining _XOPEN_SOURCE on all systems matching the
2087# wildcard, and that the wildcard does not include future systems
2088# (which may remove their limitations).
2089case $ac_sys_system/$ac_sys_release in
2090 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2091 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002092 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002093 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002094 define_xopen_source=no
2095 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2096 # also defined. This can be overridden by defining _BSD_SOURCE
2097 # As this has a different meaning on Linux, only define it on OpenBSD
2098
2099cat >>confdefs.h <<\_ACEOF
2100#define _BSD_SOURCE 1
2101_ACEOF
2102
2103 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002104 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2105 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2106 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002107 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 +00002108 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002109 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2110 # of union __?sigval. Reported by Stuart Bishop.
2111 SunOS/5.6)
2112 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002113 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2114 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002115 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002116 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002117 define_xopen_source=no;;
2118 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002119 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002120 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002121 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002122 # On FreeBSD 4, the math functions C89 does not cover are never defined
2123 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2124 FreeBSD/4.*)
2125 define_xopen_source=no;;
2126 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2127 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2128 # identifies itself as Darwin/7.*
2129 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2130 # disables platform specific features beyond repair.
2131 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2132 # has no effect, don't bother defining them
2133 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2136 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2137 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002138 AIX/4)
2139 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002140 AIX/5)
2141 if test `uname -r` -eq 1; then
2142 define_xopen_source=no
2143 fi
2144 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002145 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2146 # defining NI_NUMERICHOST.
2147 QNX/6.3.2)
2148 define_xopen_source=no
2149 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002150
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002151esac
2152
2153if test $define_xopen_source = yes
2154then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002155 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2156 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002157 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2158 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002159 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002160 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002161
2162cat >>confdefs.h <<\_ACEOF
2163#define _XOPEN_SOURCE 500
2164_ACEOF
2165
2166 ;;
2167 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002168
2169cat >>confdefs.h <<\_ACEOF
2170#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002171_ACEOF
2172
Skip Montanarof0d5f792004-08-15 14:08:23 +00002173 ;;
2174 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002175
2176 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2177 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2178 # several APIs are not declared. Since this is also needed in some
2179 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002180 # except for Solaris 10, where it must not be defined,
2181 # as it implies XPG4.2
2182 case $ac_sys_system/$ac_sys_release in
2183 SunOS/5.10)
2184 ;;
2185 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002186
2187cat >>confdefs.h <<\_ACEOF
2188#define _XOPEN_SOURCE_EXTENDED 1
2189_ACEOF
2190
Martin v. Löwis7dece662005-11-26 11:38:24 +00002191 ;;
2192 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002193
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002194
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002195cat >>confdefs.h <<\_ACEOF
2196#define _POSIX_C_SOURCE 200112L
2197_ACEOF
2198
2199
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002200fi
2201
Guido van Rossum91922671997-10-09 20:24:13 +00002202#
2203# SGI compilers allow the specification of the both the ABI and the
2204# ISA on the command line. Depending on the values of these switches,
2205# different and often incompatable code will be generated.
2206#
2207# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2208# thus supply support for various ABI/ISA combinations. The MACHDEP
2209# variable is also adjusted.
2210#
2211
2212if test ! -z "$SGI_ABI"
2213then
2214 CC="cc $SGI_ABI"
2215 LDFLAGS="$SGI_ABI $LDFLAGS"
2216 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2217fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002218{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2219echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002220
Jack Jansen83f898c2002-12-30 22:23:40 +00002221# And add extra plat-mac for darwin
2222
Jack Jansen7b59b422003-03-17 15:44:10 +00002223
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002224{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2225echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002226if test -z "$EXTRAPLATDIR"
2227then
2228 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002229 darwin)
2230 EXTRAPLATDIR="\$(PLATMACDIRS)"
2231 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2232 ;;
2233 *)
2234 EXTRAPLATDIR=""
2235 EXTRAMACHDEPPATH=""
2236 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002237 esac
2238fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002239{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2240echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002241
Jack Jansen6b08a402004-06-03 12:41:45 +00002242# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2243# it may influence the way we can build extensions, so distutils
2244# needs to check it
2245
Ronald Oussoren988117f2006-04-29 11:31:35 +00002246
Jack Jansen6b08a402004-06-03 12:41:45 +00002247CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002248EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002250{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2251echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002252ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002253{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2254echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002255
Guido van Rossum627b2d71993-12-24 10:39:16 +00002256# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002257
2258# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2259# for debug/optimization stuff. BASECFLAGS is for flags that are required
2260# just to get things to compile and link. Users are free to override OPT
2261# when running configure or make. The build should not break if they do.
2262# BASECFLAGS should generally not be messed with, however.
2263
2264# XXX shouldn't some/most/all of this code be merged with the stuff later
2265# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002266{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2267echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002268
Martin v. Löwiseba40652007-08-30 20:10:57 +00002269# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002270if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002271 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002272 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002273 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002274 without_gcc=yes;;
2275 yes) CC=gcc
2276 without_gcc=no;;
2277 *) CC=$withval
2278 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002279 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002280else
Martin v. Löwis11437992002-04-12 09:54:03 +00002281
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002282 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002283 AIX*) CC=cc_r
2284 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002285 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002286 case $BE_HOST_CPU in
2287 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002288 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002289 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002290 BASECFLAGS="$BASECFLAGS -export pragma"
2291 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002292 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 ;;
2294 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002295 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002296 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002297 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002298 ;;
2299 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002300 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2301echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002302 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002303 ;;
2304 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002305 AR="\$(srcdir)/Modules/ar_beos"
2306 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002307 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002308 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002309 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002310fi
2311
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002312{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2313echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002314
Guido van Rossum8b131c51995-03-09 14:10:13 +00002315# If the user switches compilers, we can't believe the cache
2316if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2317then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002318 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002319(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002320echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002321(it is also a good idea to do 'make clean' before compiling)" >&2;}
2322 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002323fi
2324
Martin v. Löwis11437992002-04-12 09:54:03 +00002325ac_ext=c
2326ac_cpp='$CPP $CPPFLAGS'
2327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2329ac_compiler_gnu=$ac_cv_c_compiler_gnu
2330if test -n "$ac_tool_prefix"; then
2331 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2332set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002333{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002335if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002336 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002337else
2338 if test -n "$CC"; then
2339 ac_cv_prog_CC="$CC" # Let the user override the test.
2340else
Martin v. Löwis11437992002-04-12 09:54:03 +00002341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2342for as_dir in $PATH
2343do
2344 IFS=$as_save_IFS
2345 test -z "$as_dir" && as_dir=.
2346 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002347 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 +00002348 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002349 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 break 2
2351 fi
2352done
2353done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002354IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
Jack Jansendd19cf82001-12-06 22:36:17 +00002356fi
2357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002358CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002359if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002360 { echo "$as_me:$LINENO: result: $CC" >&5
2361echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002363 { echo "$as_me:$LINENO: result: no" >&5
2364echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002365fi
2366
Martin v. Löwiseba40652007-08-30 20:10:57 +00002367
Martin v. Löwis11437992002-04-12 09:54:03 +00002368fi
2369if test -z "$ac_cv_prog_CC"; then
2370 ac_ct_CC=$CC
2371 # Extract the first word of "gcc", so it can be a program name with args.
2372set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002373{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2374echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002375if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002376 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002377else
2378 if test -n "$ac_ct_CC"; then
2379 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2380else
2381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2382for as_dir in $PATH
2383do
2384 IFS=$as_save_IFS
2385 test -z "$as_dir" && as_dir=.
2386 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002387 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 +00002388 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002389 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002390 break 2
2391 fi
2392done
2393done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396fi
2397fi
2398ac_ct_CC=$ac_cv_prog_ac_ct_CC
2399if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002400 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2401echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002403 { echo "$as_me:$LINENO: result: no" >&5
2404echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002405fi
2406
Martin v. Löwiseba40652007-08-30 20:10:57 +00002407 if test "x$ac_ct_CC" = x; then
2408 CC=""
2409 else
2410 case $cross_compiling:$ac_tool_warned in
2411yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002412{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2413whose name does not start with the host triplet. If you think this
2414configuration is useful to you, please write to autoconf@gnu.org." >&5
2415echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2416whose name does not start with the host triplet. If you think this
2417configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002418ac_tool_warned=yes ;;
2419esac
2420 CC=$ac_ct_CC
2421 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002422else
2423 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002424fi
2425
Jack Jansendd19cf82001-12-06 22:36:17 +00002426if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002427 if test -n "$ac_tool_prefix"; then
2428 # 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 +00002429set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002430{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2431echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002432if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002433 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002434else
2435 if test -n "$CC"; then
2436 ac_cv_prog_CC="$CC" # Let the user override the test.
2437else
Martin v. Löwis11437992002-04-12 09:54:03 +00002438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2439for as_dir in $PATH
2440do
2441 IFS=$as_save_IFS
2442 test -z "$as_dir" && as_dir=.
2443 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002444 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 +00002445 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002446 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 break 2
2448 fi
2449done
2450done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002451IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453fi
2454fi
2455CC=$ac_cv_prog_CC
2456if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002457 { echo "$as_me:$LINENO: result: $CC" >&5
2458echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002459else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002460 { echo "$as_me:$LINENO: result: no" >&5
2461echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002462fi
2463
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002466fi
2467if test -z "$CC"; then
2468 # Extract the first word of "cc", so it can be a program name with args.
2469set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002470{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2471echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002472if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002473 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002474else
2475 if test -n "$CC"; then
2476 ac_cv_prog_CC="$CC" # Let the user override the test.
2477else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002478 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2480for as_dir in $PATH
2481do
2482 IFS=$as_save_IFS
2483 test -z "$as_dir" && as_dir=.
2484 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485 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 +00002486 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2487 ac_prog_rejected=yes
2488 continue
2489 fi
2490 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002491 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 break 2
2493 fi
2494done
2495done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002496IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002497
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498if test $ac_prog_rejected = yes; then
2499 # We found a bogon in the path, so make sure we never use it.
2500 set dummy $ac_cv_prog_CC
2501 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002503 # We chose a different compiler from the bogus one.
2504 # However, it has the same basename, so the bogon will be chosen
2505 # first if we set CC to just the basename; use the full file name.
2506 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002508 fi
2509fi
2510fi
2511fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002512CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002513if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002514 { echo "$as_me:$LINENO: result: $CC" >&5
2515echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002516else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002517 { echo "$as_me:$LINENO: result: no" >&5
2518echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002519fi
2520
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522fi
2523if test -z "$CC"; then
2524 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002525 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 do
2527 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2528set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002529{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2530echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002531if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002532 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002533else
2534 if test -n "$CC"; then
2535 ac_cv_prog_CC="$CC" # Let the user override the test.
2536else
Martin v. Löwis11437992002-04-12 09:54:03 +00002537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2538for as_dir in $PATH
2539do
2540 IFS=$as_save_IFS
2541 test -z "$as_dir" && as_dir=.
2542 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543 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 +00002544 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002545 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002547 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
2552fi
2553fi
2554CC=$ac_cv_prog_CC
2555if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002556 { echo "$as_me:$LINENO: result: $CC" >&5
2557echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002558else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002559 { echo "$as_me:$LINENO: result: no" >&5
2560echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002561fi
2562
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 test -n "$CC" && break
2565 done
2566fi
2567if test -z "$CC"; then
2568 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002569 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002570do
2571 # Extract the first word of "$ac_prog", so it can be a program name with args.
2572set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002573{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2574echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002575if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002576 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002577else
2578 if test -n "$ac_ct_CC"; then
2579 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2580else
2581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2582for as_dir in $PATH
2583do
2584 IFS=$as_save_IFS
2585 test -z "$as_dir" && as_dir=.
2586 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 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 +00002588 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002589 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 break 2
2591 fi
2592done
2593done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596fi
2597fi
2598ac_ct_CC=$ac_cv_prog_ac_ct_CC
2599if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002600 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2601echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 { echo "$as_me:$LINENO: result: no" >&5
2604echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002605fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002606
Martin v. Löwiseba40652007-08-30 20:10:57 +00002607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 test -n "$ac_ct_CC" && break
2609done
Michael W. Hudson54241132001-12-07 15:38:26 +00002610
Martin v. Löwiseba40652007-08-30 20:10:57 +00002611 if test "x$ac_ct_CC" = x; then
2612 CC=""
2613 else
2614 case $cross_compiling:$ac_tool_warned in
2615yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002616{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2617whose name does not start with the host triplet. If you think this
2618configuration is useful to you, please write to autoconf@gnu.org." >&5
2619echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2620whose name does not start with the host triplet. If you think this
2621configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002622ac_tool_warned=yes ;;
2623esac
2624 CC=$ac_ct_CC
2625 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002626fi
2627
2628fi
2629
2630
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002631test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002632See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002633echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002634See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002635 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002636
2637# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002638echo "$as_me:$LINENO: checking for C compiler version" >&5
2639ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640{ (ac_try="$ac_compiler --version >&5"
2641case "(($ac_try" in
2642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2643 *) ac_try_echo=$ac_try;;
2644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650{ (ac_try="$ac_compiler -v >&5"
2651case "(($ac_try" in
2652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2653 *) ac_try_echo=$ac_try;;
2654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002656 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660{ (ac_try="$ac_compiler -V >&5"
2661case "(($ac_try" in
2662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2663 *) ac_try_echo=$ac_try;;
2664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002666 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 (exit $ac_status); }
2670
2671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002672/* confdefs.h. */
2673_ACEOF
2674cat confdefs.h >>conftest.$ac_ext
2675cat >>conftest.$ac_ext <<_ACEOF
2676/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678int
2679main ()
2680{
2681
2682 ;
2683 return 0;
2684}
2685_ACEOF
2686ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002687ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002688# Try to create an executable without -o first, disregard a.out.
2689# It will help us diagnose broken compilers, and finding out an intuition
2690# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002691{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2692echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2693ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2694#
2695# List of possible output files, starting from the most likely.
2696# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2697# only as a last resort. b.out is created by i960 compilers.
2698ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2699#
2700# The IRIX 6 linker writes into existing files which may not be
2701# executable, retaining their permissions. Remove them first so a
2702# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703ac_rmfiles=
2704for ac_file in $ac_files
2705do
2706 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002707 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002708 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2709 esac
2710done
2711rm -f $ac_rmfiles
2712
2713if { (ac_try="$ac_link_default"
2714case "(($ac_try" in
2715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716 *) ac_try_echo=$ac_try;;
2717esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002719 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2724# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2725# in a Makefile. We should not override ac_cv_exeext if it was cached,
2726# so that the user can short-circuit this test for compilers unknown to
2727# Autoconf.
2728for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002729do
2730 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002732 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002734 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 # We found the default executable, but exeext='' is most
2736 # certainly right.
2737 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002738 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002739 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2740 then :; else
2741 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2742 fi
2743 # We set ac_cv_exeext here because the later test for it is not
2744 # safe: cross compilers may not add the suffix if given an `-o'
2745 # argument, so we may need to know it at that point already.
2746 # Even if this section looks crufty: it has the advantage of
2747 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002748 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002750 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 esac
2752done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002753test "$ac_cv_exeext" = no && ac_cv_exeext=
2754
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002755else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002756 ac_file=''
2757fi
2758
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002759{ echo "$as_me:$LINENO: result: $ac_file" >&5
2760echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002761if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002763sed 's/^/| /' conftest.$ac_ext >&5
2764
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002765{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002766See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002767echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002768See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002769 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002770fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002771
Martin v. Löwis11437992002-04-12 09:54:03 +00002772ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002773
Martin v. Löwiseba40652007-08-30 20:10:57 +00002774# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002775# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002776{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2777echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002778# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2779# If not cross compiling, check that we can run a simple program.
2780if test "$cross_compiling" != yes; then
2781 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002782 { (case "(($ac_try" in
2783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2784 *) ac_try_echo=$ac_try;;
2785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002787 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 (exit $ac_status); }; }; then
2791 cross_compiling=no
2792 else
2793 if test "$cross_compiling" = maybe; then
2794 cross_compiling=yes
2795 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002796 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002797If you meant to cross compile, use \`--host'.
2798See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002799echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002800If you meant to cross compile, use \`--host'.
2801See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002802 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002803 fi
2804 fi
2805fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002806{ echo "$as_me:$LINENO: result: yes" >&5
2807echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002808
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002809rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002810ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002811# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002812# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002813{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2814echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2815{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2816echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002818{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2819echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002820if { (ac_try="$ac_link"
2821case "(($ac_try" in
2822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2823 *) ac_try_echo=$ac_try;;
2824esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002826 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 (exit $ac_status); }; then
2830 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2831# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2832# work properly (i.e., refer to `conftest.exe'), while it won't with
2833# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002834for ac_file in conftest.exe conftest conftest.*; do
2835 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002837 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002839 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 * ) break;;
2841 esac
2842done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002843else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002844 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002845See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002846echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002847See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002848 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002849fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002850
Martin v. Löwis11437992002-04-12 09:54:03 +00002851rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002852{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2853echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002854
2855rm -f conftest.$ac_ext
2856EXEEXT=$ac_cv_exeext
2857ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2859echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002860if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002861 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002862else
Martin v. Löwis11437992002-04-12 09:54:03 +00002863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002864/* confdefs.h. */
2865_ACEOF
2866cat confdefs.h >>conftest.$ac_ext
2867cat >>conftest.$ac_ext <<_ACEOF
2868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002869
Martin v. Löwis11437992002-04-12 09:54:03 +00002870int
2871main ()
2872{
2873
2874 ;
2875 return 0;
2876}
2877_ACEOF
2878rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002879if { (ac_try="$ac_compile"
2880case "(($ac_try" in
2881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2882 *) ac_try_echo=$ac_try;;
2883esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002885 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002889 for ac_file in conftest.o conftest.obj conftest.*; do
2890 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002891 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002892 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002893 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2894 break;;
2895 esac
2896done
2897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002899sed 's/^/| /' conftest.$ac_ext >&5
2900
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002901{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002902See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002903echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002904See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002905 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002906fi
2907
2908rm -f conftest.$ac_cv_objext conftest.$ac_ext
2909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002910{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2911echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002912OBJEXT=$ac_cv_objext
2913ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002914{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2915echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002916if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002918else
2919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002920/* confdefs.h. */
2921_ACEOF
2922cat confdefs.h >>conftest.$ac_ext
2923cat >>conftest.$ac_ext <<_ACEOF
2924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002925
Martin v. Löwis11437992002-04-12 09:54:03 +00002926int
2927main ()
2928{
2929#ifndef __GNUC__
2930 choke me
2931#endif
2932
2933 ;
2934 return 0;
2935}
2936_ACEOF
2937rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002938if { (ac_try="$ac_compile"
2939case "(($ac_try" in
2940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2941 *) ac_try_echo=$ac_try;;
2942esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002946 grep -v '^ *+' conftest.er1 >conftest.err
2947 rm -f conftest.er1
2948 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002950 (exit $ac_status); } && {
2951 test -z "$ac_c_werror_flag" ||
2952 test ! -s conftest.err
2953 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 ac_compiler_gnu=yes
2955else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002957sed 's/^/| /' conftest.$ac_ext >&5
2958
Martin v. Löwiseba40652007-08-30 20:10:57 +00002959 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002961
2962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002963ac_cv_c_compiler_gnu=$ac_compiler_gnu
2964
2965fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002966{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2967echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2968GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002969ac_test_CFLAGS=${CFLAGS+set}
2970ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002971{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2972echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002973if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002975else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002976 ac_save_c_werror_flag=$ac_c_werror_flag
2977 ac_c_werror_flag=yes
2978 ac_cv_prog_cc_g=no
2979 CFLAGS="-g"
2980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002981/* confdefs.h. */
2982_ACEOF
2983cat confdefs.h >>conftest.$ac_ext
2984cat >>conftest.$ac_ext <<_ACEOF
2985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002986
Martin v. Löwis11437992002-04-12 09:54:03 +00002987int
2988main ()
2989{
2990
2991 ;
2992 return 0;
2993}
2994_ACEOF
2995rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002996if { (ac_try="$ac_compile"
2997case "(($ac_try" in
2998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2999 *) ac_try_echo=$ac_try;;
3000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003002 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003004 grep -v '^ *+' conftest.er1 >conftest.err
3005 rm -f conftest.er1
3006 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008 (exit $ac_status); } && {
3009 test -z "$ac_c_werror_flag" ||
3010 test ! -s conftest.err
3011 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003012 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003013else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003015sed 's/^/| /' conftest.$ac_ext >&5
3016
Martin v. Löwiseba40652007-08-30 20:10:57 +00003017 CFLAGS=""
3018 cat >conftest.$ac_ext <<_ACEOF
3019/* confdefs.h. */
3020_ACEOF
3021cat confdefs.h >>conftest.$ac_ext
3022cat >>conftest.$ac_ext <<_ACEOF
3023/* end confdefs.h. */
3024
3025int
3026main ()
3027{
3028
3029 ;
3030 return 0;
3031}
3032_ACEOF
3033rm -f conftest.$ac_objext
3034if { (ac_try="$ac_compile"
3035case "(($ac_try" in
3036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3037 *) ac_try_echo=$ac_try;;
3038esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003040 (eval "$ac_compile") 2>conftest.er1
3041 ac_status=$?
3042 grep -v '^ *+' conftest.er1 >conftest.err
3043 rm -f conftest.er1
3044 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003046 (exit $ac_status); } && {
3047 test -z "$ac_c_werror_flag" ||
3048 test ! -s conftest.err
3049 } && test -s conftest.$ac_objext; then
3050 :
3051else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003052 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003053sed 's/^/| /' conftest.$ac_ext >&5
3054
3055 ac_c_werror_flag=$ac_save_c_werror_flag
3056 CFLAGS="-g"
3057 cat >conftest.$ac_ext <<_ACEOF
3058/* confdefs.h. */
3059_ACEOF
3060cat confdefs.h >>conftest.$ac_ext
3061cat >>conftest.$ac_ext <<_ACEOF
3062/* end confdefs.h. */
3063
3064int
3065main ()
3066{
3067
3068 ;
3069 return 0;
3070}
3071_ACEOF
3072rm -f conftest.$ac_objext
3073if { (ac_try="$ac_compile"
3074case "(($ac_try" in
3075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3076 *) ac_try_echo=$ac_try;;
3077esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003079 (eval "$ac_compile") 2>conftest.er1
3080 ac_status=$?
3081 grep -v '^ *+' conftest.er1 >conftest.err
3082 rm -f conftest.er1
3083 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003085 (exit $ac_status); } && {
3086 test -z "$ac_c_werror_flag" ||
3087 test ! -s conftest.err
3088 } && test -s conftest.$ac_objext; then
3089 ac_cv_prog_cc_g=yes
3090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003091 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092sed 's/^/| /' conftest.$ac_ext >&5
3093
3094
Guido van Rossum627b2d71993-12-24 10:39:16 +00003095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003096
3097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099
3100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3101fi
3102
3103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3104 ac_c_werror_flag=$ac_save_c_werror_flag
3105fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003106{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3107echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003108if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003109 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003110elif test $ac_cv_prog_cc_g = yes; then
3111 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003112 CFLAGS="-g -O2"
3113 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003114 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003115 fi
3116else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003117 if test "$GCC" = yes; then
3118 CFLAGS="-O2"
3119 else
3120 CFLAGS=
3121 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003122fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003123{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3124echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003125if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003126 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003127else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003129ac_save_CC=$CC
3130cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003131/* confdefs.h. */
3132_ACEOF
3133cat confdefs.h >>conftest.$ac_ext
3134cat >>conftest.$ac_ext <<_ACEOF
3135/* end confdefs.h. */
3136#include <stdarg.h>
3137#include <stdio.h>
3138#include <sys/types.h>
3139#include <sys/stat.h>
3140/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3141struct buf { int x; };
3142FILE * (*rcsopen) (struct buf *, struct stat *, int);
3143static char *e (p, i)
3144 char **p;
3145 int i;
3146{
3147 return p[i];
3148}
3149static char *f (char * (*g) (char **, int), char **p, ...)
3150{
3151 char *s;
3152 va_list v;
3153 va_start (v,p);
3154 s = g (p, va_arg (v,int));
3155 va_end (v);
3156 return s;
3157}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003158
3159/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3160 function prototypes and stuff, but not '\xHH' hex character constants.
3161 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003162 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003163 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3164 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003165 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003166int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3167
Martin v. Löwiseba40652007-08-30 20:10:57 +00003168/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3169 inside strings and character constants. */
3170#define FOO(x) 'x'
3171int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3172
Skip Montanaro6dead952003-09-25 14:50:04 +00003173int test (int i, double x);
3174struct s1 {int (*f) (int a);};
3175struct s2 {int (*f) (double a);};
3176int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3177int argc;
3178char **argv;
3179int
3180main ()
3181{
3182return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3183 ;
3184 return 0;
3185}
3186_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3188 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003189do
3190 CC="$ac_save_CC $ac_arg"
3191 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003192if { (ac_try="$ac_compile"
3193case "(($ac_try" in
3194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3195 *) ac_try_echo=$ac_try;;
3196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003198 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003200 grep -v '^ *+' conftest.er1 >conftest.err
3201 rm -f conftest.er1
3202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204 (exit $ac_status); } && {
3205 test -z "$ac_c_werror_flag" ||
3206 test ! -s conftest.err
3207 } && test -s conftest.$ac_objext; then
3208 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003211sed 's/^/| /' conftest.$ac_ext >&5
3212
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213
Skip Montanaro6dead952003-09-25 14:50:04 +00003214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003215
3216rm -f core conftest.err conftest.$ac_objext
3217 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003218done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003219rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003220CC=$ac_save_CC
3221
3222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223# AC_CACHE_VAL
3224case "x$ac_cv_prog_cc_c89" in
3225 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003226 { echo "$as_me:$LINENO: result: none needed" >&5
3227echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003229 { echo "$as_me:$LINENO: result: unsupported" >&5
3230echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003231 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003232 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003233 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3234echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003235esac
3236
Skip Montanaro6dead952003-09-25 14:50:04 +00003237
Martin v. Löwis11437992002-04-12 09:54:03 +00003238ac_ext=c
3239ac_cpp='$CPP $CPPFLAGS'
3240ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3241ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3242ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003243
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003244
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003245
3246
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003247{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3248echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003249
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003251if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003252 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003253
3254 case $withval in
3255 no) with_cxx_main=no
3256 MAINCC='$(CC)';;
3257 yes) with_cxx_main=yes
3258 MAINCC='$(CXX)';;
3259 *) with_cxx_main=yes
3260 MAINCC=$withval
3261 if test -z "$CXX"
3262 then
3263 CXX=$withval
3264 fi;;
3265 esac
3266else
3267
3268 with_cxx_main=no
3269 MAINCC='$(CC)'
3270
Martin v. Löwiseba40652007-08-30 20:10:57 +00003271fi
3272
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003273{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3274echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003275
3276preset_cxx="$CXX"
3277if test -z "$CXX"
3278then
3279 case "$CC" in
3280 gcc) # Extract the first word of "g++", so it can be a program name with args.
3281set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003282{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003284if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003285 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003286else
3287 case $CXX in
3288 [\\/]* | ?:[\\/]*)
3289 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3290 ;;
3291 *)
3292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3293for as_dir in notfound
3294do
3295 IFS=$as_save_IFS
3296 test -z "$as_dir" && as_dir=.
3297 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003298 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 +00003299 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301 break 2
3302 fi
3303done
3304done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003305IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003306
3307 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3308 ;;
3309esac
3310fi
3311CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003312if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003313 { echo "$as_me:$LINENO: result: $CXX" >&5
3314echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003316 { echo "$as_me:$LINENO: result: no" >&5
3317echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003320 ;;
3321 cc) # Extract the first word of "c++", so it can be a program name with args.
3322set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003325if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003327else
3328 case $CXX in
3329 [\\/]* | ?:[\\/]*)
3330 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3331 ;;
3332 *)
3333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in notfound
3335do
3336 IFS=$as_save_IFS
3337 test -z "$as_dir" && as_dir=.
3338 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003339 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 +00003340 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003342 break 2
3343 fi
3344done
3345done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003347
3348 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3349 ;;
3350esac
3351fi
3352CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003353if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003354 { echo "$as_me:$LINENO: result: $CXX" >&5
3355echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003356else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003357 { echo "$as_me:$LINENO: result: no" >&5
3358echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003360
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003361 ;;
3362 esac
3363 if test "$CXX" = "notfound"
3364 then
3365 CXX=""
3366 fi
3367fi
3368if test -z "$CXX"
3369then
3370 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3371do
3372 # Extract the first word of "$ac_prog", so it can be a program name with args.
3373set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003374{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3375echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003376if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003378else
3379 if test -n "$CXX"; then
3380 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3381else
3382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3383for as_dir in $PATH
3384do
3385 IFS=$as_save_IFS
3386 test -z "$as_dir" && as_dir=.
3387 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003388 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 +00003389 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003390 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003391 break 2
3392 fi
3393done
3394done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003395IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003396
3397fi
3398fi
3399CXX=$ac_cv_prog_CXX
3400if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003401 { echo "$as_me:$LINENO: result: $CXX" >&5
3402echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003404 { echo "$as_me:$LINENO: result: no" >&5
3405echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003406fi
3407
Martin v. Löwiseba40652007-08-30 20:10:57 +00003408
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003409 test -n "$CXX" && break
3410done
3411test -n "$CXX" || CXX="notfound"
3412
3413 if test "$CXX" = "notfound"
3414 then
3415 CXX=""
3416 fi
3417fi
3418if test "$preset_cxx" != "$CXX"
3419then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003420 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003421
3422 By default, distutils will build C++ extension modules with \"$CXX\".
3423 If this is not intended, then set CXX on the configure command line.
3424 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003425echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003426
3427 By default, distutils will build C++ extension modules with \"$CXX\".
3428 If this is not intended, then set CXX on the configure command line.
3429 " >&2;}
3430fi
3431
3432
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003433# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003434
3435ac_ext=c
3436ac_cpp='$CPP $CPPFLAGS'
3437ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3438ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3439ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003440{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3441echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442# On Suns, sometimes $CPP names a directory.
3443if test -n "$CPP" && test -d "$CPP"; then
3444 CPP=
3445fi
3446if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003448 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003449else
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 # Double quotes because CPP needs to be expanded
3451 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3452 do
3453 ac_preproc_ok=false
3454for ac_c_preproc_warn_flag in '' yes
3455do
3456 # Use a header file that comes with gcc, so configuring glibc
3457 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003458 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3459 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003460 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 # not just through cpp. "Syntax error" is here to catch this case.
3462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003463/* confdefs.h. */
3464_ACEOF
3465cat confdefs.h >>conftest.$ac_ext
3466cat >>conftest.$ac_ext <<_ACEOF
3467/* end confdefs.h. */
3468#ifdef __STDC__
3469# include <limits.h>
3470#else
3471# include <assert.h>
3472#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003473 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003474_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003475if { (ac_try="$ac_cpp conftest.$ac_ext"
3476case "(($ac_try" in
3477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3478 *) ac_try_echo=$ac_try;;
3479esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003481 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003483 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 rm -f conftest.er1
3485 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003487 (exit $ac_status); } >/dev/null && {
3488 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3489 test ! -s conftest.err
3490 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003491 :
3492else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003494sed 's/^/| /' conftest.$ac_ext >&5
3495
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 # Broken: fails on valid input.
3497continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003501
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 # can be detected and how.
3504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003505/* confdefs.h. */
3506_ACEOF
3507cat confdefs.h >>conftest.$ac_ext
3508cat >>conftest.$ac_ext <<_ACEOF
3509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003510#include <ac_nonexistent.h>
3511_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512if { (ac_try="$ac_cpp conftest.$ac_ext"
3513case "(($ac_try" in
3514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3515 *) ac_try_echo=$ac_try;;
3516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003518 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003520 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 rm -f conftest.er1
3522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003524 (exit $ac_status); } >/dev/null && {
3525 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3526 test ! -s conftest.err
3527 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 # Broken: success on invalid input.
3529continue
3530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003532sed 's/^/| /' conftest.$ac_ext >&5
3533
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 # Passes both tests.
3535ac_preproc_ok=:
3536break
3537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003538
Martin v. Löwis11437992002-04-12 09:54:03 +00003539rm -f conftest.err conftest.$ac_ext
3540
3541done
3542# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3543rm -f conftest.err conftest.$ac_ext
3544if $ac_preproc_ok; then
3545 break
3546fi
3547
3548 done
3549 ac_cv_prog_CPP=$CPP
3550
3551fi
3552 CPP=$ac_cv_prog_CPP
3553else
3554 ac_cv_prog_CPP=$CPP
3555fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003556{ echo "$as_me:$LINENO: result: $CPP" >&5
3557echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003558ac_preproc_ok=false
3559for ac_c_preproc_warn_flag in '' yes
3560do
3561 # Use a header file that comes with gcc, so configuring glibc
3562 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003563 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3564 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 # On the NeXT, cc -E runs the code through the compiler's parser,
3566 # not just through cpp. "Syntax error" is here to catch this case.
3567 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003568/* confdefs.h. */
3569_ACEOF
3570cat confdefs.h >>conftest.$ac_ext
3571cat >>conftest.$ac_ext <<_ACEOF
3572/* end confdefs.h. */
3573#ifdef __STDC__
3574# include <limits.h>
3575#else
3576# include <assert.h>
3577#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003578 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003579_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003580if { (ac_try="$ac_cpp conftest.$ac_ext"
3581case "(($ac_try" in
3582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3583 *) ac_try_echo=$ac_try;;
3584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003586 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003588 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 rm -f conftest.er1
3590 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592 (exit $ac_status); } >/dev/null && {
3593 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3594 test ! -s conftest.err
3595 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 :
3597else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003599sed 's/^/| /' conftest.$ac_ext >&5
3600
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 # Broken: fails on valid input.
3602continue
3603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003604
Martin v. Löwis11437992002-04-12 09:54:03 +00003605rm -f conftest.err conftest.$ac_ext
3606
Martin v. Löwiseba40652007-08-30 20:10:57 +00003607 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 # can be detected and how.
3609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003610/* confdefs.h. */
3611_ACEOF
3612cat confdefs.h >>conftest.$ac_ext
3613cat >>conftest.$ac_ext <<_ACEOF
3614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003615#include <ac_nonexistent.h>
3616_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003617if { (ac_try="$ac_cpp conftest.$ac_ext"
3618case "(($ac_try" in
3619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3620 *) ac_try_echo=$ac_try;;
3621esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003625 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 rm -f conftest.er1
3627 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003629 (exit $ac_status); } >/dev/null && {
3630 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3631 test ! -s conftest.err
3632 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 # Broken: success on invalid input.
3634continue
3635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003637sed 's/^/| /' conftest.$ac_ext >&5
3638
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 # Passes both tests.
3640ac_preproc_ok=:
3641break
3642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003643
Martin v. Löwis11437992002-04-12 09:54:03 +00003644rm -f conftest.err conftest.$ac_ext
3645
3646done
3647# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3648rm -f conftest.err conftest.$ac_ext
3649if $ac_preproc_ok; then
3650 :
3651else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003652 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003653See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003654echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003655See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003656 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003657fi
3658
3659ac_ext=c
3660ac_cpp='$CPP $CPPFLAGS'
3661ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3662ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3663ac_compiler_gnu=$ac_cv_c_compiler_gnu
3664
3665
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003666{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3667echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003668if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003669 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003670else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003671 # Extract the first word of "grep ggrep" to use in msg output
3672if test -z "$GREP"; then
3673set dummy grep ggrep; ac_prog_name=$2
3674if test "${ac_cv_path_GREP+set}" = set; then
3675 echo $ECHO_N "(cached) $ECHO_C" >&6
3676else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003677 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003678# Loop through the user's path and test for each of PROGNAME-LIST
3679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003680for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
3684 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003685 for ac_exec_ext in '' $ac_executable_extensions; do
3686 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3687 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3688 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003689 # Check for GNU $ac_path_GREP
3690case `"$ac_path_GREP" --version 2>&1` in
3691*GNU*)
3692 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3693*)
3694 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003695 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003696 while :
3697 do
3698 cat "conftest.in" "conftest.in" >"conftest.tmp"
3699 mv "conftest.tmp" "conftest.in"
3700 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003701 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003702 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3703 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3704 ac_count=`expr $ac_count + 1`
3705 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3706 # Best one so far, save it but keep looking for a better one
3707 ac_cv_path_GREP="$ac_path_GREP"
3708 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003709 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 # 10*(2^10) chars as input seems more than enough
3711 test $ac_count -gt 10 && break
3712 done
3713 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3714esac
3715
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003716
3717 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718 done
3719done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003720
3721done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003722IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003723
3724
3725fi
3726
3727GREP="$ac_cv_path_GREP"
3728if test -z "$GREP"; then
3729 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3730echo "$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 +00003731 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003732fi
3733
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734else
3735 ac_cv_path_GREP=$GREP
3736fi
3737
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003738
Martin v. Löwiseba40652007-08-30 20:10:57 +00003739fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003740{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3741echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003742 GREP="$ac_cv_path_GREP"
3743
3744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003745{ echo "$as_me:$LINENO: checking for egrep" >&5
3746echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003747if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003748 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749else
3750 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3751 then ac_cv_path_EGREP="$GREP -E"
3752 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003753 # Extract the first word of "egrep" to use in msg output
3754if test -z "$EGREP"; then
3755set dummy egrep; ac_prog_name=$2
3756if test "${ac_cv_path_EGREP+set}" = set; then
3757 echo $ECHO_N "(cached) $ECHO_C" >&6
3758else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003759 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003760# Loop through the user's path and test for each of PROGNAME-LIST
3761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003762for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3763do
3764 IFS=$as_save_IFS
3765 test -z "$as_dir" && as_dir=.
3766 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003767 for ac_exec_ext in '' $ac_executable_extensions; do
3768 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3769 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3770 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003771 # Check for GNU $ac_path_EGREP
3772case `"$ac_path_EGREP" --version 2>&1` in
3773*GNU*)
3774 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3775*)
3776 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003777 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003778 while :
3779 do
3780 cat "conftest.in" "conftest.in" >"conftest.tmp"
3781 mv "conftest.tmp" "conftest.in"
3782 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003783 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003784 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3785 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3786 ac_count=`expr $ac_count + 1`
3787 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3788 # Best one so far, save it but keep looking for a better one
3789 ac_cv_path_EGREP="$ac_path_EGREP"
3790 ac_path_EGREP_max=$ac_count
3791 fi
3792 # 10*(2^10) chars as input seems more than enough
3793 test $ac_count -gt 10 && break
3794 done
3795 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3796esac
3797
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003798
3799 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003800 done
3801done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003802
3803done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003805
3806
3807fi
3808
3809EGREP="$ac_cv_path_EGREP"
3810if test -z "$EGREP"; then
3811 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3812echo "$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 +00003813 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003814fi
3815
Martin v. Löwiseba40652007-08-30 20:10:57 +00003816else
3817 ac_cv_path_EGREP=$EGREP
3818fi
3819
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003820
Martin v. Löwiseba40652007-08-30 20:10:57 +00003821 fi
3822fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003823{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3824echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003825 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003826
3827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003828
3829{ echo "$as_me:$LINENO: checking for AIX" >&5
3830echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3831cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003832/* confdefs.h. */
3833_ACEOF
3834cat confdefs.h >>conftest.$ac_ext
3835cat >>conftest.$ac_ext <<_ACEOF
3836/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003837#ifdef _AIX
3838 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003839#endif
3840
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003841_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3843 $EGREP "yes" >/dev/null 2>&1; then
3844 { echo "$as_me:$LINENO: result: yes" >&5
3845echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003846cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003847#define _ALL_SOURCE 1
3848_ACEOF
3849
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003850else
3851 { echo "$as_me:$LINENO: result: no" >&5
3852echo "${ECHO_T}no" >&6; }
3853fi
Ronald Oussoren25967582009-09-06 10:00:26 +00003854rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003855
3856
3857
3858# Check for unsupported systems
3859case $ac_sys_system/$ac_sys_release in
3860atheos*|Linux*/1*)
3861 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3862 echo See README for details.
3863 exit 1;;
3864esac
3865
3866
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003867{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3868echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003869
3870# Check whether --with-suffix was given.
3871if test "${with_suffix+set}" = set; then
3872 withval=$with_suffix;
3873 case $withval in
3874 no) EXEEXT=;;
3875 yes) EXEEXT=.exe;;
3876 *) EXEEXT=$withval;;
3877 esac
3878fi
3879
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003880{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3881echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003882
3883# Test whether we're running on a non-case-sensitive system, in which
3884# case we give a warning if no ext is given
3885
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003886{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3887echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003888if test ! -d CaseSensitiveTestDir; then
3889mkdir CaseSensitiveTestDir
3890fi
3891
3892if test -d casesensitivetestdir
3893then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003894 { echo "$as_me:$LINENO: result: yes" >&5
3895echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003896 BUILDEXEEXT=.exe
3897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003898 { echo "$as_me:$LINENO: result: no" >&5
3899echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003900 BUILDEXEEXT=$EXEEXT
3901fi
3902rmdir CaseSensitiveTestDir
3903
3904case $MACHDEP in
3905bsdos*)
3906 case $CC in
3907 gcc) CC="$CC -D_HAVE_BSDI";;
3908 esac;;
3909esac
3910
3911case $ac_sys_system in
3912hp*|HP*)
3913 case $CC in
3914 cc|*/cc) CC="$CC -Ae";;
3915 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003916SunOS*)
3917 # Some functions have a prototype only with that define, e.g. confstr
3918
3919cat >>confdefs.h <<\_ACEOF
3920#define __EXTENSIONS__ 1
3921_ACEOF
3922
3923 ;;
3924esac
3925
3926
3927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003928{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3929echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003930if test -z "$LIBRARY"
3931then
3932 LIBRARY='libpython$(VERSION).a'
3933fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003934{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3935echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003936
3937# LDLIBRARY is the name of the library to link against (as opposed to the
3938# name of the library into which to insert object files). BLDLIBRARY is also
3939# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3940# is blank as the main program is not linked directly against LDLIBRARY.
3941# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3942# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3943# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3944# DLLLIBRARY is the shared (i.e., DLL) library.
3945#
3946# RUNSHARED is used to run shared python without installed libraries
3947#
3948# INSTSONAME is the name of the shared library that will be use to install
3949# on the system - some systems like version suffix, others don't
3950
3951
3952
3953
3954
3955
3956LDLIBRARY="$LIBRARY"
3957BLDLIBRARY='$(LDLIBRARY)'
3958INSTSONAME='$(LDLIBRARY)'
3959DLLLIBRARY=''
3960LDLIBRARYDIR=''
3961RUNSHARED=''
3962
3963# LINKCC is the command that links the python executable -- default is $(CC).
3964# If CXX is set, and if it is needed to link a main function that was
3965# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3966# python might then depend on the C++ runtime
3967# This is altered for AIX in order to build the export list before
3968# linking.
3969
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003970{ echo "$as_me:$LINENO: checking LINKCC" >&5
3971echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003972if test -z "$LINKCC"
3973then
3974 LINKCC='$(PURIFY) $(MAINCC)'
3975 case $ac_sys_system in
3976 AIX*)
3977 exp_extra="\"\""
3978 if test $ac_sys_release -ge 5 -o \
3979 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3980 exp_extra="."
3981 fi
3982 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003983 QNX*)
3984 # qcc must be used because the other compilers do not
3985 # support -N.
3986 LINKCC=qcc;;
3987 esac
3988fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003989{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3990echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003991
3992# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3993# make sure we default having it set to "no": this is used by
3994# distutils.unixccompiler to know if it should add --enable-new-dtags
3995# to linker command lines, and failing to detect GNU ld simply results
3996# in the same bahaviour as before.
3997
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003998{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3999echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004000ac_prog=ld
4001if test "$GCC" = yes; then
4002 ac_prog=`$CC -print-prog-name=ld`
4003fi
4004case `"$ac_prog" -V 2>&1 < /dev/null` in
4005 *GNU*)
4006 GNULD=yes;;
4007 *)
4008 GNULD=no;;
4009esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004010{ echo "$as_me:$LINENO: result: $GNULD" >&5
4011echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004013{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4014echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004015# Check whether --enable-shared was given.
4016if test "${enable_shared+set}" = set; then
4017 enableval=$enable_shared;
4018fi
4019
4020
4021if test -z "$enable_shared"
4022then
4023 case $ac_sys_system in
4024 CYGWIN* | atheos*)
4025 enable_shared="yes";;
4026 *)
4027 enable_shared="no";;
4028 esac
4029fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004030{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4031echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004033{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4034echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004035# Check whether --enable-profiling was given.
4036if test "${enable_profiling+set}" = set; then
4037 enableval=$enable_profiling; ac_save_cc="$CC"
4038 CC="$CC -pg"
4039 if test "$cross_compiling" = yes; then
4040 ac_enable_profiling="no"
4041else
4042 cat >conftest.$ac_ext <<_ACEOF
4043/* confdefs.h. */
4044_ACEOF
4045cat confdefs.h >>conftest.$ac_ext
4046cat >>conftest.$ac_ext <<_ACEOF
4047/* end confdefs.h. */
4048int main() { return 0; }
4049_ACEOF
4050rm -f conftest$ac_exeext
4051if { (ac_try="$ac_link"
4052case "(($ac_try" in
4053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4054 *) ac_try_echo=$ac_try;;
4055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004057 (eval "$ac_link") 2>&5
4058 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4061 { (case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004066 (eval "$ac_try") 2>&5
4067 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004069 (exit $ac_status); }; }; then
4070 ac_enable_profiling="yes"
4071else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004072 echo "$as_me: program exited with status $ac_status" >&5
4073echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004074sed 's/^/| /' conftest.$ac_ext >&5
4075
4076( exit $ac_status )
4077ac_enable_profiling="no"
4078fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4080fi
4081
4082
4083 CC="$ac_save_cc"
4084fi
4085
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004086{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4087echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004088
4089case "$ac_enable_profiling" in
4090 "yes")
4091 BASECFLAGS="-pg $BASECFLAGS"
4092 LDFLAGS="-pg $LDFLAGS"
4093 ;;
4094esac
4095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004096{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4097echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004098
4099# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4100# library that we build, but we do not want to link against it (we
4101# will find it with a -framework option). For this reason there is an
4102# extra variable BLDLIBRARY against which Python and the extension
4103# modules are linked, BLDLIBRARY. This is normally the same as
4104# LDLIBRARY, but empty for MacOSX framework builds.
4105if test "$enable_framework"
4106then
4107 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4108 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4109 BLDLIBRARY=''
4110else
4111 BLDLIBRARY='$(LDLIBRARY)'
4112fi
4113
4114# Other platforms follow
4115if test $enable_shared = "yes"; then
4116
4117cat >>confdefs.h <<\_ACEOF
4118#define Py_ENABLE_SHARED 1
4119_ACEOF
4120
4121 case $ac_sys_system in
4122 BeOS*)
4123 LDLIBRARY='libpython$(VERSION).so'
4124 ;;
4125 CYGWIN*)
4126 LDLIBRARY='libpython$(VERSION).dll.a'
4127 DLLLIBRARY='libpython$(VERSION).dll'
4128 ;;
4129 SunOS*)
4130 LDLIBRARY='libpython$(VERSION).so'
4131 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4132 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4133 INSTSONAME="$LDLIBRARY".$SOVERSION
4134 ;;
4135 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4136 LDLIBRARY='libpython$(VERSION).so'
4137 BLDLIBRARY='-L. -lpython$(VERSION)'
4138 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4139 case $ac_sys_system in
4140 FreeBSD*)
4141 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4142 ;;
4143 esac
4144 INSTSONAME="$LDLIBRARY".$SOVERSION
4145 ;;
4146 hp*|HP*)
4147 case `uname -m` in
4148 ia64)
4149 LDLIBRARY='libpython$(VERSION).so'
4150 ;;
4151 *)
4152 LDLIBRARY='libpython$(VERSION).sl'
4153 ;;
4154 esac
4155 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4156 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4157 ;;
4158 OSF*)
4159 LDLIBRARY='libpython$(VERSION).so'
4160 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4161 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4162 ;;
4163 atheos*)
4164 LDLIBRARY='libpython$(VERSION).so'
4165 BLDLIBRARY='-L. -lpython$(VERSION)'
4166 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4167 ;;
4168 Darwin*)
4169 LDLIBRARY='libpython$(VERSION).dylib'
4170 BLDLIBRARY='-L. -lpython$(VERSION)'
4171 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4172 ;;
4173
4174 esac
4175else # shared is disabled
4176 case $ac_sys_system in
4177 CYGWIN*)
4178 BLDLIBRARY='$(LIBRARY)'
4179 LDLIBRARY='libpython$(VERSION).dll.a'
4180 ;;
4181 esac
4182fi
4183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004184{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4185echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004186
4187if test -n "$ac_tool_prefix"; then
4188 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4189set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004190{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4191echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004192if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004193 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004194else
4195 if test -n "$RANLIB"; then
4196 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4197else
4198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4199for as_dir in $PATH
4200do
4201 IFS=$as_save_IFS
4202 test -z "$as_dir" && as_dir=.
4203 for ac_exec_ext in '' $ac_executable_extensions; do
4204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4205 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004206 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004207 break 2
4208 fi
4209done
4210done
4211IFS=$as_save_IFS
4212
4213fi
4214fi
4215RANLIB=$ac_cv_prog_RANLIB
4216if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004217 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4218echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004220 { echo "$as_me:$LINENO: result: no" >&5
4221echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004222fi
4223
4224
4225fi
4226if test -z "$ac_cv_prog_RANLIB"; then
4227 ac_ct_RANLIB=$RANLIB
4228 # Extract the first word of "ranlib", so it can be a program name with args.
4229set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004230{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4231echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004232if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004233 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004234else
4235 if test -n "$ac_ct_RANLIB"; then
4236 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4237else
4238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4239for as_dir in $PATH
4240do
4241 IFS=$as_save_IFS
4242 test -z "$as_dir" && as_dir=.
4243 for ac_exec_ext in '' $ac_executable_extensions; do
4244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4245 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004247 break 2
4248 fi
4249done
4250done
4251IFS=$as_save_IFS
4252
4253fi
4254fi
4255ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4256if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004257 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4258echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004259else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004260 { echo "$as_me:$LINENO: result: no" >&5
4261echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004262fi
4263
4264 if test "x$ac_ct_RANLIB" = x; then
4265 RANLIB=":"
4266 else
4267 case $cross_compiling:$ac_tool_warned in
4268yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004269{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4270whose name does not start with the host triplet. If you think this
4271configuration is useful to you, please write to autoconf@gnu.org." >&5
4272echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4273whose name does not start with the host triplet. If you think this
4274configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004275ac_tool_warned=yes ;;
4276esac
4277 RANLIB=$ac_ct_RANLIB
4278 fi
4279else
4280 RANLIB="$ac_cv_prog_RANLIB"
4281fi
4282
4283
4284for ac_prog in ar aal
4285do
4286 # Extract the first word of "$ac_prog", so it can be a program name with args.
4287set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004288{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004290if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004291 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004292else
4293 if test -n "$AR"; then
4294 ac_cv_prog_AR="$AR" # Let the user override the test.
4295else
4296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4297for as_dir in $PATH
4298do
4299 IFS=$as_save_IFS
4300 test -z "$as_dir" && as_dir=.
4301 for ac_exec_ext in '' $ac_executable_extensions; do
4302 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4303 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004304 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004305 break 2
4306 fi
4307done
4308done
4309IFS=$as_save_IFS
4310
4311fi
4312fi
4313AR=$ac_cv_prog_AR
4314if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004315 { echo "$as_me:$LINENO: result: $AR" >&5
4316echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004317else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004318 { echo "$as_me:$LINENO: result: no" >&5
4319echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004320fi
4321
4322
4323 test -n "$AR" && break
4324done
4325test -n "$AR" || AR="ar"
4326
4327
4328# tweak ARFLAGS only if the user didn't set it on the command line
4329
4330if test -z "$ARFLAGS"
4331then
4332 ARFLAGS="rc"
4333fi
4334
4335
4336# Extract the first word of "svnversion", so it can be a program name with args.
4337set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004338{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4339echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004340if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004341 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004342else
4343 if test -n "$SVNVERSION"; then
4344 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4345else
4346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4347for as_dir in $PATH
4348do
4349 IFS=$as_save_IFS
4350 test -z "$as_dir" && as_dir=.
4351 for ac_exec_ext in '' $ac_executable_extensions; do
4352 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4353 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004354 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004355 break 2
4356 fi
4357done
4358done
4359IFS=$as_save_IFS
4360
4361 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4362fi
4363fi
4364SVNVERSION=$ac_cv_prog_SVNVERSION
4365if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004366 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4367echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004369 { echo "$as_me:$LINENO: result: no" >&5
4370echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004371fi
4372
4373
4374if test $SVNVERSION = found
4375then
4376 SVNVERSION="svnversion \$(srcdir)"
4377else
4378 SVNVERSION="echo Unversioned directory"
4379fi
4380
4381case $MACHDEP in
4382bsdos*|hp*|HP*)
4383 # install -d does not work on BSDI or HP-UX
4384 if test -z "$INSTALL"
4385 then
4386 INSTALL="${srcdir}/install-sh -c"
4387 fi
4388esac
4389ac_aux_dir=
4390for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4391 if test -f "$ac_dir/install-sh"; then
4392 ac_aux_dir=$ac_dir
4393 ac_install_sh="$ac_aux_dir/install-sh -c"
4394 break
4395 elif test -f "$ac_dir/install.sh"; then
4396 ac_aux_dir=$ac_dir
4397 ac_install_sh="$ac_aux_dir/install.sh -c"
4398 break
4399 elif test -f "$ac_dir/shtool"; then
4400 ac_aux_dir=$ac_dir
4401 ac_install_sh="$ac_aux_dir/shtool install -c"
4402 break
4403 fi
4404done
4405if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004406 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4407echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004408 { (exit 1); exit 1; }; }
4409fi
4410
4411# These three variables are undocumented and unsupported,
4412# and are intended to be withdrawn in a future Autoconf release.
4413# They can cause serious problems if a builder's source tree is in a directory
4414# whose full name contains unusual characters.
4415ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4416ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4417ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4418
4419
4420# Find a good install program. We prefer a C program (faster),
4421# so one script is as good as another. But avoid the broken or
4422# incompatible versions:
4423# SysV /etc/install, /usr/sbin/install
4424# SunOS /usr/etc/install
4425# IRIX /sbin/install
4426# AIX /bin/install
4427# AmigaOS /C/install, which installs bootblocks on floppy discs
4428# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4429# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4430# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4431# OS/2's system install, which has a completely different semantic
4432# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004433{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4434echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004435if test -z "$INSTALL"; then
4436if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004437 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004438else
4439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4440for as_dir in $PATH
4441do
4442 IFS=$as_save_IFS
4443 test -z "$as_dir" && as_dir=.
4444 # Account for people who put trailing slashes in PATH elements.
4445case $as_dir/ in
4446 ./ | .// | /cC/* | \
4447 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4448 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4449 /usr/ucb/* ) ;;
4450 *)
4451 # OSF1 and SCO ODT 3.0 have their own names for install.
4452 # Don't use installbsd from OSF since it installs stuff as root
4453 # by default.
4454 for ac_prog in ginstall scoinst install; do
4455 for ac_exec_ext in '' $ac_executable_extensions; do
4456 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4457 if test $ac_prog = install &&
4458 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4459 # AIX install. It has an incompatible calling convention.
4460 :
4461 elif test $ac_prog = install &&
4462 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4463 # program-specific install script used by HP pwplus--don't use.
4464 :
4465 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004466 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4467 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004468 fi
4469 fi
4470 done
4471 done
4472 ;;
4473esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004474done
4475IFS=$as_save_IFS
4476
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004477
4478fi
4479 if test "${ac_cv_path_install+set}" = set; then
4480 INSTALL=$ac_cv_path_install
4481 else
4482 # As a last resort, use the slow shell script. Don't cache a
4483 # value for INSTALL within a source directory, because that will
4484 # break other packages using the cache if that directory is
4485 # removed, or if the value is a relative name.
4486 INSTALL=$ac_install_sh
4487 fi
4488fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004489{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4490echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004491
4492# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4493# It thinks the first close brace ends the variable substitution.
4494test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4495
4496test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4497
4498test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4499
4500
4501# Not every filesystem supports hard links
4502
4503if test -z "$LN" ; then
4504 case $ac_sys_system in
4505 BeOS*) LN="ln -s";;
4506 CYGWIN*) LN="ln -s";;
4507 atheos*) LN="ln -s";;
4508 *) LN=ln;;
4509 esac
4510fi
4511
4512# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004513{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4514echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004515
4516# Check whether --with-pydebug was given.
4517if test "${with_pydebug+set}" = set; then
4518 withval=$with_pydebug;
4519if test "$withval" != no
4520then
4521
4522cat >>confdefs.h <<\_ACEOF
4523#define Py_DEBUG 1
4524_ACEOF
4525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004526 { echo "$as_me:$LINENO: result: yes" >&5
4527echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004528 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004529else { echo "$as_me:$LINENO: result: no" >&5
4530echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004531fi
4532else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004533 { echo "$as_me:$LINENO: result: no" >&5
4534echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004535fi
4536
4537
4538# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4539# merged with this chunk of code?
4540
4541# Optimizer/debugger flags
4542# ------------------------
4543# (The following bit of code is complicated enough - please keep things
4544# indented properly. Just pretend you're editing Python code. ;-)
4545
4546# There are two parallel sets of case statements below, one that checks to
4547# see if OPT was set and one that does BASECFLAGS setting based upon
4548# compiler and platform. BASECFLAGS tweaks need to be made even if the
4549# user set OPT.
4550
4551# tweak OPT based on compiler and platform, only if the user didn't set
4552# it on the command line
4553
4554if test -z "$OPT"
4555then
4556 case $GCC in
4557 yes)
4558 if test "$CC" != 'g++' ; then
4559 STRICT_PROTO="-Wstrict-prototypes"
4560 fi
4561 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4562 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4563 WRAP="-fwrapv"
4564 fi
4565 case $ac_cv_prog_cc_g in
4566 yes)
4567 if test "$Py_DEBUG" = 'true' ; then
4568 # Optimization messes up debuggers, so turn it off for
4569 # debug builds.
4570 OPT="-g -Wall $STRICT_PROTO"
4571 else
4572 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4573 fi
4574 ;;
4575 *)
4576 OPT="-O3 -Wall $STRICT_PROTO"
4577 ;;
4578 esac
4579 case $ac_sys_system in
4580 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4581 ;;
4582 esac
4583 ;;
4584
4585 *)
4586 OPT="-O"
4587 ;;
4588 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004589fi
4590
4591
4592
4593# The -arch flags for universal builds on OSX
4594UNIVERSAL_ARCH_FLAGS=
4595
4596
4597# tweak BASECFLAGS based on compiler and platform
4598case $GCC in
4599yes)
4600 # Python violates C99 rules, by casting between incompatible
4601 # pointer types. GCC may generate bad code as a result of that,
4602 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004603 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4604echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004605 ac_save_cc="$CC"
4606 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004607 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4608 echo $ECHO_N "(cached) $ECHO_C" >&6
4609else
4610 if test "$cross_compiling" = yes; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004611 ac_cv_no_strict_aliasing_ok=no
4612else
4613 cat >conftest.$ac_ext <<_ACEOF
4614/* confdefs.h. */
4615_ACEOF
4616cat confdefs.h >>conftest.$ac_ext
4617cat >>conftest.$ac_ext <<_ACEOF
4618/* end confdefs.h. */
4619int main() { return 0; }
4620_ACEOF
4621rm -f conftest$ac_exeext
4622if { (ac_try="$ac_link"
4623case "(($ac_try" in
4624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4625 *) ac_try_echo=$ac_try;;
4626esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004628 (eval "$ac_link") 2>&5
4629 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004631 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4632 { (case "(($ac_try" in
4633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4634 *) ac_try_echo=$ac_try;;
4635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004637 (eval "$ac_try") 2>&5
4638 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004640 (exit $ac_status); }; }; then
4641 ac_cv_no_strict_aliasing_ok=yes
4642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004643 echo "$as_me: program exited with status $ac_status" >&5
4644echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004645sed 's/^/| /' conftest.$ac_ext >&5
4646
4647( exit $ac_status )
4648ac_cv_no_strict_aliasing_ok=no
4649fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4651fi
4652
4653
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004654fi
4655
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004656 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004657 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4658echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004659 if test $ac_cv_no_strict_aliasing_ok = yes
4660 then
4661 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4662 fi
4663
4664 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4665 # support. Without this, treatment of subnormals doesn't follow
4666 # the standard.
4667 case $ac_sys_machine in
4668 alpha*)
4669 BASECFLAGS="$BASECFLAGS -mieee"
4670 ;;
4671 esac
4672
4673 case $ac_sys_system in
4674 SCO_SV*)
4675 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4676 ;;
4677 # is there any other compiler on Darwin besides gcc?
4678 Darwin*)
4679 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4680 # used to be here, but non-Apple gcc doesn't accept them.
4681
4682
4683 if test "${enable_universalsdk}"; then
4684 UNIVERSAL_ARCH_FLAGS=""
4685 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4686 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4687 ARCH_RUN_32BIT=""
4688
4689 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4690 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren25967582009-09-06 10:00:26 +00004691 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004692
4693 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4694 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4695 ARCH_RUN_32BIT="arch -i386 -ppc"
4696
4697 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004698 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4699echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004700 { (exit 1); exit 1; }; }
4701
4702 fi
4703
4704
4705 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4706 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4707 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4708 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4709 fi
4710 fi
4711
4712 # Calculate the right deployment target for this build.
4713 #
4714 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4715 if test ${cur_target} '>' 10.2; then
4716 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004717 if test ${enable_universalsdk}; then
4718 if test "${UNIVERSAL_ARCHS}" = "all"; then
4719 # Ensure that the default platform for a
4720 # 4-way universal build is OSX 10.5,
4721 # that's the first OS release where
4722 # 4-way builds make sense.
4723 cur_target='10.5'
4724 fi
4725 else
4726 if test `arch` = "i386"; then
4727 # On Intel macs default to a deployment
4728 # target of 10.4, that's the first OSX
4729 # release with Intel support.
4730 cur_target="10.4"
4731 fi
4732 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004733 fi
4734 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4735
4736 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4737 # environment with a value that is the same as what we'll use
4738 # in the Makefile to ensure that we'll get the same compiler
4739 # environment during configure and build time.
4740 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4741 export MACOSX_DEPLOYMENT_TARGET
4742 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4743
4744 ;;
4745 OSF*)
4746 BASECFLAGS="$BASECFLAGS -mieee"
4747 ;;
4748 esac
4749 ;;
4750
4751*)
4752 case $ac_sys_system in
4753 OpenUNIX*|UnixWare*)
4754 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4755 ;;
4756 OSF*)
4757 BASECFLAGS="$BASECFLAGS -ieee -std"
4758 ;;
4759 SCO_SV*)
4760 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4761 ;;
4762 esac
4763 ;;
4764esac
4765
4766if test "$Py_DEBUG" = 'true'; then
4767 :
4768else
4769 OPT="-DNDEBUG $OPT"
4770fi
4771
4772if test "$ac_arch_flags"
4773then
4774 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4775fi
4776
4777# disable check for icc since it seems to pass, but generates a warning
4778if test "$CC" = icc
4779then
4780 ac_cv_opt_olimit_ok=no
4781fi
4782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004783{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4784echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004785if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004786 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004787else
4788 ac_save_cc="$CC"
4789CC="$CC -OPT:Olimit=0"
4790if test "$cross_compiling" = yes; then
4791 ac_cv_opt_olimit_ok=no
4792else
4793 cat >conftest.$ac_ext <<_ACEOF
4794/* confdefs.h. */
4795_ACEOF
4796cat confdefs.h >>conftest.$ac_ext
4797cat >>conftest.$ac_ext <<_ACEOF
4798/* end confdefs.h. */
4799int main() { return 0; }
4800_ACEOF
4801rm -f conftest$ac_exeext
4802if { (ac_try="$ac_link"
4803case "(($ac_try" in
4804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4805 *) ac_try_echo=$ac_try;;
4806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004808 (eval "$ac_link") 2>&5
4809 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004811 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4812 { (case "(($ac_try" in
4813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4814 *) ac_try_echo=$ac_try;;
4815esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004817 (eval "$ac_try") 2>&5
4818 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004820 (exit $ac_status); }; }; then
4821 ac_cv_opt_olimit_ok=yes
4822else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004823 echo "$as_me: program exited with status $ac_status" >&5
4824echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004825sed 's/^/| /' conftest.$ac_ext >&5
4826
4827( exit $ac_status )
4828ac_cv_opt_olimit_ok=no
4829fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4831fi
4832
4833
4834CC="$ac_save_cc"
4835fi
4836
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004837{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4838echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004839if test $ac_cv_opt_olimit_ok = yes; then
4840 case $ac_sys_system in
4841 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4842 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4843 # environment?
4844 Darwin*)
4845 ;;
4846 *)
4847 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4848 ;;
4849 esac
4850else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004851 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4852echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004853 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004854 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004855else
4856 ac_save_cc="$CC"
4857 CC="$CC -Olimit 1500"
4858 if test "$cross_compiling" = yes; then
4859 ac_cv_olimit_ok=no
4860else
4861 cat >conftest.$ac_ext <<_ACEOF
4862/* confdefs.h. */
4863_ACEOF
4864cat confdefs.h >>conftest.$ac_ext
4865cat >>conftest.$ac_ext <<_ACEOF
4866/* end confdefs.h. */
4867int main() { return 0; }
4868_ACEOF
4869rm -f conftest$ac_exeext
4870if { (ac_try="$ac_link"
4871case "(($ac_try" in
4872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4873 *) ac_try_echo=$ac_try;;
4874esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004876 (eval "$ac_link") 2>&5
4877 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004879 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4880 { (case "(($ac_try" in
4881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4882 *) ac_try_echo=$ac_try;;
4883esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004885 (eval "$ac_try") 2>&5
4886 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004888 (exit $ac_status); }; }; then
4889 ac_cv_olimit_ok=yes
4890else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004891 echo "$as_me: program exited with status $ac_status" >&5
4892echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004893sed 's/^/| /' conftest.$ac_ext >&5
4894
4895( exit $ac_status )
4896ac_cv_olimit_ok=no
4897fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4899fi
4900
4901
4902 CC="$ac_save_cc"
4903fi
4904
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004905 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4906echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004907 if test $ac_cv_olimit_ok = yes; then
4908 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4909 fi
4910fi
4911
4912# Check whether GCC supports PyArg_ParseTuple format
4913if test "$GCC" = "yes"
4914then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004915 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4916echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004917 save_CFLAGS=$CFLAGS
4918 CFLAGS="$CFLAGS -Werror"
4919 cat >conftest.$ac_ext <<_ACEOF
4920/* confdefs.h. */
4921_ACEOF
4922cat confdefs.h >>conftest.$ac_ext
4923cat >>conftest.$ac_ext <<_ACEOF
4924/* end confdefs.h. */
4925
4926 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4927
4928int
4929main ()
4930{
4931
4932 ;
4933 return 0;
4934}
4935_ACEOF
4936rm -f conftest.$ac_objext
4937if { (ac_try="$ac_compile"
4938case "(($ac_try" in
4939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4940 *) ac_try_echo=$ac_try;;
4941esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004943 (eval "$ac_compile") 2>conftest.er1
4944 ac_status=$?
4945 grep -v '^ *+' conftest.er1 >conftest.err
4946 rm -f conftest.er1
4947 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004949 (exit $ac_status); } && {
4950 test -z "$ac_c_werror_flag" ||
4951 test ! -s conftest.err
4952 } && test -s conftest.$ac_objext; then
4953
4954cat >>confdefs.h <<\_ACEOF
4955#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4956_ACEOF
4957
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004958 { echo "$as_me:$LINENO: result: yes" >&5
4959echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004961 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004962sed 's/^/| /' conftest.$ac_ext >&5
4963
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004964 { echo "$as_me:$LINENO: result: no" >&5
4965echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004966
4967fi
4968
4969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4970 CFLAGS=$save_CFLAGS
4971fi
4972
4973# On some compilers, pthreads are available without further options
4974# (e.g. MacOS X). On some of these systems, the compiler will not
4975# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4976# So we have to see first whether pthreads are available without
4977# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004978{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4979echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004980if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004981 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004982else
4983 if test "$cross_compiling" = yes; then
4984 ac_cv_pthread_is_default=no
4985else
4986 cat >conftest.$ac_ext <<_ACEOF
4987/* confdefs.h. */
4988_ACEOF
4989cat confdefs.h >>conftest.$ac_ext
4990cat >>conftest.$ac_ext <<_ACEOF
4991/* end confdefs.h. */
4992
4993#include <pthread.h>
4994
4995void* routine(void* p){return NULL;}
4996
4997int main(){
4998 pthread_t p;
4999 if(pthread_create(&p,NULL,routine,NULL)!=0)
5000 return 1;
5001 (void)pthread_detach(p);
5002 return 0;
5003}
5004
5005_ACEOF
5006rm -f conftest$ac_exeext
5007if { (ac_try="$ac_link"
5008case "(($ac_try" in
5009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5010 *) ac_try_echo=$ac_try;;
5011esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005013 (eval "$ac_link") 2>&5
5014 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005016 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5017 { (case "(($ac_try" in
5018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5019 *) ac_try_echo=$ac_try;;
5020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005022 (eval "$ac_try") 2>&5
5023 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005025 (exit $ac_status); }; }; then
5026
5027 ac_cv_pthread_is_default=yes
5028 ac_cv_kthread=no
5029 ac_cv_pthread=no
5030
5031else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005032 echo "$as_me: program exited with status $ac_status" >&5
5033echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005034sed 's/^/| /' conftest.$ac_ext >&5
5035
5036( exit $ac_status )
5037ac_cv_pthread_is_default=no
5038fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5040fi
5041
5042
5043
5044fi
5045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005046{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5047echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005048
5049
5050if test $ac_cv_pthread_is_default = yes
5051then
5052 ac_cv_kpthread=no
5053else
5054# -Kpthread, if available, provides the right #defines
5055# and linker options to make pthread_create available
5056# Some compilers won't report that they do not support -Kpthread,
5057# so we need to run a program to see whether it really made the
5058# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005059{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5060echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005061if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005062 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005063else
5064 ac_save_cc="$CC"
5065CC="$CC -Kpthread"
5066if test "$cross_compiling" = yes; then
5067 ac_cv_kpthread=no
5068else
5069 cat >conftest.$ac_ext <<_ACEOF
5070/* confdefs.h. */
5071_ACEOF
5072cat confdefs.h >>conftest.$ac_ext
5073cat >>conftest.$ac_ext <<_ACEOF
5074/* end confdefs.h. */
5075
5076#include <pthread.h>
5077
5078void* routine(void* p){return NULL;}
5079
5080int main(){
5081 pthread_t p;
5082 if(pthread_create(&p,NULL,routine,NULL)!=0)
5083 return 1;
5084 (void)pthread_detach(p);
5085 return 0;
5086}
5087
5088_ACEOF
5089rm -f conftest$ac_exeext
5090if { (ac_try="$ac_link"
5091case "(($ac_try" in
5092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5093 *) ac_try_echo=$ac_try;;
5094esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005096 (eval "$ac_link") 2>&5
5097 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5100 { (case "(($ac_try" in
5101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5102 *) ac_try_echo=$ac_try;;
5103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005105 (eval "$ac_try") 2>&5
5106 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005108 (exit $ac_status); }; }; then
5109 ac_cv_kpthread=yes
5110else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005111 echo "$as_me: program exited with status $ac_status" >&5
5112echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005113sed 's/^/| /' conftest.$ac_ext >&5
5114
5115( exit $ac_status )
5116ac_cv_kpthread=no
5117fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5119fi
5120
5121
5122CC="$ac_save_cc"
5123fi
5124
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005125{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5126echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005127fi
5128
5129if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5130then
5131# -Kthread, if available, provides the right #defines
5132# and linker options to make pthread_create available
5133# Some compilers won't report that they do not support -Kthread,
5134# so we need to run a program to see whether it really made the
5135# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005136{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5137echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005138if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005139 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140else
5141 ac_save_cc="$CC"
5142CC="$CC -Kthread"
5143if test "$cross_compiling" = yes; then
5144 ac_cv_kthread=no
5145else
5146 cat >conftest.$ac_ext <<_ACEOF
5147/* confdefs.h. */
5148_ACEOF
5149cat confdefs.h >>conftest.$ac_ext
5150cat >>conftest.$ac_ext <<_ACEOF
5151/* end confdefs.h. */
5152
5153#include <pthread.h>
5154
5155void* routine(void* p){return NULL;}
5156
5157int main(){
5158 pthread_t p;
5159 if(pthread_create(&p,NULL,routine,NULL)!=0)
5160 return 1;
5161 (void)pthread_detach(p);
5162 return 0;
5163}
5164
5165_ACEOF
5166rm -f conftest$ac_exeext
5167if { (ac_try="$ac_link"
5168case "(($ac_try" in
5169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5170 *) ac_try_echo=$ac_try;;
5171esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005173 (eval "$ac_link") 2>&5
5174 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005176 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5177 { (case "(($ac_try" in
5178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5179 *) ac_try_echo=$ac_try;;
5180esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005182 (eval "$ac_try") 2>&5
5183 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005185 (exit $ac_status); }; }; then
5186 ac_cv_kthread=yes
5187else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005188 echo "$as_me: program exited with status $ac_status" >&5
5189echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005190sed 's/^/| /' conftest.$ac_ext >&5
5191
5192( exit $ac_status )
5193ac_cv_kthread=no
5194fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5196fi
5197
5198
5199CC="$ac_save_cc"
5200fi
5201
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005202{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5203echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005204fi
5205
5206if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5207then
5208# -pthread, if available, provides the right #defines
5209# and linker options to make pthread_create available
5210# Some compilers won't report that they do not support -pthread,
5211# so we need to run a program to see whether it really made the
5212# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005213{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5214echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005215if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005216 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005217else
5218 ac_save_cc="$CC"
5219CC="$CC -pthread"
5220if test "$cross_compiling" = yes; then
5221 ac_cv_pthread=no
5222else
5223 cat >conftest.$ac_ext <<_ACEOF
5224/* confdefs.h. */
5225_ACEOF
5226cat confdefs.h >>conftest.$ac_ext
5227cat >>conftest.$ac_ext <<_ACEOF
5228/* end confdefs.h. */
5229
5230#include <pthread.h>
5231
5232void* routine(void* p){return NULL;}
5233
5234int main(){
5235 pthread_t p;
5236 if(pthread_create(&p,NULL,routine,NULL)!=0)
5237 return 1;
5238 (void)pthread_detach(p);
5239 return 0;
5240}
5241
5242_ACEOF
5243rm -f conftest$ac_exeext
5244if { (ac_try="$ac_link"
5245case "(($ac_try" in
5246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5247 *) ac_try_echo=$ac_try;;
5248esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005250 (eval "$ac_link") 2>&5
5251 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005253 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5254 { (case "(($ac_try" in
5255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5256 *) ac_try_echo=$ac_try;;
5257esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005259 (eval "$ac_try") 2>&5
5260 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005262 (exit $ac_status); }; }; then
5263 ac_cv_pthread=yes
5264else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005265 echo "$as_me: program exited with status $ac_status" >&5
5266echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005267sed 's/^/| /' conftest.$ac_ext >&5
5268
5269( exit $ac_status )
5270ac_cv_pthread=no
5271fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005272rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5273fi
5274
5275
5276CC="$ac_save_cc"
5277fi
5278
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005279{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5280echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005281fi
5282
5283# If we have set a CC compiler flag for thread support then
5284# check if it works for CXX, too.
5285ac_cv_cxx_thread=no
5286if test ! -z "$CXX"
5287then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005288{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5289echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005290ac_save_cxx="$CXX"
5291
5292if test "$ac_cv_kpthread" = "yes"
5293then
5294 CXX="$CXX -Kpthread"
5295 ac_cv_cxx_thread=yes
5296elif test "$ac_cv_kthread" = "yes"
5297then
5298 CXX="$CXX -Kthread"
5299 ac_cv_cxx_thread=yes
5300elif test "$ac_cv_pthread" = "yes"
5301then
5302 CXX="$CXX -pthread"
5303 ac_cv_cxx_thread=yes
5304fi
5305
5306if test $ac_cv_cxx_thread = yes
5307then
5308 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5309 $CXX -c conftest.$ac_ext 2>&5
5310 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5311 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5312 then
5313 ac_cv_cxx_thread=yes
5314 else
5315 ac_cv_cxx_thread=no
5316 fi
5317 rm -fr conftest*
5318fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005319{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5320echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005321fi
5322CXX="$ac_save_cxx"
5323
5324
5325# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005326{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5327echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005328if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005329 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330else
5331 cat >conftest.$ac_ext <<_ACEOF
5332/* confdefs.h. */
5333_ACEOF
5334cat confdefs.h >>conftest.$ac_ext
5335cat >>conftest.$ac_ext <<_ACEOF
5336/* end confdefs.h. */
5337#include <stdlib.h>
5338#include <stdarg.h>
5339#include <string.h>
5340#include <float.h>
5341
5342int
5343main ()
5344{
5345
5346 ;
5347 return 0;
5348}
5349_ACEOF
5350rm -f conftest.$ac_objext
5351if { (ac_try="$ac_compile"
5352case "(($ac_try" in
5353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5354 *) ac_try_echo=$ac_try;;
5355esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005357 (eval "$ac_compile") 2>conftest.er1
5358 ac_status=$?
5359 grep -v '^ *+' conftest.er1 >conftest.err
5360 rm -f conftest.er1
5361 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005363 (exit $ac_status); } && {
5364 test -z "$ac_c_werror_flag" ||
5365 test ! -s conftest.err
5366 } && test -s conftest.$ac_objext; then
5367 ac_cv_header_stdc=yes
5368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005369 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005370sed 's/^/| /' conftest.$ac_ext >&5
5371
5372 ac_cv_header_stdc=no
5373fi
5374
5375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5376
5377if test $ac_cv_header_stdc = yes; then
5378 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5379 cat >conftest.$ac_ext <<_ACEOF
5380/* confdefs.h. */
5381_ACEOF
5382cat confdefs.h >>conftest.$ac_ext
5383cat >>conftest.$ac_ext <<_ACEOF
5384/* end confdefs.h. */
5385#include <string.h>
5386
5387_ACEOF
5388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5389 $EGREP "memchr" >/dev/null 2>&1; then
5390 :
5391else
5392 ac_cv_header_stdc=no
5393fi
Ronald Oussoren25967582009-09-06 10:00:26 +00005394rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005395
5396fi
5397
5398if test $ac_cv_header_stdc = yes; then
5399 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5400 cat >conftest.$ac_ext <<_ACEOF
5401/* confdefs.h. */
5402_ACEOF
5403cat confdefs.h >>conftest.$ac_ext
5404cat >>conftest.$ac_ext <<_ACEOF
5405/* end confdefs.h. */
5406#include <stdlib.h>
5407
5408_ACEOF
5409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5410 $EGREP "free" >/dev/null 2>&1; then
5411 :
5412else
5413 ac_cv_header_stdc=no
5414fi
Ronald Oussoren25967582009-09-06 10:00:26 +00005415rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005416
5417fi
5418
5419if test $ac_cv_header_stdc = yes; then
5420 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5421 if test "$cross_compiling" = yes; then
5422 :
5423else
5424 cat >conftest.$ac_ext <<_ACEOF
5425/* confdefs.h. */
5426_ACEOF
5427cat confdefs.h >>conftest.$ac_ext
5428cat >>conftest.$ac_ext <<_ACEOF
5429/* end confdefs.h. */
5430#include <ctype.h>
5431#include <stdlib.h>
5432#if ((' ' & 0x0FF) == 0x020)
5433# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5434# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5435#else
5436# define ISLOWER(c) \
5437 (('a' <= (c) && (c) <= 'i') \
5438 || ('j' <= (c) && (c) <= 'r') \
5439 || ('s' <= (c) && (c) <= 'z'))
5440# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5441#endif
5442
5443#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5444int
5445main ()
5446{
5447 int i;
5448 for (i = 0; i < 256; i++)
5449 if (XOR (islower (i), ISLOWER (i))
5450 || toupper (i) != TOUPPER (i))
5451 return 2;
5452 return 0;
5453}
5454_ACEOF
5455rm -f conftest$ac_exeext
5456if { (ac_try="$ac_link"
5457case "(($ac_try" in
5458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5459 *) ac_try_echo=$ac_try;;
5460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005462 (eval "$ac_link") 2>&5
5463 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005465 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5466 { (case "(($ac_try" in
5467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5468 *) ac_try_echo=$ac_try;;
5469esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005471 (eval "$ac_try") 2>&5
5472 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474 (exit $ac_status); }; }; then
5475 :
5476else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005477 echo "$as_me: program exited with status $ac_status" >&5
5478echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479sed 's/^/| /' conftest.$ac_ext >&5
5480
5481( exit $ac_status )
5482ac_cv_header_stdc=no
5483fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5485fi
5486
5487
5488fi
5489fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005490{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5491echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492if test $ac_cv_header_stdc = yes; then
5493
5494cat >>confdefs.h <<\_ACEOF
5495#define STDC_HEADERS 1
5496_ACEOF
5497
5498fi
5499
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005500# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5511 inttypes.h stdint.h unistd.h
5512do
5513as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5514{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5515echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5516if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5517 echo $ECHO_N "(cached) $ECHO_C" >&6
5518else
5519 cat >conftest.$ac_ext <<_ACEOF
5520/* confdefs.h. */
5521_ACEOF
5522cat confdefs.h >>conftest.$ac_ext
5523cat >>conftest.$ac_ext <<_ACEOF
5524/* end confdefs.h. */
5525$ac_includes_default
5526
5527#include <$ac_header>
5528_ACEOF
5529rm -f conftest.$ac_objext
5530if { (ac_try="$ac_compile"
5531case "(($ac_try" in
5532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5533 *) ac_try_echo=$ac_try;;
5534esac
5535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5536 (eval "$ac_compile") 2>conftest.er1
5537 ac_status=$?
5538 grep -v '^ *+' conftest.er1 >conftest.err
5539 rm -f conftest.er1
5540 cat conftest.err >&5
5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542 (exit $ac_status); } && {
5543 test -z "$ac_c_werror_flag" ||
5544 test ! -s conftest.err
5545 } && test -s conftest.$ac_objext; then
5546 eval "$as_ac_Header=yes"
5547else
5548 echo "$as_me: failed program was:" >&5
5549sed 's/^/| /' conftest.$ac_ext >&5
5550
5551 eval "$as_ac_Header=no"
5552fi
5553
5554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5555fi
5556ac_res=`eval echo '${'$as_ac_Header'}'`
5557 { echo "$as_me:$LINENO: result: $ac_res" >&5
5558echo "${ECHO_T}$ac_res" >&6; }
5559if test `eval echo '${'$as_ac_Header'}'` = yes; then
5560 cat >>confdefs.h <<_ACEOF
5561#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5562_ACEOF
5563
5564fi
5565
5566done
5567
5568
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005569
Martin v. Löwis11437992002-04-12 09:54:03 +00005570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
Anthony Baxter8a560de2004-10-13 15:30:56 +00005605
Martin v. Löwisc3001752005-01-23 09:27:24 +00005606
Martin v. Löwis11017b12006-01-14 18:12:57 +00005607
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005608
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005609
5610
5611
5612
5613
5614
5615
5616
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005617
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005618
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005619
5620
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005621
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005622
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005623for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5624fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005625ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005626shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005627unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005628sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5629sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005630sys/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 +00005631sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005632sys/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 +00005633sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005634bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005635do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005636as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005637if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005638 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5639echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005640if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005641 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005642fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005643ac_res=`eval echo '${'$as_ac_Header'}'`
5644 { echo "$as_me:$LINENO: result: $ac_res" >&5
5645echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005646else
Martin v. Löwis11437992002-04-12 09:54:03 +00005647 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005648{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5649echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005650cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005651/* confdefs.h. */
5652_ACEOF
5653cat confdefs.h >>conftest.$ac_ext
5654cat >>conftest.$ac_ext <<_ACEOF
5655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005656$ac_includes_default
5657#include <$ac_header>
5658_ACEOF
5659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005660if { (ac_try="$ac_compile"
5661case "(($ac_try" in
5662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5663 *) ac_try_echo=$ac_try;;
5664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005668 grep -v '^ *+' conftest.er1 >conftest.err
5669 rm -f conftest.er1
5670 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005672 (exit $ac_status); } && {
5673 test -z "$ac_c_werror_flag" ||
5674 test ! -s conftest.err
5675 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005676 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005677else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005679sed 's/^/| /' conftest.$ac_ext >&5
5680
Martin v. Löwiseba40652007-08-30 20:10:57 +00005681 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005683
5684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005685{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5686echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005687
5688# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005689{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5690echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005692/* confdefs.h. */
5693_ACEOF
5694cat confdefs.h >>conftest.$ac_ext
5695cat >>conftest.$ac_ext <<_ACEOF
5696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005697#include <$ac_header>
5698_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005699if { (ac_try="$ac_cpp conftest.$ac_ext"
5700case "(($ac_try" in
5701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5702 *) ac_try_echo=$ac_try;;
5703esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005705 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005706 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005707 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005708 rm -f conftest.er1
5709 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005711 (exit $ac_status); } >/dev/null && {
5712 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5713 test ! -s conftest.err
5714 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005715 ac_header_preproc=yes
5716else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005718sed 's/^/| /' conftest.$ac_ext >&5
5719
Martin v. Löwis11437992002-04-12 09:54:03 +00005720 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005722
Martin v. Löwis11437992002-04-12 09:54:03 +00005723rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005724{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5725echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005726
5727# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005728case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5729 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005730 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5731echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5732 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5733echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005734 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005735 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005736 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005737 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5738echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5739 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5740echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5741 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5742echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5743 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5744echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5745 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5746echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5747 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5748echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005749 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005750## -------------------------------------- ##
5751## Report this to http://bugs.python.org/ ##
5752## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005753_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005754 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005755 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005756esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005757{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5758echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005759if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005760 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005761else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005762 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005763fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005764ac_res=`eval echo '${'$as_ac_Header'}'`
5765 { echo "$as_me:$LINENO: result: $ac_res" >&5
5766echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005767
5768fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005769if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005770 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005771#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005772_ACEOF
5773
5774fi
5775
Guido van Rossum627b2d71993-12-24 10:39:16 +00005776done
5777
Martin v. Löwis11437992002-04-12 09:54:03 +00005778
5779
5780
5781
5782
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005783ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005784for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005785 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5786{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5787echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005788if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005789 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005790else
Martin v. Löwis11437992002-04-12 09:54:03 +00005791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005792/* confdefs.h. */
5793_ACEOF
5794cat confdefs.h >>conftest.$ac_ext
5795cat >>conftest.$ac_ext <<_ACEOF
5796/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005797#include <sys/types.h>
5798#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005799
Martin v. Löwis11437992002-04-12 09:54:03 +00005800int
5801main ()
5802{
5803if ((DIR *) 0)
5804return 0;
5805 ;
5806 return 0;
5807}
5808_ACEOF
5809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005810if { (ac_try="$ac_compile"
5811case "(($ac_try" in
5812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5813 *) ac_try_echo=$ac_try;;
5814esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005818 grep -v '^ *+' conftest.er1 >conftest.err
5819 rm -f conftest.er1
5820 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005822 (exit $ac_status); } && {
5823 test -z "$ac_c_werror_flag" ||
5824 test ! -s conftest.err
5825 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005826 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005827else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005829sed 's/^/| /' conftest.$ac_ext >&5
5830
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005833
5834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005835fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005836ac_res=`eval echo '${'$as_ac_Header'}'`
5837 { echo "$as_me:$LINENO: result: $ac_res" >&5
5838echo "${ECHO_T}$ac_res" >&6; }
5839if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005840 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005841#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005842_ACEOF
5843
5844ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005845fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005847done
5848# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5849if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005850 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5851echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005852if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005853 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005854else
Martin v. Löwis11437992002-04-12 09:54:03 +00005855 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005856cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005857/* confdefs.h. */
5858_ACEOF
5859cat confdefs.h >>conftest.$ac_ext
5860cat >>conftest.$ac_ext <<_ACEOF
5861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005862
Martin v. Löwiseba40652007-08-30 20:10:57 +00005863/* Override any GCC internal prototype to avoid an error.
5864 Use char because int might match the return type of a GCC
5865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005866#ifdef __cplusplus
5867extern "C"
5868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005869char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005870int
5871main ()
5872{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005873return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005874 ;
5875 return 0;
5876}
5877_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005878for ac_lib in '' dir; do
5879 if test -z "$ac_lib"; then
5880 ac_res="none required"
5881 else
5882 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005883 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005884 fi
5885 rm -f conftest.$ac_objext conftest$ac_exeext
5886if { (ac_try="$ac_link"
5887case "(($ac_try" in
5888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5889 *) ac_try_echo=$ac_try;;
5890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005892 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005893 ac_status=$?
5894 grep -v '^ *+' conftest.er1 >conftest.err
5895 rm -f conftest.er1
5896 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005898 (exit $ac_status); } && {
5899 test -z "$ac_c_werror_flag" ||
5900 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005901 } && test -s conftest$ac_exeext &&
5902 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005903 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005905 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005906sed 's/^/| /' conftest.$ac_ext >&5
5907
Martin v. Löwiseba40652007-08-30 20:10:57 +00005908
Brett Cannon19fab762007-06-02 03:02:29 +00005909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005910
5911rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5912 conftest$ac_exeext
5913 if test "${ac_cv_search_opendir+set}" = set; then
5914 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005916done
5917if test "${ac_cv_search_opendir+set}" = set; then
5918 :
5919else
5920 ac_cv_search_opendir=no
5921fi
5922rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005923LIBS=$ac_func_search_save_LIBS
5924fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005925{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5926echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005927ac_res=$ac_cv_search_opendir
5928if test "$ac_res" != no; then
5929 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005930
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005931fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005932
Michael W. Hudson54241132001-12-07 15:38:26 +00005933else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005934 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5935echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005936if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005937 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005938else
5939 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005940cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005941/* confdefs.h. */
5942_ACEOF
5943cat confdefs.h >>conftest.$ac_ext
5944cat >>conftest.$ac_ext <<_ACEOF
5945/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005946
Martin v. Löwiseba40652007-08-30 20:10:57 +00005947/* Override any GCC internal prototype to avoid an error.
5948 Use char because int might match the return type of a GCC
5949 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005950#ifdef __cplusplus
5951extern "C"
5952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005953char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005954int
5955main ()
5956{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005957return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005958 ;
5959 return 0;
5960}
5961_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005962for ac_lib in '' x; do
5963 if test -z "$ac_lib"; then
5964 ac_res="none required"
5965 else
5966 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005967 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005968 fi
5969 rm -f conftest.$ac_objext conftest$ac_exeext
5970if { (ac_try="$ac_link"
5971case "(($ac_try" in
5972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5973 *) ac_try_echo=$ac_try;;
5974esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005976 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005977 ac_status=$?
5978 grep -v '^ *+' conftest.er1 >conftest.err
5979 rm -f conftest.er1
5980 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005982 (exit $ac_status); } && {
5983 test -z "$ac_c_werror_flag" ||
5984 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005985 } && test -s conftest$ac_exeext &&
5986 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005987 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005989 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005990sed 's/^/| /' conftest.$ac_ext >&5
5991
Martin v. Löwiseba40652007-08-30 20:10:57 +00005992
Brett Cannon19fab762007-06-02 03:02:29 +00005993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005994
5995rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5996 conftest$ac_exeext
5997 if test "${ac_cv_search_opendir+set}" = set; then
5998 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006000done
6001if test "${ac_cv_search_opendir+set}" = set; then
6002 :
6003else
6004 ac_cv_search_opendir=no
6005fi
6006rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006007LIBS=$ac_func_search_save_LIBS
6008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006009{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6010echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006011ac_res=$ac_cv_search_opendir
6012if test "$ac_res" != no; then
6013 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006014
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006015fi
6016
6017fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006018
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006019{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6020echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006021if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006022 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023else
6024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006025/* confdefs.h. */
6026_ACEOF
6027cat confdefs.h >>conftest.$ac_ext
6028cat >>conftest.$ac_ext <<_ACEOF
6029/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006030#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031int
6032main ()
6033{
6034return makedev(0, 0);
6035 ;
6036 return 0;
6037}
6038_ACEOF
6039rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006040if { (ac_try="$ac_link"
6041case "(($ac_try" in
6042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6043 *) ac_try_echo=$ac_try;;
6044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006046 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006048 grep -v '^ *+' conftest.er1 >conftest.err
6049 rm -f conftest.er1
6050 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006052 (exit $ac_status); } && {
6053 test -z "$ac_c_werror_flag" ||
6054 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006055 } && test -s conftest$ac_exeext &&
6056 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057 ac_cv_header_sys_types_h_makedev=yes
6058else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006060sed 's/^/| /' conftest.$ac_ext >&5
6061
Martin v. Löwiseba40652007-08-30 20:10:57 +00006062 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006064
6065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006066 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006067
6068fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006069{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6070echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071
6072if test $ac_cv_header_sys_types_h_makedev = no; then
6073if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006074 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6075echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006077 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006079{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6080echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081else
6082 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006083{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6084echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006086/* confdefs.h. */
6087_ACEOF
6088cat confdefs.h >>conftest.$ac_ext
6089cat >>conftest.$ac_ext <<_ACEOF
6090/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091$ac_includes_default
6092#include <sys/mkdev.h>
6093_ACEOF
6094rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006095if { (ac_try="$ac_compile"
6096case "(($ac_try" in
6097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6098 *) ac_try_echo=$ac_try;;
6099esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006103 grep -v '^ *+' conftest.er1 >conftest.err
6104 rm -f conftest.er1
6105 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006107 (exit $ac_status); } && {
6108 test -z "$ac_c_werror_flag" ||
6109 test ! -s conftest.err
6110 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006111 ac_header_compiler=yes
6112else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006114sed 's/^/| /' conftest.$ac_ext >&5
6115
Martin v. Löwiseba40652007-08-30 20:10:57 +00006116 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006118
6119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006120{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6121echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006122
6123# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006124{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6125echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006126cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006127/* confdefs.h. */
6128_ACEOF
6129cat confdefs.h >>conftest.$ac_ext
6130cat >>conftest.$ac_ext <<_ACEOF
6131/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132#include <sys/mkdev.h>
6133_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006134if { (ac_try="$ac_cpp conftest.$ac_ext"
6135case "(($ac_try" in
6136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6137 *) ac_try_echo=$ac_try;;
6138esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006140 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006142 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143 rm -f conftest.er1
6144 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006146 (exit $ac_status); } >/dev/null && {
6147 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6148 test ! -s conftest.err
6149 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150 ac_header_preproc=yes
6151else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006153sed 's/^/| /' conftest.$ac_ext >&5
6154
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155 ac_header_preproc=no
6156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006157
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006159{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6160echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161
6162# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006163case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6164 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006165 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6166echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6167 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6168echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006169 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006170 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006171 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006172 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6173echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6174 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6175echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6176 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6177echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6178 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6179echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6180 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6181echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6182 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6183echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006184 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006185## -------------------------------------- ##
6186## Report this to http://bugs.python.org/ ##
6187## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006188_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006189 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006190 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006192{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6193echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006195 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006196else
6197 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6198fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006199{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6200echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201
6202fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006203if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204
6205cat >>confdefs.h <<\_ACEOF
6206#define MAJOR_IN_MKDEV 1
6207_ACEOF
6208
6209fi
6210
6211
6212
6213 if test $ac_cv_header_sys_mkdev_h = no; then
6214 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006215 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6216echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217if test "${ac_cv_header_sys_sysmacros_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 +00006219fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006220{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6221echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222else
6223 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006224{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6225echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006227/* confdefs.h. */
6228_ACEOF
6229cat confdefs.h >>conftest.$ac_ext
6230cat >>conftest.$ac_ext <<_ACEOF
6231/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232$ac_includes_default
6233#include <sys/sysmacros.h>
6234_ACEOF
6235rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006236if { (ac_try="$ac_compile"
6237case "(($ac_try" in
6238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6239 *) ac_try_echo=$ac_try;;
6240esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006244 grep -v '^ *+' conftest.er1 >conftest.err
6245 rm -f conftest.er1
6246 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006248 (exit $ac_status); } && {
6249 test -z "$ac_c_werror_flag" ||
6250 test ! -s conftest.err
6251 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252 ac_header_compiler=yes
6253else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006255sed 's/^/| /' conftest.$ac_ext >&5
6256
Martin v. Löwiseba40652007-08-30 20:10:57 +00006257 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006259
6260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006261{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6262echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263
6264# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006265{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6266echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006268/* confdefs.h. */
6269_ACEOF
6270cat confdefs.h >>conftest.$ac_ext
6271cat >>conftest.$ac_ext <<_ACEOF
6272/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273#include <sys/sysmacros.h>
6274_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006275if { (ac_try="$ac_cpp conftest.$ac_ext"
6276case "(($ac_try" in
6277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6278 *) ac_try_echo=$ac_try;;
6279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006281 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006283 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284 rm -f conftest.er1
6285 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006287 (exit $ac_status); } >/dev/null && {
6288 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6289 test ! -s conftest.err
6290 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291 ac_header_preproc=yes
6292else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006294sed 's/^/| /' conftest.$ac_ext >&5
6295
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296 ac_header_preproc=no
6297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006298
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006300{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6301echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302
6303# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006304case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6305 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006306 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6307echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6308 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6309echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006310 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006311 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006312 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006313 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6314echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6315 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6316echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6317 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6318echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6319 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6320echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6321 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6322echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6323 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6324echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006325 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006326## -------------------------------------- ##
6327## Report this to http://bugs.python.org/ ##
6328## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006329_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006330 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006331 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006332esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006333{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6334echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006335if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006336 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006337else
6338 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6339fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006340{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6341echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006342
6343fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006344if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006345
6346cat >>confdefs.h <<\_ACEOF
6347#define MAJOR_IN_SYSMACROS 1
6348_ACEOF
6349
6350fi
6351
6352
6353 fi
6354fi
6355
Michael W. Hudson54241132001-12-07 15:38:26 +00006356
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006357# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006358
6359for ac_header in term.h
6360do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006361as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6362{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6363echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006364if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006365 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366else
6367 cat >conftest.$ac_ext <<_ACEOF
6368/* confdefs.h. */
6369_ACEOF
6370cat confdefs.h >>conftest.$ac_ext
6371cat >>conftest.$ac_ext <<_ACEOF
6372/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006373
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006374#ifdef HAVE_CURSES_H
6375#include <curses.h>
6376#endif
6377
6378
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006379#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006380_ACEOF
6381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006382if { (ac_try="$ac_compile"
6383case "(($ac_try" in
6384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6385 *) ac_try_echo=$ac_try;;
6386esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006389 ac_status=$?
6390 grep -v '^ *+' conftest.er1 >conftest.err
6391 rm -f conftest.er1
6392 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006394 (exit $ac_status); } && {
6395 test -z "$ac_c_werror_flag" ||
6396 test ! -s conftest.err
6397 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006398 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006400 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006401sed 's/^/| /' conftest.$ac_ext >&5
6402
Martin v. Löwiseba40652007-08-30 20:10:57 +00006403 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006405
6406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006407fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006408ac_res=`eval echo '${'$as_ac_Header'}'`
6409 { echo "$as_me:$LINENO: result: $ac_res" >&5
6410echo "${ECHO_T}$ac_res" >&6; }
6411if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006412 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006413#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006414_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006415
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006416fi
6417
6418done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006419
6420
Martin v. Löwis11017b12006-01-14 18:12:57 +00006421# On Linux, netlink.h requires asm/types.h
6422
6423for ac_header in linux/netlink.h
6424do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006425as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6426{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6427echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006428if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006429 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006430else
6431 cat >conftest.$ac_ext <<_ACEOF
6432/* confdefs.h. */
6433_ACEOF
6434cat confdefs.h >>conftest.$ac_ext
6435cat >>conftest.$ac_ext <<_ACEOF
6436/* end confdefs.h. */
6437
6438#ifdef HAVE_ASM_TYPES_H
6439#include <asm/types.h>
6440#endif
6441#ifdef HAVE_SYS_SOCKET_H
6442#include <sys/socket.h>
6443#endif
6444
6445
6446#include <$ac_header>
6447_ACEOF
6448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006449if { (ac_try="$ac_compile"
6450case "(($ac_try" in
6451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6452 *) ac_try_echo=$ac_try;;
6453esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006456 ac_status=$?
6457 grep -v '^ *+' conftest.er1 >conftest.err
6458 rm -f conftest.er1
6459 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006461 (exit $ac_status); } && {
6462 test -z "$ac_c_werror_flag" ||
6463 test ! -s conftest.err
6464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006465 eval "$as_ac_Header=yes"
6466else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006467 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006468sed 's/^/| /' conftest.$ac_ext >&5
6469
Martin v. Löwiseba40652007-08-30 20:10:57 +00006470 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006472
6473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006474fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006475ac_res=`eval echo '${'$as_ac_Header'}'`
6476 { echo "$as_me:$LINENO: result: $ac_res" >&5
6477echo "${ECHO_T}$ac_res" >&6; }
6478if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006479 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006480#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006481_ACEOF
6482
6483fi
6484
6485done
6486
6487
Guido van Rossum627b2d71993-12-24 10:39:16 +00006488# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006489was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006490{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6491echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006493/* confdefs.h. */
6494_ACEOF
6495cat confdefs.h >>conftest.$ac_ext
6496cat >>conftest.$ac_ext <<_ACEOF
6497/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006498#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006499
6500_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006502 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006503 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006504else
Martin v. Löwis11437992002-04-12 09:54:03 +00006505
6506
6507cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006508#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006509_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006510
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006511
Guido van Rossum627b2d71993-12-24 10:39:16 +00006512fi
Ronald Oussoren25967582009-09-06 10:00:26 +00006513rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006514
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006515{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6516echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006517
Neal Norwitz11690112002-07-30 01:08:28 +00006518# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006519{ echo "$as_me:$LINENO: checking for makedev" >&5
6520echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006521cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006522/* confdefs.h. */
6523_ACEOF
6524cat confdefs.h >>conftest.$ac_ext
6525cat >>conftest.$ac_ext <<_ACEOF
6526/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006527#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006528int
6529main ()
6530{
6531 makedev(0, 0)
6532 ;
6533 return 0;
6534}
6535_ACEOF
6536rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006537if { (ac_try="$ac_link"
6538case "(($ac_try" in
6539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6540 *) ac_try_echo=$ac_try;;
6541esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006543 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006545 grep -v '^ *+' conftest.er1 >conftest.err
6546 rm -f conftest.er1
6547 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006549 (exit $ac_status); } && {
6550 test -z "$ac_c_werror_flag" ||
6551 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006552 } && test -s conftest$ac_exeext &&
6553 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006554 ac_cv_has_makedev=yes
6555else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006557sed 's/^/| /' conftest.$ac_ext >&5
6558
Martin v. Löwiseba40652007-08-30 20:10:57 +00006559 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006561
6562rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006563 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006564if test "$ac_cv_has_makedev" = "no"; then
6565 # we didn't link, try if _OSF_SOURCE will allow us to link
6566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006567/* confdefs.h. */
6568_ACEOF
6569cat confdefs.h >>conftest.$ac_ext
6570cat >>conftest.$ac_ext <<_ACEOF
6571/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006572
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006573#define _OSF_SOURCE 1
6574#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006575
Neal Norwitz11690112002-07-30 01:08:28 +00006576int
6577main ()
6578{
6579 makedev(0, 0)
6580 ;
6581 return 0;
6582}
6583_ACEOF
6584rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006585if { (ac_try="$ac_link"
6586case "(($ac_try" in
6587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6588 *) ac_try_echo=$ac_try;;
6589esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006591 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006593 grep -v '^ *+' conftest.er1 >conftest.err
6594 rm -f conftest.er1
6595 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006597 (exit $ac_status); } && {
6598 test -z "$ac_c_werror_flag" ||
6599 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006600 } && test -s conftest$ac_exeext &&
6601 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006602 ac_cv_has_makedev=yes
6603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006605sed 's/^/| /' conftest.$ac_ext >&5
6606
Martin v. Löwiseba40652007-08-30 20:10:57 +00006607 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006609
6610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006611 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006612 if test "$ac_cv_has_makedev" = "yes"; then
6613
6614cat >>confdefs.h <<\_ACEOF
6615#define _OSF_SOURCE 1
6616_ACEOF
6617
6618 fi
6619fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006620{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6621echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006622if test "$ac_cv_has_makedev" = "yes"; then
6623
6624cat >>confdefs.h <<\_ACEOF
6625#define HAVE_MAKEDEV 1
6626_ACEOF
6627
6628fi
6629
Martin v. Löwis399a6892002-10-04 10:22:02 +00006630# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6631# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6632# defined, but the compiler does not support pragma redefine_extname,
6633# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6634# structures (such as rlimit64) without declaring them. As a
6635# work-around, disable LFS on such configurations
6636
6637use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006638{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6639echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006641/* confdefs.h. */
6642_ACEOF
6643cat confdefs.h >>conftest.$ac_ext
6644cat >>conftest.$ac_ext <<_ACEOF
6645/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006646
6647#define _LARGEFILE_SOURCE 1
6648#define _FILE_OFFSET_BITS 64
6649#include <sys/resource.h>
6650
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651int
6652main ()
6653{
6654struct rlimit foo;
6655 ;
6656 return 0;
6657}
6658_ACEOF
6659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006660if { (ac_try="$ac_compile"
6661case "(($ac_try" in
6662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6663 *) ac_try_echo=$ac_try;;
6664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006668 grep -v '^ *+' conftest.er1 >conftest.err
6669 rm -f conftest.er1
6670 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006672 (exit $ac_status); } && {
6673 test -z "$ac_c_werror_flag" ||
6674 test ! -s conftest.err
6675 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006676 sol_lfs_bug=no
6677else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006679sed 's/^/| /' conftest.$ac_ext >&5
6680
Martin v. Löwiseba40652007-08-30 20:10:57 +00006681 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683
6684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006685{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6686echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006687if test "$sol_lfs_bug" = "yes"; then
6688 use_lfs=no
6689fi
6690
6691if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006692# Two defines needed to enable largefile support on various platforms
6693# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006694
Martin v. Löwis11437992002-04-12 09:54:03 +00006695cat >>confdefs.h <<\_ACEOF
6696#define _LARGEFILE_SOURCE 1
6697_ACEOF
6698
6699
6700cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006701#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006702_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006703
Martin v. Löwis399a6892002-10-04 10:22:02 +00006704fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006705
Guido van Rossum84e7b241996-08-19 21:59:00 +00006706# Add some code to confdefs.h so that the test for off_t works on SCO
6707cat >> confdefs.h <<\EOF
6708#if defined(SCO_DS)
6709#undef _OFF_T
6710#endif
6711EOF
6712
Guido van Rossumef2255b2000-03-10 22:30:29 +00006713# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006714{ echo "$as_me:$LINENO: checking for mode_t" >&5
6715echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006716if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006717 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006718else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006719 cat >conftest.$ac_ext <<_ACEOF
6720/* confdefs.h. */
6721_ACEOF
6722cat confdefs.h >>conftest.$ac_ext
6723cat >>conftest.$ac_ext <<_ACEOF
6724/* end confdefs.h. */
6725$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006726typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006727int
6728main ()
6729{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006730if ((ac__type_new_ *) 0)
6731 return 0;
6732if (sizeof (ac__type_new_))
6733 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006734 ;
6735 return 0;
6736}
6737_ACEOF
6738rm -f conftest.$ac_objext
6739if { (ac_try="$ac_compile"
6740case "(($ac_try" in
6741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6742 *) ac_try_echo=$ac_try;;
6743esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006745 (eval "$ac_compile") 2>conftest.er1
6746 ac_status=$?
6747 grep -v '^ *+' conftest.er1 >conftest.err
6748 rm -f conftest.er1
6749 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006751 (exit $ac_status); } && {
6752 test -z "$ac_c_werror_flag" ||
6753 test ! -s conftest.err
6754 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006755 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006758sed 's/^/| /' conftest.$ac_ext >&5
6759
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006760 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762
6763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006764fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006765{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6766echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6767if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006768 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006769else
Martin v. Löwis11437992002-04-12 09:54:03 +00006770
6771cat >>confdefs.h <<_ACEOF
6772#define mode_t int
6773_ACEOF
6774
6775fi
6776
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006777{ echo "$as_me:$LINENO: checking for off_t" >&5
6778echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006779if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006780 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006781else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006782 cat >conftest.$ac_ext <<_ACEOF
6783/* confdefs.h. */
6784_ACEOF
6785cat confdefs.h >>conftest.$ac_ext
6786cat >>conftest.$ac_ext <<_ACEOF
6787/* end confdefs.h. */
6788$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006789typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006790int
6791main ()
6792{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006793if ((ac__type_new_ *) 0)
6794 return 0;
6795if (sizeof (ac__type_new_))
6796 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006797 ;
6798 return 0;
6799}
6800_ACEOF
6801rm -f conftest.$ac_objext
6802if { (ac_try="$ac_compile"
6803case "(($ac_try" in
6804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6805 *) ac_try_echo=$ac_try;;
6806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006808 (eval "$ac_compile") 2>conftest.er1
6809 ac_status=$?
6810 grep -v '^ *+' conftest.er1 >conftest.err
6811 rm -f conftest.er1
6812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006814 (exit $ac_status); } && {
6815 test -z "$ac_c_werror_flag" ||
6816 test ! -s conftest.err
6817 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006818 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006819else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006821sed 's/^/| /' conftest.$ac_ext >&5
6822
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006823 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006825
6826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006827fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006828{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6829echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6830if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006831 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006832else
Martin v. Löwis11437992002-04-12 09:54:03 +00006833
6834cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006835#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006836_ACEOF
6837
6838fi
6839
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006840{ echo "$as_me:$LINENO: checking for pid_t" >&5
6841echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006842if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006843 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006844else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006845 cat >conftest.$ac_ext <<_ACEOF
6846/* confdefs.h. */
6847_ACEOF
6848cat confdefs.h >>conftest.$ac_ext
6849cat >>conftest.$ac_ext <<_ACEOF
6850/* end confdefs.h. */
6851$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006852typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006853int
6854main ()
6855{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006856if ((ac__type_new_ *) 0)
6857 return 0;
6858if (sizeof (ac__type_new_))
6859 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006860 ;
6861 return 0;
6862}
6863_ACEOF
6864rm -f conftest.$ac_objext
6865if { (ac_try="$ac_compile"
6866case "(($ac_try" in
6867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6868 *) ac_try_echo=$ac_try;;
6869esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006871 (eval "$ac_compile") 2>conftest.er1
6872 ac_status=$?
6873 grep -v '^ *+' conftest.er1 >conftest.err
6874 rm -f conftest.er1
6875 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006877 (exit $ac_status); } && {
6878 test -z "$ac_c_werror_flag" ||
6879 test ! -s conftest.err
6880 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006881 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006882else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006884sed 's/^/| /' conftest.$ac_ext >&5
6885
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006886 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006888
6889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006890fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006891{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6892echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6893if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006894 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006895else
Martin v. Löwis11437992002-04-12 09:54:03 +00006896
6897cat >>confdefs.h <<_ACEOF
6898#define pid_t int
6899_ACEOF
6900
6901fi
6902
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006903{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6904echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006905if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006906 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006907else
6908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006909/* confdefs.h. */
6910_ACEOF
6911cat confdefs.h >>conftest.$ac_ext
6912cat >>conftest.$ac_ext <<_ACEOF
6913/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006914#include <sys/types.h>
6915#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006916
Martin v. Löwis11437992002-04-12 09:54:03 +00006917int
6918main ()
6919{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006920return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006921 ;
6922 return 0;
6923}
6924_ACEOF
6925rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006926if { (ac_try="$ac_compile"
6927case "(($ac_try" in
6928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6929 *) ac_try_echo=$ac_try;;
6930esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006932 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006934 grep -v '^ *+' conftest.er1 >conftest.err
6935 rm -f conftest.er1
6936 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938 (exit $ac_status); } && {
6939 test -z "$ac_c_werror_flag" ||
6940 test ! -s conftest.err
6941 } && test -s conftest.$ac_objext; then
6942 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006943else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006945sed 's/^/| /' conftest.$ac_ext >&5
6946
Martin v. Löwiseba40652007-08-30 20:10:57 +00006947 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949
6950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006951fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006952{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6953echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006954
Martin v. Löwis11437992002-04-12 09:54:03 +00006955cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006956#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006957_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006958
Michael W. Hudson54241132001-12-07 15:38:26 +00006959
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006960{ echo "$as_me:$LINENO: checking for size_t" >&5
6961echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006962if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006963 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006964else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006965 cat >conftest.$ac_ext <<_ACEOF
6966/* confdefs.h. */
6967_ACEOF
6968cat confdefs.h >>conftest.$ac_ext
6969cat >>conftest.$ac_ext <<_ACEOF
6970/* end confdefs.h. */
6971$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006972typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006973int
6974main ()
6975{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006976if ((ac__type_new_ *) 0)
6977 return 0;
6978if (sizeof (ac__type_new_))
6979 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006980 ;
6981 return 0;
6982}
6983_ACEOF
6984rm -f conftest.$ac_objext
6985if { (ac_try="$ac_compile"
6986case "(($ac_try" in
6987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6988 *) ac_try_echo=$ac_try;;
6989esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006991 (eval "$ac_compile") 2>conftest.er1
6992 ac_status=$?
6993 grep -v '^ *+' conftest.er1 >conftest.err
6994 rm -f conftest.er1
6995 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006997 (exit $ac_status); } && {
6998 test -z "$ac_c_werror_flag" ||
6999 test ! -s conftest.err
7000 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007001 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007002else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007004sed 's/^/| /' conftest.$ac_ext >&5
7005
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007006 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007008
7009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007010fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007011{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7012echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7013if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007014 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007015else
Martin v. Löwis11437992002-04-12 09:54:03 +00007016
7017cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007018#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007019_ACEOF
7020
7021fi
7022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007023{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7024echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007025if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007026 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007027else
7028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007029/* confdefs.h. */
7030_ACEOF
7031cat confdefs.h >>conftest.$ac_ext
7032cat >>conftest.$ac_ext <<_ACEOF
7033/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007034#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007035
7036_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007038 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007039 ac_cv_type_uid_t=yes
7040else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007041 ac_cv_type_uid_t=no
7042fi
Ronald Oussoren25967582009-09-06 10:00:26 +00007043rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007046{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7047echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007048if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007049
Martin v. Löwis11437992002-04-12 09:54:03 +00007050cat >>confdefs.h <<\_ACEOF
7051#define uid_t int
7052_ACEOF
7053
7054
7055cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007057_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058
7059fi
7060
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007061
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007062 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7063echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007064if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007065 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007066else
7067 ac_cv_c_uint32_t=no
7068 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7069 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7070 cat >conftest.$ac_ext <<_ACEOF
7071/* confdefs.h. */
7072_ACEOF
7073cat confdefs.h >>conftest.$ac_ext
7074cat >>conftest.$ac_ext <<_ACEOF
7075/* end confdefs.h. */
7076$ac_includes_default
7077int
7078main ()
7079{
7080static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7081test_array [0] = 0
7082
7083 ;
7084 return 0;
7085}
7086_ACEOF
7087rm -f conftest.$ac_objext
7088if { (ac_try="$ac_compile"
7089case "(($ac_try" in
7090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7091 *) ac_try_echo=$ac_try;;
7092esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007094 (eval "$ac_compile") 2>conftest.er1
7095 ac_status=$?
7096 grep -v '^ *+' conftest.er1 >conftest.err
7097 rm -f conftest.er1
7098 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007100 (exit $ac_status); } && {
7101 test -z "$ac_c_werror_flag" ||
7102 test ! -s conftest.err
7103 } && test -s conftest.$ac_objext; then
7104 case $ac_type in
7105 uint32_t) ac_cv_c_uint32_t=yes ;;
7106 *) ac_cv_c_uint32_t=$ac_type ;;
7107esac
7108
7109else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007110 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007111sed 's/^/| /' conftest.$ac_ext >&5
7112
7113
7114fi
7115
7116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7117 test "$ac_cv_c_uint32_t" != no && break
7118 done
7119fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007120{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7121echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007122 case $ac_cv_c_uint32_t in #(
7123 no|yes) ;; #(
7124 *)
7125
7126cat >>confdefs.h <<\_ACEOF
7127#define _UINT32_T 1
7128_ACEOF
7129
7130
7131cat >>confdefs.h <<_ACEOF
7132#define uint32_t $ac_cv_c_uint32_t
7133_ACEOF
7134;;
7135 esac
7136
7137
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007138 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7139echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007140if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007141 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007142else
7143 ac_cv_c_uint64_t=no
7144 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7145 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7146 cat >conftest.$ac_ext <<_ACEOF
7147/* confdefs.h. */
7148_ACEOF
7149cat confdefs.h >>conftest.$ac_ext
7150cat >>conftest.$ac_ext <<_ACEOF
7151/* end confdefs.h. */
7152$ac_includes_default
7153int
7154main ()
7155{
7156static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7157test_array [0] = 0
7158
7159 ;
7160 return 0;
7161}
7162_ACEOF
7163rm -f conftest.$ac_objext
7164if { (ac_try="$ac_compile"
7165case "(($ac_try" in
7166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7167 *) ac_try_echo=$ac_try;;
7168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007170 (eval "$ac_compile") 2>conftest.er1
7171 ac_status=$?
7172 grep -v '^ *+' conftest.er1 >conftest.err
7173 rm -f conftest.er1
7174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007176 (exit $ac_status); } && {
7177 test -z "$ac_c_werror_flag" ||
7178 test ! -s conftest.err
7179 } && test -s conftest.$ac_objext; then
7180 case $ac_type in
7181 uint64_t) ac_cv_c_uint64_t=yes ;;
7182 *) ac_cv_c_uint64_t=$ac_type ;;
7183esac
7184
7185else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007186 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007187sed 's/^/| /' conftest.$ac_ext >&5
7188
7189
7190fi
7191
7192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7193 test "$ac_cv_c_uint64_t" != no && break
7194 done
7195fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007196{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7197echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007198 case $ac_cv_c_uint64_t in #(
7199 no|yes) ;; #(
7200 *)
7201
7202cat >>confdefs.h <<\_ACEOF
7203#define _UINT64_T 1
7204_ACEOF
7205
7206
7207cat >>confdefs.h <<_ACEOF
7208#define uint64_t $ac_cv_c_uint64_t
7209_ACEOF
7210;;
7211 esac
7212
7213
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007214 { echo "$as_me:$LINENO: checking for int32_t" >&5
7215echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007216if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007217 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007218else
7219 ac_cv_c_int32_t=no
7220 for ac_type in 'int32_t' 'int' 'long int' \
7221 'long long int' 'short int' 'signed char'; do
7222 cat >conftest.$ac_ext <<_ACEOF
7223/* confdefs.h. */
7224_ACEOF
7225cat confdefs.h >>conftest.$ac_ext
7226cat >>conftest.$ac_ext <<_ACEOF
7227/* end confdefs.h. */
7228$ac_includes_default
7229int
7230main ()
7231{
7232static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7233test_array [0] = 0
7234
7235 ;
7236 return 0;
7237}
7238_ACEOF
7239rm -f conftest.$ac_objext
7240if { (ac_try="$ac_compile"
7241case "(($ac_try" in
7242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7243 *) ac_try_echo=$ac_try;;
7244esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007246 (eval "$ac_compile") 2>conftest.er1
7247 ac_status=$?
7248 grep -v '^ *+' conftest.er1 >conftest.err
7249 rm -f conftest.er1
7250 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007252 (exit $ac_status); } && {
7253 test -z "$ac_c_werror_flag" ||
7254 test ! -s conftest.err
7255 } && test -s conftest.$ac_objext; then
7256 cat >conftest.$ac_ext <<_ACEOF
7257/* confdefs.h. */
7258_ACEOF
7259cat confdefs.h >>conftest.$ac_ext
7260cat >>conftest.$ac_ext <<_ACEOF
7261/* end confdefs.h. */
7262$ac_includes_default
7263int
7264main ()
7265{
7266static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007267 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007268test_array [0] = 0
7269
7270 ;
7271 return 0;
7272}
7273_ACEOF
7274rm -f conftest.$ac_objext
7275if { (ac_try="$ac_compile"
7276case "(($ac_try" in
7277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7278 *) ac_try_echo=$ac_try;;
7279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007281 (eval "$ac_compile") 2>conftest.er1
7282 ac_status=$?
7283 grep -v '^ *+' conftest.er1 >conftest.err
7284 rm -f conftest.er1
7285 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007287 (exit $ac_status); } && {
7288 test -z "$ac_c_werror_flag" ||
7289 test ! -s conftest.err
7290 } && test -s conftest.$ac_objext; then
7291 :
7292else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007293 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007294sed 's/^/| /' conftest.$ac_ext >&5
7295
7296 case $ac_type in
7297 int32_t) ac_cv_c_int32_t=yes ;;
7298 *) ac_cv_c_int32_t=$ac_type ;;
7299esac
7300
7301fi
7302
7303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7304else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007305 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007306sed 's/^/| /' conftest.$ac_ext >&5
7307
7308
7309fi
7310
7311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7312 test "$ac_cv_c_int32_t" != no && break
7313 done
7314fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007315{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7316echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007317 case $ac_cv_c_int32_t in #(
7318 no|yes) ;; #(
7319 *)
7320
7321cat >>confdefs.h <<_ACEOF
7322#define int32_t $ac_cv_c_int32_t
7323_ACEOF
7324;;
7325 esac
7326
7327
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007328 { echo "$as_me:$LINENO: checking for int64_t" >&5
7329echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007330if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007331 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007332else
7333 ac_cv_c_int64_t=no
7334 for ac_type in 'int64_t' 'int' 'long int' \
7335 'long long int' 'short int' 'signed char'; do
7336 cat >conftest.$ac_ext <<_ACEOF
7337/* confdefs.h. */
7338_ACEOF
7339cat confdefs.h >>conftest.$ac_ext
7340cat >>conftest.$ac_ext <<_ACEOF
7341/* end confdefs.h. */
7342$ac_includes_default
7343int
7344main ()
7345{
7346static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7347test_array [0] = 0
7348
7349 ;
7350 return 0;
7351}
7352_ACEOF
7353rm -f conftest.$ac_objext
7354if { (ac_try="$ac_compile"
7355case "(($ac_try" in
7356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7357 *) ac_try_echo=$ac_try;;
7358esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007360 (eval "$ac_compile") 2>conftest.er1
7361 ac_status=$?
7362 grep -v '^ *+' conftest.er1 >conftest.err
7363 rm -f conftest.er1
7364 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007366 (exit $ac_status); } && {
7367 test -z "$ac_c_werror_flag" ||
7368 test ! -s conftest.err
7369 } && test -s conftest.$ac_objext; then
7370 cat >conftest.$ac_ext <<_ACEOF
7371/* confdefs.h. */
7372_ACEOF
7373cat confdefs.h >>conftest.$ac_ext
7374cat >>conftest.$ac_ext <<_ACEOF
7375/* end confdefs.h. */
7376$ac_includes_default
7377int
7378main ()
7379{
7380static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007381 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007382test_array [0] = 0
7383
7384 ;
7385 return 0;
7386}
7387_ACEOF
7388rm -f conftest.$ac_objext
7389if { (ac_try="$ac_compile"
7390case "(($ac_try" in
7391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7392 *) ac_try_echo=$ac_try;;
7393esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007395 (eval "$ac_compile") 2>conftest.er1
7396 ac_status=$?
7397 grep -v '^ *+' conftest.er1 >conftest.err
7398 rm -f conftest.er1
7399 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007401 (exit $ac_status); } && {
7402 test -z "$ac_c_werror_flag" ||
7403 test ! -s conftest.err
7404 } && test -s conftest.$ac_objext; then
7405 :
7406else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007407 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007408sed 's/^/| /' conftest.$ac_ext >&5
7409
7410 case $ac_type in
7411 int64_t) ac_cv_c_int64_t=yes ;;
7412 *) ac_cv_c_int64_t=$ac_type ;;
7413esac
7414
7415fi
7416
7417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007419 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007420sed 's/^/| /' conftest.$ac_ext >&5
7421
7422
7423fi
7424
7425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7426 test "$ac_cv_c_int64_t" != no && break
7427 done
7428fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007429{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7430echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007431 case $ac_cv_c_int64_t in #(
7432 no|yes) ;; #(
7433 *)
7434
7435cat >>confdefs.h <<_ACEOF
7436#define int64_t $ac_cv_c_int64_t
7437_ACEOF
7438;;
7439 esac
7440
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007441{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7442echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007443if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007444 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007445else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007446 cat >conftest.$ac_ext <<_ACEOF
7447/* confdefs.h. */
7448_ACEOF
7449cat confdefs.h >>conftest.$ac_ext
7450cat >>conftest.$ac_ext <<_ACEOF
7451/* end confdefs.h. */
7452$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007453typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007454int
7455main ()
7456{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007457if ((ac__type_new_ *) 0)
7458 return 0;
7459if (sizeof (ac__type_new_))
7460 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007461 ;
7462 return 0;
7463}
7464_ACEOF
7465rm -f conftest.$ac_objext
7466if { (ac_try="$ac_compile"
7467case "(($ac_try" in
7468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7469 *) ac_try_echo=$ac_try;;
7470esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007472 (eval "$ac_compile") 2>conftest.er1
7473 ac_status=$?
7474 grep -v '^ *+' conftest.er1 >conftest.err
7475 rm -f conftest.er1
7476 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007478 (exit $ac_status); } && {
7479 test -z "$ac_c_werror_flag" ||
7480 test ! -s conftest.err
7481 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007482 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007484 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007485sed 's/^/| /' conftest.$ac_ext >&5
7486
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007487 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007489
7490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007491fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007492{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7493echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7494if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007495
7496cat >>confdefs.h <<\_ACEOF
7497#define HAVE_SSIZE_T 1
7498_ACEOF
7499
7500fi
7501
Jack Jansendd19cf82001-12-06 22:36:17 +00007502
Michael W. Hudson54241132001-12-07 15:38:26 +00007503# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007504# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007505{ echo "$as_me:$LINENO: checking for int" >&5
7506echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7507if test "${ac_cv_type_int+set}" = set; then
7508 echo $ECHO_N "(cached) $ECHO_C" >&6
7509else
7510 cat >conftest.$ac_ext <<_ACEOF
7511/* confdefs.h. */
7512_ACEOF
7513cat confdefs.h >>conftest.$ac_ext
7514cat >>conftest.$ac_ext <<_ACEOF
7515/* end confdefs.h. */
7516$ac_includes_default
7517typedef int ac__type_new_;
7518int
7519main ()
7520{
7521if ((ac__type_new_ *) 0)
7522 return 0;
7523if (sizeof (ac__type_new_))
7524 return 0;
7525 ;
7526 return 0;
7527}
7528_ACEOF
7529rm -f conftest.$ac_objext
7530if { (ac_try="$ac_compile"
7531case "(($ac_try" in
7532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7533 *) ac_try_echo=$ac_try;;
7534esac
7535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7536 (eval "$ac_compile") 2>conftest.er1
7537 ac_status=$?
7538 grep -v '^ *+' conftest.er1 >conftest.err
7539 rm -f conftest.er1
7540 cat conftest.err >&5
7541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542 (exit $ac_status); } && {
7543 test -z "$ac_c_werror_flag" ||
7544 test ! -s conftest.err
7545 } && test -s conftest.$ac_objext; then
7546 ac_cv_type_int=yes
7547else
7548 echo "$as_me: failed program was:" >&5
7549sed 's/^/| /' conftest.$ac_ext >&5
7550
7551 ac_cv_type_int=no
7552fi
7553
7554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7555fi
7556{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7557echo "${ECHO_T}$ac_cv_type_int" >&6; }
7558
Martin v. Löwiseba40652007-08-30 20:10:57 +00007559# The cast to long int works around a bug in the HP C Compiler
7560# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7561# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7562# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007563{ echo "$as_me:$LINENO: checking size of int" >&5
7564echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007565if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007566 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007567else
Martin v. Löwis11437992002-04-12 09:54:03 +00007568 if test "$cross_compiling" = yes; then
7569 # Depending upon the size, compute the lo and hi bounds.
7570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007571/* confdefs.h. */
7572_ACEOF
7573cat confdefs.h >>conftest.$ac_ext
7574cat >>conftest.$ac_ext <<_ACEOF
7575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007576$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007577 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007578int
7579main ()
7580{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007581static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007582test_array [0] = 0
7583
7584 ;
7585 return 0;
7586}
7587_ACEOF
7588rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007589if { (ac_try="$ac_compile"
7590case "(($ac_try" in
7591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7592 *) ac_try_echo=$ac_try;;
7593esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007597 grep -v '^ *+' conftest.er1 >conftest.err
7598 rm -f conftest.er1
7599 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007601 (exit $ac_status); } && {
7602 test -z "$ac_c_werror_flag" ||
7603 test ! -s conftest.err
7604 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007605 ac_lo=0 ac_mid=0
7606 while :; do
7607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007608/* confdefs.h. */
7609_ACEOF
7610cat confdefs.h >>conftest.$ac_ext
7611cat >>conftest.$ac_ext <<_ACEOF
7612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007613$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007614 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007615int
7616main ()
7617{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007619test_array [0] = 0
7620
7621 ;
7622 return 0;
7623}
7624_ACEOF
7625rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007626if { (ac_try="$ac_compile"
7627case "(($ac_try" in
7628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7629 *) ac_try_echo=$ac_try;;
7630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007634 grep -v '^ *+' conftest.er1 >conftest.err
7635 rm -f conftest.er1
7636 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007638 (exit $ac_status); } && {
7639 test -z "$ac_c_werror_flag" ||
7640 test ! -s conftest.err
7641 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007642 ac_hi=$ac_mid; break
7643else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007645sed 's/^/| /' conftest.$ac_ext >&5
7646
Martin v. Löwiseba40652007-08-30 20:10:57 +00007647 ac_lo=`expr $ac_mid + 1`
7648 if test $ac_lo -le $ac_mid; then
7649 ac_lo= ac_hi=
7650 break
7651 fi
7652 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654
7655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 done
7657else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007659sed 's/^/| /' conftest.$ac_ext >&5
7660
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007662/* confdefs.h. */
7663_ACEOF
7664cat confdefs.h >>conftest.$ac_ext
7665cat >>conftest.$ac_ext <<_ACEOF
7666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007667$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007668 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007669int
7670main ()
7671{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007672static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007673test_array [0] = 0
7674
7675 ;
7676 return 0;
7677}
7678_ACEOF
7679rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007680if { (ac_try="$ac_compile"
7681case "(($ac_try" in
7682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7683 *) ac_try_echo=$ac_try;;
7684esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007688 grep -v '^ *+' conftest.er1 >conftest.err
7689 rm -f conftest.er1
7690 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007692 (exit $ac_status); } && {
7693 test -z "$ac_c_werror_flag" ||
7694 test ! -s conftest.err
7695 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007696 ac_hi=-1 ac_mid=-1
7697 while :; do
7698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007699/* confdefs.h. */
7700_ACEOF
7701cat confdefs.h >>conftest.$ac_ext
7702cat >>conftest.$ac_ext <<_ACEOF
7703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007704$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007705 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007706int
7707main ()
7708{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007709static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007710test_array [0] = 0
7711
7712 ;
7713 return 0;
7714}
7715_ACEOF
7716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717if { (ac_try="$ac_compile"
7718case "(($ac_try" in
7719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7720 *) ac_try_echo=$ac_try;;
7721esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007725 grep -v '^ *+' conftest.er1 >conftest.err
7726 rm -f conftest.er1
7727 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007729 (exit $ac_status); } && {
7730 test -z "$ac_c_werror_flag" ||
7731 test ! -s conftest.err
7732 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007733 ac_lo=$ac_mid; break
7734else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007736sed 's/^/| /' conftest.$ac_ext >&5
7737
Martin v. Löwiseba40652007-08-30 20:10:57 +00007738 ac_hi=`expr '(' $ac_mid ')' - 1`
7739 if test $ac_mid -le $ac_hi; then
7740 ac_lo= ac_hi=
7741 break
7742 fi
7743 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745
7746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 done
7748else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007750sed 's/^/| /' conftest.$ac_ext >&5
7751
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754
7755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007757
7758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007759# Binary search between lo and hi bounds.
7760while test "x$ac_lo" != "x$ac_hi"; do
7761 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007763/* confdefs.h. */
7764_ACEOF
7765cat confdefs.h >>conftest.$ac_ext
7766cat >>conftest.$ac_ext <<_ACEOF
7767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007768$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007769 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007770int
7771main ()
7772{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007773static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007774test_array [0] = 0
7775
7776 ;
7777 return 0;
7778}
7779_ACEOF
7780rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007781if { (ac_try="$ac_compile"
7782case "(($ac_try" in
7783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7784 *) ac_try_echo=$ac_try;;
7785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007789 grep -v '^ *+' conftest.er1 >conftest.err
7790 rm -f conftest.er1
7791 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007793 (exit $ac_status); } && {
7794 test -z "$ac_c_werror_flag" ||
7795 test ! -s conftest.err
7796 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 ac_hi=$ac_mid
7798else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007800sed 's/^/| /' conftest.$ac_ext >&5
7801
Martin v. Löwiseba40652007-08-30 20:10:57 +00007802 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007804
7805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007806done
7807case $ac_lo in
7808?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007809'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007810 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007811See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007812echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007813See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007814 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007815 else
7816 ac_cv_sizeof_int=0
7817 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007818esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007819else
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007821/* confdefs.h. */
7822_ACEOF
7823cat confdefs.h >>conftest.$ac_ext
7824cat >>conftest.$ac_ext <<_ACEOF
7825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007826$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007827 typedef int ac__type_sizeof_;
7828static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7829static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007830#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007831#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007832int
7833main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007834{
Martin v. Löwis11437992002-04-12 09:54:03 +00007835
7836 FILE *f = fopen ("conftest.val", "w");
7837 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007838 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007839 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007841 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007842 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007843 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007844 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 }
7846 else
7847 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007848 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007849 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007850 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007851 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007852 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007853 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007854
7855 ;
7856 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007857}
Martin v. Löwis11437992002-04-12 09:54:03 +00007858_ACEOF
7859rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860if { (ac_try="$ac_link"
7861case "(($ac_try" in
7862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7863 *) ac_try_echo=$ac_try;;
7864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007866 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870 { (case "(($ac_try" in
7871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7872 *) ac_try_echo=$ac_try;;
7873esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007875 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 (exit $ac_status); }; }; then
7879 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007881 echo "$as_me: program exited with status $ac_status" >&5
7882echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007883sed 's/^/| /' conftest.$ac_ext >&5
7884
Martin v. Löwis11437992002-04-12 09:54:03 +00007885( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007886if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007887 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007888See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007889echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007890See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007891 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892 else
7893 ac_cv_sizeof_int=0
7894 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007896rm -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 +00007897fi
7898rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007899fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007900{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7901echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007902
7903
7904
Martin v. Löwis11437992002-04-12 09:54:03 +00007905cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007906#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007907_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007908
7909
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007910{ echo "$as_me:$LINENO: checking for long" >&5
7911echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7912if test "${ac_cv_type_long+set}" = set; then
7913 echo $ECHO_N "(cached) $ECHO_C" >&6
7914else
7915 cat >conftest.$ac_ext <<_ACEOF
7916/* confdefs.h. */
7917_ACEOF
7918cat confdefs.h >>conftest.$ac_ext
7919cat >>conftest.$ac_ext <<_ACEOF
7920/* end confdefs.h. */
7921$ac_includes_default
7922typedef long ac__type_new_;
7923int
7924main ()
7925{
7926if ((ac__type_new_ *) 0)
7927 return 0;
7928if (sizeof (ac__type_new_))
7929 return 0;
7930 ;
7931 return 0;
7932}
7933_ACEOF
7934rm -f conftest.$ac_objext
7935if { (ac_try="$ac_compile"
7936case "(($ac_try" in
7937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7938 *) ac_try_echo=$ac_try;;
7939esac
7940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7941 (eval "$ac_compile") 2>conftest.er1
7942 ac_status=$?
7943 grep -v '^ *+' conftest.er1 >conftest.err
7944 rm -f conftest.er1
7945 cat conftest.err >&5
7946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7947 (exit $ac_status); } && {
7948 test -z "$ac_c_werror_flag" ||
7949 test ! -s conftest.err
7950 } && test -s conftest.$ac_objext; then
7951 ac_cv_type_long=yes
7952else
7953 echo "$as_me: failed program was:" >&5
7954sed 's/^/| /' conftest.$ac_ext >&5
7955
7956 ac_cv_type_long=no
7957fi
7958
7959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7960fi
7961{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7962echo "${ECHO_T}$ac_cv_type_long" >&6; }
7963
Martin v. Löwiseba40652007-08-30 20:10:57 +00007964# The cast to long int works around a bug in the HP C Compiler
7965# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7966# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7967# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007968{ echo "$as_me:$LINENO: checking size of long" >&5
7969echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007970if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007971 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007972else
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 if test "$cross_compiling" = yes; then
7974 # Depending upon the size, compute the lo and hi bounds.
7975cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007976/* confdefs.h. */
7977_ACEOF
7978cat confdefs.h >>conftest.$ac_ext
7979cat >>conftest.$ac_ext <<_ACEOF
7980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007981$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007982 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007983int
7984main ()
7985{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007986static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007987test_array [0] = 0
7988
7989 ;
7990 return 0;
7991}
7992_ACEOF
7993rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007994if { (ac_try="$ac_compile"
7995case "(($ac_try" in
7996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7997 *) ac_try_echo=$ac_try;;
7998esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008002 grep -v '^ *+' conftest.er1 >conftest.err
8003 rm -f conftest.er1
8004 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008006 (exit $ac_status); } && {
8007 test -z "$ac_c_werror_flag" ||
8008 test ! -s conftest.err
8009 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008010 ac_lo=0 ac_mid=0
8011 while :; do
8012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* confdefs.h. */
8014_ACEOF
8015cat confdefs.h >>conftest.$ac_ext
8016cat >>conftest.$ac_ext <<_ACEOF
8017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008018$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008019 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008024test_array [0] = 0
8025
8026 ;
8027 return 0;
8028}
8029_ACEOF
8030rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008031if { (ac_try="$ac_compile"
8032case "(($ac_try" in
8033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8034 *) ac_try_echo=$ac_try;;
8035esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008039 grep -v '^ *+' conftest.er1 >conftest.err
8040 rm -f conftest.er1
8041 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008043 (exit $ac_status); } && {
8044 test -z "$ac_c_werror_flag" ||
8045 test ! -s conftest.err
8046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ac_hi=$ac_mid; break
8048else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008050sed 's/^/| /' conftest.$ac_ext >&5
8051
Martin v. Löwiseba40652007-08-30 20:10:57 +00008052 ac_lo=`expr $ac_mid + 1`
8053 if test $ac_lo -le $ac_mid; then
8054 ac_lo= ac_hi=
8055 break
8056 fi
8057 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008058fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059
8060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008061 done
8062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008064sed 's/^/| /' conftest.$ac_ext >&5
8065
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008067/* confdefs.h. */
8068_ACEOF
8069cat confdefs.h >>conftest.$ac_ext
8070cat >>conftest.$ac_ext <<_ACEOF
8071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008072$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008073 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008074int
8075main ()
8076{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008077static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008078test_array [0] = 0
8079
8080 ;
8081 return 0;
8082}
8083_ACEOF
8084rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008085if { (ac_try="$ac_compile"
8086case "(($ac_try" in
8087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8088 *) ac_try_echo=$ac_try;;
8089esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008093 grep -v '^ *+' conftest.er1 >conftest.err
8094 rm -f conftest.er1
8095 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008097 (exit $ac_status); } && {
8098 test -z "$ac_c_werror_flag" ||
8099 test ! -s conftest.err
8100 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008101 ac_hi=-1 ac_mid=-1
8102 while :; do
8103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008104/* confdefs.h. */
8105_ACEOF
8106cat confdefs.h >>conftest.$ac_ext
8107cat >>conftest.$ac_ext <<_ACEOF
8108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008109$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008110 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008111int
8112main ()
8113{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008114static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008115test_array [0] = 0
8116
8117 ;
8118 return 0;
8119}
8120_ACEOF
8121rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122if { (ac_try="$ac_compile"
8123case "(($ac_try" in
8124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8125 *) ac_try_echo=$ac_try;;
8126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008130 grep -v '^ *+' conftest.er1 >conftest.err
8131 rm -f conftest.er1
8132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008134 (exit $ac_status); } && {
8135 test -z "$ac_c_werror_flag" ||
8136 test ! -s conftest.err
8137 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ac_lo=$ac_mid; break
8139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008141sed 's/^/| /' conftest.$ac_ext >&5
8142
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143 ac_hi=`expr '(' $ac_mid ')' - 1`
8144 if test $ac_mid -le $ac_hi; then
8145 ac_lo= ac_hi=
8146 break
8147 fi
8148 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150
8151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 done
8153else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008155sed 's/^/| /' conftest.$ac_ext >&5
8156
Martin v. Löwiseba40652007-08-30 20:10:57 +00008157 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008159
8160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008162
8163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008164# Binary search between lo and hi bounds.
8165while test "x$ac_lo" != "x$ac_hi"; do
8166 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008168/* confdefs.h. */
8169_ACEOF
8170cat confdefs.h >>conftest.$ac_ext
8171cat >>conftest.$ac_ext <<_ACEOF
8172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008173$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008174 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008175int
8176main ()
8177{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008178static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008179test_array [0] = 0
8180
8181 ;
8182 return 0;
8183}
8184_ACEOF
8185rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008186if { (ac_try="$ac_compile"
8187case "(($ac_try" in
8188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8189 *) ac_try_echo=$ac_try;;
8190esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008192 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008194 grep -v '^ *+' conftest.er1 >conftest.err
8195 rm -f conftest.er1
8196 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008198 (exit $ac_status); } && {
8199 test -z "$ac_c_werror_flag" ||
8200 test ! -s conftest.err
8201 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008202 ac_hi=$ac_mid
8203else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008205sed 's/^/| /' conftest.$ac_ext >&5
8206
Martin v. Löwiseba40652007-08-30 20:10:57 +00008207 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008209
8210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008211done
8212case $ac_lo in
8213?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008215 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008216See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008217echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008218See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008219 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008220 else
8221 ac_cv_sizeof_long=0
8222 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008223esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008224else
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008226/* confdefs.h. */
8227_ACEOF
8228cat confdefs.h >>conftest.$ac_ext
8229cat >>conftest.$ac_ext <<_ACEOF
8230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008231$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008232 typedef long ac__type_sizeof_;
8233static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8234static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008235#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008236#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008237int
8238main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008239{
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
8241 FILE *f = fopen ("conftest.val", "w");
8242 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008243 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008244 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008245 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008246 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008247 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008248 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008249 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008250 }
8251 else
8252 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008253 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008254 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008255 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008256 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008257 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008258 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
8260 ;
8261 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008262}
Martin v. Löwis11437992002-04-12 09:54:03 +00008263_ACEOF
8264rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265if { (ac_try="$ac_link"
8266case "(($ac_try" in
8267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8268 *) ac_try_echo=$ac_try;;
8269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008271 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008272 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275 { (case "(($ac_try" in
8276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8277 *) ac_try_echo=$ac_try;;
8278esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008280 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008281 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008283 (exit $ac_status); }; }; then
8284 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008286 echo "$as_me: program exited with status $ac_status" >&5
8287echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008288sed 's/^/| /' conftest.$ac_ext >&5
8289
Martin v. Löwis11437992002-04-12 09:54:03 +00008290( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008291if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008292 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008293See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008294echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008295See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008296 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 else
8298 ac_cv_sizeof_long=0
8299 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008301rm -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 +00008302fi
8303rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008304fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008305{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8306echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008307
8308
8309
Martin v. Löwis11437992002-04-12 09:54:03 +00008310cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008311#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008312_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008313
8314
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008315{ echo "$as_me:$LINENO: checking for void *" >&5
8316echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8317if test "${ac_cv_type_void_p+set}" = set; then
8318 echo $ECHO_N "(cached) $ECHO_C" >&6
8319else
8320 cat >conftest.$ac_ext <<_ACEOF
8321/* confdefs.h. */
8322_ACEOF
8323cat confdefs.h >>conftest.$ac_ext
8324cat >>conftest.$ac_ext <<_ACEOF
8325/* end confdefs.h. */
8326$ac_includes_default
8327typedef void * ac__type_new_;
8328int
8329main ()
8330{
8331if ((ac__type_new_ *) 0)
8332 return 0;
8333if (sizeof (ac__type_new_))
8334 return 0;
8335 ;
8336 return 0;
8337}
8338_ACEOF
8339rm -f conftest.$ac_objext
8340if { (ac_try="$ac_compile"
8341case "(($ac_try" in
8342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8343 *) ac_try_echo=$ac_try;;
8344esac
8345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8346 (eval "$ac_compile") 2>conftest.er1
8347 ac_status=$?
8348 grep -v '^ *+' conftest.er1 >conftest.err
8349 rm -f conftest.er1
8350 cat conftest.err >&5
8351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8352 (exit $ac_status); } && {
8353 test -z "$ac_c_werror_flag" ||
8354 test ! -s conftest.err
8355 } && test -s conftest.$ac_objext; then
8356 ac_cv_type_void_p=yes
8357else
8358 echo "$as_me: failed program was:" >&5
8359sed 's/^/| /' conftest.$ac_ext >&5
8360
8361 ac_cv_type_void_p=no
8362fi
8363
8364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8365fi
8366{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8367echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8368
Martin v. Löwiseba40652007-08-30 20:10:57 +00008369# The cast to long int works around a bug in the HP C Compiler
8370# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8371# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8372# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008373{ echo "$as_me:$LINENO: checking size of void *" >&5
8374echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008375if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008376 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008377else
Martin v. Löwis11437992002-04-12 09:54:03 +00008378 if test "$cross_compiling" = yes; then
8379 # Depending upon the size, compute the lo and hi bounds.
8380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008381/* confdefs.h. */
8382_ACEOF
8383cat confdefs.h >>conftest.$ac_ext
8384cat >>conftest.$ac_ext <<_ACEOF
8385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008386$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008387 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008388int
8389main ()
8390{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008391static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008392test_array [0] = 0
8393
8394 ;
8395 return 0;
8396}
8397_ACEOF
8398rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008399if { (ac_try="$ac_compile"
8400case "(($ac_try" in
8401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8402 *) ac_try_echo=$ac_try;;
8403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008407 grep -v '^ *+' conftest.er1 >conftest.err
8408 rm -f conftest.er1
8409 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008411 (exit $ac_status); } && {
8412 test -z "$ac_c_werror_flag" ||
8413 test ! -s conftest.err
8414 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008415 ac_lo=0 ac_mid=0
8416 while :; do
8417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008418/* confdefs.h. */
8419_ACEOF
8420cat confdefs.h >>conftest.$ac_ext
8421cat >>conftest.$ac_ext <<_ACEOF
8422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008423$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008424 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008425int
8426main ()
8427{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008429test_array [0] = 0
8430
8431 ;
8432 return 0;
8433}
8434_ACEOF
8435rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008436if { (ac_try="$ac_compile"
8437case "(($ac_try" in
8438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8439 *) ac_try_echo=$ac_try;;
8440esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008444 grep -v '^ *+' conftest.er1 >conftest.err
8445 rm -f conftest.er1
8446 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008448 (exit $ac_status); } && {
8449 test -z "$ac_c_werror_flag" ||
8450 test ! -s conftest.err
8451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 ac_hi=$ac_mid; break
8453else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008455sed 's/^/| /' conftest.$ac_ext >&5
8456
Martin v. Löwiseba40652007-08-30 20:10:57 +00008457 ac_lo=`expr $ac_mid + 1`
8458 if test $ac_lo -le $ac_mid; then
8459 ac_lo= ac_hi=
8460 break
8461 fi
8462 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464
8465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 done
8467else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008469sed 's/^/| /' conftest.$ac_ext >&5
8470
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008472/* confdefs.h. */
8473_ACEOF
8474cat confdefs.h >>conftest.$ac_ext
8475cat >>conftest.$ac_ext <<_ACEOF
8476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008477$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008478 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008479int
8480main ()
8481{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008482static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008483test_array [0] = 0
8484
8485 ;
8486 return 0;
8487}
8488_ACEOF
8489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008490if { (ac_try="$ac_compile"
8491case "(($ac_try" in
8492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8493 *) ac_try_echo=$ac_try;;
8494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008498 grep -v '^ *+' conftest.er1 >conftest.err
8499 rm -f conftest.er1
8500 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008502 (exit $ac_status); } && {
8503 test -z "$ac_c_werror_flag" ||
8504 test ! -s conftest.err
8505 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008506 ac_hi=-1 ac_mid=-1
8507 while :; do
8508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008509/* confdefs.h. */
8510_ACEOF
8511cat confdefs.h >>conftest.$ac_ext
8512cat >>conftest.$ac_ext <<_ACEOF
8513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008514$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008515 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008516int
8517main ()
8518{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008519static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008520test_array [0] = 0
8521
8522 ;
8523 return 0;
8524}
8525_ACEOF
8526rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008527if { (ac_try="$ac_compile"
8528case "(($ac_try" in
8529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8530 *) ac_try_echo=$ac_try;;
8531esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008535 grep -v '^ *+' conftest.er1 >conftest.err
8536 rm -f conftest.er1
8537 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008539 (exit $ac_status); } && {
8540 test -z "$ac_c_werror_flag" ||
8541 test ! -s conftest.err
8542 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008543 ac_lo=$ac_mid; break
8544else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008546sed 's/^/| /' conftest.$ac_ext >&5
8547
Martin v. Löwiseba40652007-08-30 20:10:57 +00008548 ac_hi=`expr '(' $ac_mid ')' - 1`
8549 if test $ac_mid -le $ac_hi; then
8550 ac_lo= ac_hi=
8551 break
8552 fi
8553 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555
8556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 done
8558else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008560sed 's/^/| /' conftest.$ac_ext >&5
8561
Martin v. Löwiseba40652007-08-30 20:10:57 +00008562 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564
8565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008567
8568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008569# Binary search between lo and hi bounds.
8570while test "x$ac_lo" != "x$ac_hi"; do
8571 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008573/* confdefs.h. */
8574_ACEOF
8575cat confdefs.h >>conftest.$ac_ext
8576cat >>conftest.$ac_ext <<_ACEOF
8577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008578$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008579 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008580int
8581main ()
8582{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008583static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008584test_array [0] = 0
8585
8586 ;
8587 return 0;
8588}
8589_ACEOF
8590rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008591if { (ac_try="$ac_compile"
8592case "(($ac_try" in
8593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8594 *) ac_try_echo=$ac_try;;
8595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008599 grep -v '^ *+' conftest.er1 >conftest.err
8600 rm -f conftest.er1
8601 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008603 (exit $ac_status); } && {
8604 test -z "$ac_c_werror_flag" ||
8605 test ! -s conftest.err
8606 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 ac_hi=$ac_mid
8608else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008610sed 's/^/| /' conftest.$ac_ext >&5
8611
Martin v. Löwiseba40652007-08-30 20:10:57 +00008612 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008614
8615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008616done
8617case $ac_lo in
8618?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008620 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008621See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008622echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008623See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008624 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008625 else
8626 ac_cv_sizeof_void_p=0
8627 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008628esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008629else
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008631/* confdefs.h. */
8632_ACEOF
8633cat confdefs.h >>conftest.$ac_ext
8634cat >>conftest.$ac_ext <<_ACEOF
8635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008636$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008637 typedef void * ac__type_sizeof_;
8638static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8639static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008640#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008641#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008642int
8643main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008644{
Martin v. Löwis11437992002-04-12 09:54:03 +00008645
8646 FILE *f = fopen ("conftest.val", "w");
8647 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008648 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008649 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008650 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008651 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008652 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008653 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008654 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 }
8656 else
8657 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008658 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008659 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008660 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008661 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008663 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008664
8665 ;
8666 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008667}
Martin v. Löwis11437992002-04-12 09:54:03 +00008668_ACEOF
8669rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670if { (ac_try="$ac_link"
8671case "(($ac_try" in
8672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8673 *) ac_try_echo=$ac_try;;
8674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008676 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680 { (case "(($ac_try" in
8681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8682 *) ac_try_echo=$ac_try;;
8683esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008685 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 (exit $ac_status); }; }; then
8689 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008690else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008691 echo "$as_me: program exited with status $ac_status" >&5
8692echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008693sed 's/^/| /' conftest.$ac_ext >&5
8694
Martin v. Löwis11437992002-04-12 09:54:03 +00008695( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008696if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008697 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008698See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008699echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008700See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008701 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702 else
8703 ac_cv_sizeof_void_p=0
8704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008706rm -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 +00008707fi
8708rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008709fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008710{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8711echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008712
8713
8714
Martin v. Löwis11437992002-04-12 09:54:03 +00008715cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008716#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008717_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008718
8719
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008720{ echo "$as_me:$LINENO: checking for short" >&5
8721echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8722if test "${ac_cv_type_short+set}" = set; then
8723 echo $ECHO_N "(cached) $ECHO_C" >&6
8724else
8725 cat >conftest.$ac_ext <<_ACEOF
8726/* confdefs.h. */
8727_ACEOF
8728cat confdefs.h >>conftest.$ac_ext
8729cat >>conftest.$ac_ext <<_ACEOF
8730/* end confdefs.h. */
8731$ac_includes_default
8732typedef short ac__type_new_;
8733int
8734main ()
8735{
8736if ((ac__type_new_ *) 0)
8737 return 0;
8738if (sizeof (ac__type_new_))
8739 return 0;
8740 ;
8741 return 0;
8742}
8743_ACEOF
8744rm -f conftest.$ac_objext
8745if { (ac_try="$ac_compile"
8746case "(($ac_try" in
8747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8748 *) ac_try_echo=$ac_try;;
8749esac
8750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8751 (eval "$ac_compile") 2>conftest.er1
8752 ac_status=$?
8753 grep -v '^ *+' conftest.er1 >conftest.err
8754 rm -f conftest.er1
8755 cat conftest.err >&5
8756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757 (exit $ac_status); } && {
8758 test -z "$ac_c_werror_flag" ||
8759 test ! -s conftest.err
8760 } && test -s conftest.$ac_objext; then
8761 ac_cv_type_short=yes
8762else
8763 echo "$as_me: failed program was:" >&5
8764sed 's/^/| /' conftest.$ac_ext >&5
8765
8766 ac_cv_type_short=no
8767fi
8768
8769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8770fi
8771{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8772echo "${ECHO_T}$ac_cv_type_short" >&6; }
8773
Martin v. Löwiseba40652007-08-30 20:10:57 +00008774# The cast to long int works around a bug in the HP C Compiler
8775# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8776# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8777# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008778{ echo "$as_me:$LINENO: checking size of short" >&5
8779echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008780if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008781 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008782else
Martin v. Löwis11437992002-04-12 09:54:03 +00008783 if test "$cross_compiling" = yes; then
8784 # Depending upon the size, compute the lo and hi bounds.
8785cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008786/* confdefs.h. */
8787_ACEOF
8788cat confdefs.h >>conftest.$ac_ext
8789cat >>conftest.$ac_ext <<_ACEOF
8790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008791$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008792 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008793int
8794main ()
8795{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008796static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008797test_array [0] = 0
8798
8799 ;
8800 return 0;
8801}
8802_ACEOF
8803rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008804if { (ac_try="$ac_compile"
8805case "(($ac_try" in
8806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8807 *) ac_try_echo=$ac_try;;
8808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008812 grep -v '^ *+' conftest.er1 >conftest.err
8813 rm -f conftest.er1
8814 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008816 (exit $ac_status); } && {
8817 test -z "$ac_c_werror_flag" ||
8818 test ! -s conftest.err
8819 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008820 ac_lo=0 ac_mid=0
8821 while :; do
8822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* confdefs.h. */
8824_ACEOF
8825cat confdefs.h >>conftest.$ac_ext
8826cat >>conftest.$ac_ext <<_ACEOF
8827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008828$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008829 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008830int
8831main ()
8832{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008834test_array [0] = 0
8835
8836 ;
8837 return 0;
8838}
8839_ACEOF
8840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008841if { (ac_try="$ac_compile"
8842case "(($ac_try" in
8843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8844 *) ac_try_echo=$ac_try;;
8845esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008849 grep -v '^ *+' conftest.er1 >conftest.err
8850 rm -f conftest.er1
8851 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008853 (exit $ac_status); } && {
8854 test -z "$ac_c_werror_flag" ||
8855 test ! -s conftest.err
8856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_hi=$ac_mid; break
8858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008860sed 's/^/| /' conftest.$ac_ext >&5
8861
Martin v. Löwiseba40652007-08-30 20:10:57 +00008862 ac_lo=`expr $ac_mid + 1`
8863 if test $ac_lo -le $ac_mid; then
8864 ac_lo= ac_hi=
8865 break
8866 fi
8867 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869
8870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 done
8872else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008874sed 's/^/| /' conftest.$ac_ext >&5
8875
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008877/* confdefs.h. */
8878_ACEOF
8879cat confdefs.h >>conftest.$ac_ext
8880cat >>conftest.$ac_ext <<_ACEOF
8881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008882$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008883 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008884int
8885main ()
8886{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008887static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008888test_array [0] = 0
8889
8890 ;
8891 return 0;
8892}
8893_ACEOF
8894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008895if { (ac_try="$ac_compile"
8896case "(($ac_try" in
8897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8898 *) ac_try_echo=$ac_try;;
8899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008903 grep -v '^ *+' conftest.er1 >conftest.err
8904 rm -f conftest.er1
8905 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008907 (exit $ac_status); } && {
8908 test -z "$ac_c_werror_flag" ||
8909 test ! -s conftest.err
8910 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 ac_hi=-1 ac_mid=-1
8912 while :; do
8913 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008914/* confdefs.h. */
8915_ACEOF
8916cat confdefs.h >>conftest.$ac_ext
8917cat >>conftest.$ac_ext <<_ACEOF
8918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008919$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008920 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008921int
8922main ()
8923{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008924static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008925test_array [0] = 0
8926
8927 ;
8928 return 0;
8929}
8930_ACEOF
8931rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008932if { (ac_try="$ac_compile"
8933case "(($ac_try" in
8934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8935 *) ac_try_echo=$ac_try;;
8936esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008940 grep -v '^ *+' conftest.er1 >conftest.err
8941 rm -f conftest.er1
8942 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008944 (exit $ac_status); } && {
8945 test -z "$ac_c_werror_flag" ||
8946 test ! -s conftest.err
8947 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 ac_lo=$ac_mid; break
8949else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008951sed 's/^/| /' conftest.$ac_ext >&5
8952
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953 ac_hi=`expr '(' $ac_mid ')' - 1`
8954 if test $ac_mid -le $ac_hi; then
8955 ac_lo= ac_hi=
8956 break
8957 fi
8958 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960
8961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 done
8963else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008965sed 's/^/| /' conftest.$ac_ext >&5
8966
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969
8970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008972
8973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008974# Binary search between lo and hi bounds.
8975while test "x$ac_lo" != "x$ac_hi"; do
8976 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008978/* confdefs.h. */
8979_ACEOF
8980cat confdefs.h >>conftest.$ac_ext
8981cat >>conftest.$ac_ext <<_ACEOF
8982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008983$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008984 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008985int
8986main ()
8987{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008988static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008989test_array [0] = 0
8990
8991 ;
8992 return 0;
8993}
8994_ACEOF
8995rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008996if { (ac_try="$ac_compile"
8997case "(($ac_try" in
8998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8999 *) ac_try_echo=$ac_try;;
9000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009002 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009004 grep -v '^ *+' conftest.er1 >conftest.err
9005 rm -f conftest.er1
9006 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009008 (exit $ac_status); } && {
9009 test -z "$ac_c_werror_flag" ||
9010 test ! -s conftest.err
9011 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ac_hi=$ac_mid
9013else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009015sed 's/^/| /' conftest.$ac_ext >&5
9016
Martin v. Löwiseba40652007-08-30 20:10:57 +00009017 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009019
9020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009021done
9022case $ac_lo in
9023?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009024'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009025 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009026See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009027echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009028See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009029 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009030 else
9031 ac_cv_sizeof_short=0
9032 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009033esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009034else
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009036/* confdefs.h. */
9037_ACEOF
9038cat confdefs.h >>conftest.$ac_ext
9039cat >>conftest.$ac_ext <<_ACEOF
9040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009041$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009042 typedef short ac__type_sizeof_;
9043static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9044static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009045#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009046#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009047int
9048main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009049{
Martin v. Löwis11437992002-04-12 09:54:03 +00009050
9051 FILE *f = fopen ("conftest.val", "w");
9052 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009053 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009054 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009056 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009057 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009058 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009059 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 }
9061 else
9062 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009063 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009064 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009065 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009066 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009067 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009068 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
9070 ;
9071 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009072}
Martin v. Löwis11437992002-04-12 09:54:03 +00009073_ACEOF
9074rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075if { (ac_try="$ac_link"
9076case "(($ac_try" in
9077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9078 *) ac_try_echo=$ac_try;;
9079esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085 { (case "(($ac_try" in
9086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9087 *) ac_try_echo=$ac_try;;
9088esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009090 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009091 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 (exit $ac_status); }; }; then
9094 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009096 echo "$as_me: program exited with status $ac_status" >&5
9097echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009098sed 's/^/| /' conftest.$ac_ext >&5
9099
Martin v. Löwis11437992002-04-12 09:54:03 +00009100( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009101if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009102 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009103See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009104echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009105See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009106 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107 else
9108 ac_cv_sizeof_short=0
9109 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009111rm -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 +00009112fi
9113rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009114fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009115{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9116echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009117
9118
9119
Martin v. Löwis11437992002-04-12 09:54:03 +00009120cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009121#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009122_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009123
9124
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009125{ echo "$as_me:$LINENO: checking for float" >&5
9126echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9127if test "${ac_cv_type_float+set}" = set; then
9128 echo $ECHO_N "(cached) $ECHO_C" >&6
9129else
9130 cat >conftest.$ac_ext <<_ACEOF
9131/* confdefs.h. */
9132_ACEOF
9133cat confdefs.h >>conftest.$ac_ext
9134cat >>conftest.$ac_ext <<_ACEOF
9135/* end confdefs.h. */
9136$ac_includes_default
9137typedef float ac__type_new_;
9138int
9139main ()
9140{
9141if ((ac__type_new_ *) 0)
9142 return 0;
9143if (sizeof (ac__type_new_))
9144 return 0;
9145 ;
9146 return 0;
9147}
9148_ACEOF
9149rm -f conftest.$ac_objext
9150if { (ac_try="$ac_compile"
9151case "(($ac_try" in
9152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9153 *) ac_try_echo=$ac_try;;
9154esac
9155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9156 (eval "$ac_compile") 2>conftest.er1
9157 ac_status=$?
9158 grep -v '^ *+' conftest.er1 >conftest.err
9159 rm -f conftest.er1
9160 cat conftest.err >&5
9161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9162 (exit $ac_status); } && {
9163 test -z "$ac_c_werror_flag" ||
9164 test ! -s conftest.err
9165 } && test -s conftest.$ac_objext; then
9166 ac_cv_type_float=yes
9167else
9168 echo "$as_me: failed program was:" >&5
9169sed 's/^/| /' conftest.$ac_ext >&5
9170
9171 ac_cv_type_float=no
9172fi
9173
9174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9175fi
9176{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9177echo "${ECHO_T}$ac_cv_type_float" >&6; }
9178
Martin v. Löwiseba40652007-08-30 20:10:57 +00009179# The cast to long int works around a bug in the HP C Compiler
9180# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9181# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9182# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009183{ echo "$as_me:$LINENO: checking size of float" >&5
9184echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009185if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009186 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009187else
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 if test "$cross_compiling" = yes; then
9189 # Depending upon the size, compute the lo and hi bounds.
9190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009191/* confdefs.h. */
9192_ACEOF
9193cat confdefs.h >>conftest.$ac_ext
9194cat >>conftest.$ac_ext <<_ACEOF
9195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009196$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009197 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009198int
9199main ()
9200{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009201static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009202test_array [0] = 0
9203
9204 ;
9205 return 0;
9206}
9207_ACEOF
9208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009209if { (ac_try="$ac_compile"
9210case "(($ac_try" in
9211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9212 *) ac_try_echo=$ac_try;;
9213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009217 grep -v '^ *+' conftest.er1 >conftest.err
9218 rm -f conftest.er1
9219 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009221 (exit $ac_status); } && {
9222 test -z "$ac_c_werror_flag" ||
9223 test ! -s conftest.err
9224 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 ac_lo=0 ac_mid=0
9226 while :; do
9227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009228/* confdefs.h. */
9229_ACEOF
9230cat confdefs.h >>conftest.$ac_ext
9231cat >>conftest.$ac_ext <<_ACEOF
9232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009233$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009234 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009235int
9236main ()
9237{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009238static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009239test_array [0] = 0
9240
9241 ;
9242 return 0;
9243}
9244_ACEOF
9245rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009246if { (ac_try="$ac_compile"
9247case "(($ac_try" in
9248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9249 *) ac_try_echo=$ac_try;;
9250esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009254 grep -v '^ *+' conftest.er1 >conftest.err
9255 rm -f conftest.er1
9256 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009258 (exit $ac_status); } && {
9259 test -z "$ac_c_werror_flag" ||
9260 test ! -s conftest.err
9261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 ac_hi=$ac_mid; break
9263else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009265sed 's/^/| /' conftest.$ac_ext >&5
9266
Martin v. Löwiseba40652007-08-30 20:10:57 +00009267 ac_lo=`expr $ac_mid + 1`
9268 if test $ac_lo -le $ac_mid; then
9269 ac_lo= ac_hi=
9270 break
9271 fi
9272 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009274
9275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009276 done
9277else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009279sed 's/^/| /' conftest.$ac_ext >&5
9280
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009282/* confdefs.h. */
9283_ACEOF
9284cat confdefs.h >>conftest.$ac_ext
9285cat >>conftest.$ac_ext <<_ACEOF
9286/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009287$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009288 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009289int
9290main ()
9291{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009292static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009293test_array [0] = 0
9294
9295 ;
9296 return 0;
9297}
9298_ACEOF
9299rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009300if { (ac_try="$ac_compile"
9301case "(($ac_try" in
9302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9303 *) ac_try_echo=$ac_try;;
9304esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009308 grep -v '^ *+' conftest.er1 >conftest.err
9309 rm -f conftest.er1
9310 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009312 (exit $ac_status); } && {
9313 test -z "$ac_c_werror_flag" ||
9314 test ! -s conftest.err
9315 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009316 ac_hi=-1 ac_mid=-1
9317 while :; do
9318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009319/* confdefs.h. */
9320_ACEOF
9321cat confdefs.h >>conftest.$ac_ext
9322cat >>conftest.$ac_ext <<_ACEOF
9323/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009324$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009325 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009326int
9327main ()
9328{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009329static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009330test_array [0] = 0
9331
9332 ;
9333 return 0;
9334}
9335_ACEOF
9336rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009337if { (ac_try="$ac_compile"
9338case "(($ac_try" in
9339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9340 *) ac_try_echo=$ac_try;;
9341esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009345 grep -v '^ *+' conftest.er1 >conftest.err
9346 rm -f conftest.er1
9347 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009349 (exit $ac_status); } && {
9350 test -z "$ac_c_werror_flag" ||
9351 test ! -s conftest.err
9352 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 ac_lo=$ac_mid; break
9354else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009356sed 's/^/| /' conftest.$ac_ext >&5
9357
Martin v. Löwiseba40652007-08-30 20:10:57 +00009358 ac_hi=`expr '(' $ac_mid ')' - 1`
9359 if test $ac_mid -le $ac_hi; then
9360 ac_lo= ac_hi=
9361 break
9362 fi
9363 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365
9366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 done
9368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009370sed 's/^/| /' conftest.$ac_ext >&5
9371
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374
9375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377
9378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009379# Binary search between lo and hi bounds.
9380while test "x$ac_lo" != "x$ac_hi"; do
9381 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009383/* confdefs.h. */
9384_ACEOF
9385cat confdefs.h >>conftest.$ac_ext
9386cat >>conftest.$ac_ext <<_ACEOF
9387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009388$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009389 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009390int
9391main ()
9392{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009393static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009394test_array [0] = 0
9395
9396 ;
9397 return 0;
9398}
9399_ACEOF
9400rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009401if { (ac_try="$ac_compile"
9402case "(($ac_try" in
9403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9404 *) ac_try_echo=$ac_try;;
9405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009409 grep -v '^ *+' conftest.er1 >conftest.err
9410 rm -f conftest.er1
9411 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009413 (exit $ac_status); } && {
9414 test -z "$ac_c_werror_flag" ||
9415 test ! -s conftest.err
9416 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 ac_hi=$ac_mid
9418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009420sed 's/^/| /' conftest.$ac_ext >&5
9421
Martin v. Löwiseba40652007-08-30 20:10:57 +00009422 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009424
9425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009426done
9427case $ac_lo in
9428?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009430 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009431See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009432echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009433See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009434 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009435 else
9436 ac_cv_sizeof_float=0
9437 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009438esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009439else
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009441/* confdefs.h. */
9442_ACEOF
9443cat confdefs.h >>conftest.$ac_ext
9444cat >>conftest.$ac_ext <<_ACEOF
9445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009446$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009447 typedef float ac__type_sizeof_;
9448static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9449static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009450#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009451#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009452int
9453main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009454{
Martin v. Löwis11437992002-04-12 09:54:03 +00009455
9456 FILE *f = fopen ("conftest.val", "w");
9457 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009459 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009461 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009462 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009463 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009464 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 }
9466 else
9467 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009468 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009469 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009470 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009471 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009472 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009473 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009474
9475 ;
9476 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009477}
Martin v. Löwis11437992002-04-12 09:54:03 +00009478_ACEOF
9479rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480if { (ac_try="$ac_link"
9481case "(($ac_try" in
9482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9483 *) ac_try_echo=$ac_try;;
9484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490 { (case "(($ac_try" in
9491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9492 *) ac_try_echo=$ac_try;;
9493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 (exit $ac_status); }; }; then
9499 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009501 echo "$as_me: program exited with status $ac_status" >&5
9502echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009503sed 's/^/| /' conftest.$ac_ext >&5
9504
Martin v. Löwis11437992002-04-12 09:54:03 +00009505( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009506if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009507 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009508See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009509echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009510See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009511 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 else
9513 ac_cv_sizeof_float=0
9514 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009516rm -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 +00009517fi
9518rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009519fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009520{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9521echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009522
9523
9524
Martin v. Löwis11437992002-04-12 09:54:03 +00009525cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009526#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009527_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009528
9529
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009530{ echo "$as_me:$LINENO: checking for double" >&5
9531echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9532if test "${ac_cv_type_double+set}" = set; then
9533 echo $ECHO_N "(cached) $ECHO_C" >&6
9534else
9535 cat >conftest.$ac_ext <<_ACEOF
9536/* confdefs.h. */
9537_ACEOF
9538cat confdefs.h >>conftest.$ac_ext
9539cat >>conftest.$ac_ext <<_ACEOF
9540/* end confdefs.h. */
9541$ac_includes_default
9542typedef double ac__type_new_;
9543int
9544main ()
9545{
9546if ((ac__type_new_ *) 0)
9547 return 0;
9548if (sizeof (ac__type_new_))
9549 return 0;
9550 ;
9551 return 0;
9552}
9553_ACEOF
9554rm -f conftest.$ac_objext
9555if { (ac_try="$ac_compile"
9556case "(($ac_try" in
9557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9558 *) ac_try_echo=$ac_try;;
9559esac
9560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9561 (eval "$ac_compile") 2>conftest.er1
9562 ac_status=$?
9563 grep -v '^ *+' conftest.er1 >conftest.err
9564 rm -f conftest.er1
9565 cat conftest.err >&5
9566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9567 (exit $ac_status); } && {
9568 test -z "$ac_c_werror_flag" ||
9569 test ! -s conftest.err
9570 } && test -s conftest.$ac_objext; then
9571 ac_cv_type_double=yes
9572else
9573 echo "$as_me: failed program was:" >&5
9574sed 's/^/| /' conftest.$ac_ext >&5
9575
9576 ac_cv_type_double=no
9577fi
9578
9579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9580fi
9581{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9582echo "${ECHO_T}$ac_cv_type_double" >&6; }
9583
Martin v. Löwiseba40652007-08-30 20:10:57 +00009584# The cast to long int works around a bug in the HP C Compiler
9585# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9586# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9587# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009588{ echo "$as_me:$LINENO: checking size of double" >&5
9589echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009590if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009591 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009592else
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 if test "$cross_compiling" = yes; then
9594 # Depending upon the size, compute the lo and hi bounds.
9595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009596/* confdefs.h. */
9597_ACEOF
9598cat confdefs.h >>conftest.$ac_ext
9599cat >>conftest.$ac_ext <<_ACEOF
9600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009601$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009602 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009603int
9604main ()
9605{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009606static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009607test_array [0] = 0
9608
9609 ;
9610 return 0;
9611}
9612_ACEOF
9613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009614if { (ac_try="$ac_compile"
9615case "(($ac_try" in
9616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9617 *) ac_try_echo=$ac_try;;
9618esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009622 grep -v '^ *+' conftest.er1 >conftest.err
9623 rm -f conftest.er1
9624 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009626 (exit $ac_status); } && {
9627 test -z "$ac_c_werror_flag" ||
9628 test ! -s conftest.err
9629 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 ac_lo=0 ac_mid=0
9631 while :; do
9632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009633/* confdefs.h. */
9634_ACEOF
9635cat confdefs.h >>conftest.$ac_ext
9636cat >>conftest.$ac_ext <<_ACEOF
9637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009638$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009639 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009640int
9641main ()
9642{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009643static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009644test_array [0] = 0
9645
9646 ;
9647 return 0;
9648}
9649_ACEOF
9650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651if { (ac_try="$ac_compile"
9652case "(($ac_try" in
9653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9654 *) ac_try_echo=$ac_try;;
9655esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009659 grep -v '^ *+' conftest.er1 >conftest.err
9660 rm -f conftest.er1
9661 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009663 (exit $ac_status); } && {
9664 test -z "$ac_c_werror_flag" ||
9665 test ! -s conftest.err
9666 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ac_hi=$ac_mid; break
9668else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009670sed 's/^/| /' conftest.$ac_ext >&5
9671
Martin v. Löwiseba40652007-08-30 20:10:57 +00009672 ac_lo=`expr $ac_mid + 1`
9673 if test $ac_lo -le $ac_mid; then
9674 ac_lo= ac_hi=
9675 break
9676 fi
9677 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009679
9680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 done
9682else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009684sed 's/^/| /' conftest.$ac_ext >&5
9685
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009687/* confdefs.h. */
9688_ACEOF
9689cat confdefs.h >>conftest.$ac_ext
9690cat >>conftest.$ac_ext <<_ACEOF
9691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009692$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009693 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009694int
9695main ()
9696{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009697static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009698test_array [0] = 0
9699
9700 ;
9701 return 0;
9702}
9703_ACEOF
9704rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009705if { (ac_try="$ac_compile"
9706case "(($ac_try" in
9707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9708 *) ac_try_echo=$ac_try;;
9709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009713 grep -v '^ *+' conftest.er1 >conftest.err
9714 rm -f conftest.er1
9715 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009717 (exit $ac_status); } && {
9718 test -z "$ac_c_werror_flag" ||
9719 test ! -s conftest.err
9720 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 ac_hi=-1 ac_mid=-1
9722 while :; do
9723 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009724/* confdefs.h. */
9725_ACEOF
9726cat confdefs.h >>conftest.$ac_ext
9727cat >>conftest.$ac_ext <<_ACEOF
9728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009729$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009730 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009731int
9732main ()
9733{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009734static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009735test_array [0] = 0
9736
9737 ;
9738 return 0;
9739}
9740_ACEOF
9741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009742if { (ac_try="$ac_compile"
9743case "(($ac_try" in
9744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9745 *) ac_try_echo=$ac_try;;
9746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009750 grep -v '^ *+' conftest.er1 >conftest.err
9751 rm -f conftest.er1
9752 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009754 (exit $ac_status); } && {
9755 test -z "$ac_c_werror_flag" ||
9756 test ! -s conftest.err
9757 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 ac_lo=$ac_mid; break
9759else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009761sed 's/^/| /' conftest.$ac_ext >&5
9762
Martin v. Löwiseba40652007-08-30 20:10:57 +00009763 ac_hi=`expr '(' $ac_mid ')' - 1`
9764 if test $ac_mid -le $ac_hi; then
9765 ac_lo= ac_hi=
9766 break
9767 fi
9768 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770
9771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 done
9773else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009775sed 's/^/| /' conftest.$ac_ext >&5
9776
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779
9780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009782
9783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009784# Binary search between lo and hi bounds.
9785while test "x$ac_lo" != "x$ac_hi"; do
9786 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009788/* confdefs.h. */
9789_ACEOF
9790cat confdefs.h >>conftest.$ac_ext
9791cat >>conftest.$ac_ext <<_ACEOF
9792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009793$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009794 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009795int
9796main ()
9797{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009798static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009799test_array [0] = 0
9800
9801 ;
9802 return 0;
9803}
9804_ACEOF
9805rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009806if { (ac_try="$ac_compile"
9807case "(($ac_try" in
9808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9809 *) ac_try_echo=$ac_try;;
9810esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009812 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009814 grep -v '^ *+' conftest.er1 >conftest.err
9815 rm -f conftest.er1
9816 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009818 (exit $ac_status); } && {
9819 test -z "$ac_c_werror_flag" ||
9820 test ! -s conftest.err
9821 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 ac_hi=$ac_mid
9823else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009825sed 's/^/| /' conftest.$ac_ext >&5
9826
Martin v. Löwiseba40652007-08-30 20:10:57 +00009827 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009829
9830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009831done
9832case $ac_lo in
9833?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009835 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009836See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009837echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009838See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009839 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009840 else
9841 ac_cv_sizeof_double=0
9842 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009843esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009844else
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009846/* confdefs.h. */
9847_ACEOF
9848cat confdefs.h >>conftest.$ac_ext
9849cat >>conftest.$ac_ext <<_ACEOF
9850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009851$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009852 typedef double ac__type_sizeof_;
9853static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9854static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009855#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009856#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009857int
9858main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009859{
Martin v. Löwis11437992002-04-12 09:54:03 +00009860
9861 FILE *f = fopen ("conftest.val", "w");
9862 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009863 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009864 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009865 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009866 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009867 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009868 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009869 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 }
9871 else
9872 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009873 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009874 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009875 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009876 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009878 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009879
9880 ;
9881 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009882}
Martin v. Löwis11437992002-04-12 09:54:03 +00009883_ACEOF
9884rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885if { (ac_try="$ac_link"
9886case "(($ac_try" in
9887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9888 *) ac_try_echo=$ac_try;;
9889esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009891 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895 { (case "(($ac_try" in
9896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9897 *) ac_try_echo=$ac_try;;
9898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009900 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 (exit $ac_status); }; }; then
9904 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009906 echo "$as_me: program exited with status $ac_status" >&5
9907echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009908sed 's/^/| /' conftest.$ac_ext >&5
9909
Martin v. Löwis11437992002-04-12 09:54:03 +00009910( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009911if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009912 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009913See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009914echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009915See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009916 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917 else
9918 ac_cv_sizeof_double=0
9919 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009921rm -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 +00009922fi
9923rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009924fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009925{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9926echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009927
9928
9929
Martin v. Löwis11437992002-04-12 09:54:03 +00009930cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009931#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009932_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009933
9934
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009935{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9936echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9937if test "${ac_cv_type_fpos_t+set}" = set; then
9938 echo $ECHO_N "(cached) $ECHO_C" >&6
9939else
9940 cat >conftest.$ac_ext <<_ACEOF
9941/* confdefs.h. */
9942_ACEOF
9943cat confdefs.h >>conftest.$ac_ext
9944cat >>conftest.$ac_ext <<_ACEOF
9945/* end confdefs.h. */
9946$ac_includes_default
9947typedef fpos_t ac__type_new_;
9948int
9949main ()
9950{
9951if ((ac__type_new_ *) 0)
9952 return 0;
9953if (sizeof (ac__type_new_))
9954 return 0;
9955 ;
9956 return 0;
9957}
9958_ACEOF
9959rm -f conftest.$ac_objext
9960if { (ac_try="$ac_compile"
9961case "(($ac_try" in
9962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9963 *) ac_try_echo=$ac_try;;
9964esac
9965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9966 (eval "$ac_compile") 2>conftest.er1
9967 ac_status=$?
9968 grep -v '^ *+' conftest.er1 >conftest.err
9969 rm -f conftest.er1
9970 cat conftest.err >&5
9971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9972 (exit $ac_status); } && {
9973 test -z "$ac_c_werror_flag" ||
9974 test ! -s conftest.err
9975 } && test -s conftest.$ac_objext; then
9976 ac_cv_type_fpos_t=yes
9977else
9978 echo "$as_me: failed program was:" >&5
9979sed 's/^/| /' conftest.$ac_ext >&5
9980
9981 ac_cv_type_fpos_t=no
9982fi
9983
9984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9985fi
9986{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9987echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9988
Martin v. Löwiseba40652007-08-30 20:10:57 +00009989# The cast to long int works around a bug in the HP C Compiler
9990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9992# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009993{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9994echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009995if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009996 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009997else
Martin v. Löwis11437992002-04-12 09:54:03 +00009998 if test "$cross_compiling" = yes; then
9999 # Depending upon the size, compute the lo and hi bounds.
10000cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010001/* confdefs.h. */
10002_ACEOF
10003cat confdefs.h >>conftest.$ac_ext
10004cat >>conftest.$ac_ext <<_ACEOF
10005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010006$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010007 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010008int
10009main ()
10010{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010011static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010012test_array [0] = 0
10013
10014 ;
10015 return 0;
10016}
10017_ACEOF
10018rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010019if { (ac_try="$ac_compile"
10020case "(($ac_try" in
10021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10022 *) ac_try_echo=$ac_try;;
10023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010027 grep -v '^ *+' conftest.er1 >conftest.err
10028 rm -f conftest.er1
10029 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010031 (exit $ac_status); } && {
10032 test -z "$ac_c_werror_flag" ||
10033 test ! -s conftest.err
10034 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010035 ac_lo=0 ac_mid=0
10036 while :; do
10037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010038/* confdefs.h. */
10039_ACEOF
10040cat confdefs.h >>conftest.$ac_ext
10041cat >>conftest.$ac_ext <<_ACEOF
10042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010043$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010044 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010045int
10046main ()
10047{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010049test_array [0] = 0
10050
10051 ;
10052 return 0;
10053}
10054_ACEOF
10055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010056if { (ac_try="$ac_compile"
10057case "(($ac_try" in
10058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10059 *) ac_try_echo=$ac_try;;
10060esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010064 grep -v '^ *+' conftest.er1 >conftest.err
10065 rm -f conftest.er1
10066 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010068 (exit $ac_status); } && {
10069 test -z "$ac_c_werror_flag" ||
10070 test ! -s conftest.err
10071 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010072 ac_hi=$ac_mid; break
10073else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010075sed 's/^/| /' conftest.$ac_ext >&5
10076
Martin v. Löwiseba40652007-08-30 20:10:57 +000010077 ac_lo=`expr $ac_mid + 1`
10078 if test $ac_lo -le $ac_mid; then
10079 ac_lo= ac_hi=
10080 break
10081 fi
10082 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010084
10085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 done
10087else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010089sed 's/^/| /' conftest.$ac_ext >&5
10090
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010092/* confdefs.h. */
10093_ACEOF
10094cat confdefs.h >>conftest.$ac_ext
10095cat >>conftest.$ac_ext <<_ACEOF
10096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010097$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010098 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010099int
10100main ()
10101{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010102static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010103test_array [0] = 0
10104
10105 ;
10106 return 0;
10107}
10108_ACEOF
10109rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010110if { (ac_try="$ac_compile"
10111case "(($ac_try" in
10112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10113 *) ac_try_echo=$ac_try;;
10114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010116 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010118 grep -v '^ *+' conftest.er1 >conftest.err
10119 rm -f conftest.er1
10120 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010122 (exit $ac_status); } && {
10123 test -z "$ac_c_werror_flag" ||
10124 test ! -s conftest.err
10125 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 ac_hi=-1 ac_mid=-1
10127 while :; do
10128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010129/* confdefs.h. */
10130_ACEOF
10131cat confdefs.h >>conftest.$ac_ext
10132cat >>conftest.$ac_ext <<_ACEOF
10133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010134$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010135 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010136int
10137main ()
10138{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010139static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010140test_array [0] = 0
10141
10142 ;
10143 return 0;
10144}
10145_ACEOF
10146rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010147if { (ac_try="$ac_compile"
10148case "(($ac_try" in
10149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10150 *) ac_try_echo=$ac_try;;
10151esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010155 grep -v '^ *+' conftest.er1 >conftest.err
10156 rm -f conftest.er1
10157 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010159 (exit $ac_status); } && {
10160 test -z "$ac_c_werror_flag" ||
10161 test ! -s conftest.err
10162 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 ac_lo=$ac_mid; break
10164else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010166sed 's/^/| /' conftest.$ac_ext >&5
10167
Martin v. Löwiseba40652007-08-30 20:10:57 +000010168 ac_hi=`expr '(' $ac_mid ')' - 1`
10169 if test $ac_mid -le $ac_hi; then
10170 ac_lo= ac_hi=
10171 break
10172 fi
10173 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010175
10176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 done
10178else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010180sed 's/^/| /' conftest.$ac_ext >&5
10181
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010184
10185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010187
10188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010189# Binary search between lo and hi bounds.
10190while test "x$ac_lo" != "x$ac_hi"; do
10191 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010193/* confdefs.h. */
10194_ACEOF
10195cat confdefs.h >>conftest.$ac_ext
10196cat >>conftest.$ac_ext <<_ACEOF
10197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010198$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010199 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010200int
10201main ()
10202{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010203static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010204test_array [0] = 0
10205
10206 ;
10207 return 0;
10208}
10209_ACEOF
10210rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010211if { (ac_try="$ac_compile"
10212case "(($ac_try" in
10213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10214 *) ac_try_echo=$ac_try;;
10215esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010219 grep -v '^ *+' conftest.er1 >conftest.err
10220 rm -f conftest.er1
10221 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010223 (exit $ac_status); } && {
10224 test -z "$ac_c_werror_flag" ||
10225 test ! -s conftest.err
10226 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 ac_hi=$ac_mid
10228else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010230sed 's/^/| /' conftest.$ac_ext >&5
10231
Martin v. Löwiseba40652007-08-30 20:10:57 +000010232 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010234
10235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010236done
10237case $ac_lo in
10238?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010239'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010240 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010241See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010242echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010243See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010244 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010245 else
10246 ac_cv_sizeof_fpos_t=0
10247 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010248esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010249else
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010251/* confdefs.h. */
10252_ACEOF
10253cat confdefs.h >>conftest.$ac_ext
10254cat >>conftest.$ac_ext <<_ACEOF
10255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010256$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010257 typedef fpos_t ac__type_sizeof_;
10258static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10259static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010260#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010261#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010262int
10263main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010264{
Martin v. Löwis11437992002-04-12 09:54:03 +000010265
10266 FILE *f = fopen ("conftest.val", "w");
10267 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010268 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010269 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010271 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010272 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010273 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010274 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 }
10276 else
10277 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010278 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010279 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010280 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010281 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010283 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010284
10285 ;
10286 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010287}
Martin v. Löwis11437992002-04-12 09:54:03 +000010288_ACEOF
10289rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290if { (ac_try="$ac_link"
10291case "(($ac_try" in
10292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10293 *) ac_try_echo=$ac_try;;
10294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010296 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300 { (case "(($ac_try" in
10301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10302 *) ac_try_echo=$ac_try;;
10303esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010305 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 (exit $ac_status); }; }; then
10309 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010311 echo "$as_me: program exited with status $ac_status" >&5
10312echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010313sed 's/^/| /' conftest.$ac_ext >&5
10314
Martin v. Löwis11437992002-04-12 09:54:03 +000010315( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010316if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010317 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010318See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010319echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010320See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010321 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322 else
10323 ac_cv_sizeof_fpos_t=0
10324 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010326rm -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 +000010327fi
10328rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010329fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010330{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10331echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010332
10333
10334
Martin v. Löwis11437992002-04-12 09:54:03 +000010335cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010336#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010337_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010338
Michael W. Hudson54241132001-12-07 15:38:26 +000010339
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010340{ echo "$as_me:$LINENO: checking for size_t" >&5
10341echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10342if test "${ac_cv_type_size_t+set}" = set; then
10343 echo $ECHO_N "(cached) $ECHO_C" >&6
10344else
10345 cat >conftest.$ac_ext <<_ACEOF
10346/* confdefs.h. */
10347_ACEOF
10348cat confdefs.h >>conftest.$ac_ext
10349cat >>conftest.$ac_ext <<_ACEOF
10350/* end confdefs.h. */
10351$ac_includes_default
10352typedef size_t ac__type_new_;
10353int
10354main ()
10355{
10356if ((ac__type_new_ *) 0)
10357 return 0;
10358if (sizeof (ac__type_new_))
10359 return 0;
10360 ;
10361 return 0;
10362}
10363_ACEOF
10364rm -f conftest.$ac_objext
10365if { (ac_try="$ac_compile"
10366case "(($ac_try" in
10367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10368 *) ac_try_echo=$ac_try;;
10369esac
10370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10371 (eval "$ac_compile") 2>conftest.er1
10372 ac_status=$?
10373 grep -v '^ *+' conftest.er1 >conftest.err
10374 rm -f conftest.er1
10375 cat conftest.err >&5
10376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10377 (exit $ac_status); } && {
10378 test -z "$ac_c_werror_flag" ||
10379 test ! -s conftest.err
10380 } && test -s conftest.$ac_objext; then
10381 ac_cv_type_size_t=yes
10382else
10383 echo "$as_me: failed program was:" >&5
10384sed 's/^/| /' conftest.$ac_ext >&5
10385
10386 ac_cv_type_size_t=no
10387fi
10388
10389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10390fi
10391{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10392echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10393
Martin v. Löwiseba40652007-08-30 20:10:57 +000010394# The cast to long int works around a bug in the HP C Compiler
10395# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10396# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10397# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010398{ echo "$as_me:$LINENO: checking size of size_t" >&5
10399echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010400if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010401 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010402else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010403 if test "$cross_compiling" = yes; then
10404 # Depending upon the size, compute the lo and hi bounds.
10405cat >conftest.$ac_ext <<_ACEOF
10406/* confdefs.h. */
10407_ACEOF
10408cat confdefs.h >>conftest.$ac_ext
10409cat >>conftest.$ac_ext <<_ACEOF
10410/* end confdefs.h. */
10411$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010412 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010413int
10414main ()
10415{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010416static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010417test_array [0] = 0
10418
10419 ;
10420 return 0;
10421}
10422_ACEOF
10423rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010424if { (ac_try="$ac_compile"
10425case "(($ac_try" in
10426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10427 *) ac_try_echo=$ac_try;;
10428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010430 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010431 ac_status=$?
10432 grep -v '^ *+' conftest.er1 >conftest.err
10433 rm -f conftest.er1
10434 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010436 (exit $ac_status); } && {
10437 test -z "$ac_c_werror_flag" ||
10438 test ! -s conftest.err
10439 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010440 ac_lo=0 ac_mid=0
10441 while :; do
10442 cat >conftest.$ac_ext <<_ACEOF
10443/* confdefs.h. */
10444_ACEOF
10445cat confdefs.h >>conftest.$ac_ext
10446cat >>conftest.$ac_ext <<_ACEOF
10447/* end confdefs.h. */
10448$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010449 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450int
10451main ()
10452{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010453static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010454test_array [0] = 0
10455
10456 ;
10457 return 0;
10458}
10459_ACEOF
10460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010461if { (ac_try="$ac_compile"
10462case "(($ac_try" in
10463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10464 *) ac_try_echo=$ac_try;;
10465esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010468 ac_status=$?
10469 grep -v '^ *+' conftest.er1 >conftest.err
10470 rm -f conftest.er1
10471 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010473 (exit $ac_status); } && {
10474 test -z "$ac_c_werror_flag" ||
10475 test ! -s conftest.err
10476 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477 ac_hi=$ac_mid; break
10478else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010479 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010480sed 's/^/| /' conftest.$ac_ext >&5
10481
Martin v. Löwiseba40652007-08-30 20:10:57 +000010482 ac_lo=`expr $ac_mid + 1`
10483 if test $ac_lo -le $ac_mid; then
10484 ac_lo= ac_hi=
10485 break
10486 fi
10487 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010489
10490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491 done
10492else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010493 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010494sed 's/^/| /' conftest.$ac_ext >&5
10495
Martin v. Löwiseba40652007-08-30 20:10:57 +000010496 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010497/* confdefs.h. */
10498_ACEOF
10499cat confdefs.h >>conftest.$ac_ext
10500cat >>conftest.$ac_ext <<_ACEOF
10501/* end confdefs.h. */
10502$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010503 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010504int
10505main ()
10506{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010507static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010508test_array [0] = 0
10509
10510 ;
10511 return 0;
10512}
10513_ACEOF
10514rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010515if { (ac_try="$ac_compile"
10516case "(($ac_try" in
10517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10518 *) ac_try_echo=$ac_try;;
10519esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010521 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010522 ac_status=$?
10523 grep -v '^ *+' conftest.er1 >conftest.err
10524 rm -f conftest.er1
10525 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010527 (exit $ac_status); } && {
10528 test -z "$ac_c_werror_flag" ||
10529 test ! -s conftest.err
10530 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010531 ac_hi=-1 ac_mid=-1
10532 while :; do
10533 cat >conftest.$ac_ext <<_ACEOF
10534/* confdefs.h. */
10535_ACEOF
10536cat confdefs.h >>conftest.$ac_ext
10537cat >>conftest.$ac_ext <<_ACEOF
10538/* end confdefs.h. */
10539$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010540 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541int
10542main ()
10543{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010544static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010545test_array [0] = 0
10546
10547 ;
10548 return 0;
10549}
10550_ACEOF
10551rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010552if { (ac_try="$ac_compile"
10553case "(($ac_try" in
10554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10555 *) ac_try_echo=$ac_try;;
10556esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010559 ac_status=$?
10560 grep -v '^ *+' conftest.er1 >conftest.err
10561 rm -f conftest.er1
10562 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010564 (exit $ac_status); } && {
10565 test -z "$ac_c_werror_flag" ||
10566 test ! -s conftest.err
10567 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010568 ac_lo=$ac_mid; break
10569else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010570 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010571sed 's/^/| /' conftest.$ac_ext >&5
10572
Martin v. Löwiseba40652007-08-30 20:10:57 +000010573 ac_hi=`expr '(' $ac_mid ')' - 1`
10574 if test $ac_mid -le $ac_hi; then
10575 ac_lo= ac_hi=
10576 break
10577 fi
10578 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010580
10581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582 done
10583else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010584 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585sed 's/^/| /' conftest.$ac_ext >&5
10586
Martin v. Löwiseba40652007-08-30 20:10:57 +000010587 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010589
10590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010592
10593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594# Binary search between lo and hi bounds.
10595while test "x$ac_lo" != "x$ac_hi"; do
10596 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10597 cat >conftest.$ac_ext <<_ACEOF
10598/* confdefs.h. */
10599_ACEOF
10600cat confdefs.h >>conftest.$ac_ext
10601cat >>conftest.$ac_ext <<_ACEOF
10602/* end confdefs.h. */
10603$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010604 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605int
10606main ()
10607{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010608static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010609test_array [0] = 0
10610
10611 ;
10612 return 0;
10613}
10614_ACEOF
10615rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010616if { (ac_try="$ac_compile"
10617case "(($ac_try" in
10618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10619 *) ac_try_echo=$ac_try;;
10620esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010623 ac_status=$?
10624 grep -v '^ *+' conftest.er1 >conftest.err
10625 rm -f conftest.er1
10626 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010628 (exit $ac_status); } && {
10629 test -z "$ac_c_werror_flag" ||
10630 test ! -s conftest.err
10631 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010632 ac_hi=$ac_mid
10633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010634 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635sed 's/^/| /' conftest.$ac_ext >&5
10636
Martin v. Löwiseba40652007-08-30 20:10:57 +000010637 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010639
10640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010641done
10642case $ac_lo in
10643?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010644'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010645 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010647echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010649 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010650 else
10651 ac_cv_sizeof_size_t=0
10652 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010653esac
10654else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655 cat >conftest.$ac_ext <<_ACEOF
10656/* confdefs.h. */
10657_ACEOF
10658cat confdefs.h >>conftest.$ac_ext
10659cat >>conftest.$ac_ext <<_ACEOF
10660/* end confdefs.h. */
10661$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010662 typedef size_t ac__type_sizeof_;
10663static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10664static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665#include <stdio.h>
10666#include <stdlib.h>
10667int
10668main ()
10669{
10670
10671 FILE *f = fopen ("conftest.val", "w");
10672 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010674 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010675 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010676 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010677 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010678 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010679 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680 }
10681 else
10682 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010683 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010684 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010685 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010686 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010688 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010689
10690 ;
10691 return 0;
10692}
10693_ACEOF
10694rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695if { (ac_try="$ac_link"
10696case "(($ac_try" in
10697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10698 *) ac_try_echo=$ac_try;;
10699esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010701 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010702 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705 { (case "(($ac_try" in
10706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10707 *) ac_try_echo=$ac_try;;
10708esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010710 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010711 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010713 (exit $ac_status); }; }; then
10714 ac_cv_sizeof_size_t=`cat conftest.val`
10715else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010716 echo "$as_me: program exited with status $ac_status" >&5
10717echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010718sed 's/^/| /' conftest.$ac_ext >&5
10719
10720( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010721if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010722 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010723See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010724echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010725See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010726 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727 else
10728 ac_cv_sizeof_size_t=0
10729 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010731rm -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 +000010732fi
10733rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010734fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010735{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10736echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010737
10738
10739
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740cat >>confdefs.h <<_ACEOF
10741#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10742_ACEOF
10743
10744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010745{ echo "$as_me:$LINENO: checking for pid_t" >&5
10746echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10747if test "${ac_cv_type_pid_t+set}" = set; then
10748 echo $ECHO_N "(cached) $ECHO_C" >&6
10749else
10750 cat >conftest.$ac_ext <<_ACEOF
10751/* confdefs.h. */
10752_ACEOF
10753cat confdefs.h >>conftest.$ac_ext
10754cat >>conftest.$ac_ext <<_ACEOF
10755/* end confdefs.h. */
10756$ac_includes_default
10757typedef pid_t ac__type_new_;
10758int
10759main ()
10760{
10761if ((ac__type_new_ *) 0)
10762 return 0;
10763if (sizeof (ac__type_new_))
10764 return 0;
10765 ;
10766 return 0;
10767}
10768_ACEOF
10769rm -f conftest.$ac_objext
10770if { (ac_try="$ac_compile"
10771case "(($ac_try" in
10772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10773 *) ac_try_echo=$ac_try;;
10774esac
10775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10776 (eval "$ac_compile") 2>conftest.er1
10777 ac_status=$?
10778 grep -v '^ *+' conftest.er1 >conftest.err
10779 rm -f conftest.er1
10780 cat conftest.err >&5
10781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10782 (exit $ac_status); } && {
10783 test -z "$ac_c_werror_flag" ||
10784 test ! -s conftest.err
10785 } && test -s conftest.$ac_objext; then
10786 ac_cv_type_pid_t=yes
10787else
10788 echo "$as_me: failed program was:" >&5
10789sed 's/^/| /' conftest.$ac_ext >&5
10790
10791 ac_cv_type_pid_t=no
10792fi
10793
10794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10795fi
10796{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10797echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10798
Christian Heimes951cc0f2008-01-31 23:08:23 +000010799# The cast to long int works around a bug in the HP C Compiler
10800# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10801# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10802# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010803{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10804echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010805if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010806 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010807else
10808 if test "$cross_compiling" = yes; then
10809 # Depending upon the size, compute the lo and hi bounds.
10810cat >conftest.$ac_ext <<_ACEOF
10811/* confdefs.h. */
10812_ACEOF
10813cat confdefs.h >>conftest.$ac_ext
10814cat >>conftest.$ac_ext <<_ACEOF
10815/* end confdefs.h. */
10816$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010817 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010818int
10819main ()
10820{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010821static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010822test_array [0] = 0
10823
10824 ;
10825 return 0;
10826}
10827_ACEOF
10828rm -f conftest.$ac_objext
10829if { (ac_try="$ac_compile"
10830case "(($ac_try" in
10831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10832 *) ac_try_echo=$ac_try;;
10833esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010835 (eval "$ac_compile") 2>conftest.er1
10836 ac_status=$?
10837 grep -v '^ *+' conftest.er1 >conftest.err
10838 rm -f conftest.er1
10839 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010841 (exit $ac_status); } && {
10842 test -z "$ac_c_werror_flag" ||
10843 test ! -s conftest.err
10844 } && test -s conftest.$ac_objext; then
10845 ac_lo=0 ac_mid=0
10846 while :; do
10847 cat >conftest.$ac_ext <<_ACEOF
10848/* confdefs.h. */
10849_ACEOF
10850cat confdefs.h >>conftest.$ac_ext
10851cat >>conftest.$ac_ext <<_ACEOF
10852/* end confdefs.h. */
10853$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010854 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010855int
10856main ()
10857{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010858static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010859test_array [0] = 0
10860
10861 ;
10862 return 0;
10863}
10864_ACEOF
10865rm -f conftest.$ac_objext
10866if { (ac_try="$ac_compile"
10867case "(($ac_try" in
10868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10869 *) ac_try_echo=$ac_try;;
10870esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010872 (eval "$ac_compile") 2>conftest.er1
10873 ac_status=$?
10874 grep -v '^ *+' conftest.er1 >conftest.err
10875 rm -f conftest.er1
10876 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010878 (exit $ac_status); } && {
10879 test -z "$ac_c_werror_flag" ||
10880 test ! -s conftest.err
10881 } && test -s conftest.$ac_objext; then
10882 ac_hi=$ac_mid; break
10883else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010884 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010885sed 's/^/| /' conftest.$ac_ext >&5
10886
10887 ac_lo=`expr $ac_mid + 1`
10888 if test $ac_lo -le $ac_mid; then
10889 ac_lo= ac_hi=
10890 break
10891 fi
10892 ac_mid=`expr 2 '*' $ac_mid + 1`
10893fi
10894
10895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10896 done
10897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010898 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010899sed 's/^/| /' conftest.$ac_ext >&5
10900
10901 cat >conftest.$ac_ext <<_ACEOF
10902/* confdefs.h. */
10903_ACEOF
10904cat confdefs.h >>conftest.$ac_ext
10905cat >>conftest.$ac_ext <<_ACEOF
10906/* end confdefs.h. */
10907$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010908 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010909int
10910main ()
10911{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010912static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010913test_array [0] = 0
10914
10915 ;
10916 return 0;
10917}
10918_ACEOF
10919rm -f conftest.$ac_objext
10920if { (ac_try="$ac_compile"
10921case "(($ac_try" in
10922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10923 *) ac_try_echo=$ac_try;;
10924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010926 (eval "$ac_compile") 2>conftest.er1
10927 ac_status=$?
10928 grep -v '^ *+' conftest.er1 >conftest.err
10929 rm -f conftest.er1
10930 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010932 (exit $ac_status); } && {
10933 test -z "$ac_c_werror_flag" ||
10934 test ! -s conftest.err
10935 } && test -s conftest.$ac_objext; then
10936 ac_hi=-1 ac_mid=-1
10937 while :; do
10938 cat >conftest.$ac_ext <<_ACEOF
10939/* confdefs.h. */
10940_ACEOF
10941cat confdefs.h >>conftest.$ac_ext
10942cat >>conftest.$ac_ext <<_ACEOF
10943/* end confdefs.h. */
10944$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010945 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010946int
10947main ()
10948{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010949static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010950test_array [0] = 0
10951
10952 ;
10953 return 0;
10954}
10955_ACEOF
10956rm -f conftest.$ac_objext
10957if { (ac_try="$ac_compile"
10958case "(($ac_try" in
10959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10960 *) ac_try_echo=$ac_try;;
10961esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010963 (eval "$ac_compile") 2>conftest.er1
10964 ac_status=$?
10965 grep -v '^ *+' conftest.er1 >conftest.err
10966 rm -f conftest.er1
10967 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010969 (exit $ac_status); } && {
10970 test -z "$ac_c_werror_flag" ||
10971 test ! -s conftest.err
10972 } && test -s conftest.$ac_objext; then
10973 ac_lo=$ac_mid; break
10974else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010975 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010976sed 's/^/| /' conftest.$ac_ext >&5
10977
10978 ac_hi=`expr '(' $ac_mid ')' - 1`
10979 if test $ac_mid -le $ac_hi; then
10980 ac_lo= ac_hi=
10981 break
10982 fi
10983 ac_mid=`expr 2 '*' $ac_mid`
10984fi
10985
10986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10987 done
10988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010989 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010990sed 's/^/| /' conftest.$ac_ext >&5
10991
10992 ac_lo= ac_hi=
10993fi
10994
10995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10996fi
10997
10998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10999# Binary search between lo and hi bounds.
11000while test "x$ac_lo" != "x$ac_hi"; do
11001 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11002 cat >conftest.$ac_ext <<_ACEOF
11003/* confdefs.h. */
11004_ACEOF
11005cat confdefs.h >>conftest.$ac_ext
11006cat >>conftest.$ac_ext <<_ACEOF
11007/* end confdefs.h. */
11008$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011009 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011010int
11011main ()
11012{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011013static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011014test_array [0] = 0
11015
11016 ;
11017 return 0;
11018}
11019_ACEOF
11020rm -f conftest.$ac_objext
11021if { (ac_try="$ac_compile"
11022case "(($ac_try" in
11023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11024 *) ac_try_echo=$ac_try;;
11025esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011027 (eval "$ac_compile") 2>conftest.er1
11028 ac_status=$?
11029 grep -v '^ *+' conftest.er1 >conftest.err
11030 rm -f conftest.er1
11031 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011033 (exit $ac_status); } && {
11034 test -z "$ac_c_werror_flag" ||
11035 test ! -s conftest.err
11036 } && test -s conftest.$ac_objext; then
11037 ac_hi=$ac_mid
11038else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011039 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011040sed 's/^/| /' conftest.$ac_ext >&5
11041
11042 ac_lo=`expr '(' $ac_mid ')' + 1`
11043fi
11044
11045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11046done
11047case $ac_lo in
11048?*) ac_cv_sizeof_pid_t=$ac_lo;;
11049'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011050 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011051See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011052echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011053See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011054 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011055 else
11056 ac_cv_sizeof_pid_t=0
11057 fi ;;
11058esac
11059else
11060 cat >conftest.$ac_ext <<_ACEOF
11061/* confdefs.h. */
11062_ACEOF
11063cat confdefs.h >>conftest.$ac_ext
11064cat >>conftest.$ac_ext <<_ACEOF
11065/* end confdefs.h. */
11066$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011067 typedef pid_t ac__type_sizeof_;
11068static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11069static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011070#include <stdio.h>
11071#include <stdlib.h>
11072int
11073main ()
11074{
11075
11076 FILE *f = fopen ("conftest.val", "w");
11077 if (! f)
11078 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011079 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011080 {
11081 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011082 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011083 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011084 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011085 }
11086 else
11087 {
11088 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011089 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011090 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011091 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011092 }
11093 return ferror (f) || fclose (f) != 0;
11094
11095 ;
11096 return 0;
11097}
11098_ACEOF
11099rm -f conftest$ac_exeext
11100if { (ac_try="$ac_link"
11101case "(($ac_try" in
11102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11103 *) ac_try_echo=$ac_try;;
11104esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011106 (eval "$ac_link") 2>&5
11107 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011109 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11110 { (case "(($ac_try" in
11111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11112 *) ac_try_echo=$ac_try;;
11113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011115 (eval "$ac_try") 2>&5
11116 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011118 (exit $ac_status); }; }; then
11119 ac_cv_sizeof_pid_t=`cat conftest.val`
11120else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011121 echo "$as_me: program exited with status $ac_status" >&5
11122echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011123sed 's/^/| /' conftest.$ac_ext >&5
11124
11125( exit $ac_status )
11126if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011127 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011128See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011129echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011130See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011131 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011132 else
11133 ac_cv_sizeof_pid_t=0
11134 fi
11135fi
11136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11137fi
11138rm -f conftest.val
11139fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011140{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11141echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011142
11143
11144
11145cat >>confdefs.h <<_ACEOF
11146#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11147_ACEOF
11148
11149
Michael W. Hudson54241132001-12-07 15:38:26 +000011150
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011151{ echo "$as_me:$LINENO: checking for long long support" >&5
11152echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011153have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011155/* confdefs.h. */
11156_ACEOF
11157cat confdefs.h >>conftest.$ac_ext
11158cat >>conftest.$ac_ext <<_ACEOF
11159/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011160
Martin v. Löwis11437992002-04-12 09:54:03 +000011161int
11162main ()
11163{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011164long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011165 ;
11166 return 0;
11167}
11168_ACEOF
11169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011170if { (ac_try="$ac_compile"
11171case "(($ac_try" in
11172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11173 *) ac_try_echo=$ac_try;;
11174esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011178 grep -v '^ *+' conftest.er1 >conftest.err
11179 rm -f conftest.er1
11180 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011182 (exit $ac_status); } && {
11183 test -z "$ac_c_werror_flag" ||
11184 test ! -s conftest.err
11185 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011186
11187
11188cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011189#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011190_ACEOF
11191
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011192 have_long_long=yes
11193
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011194else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011196sed 's/^/| /' conftest.$ac_ext >&5
11197
Martin v. Löwiseba40652007-08-30 20:10:57 +000011198
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011200
11201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011202{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11203echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011204if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011205{ echo "$as_me:$LINENO: checking for long long" >&5
11206echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11207if test "${ac_cv_type_long_long+set}" = set; then
11208 echo $ECHO_N "(cached) $ECHO_C" >&6
11209else
11210 cat >conftest.$ac_ext <<_ACEOF
11211/* confdefs.h. */
11212_ACEOF
11213cat confdefs.h >>conftest.$ac_ext
11214cat >>conftest.$ac_ext <<_ACEOF
11215/* end confdefs.h. */
11216$ac_includes_default
11217typedef long long ac__type_new_;
11218int
11219main ()
11220{
11221if ((ac__type_new_ *) 0)
11222 return 0;
11223if (sizeof (ac__type_new_))
11224 return 0;
11225 ;
11226 return 0;
11227}
11228_ACEOF
11229rm -f conftest.$ac_objext
11230if { (ac_try="$ac_compile"
11231case "(($ac_try" in
11232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11233 *) ac_try_echo=$ac_try;;
11234esac
11235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11236 (eval "$ac_compile") 2>conftest.er1
11237 ac_status=$?
11238 grep -v '^ *+' conftest.er1 >conftest.err
11239 rm -f conftest.er1
11240 cat conftest.err >&5
11241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11242 (exit $ac_status); } && {
11243 test -z "$ac_c_werror_flag" ||
11244 test ! -s conftest.err
11245 } && test -s conftest.$ac_objext; then
11246 ac_cv_type_long_long=yes
11247else
11248 echo "$as_me: failed program was:" >&5
11249sed 's/^/| /' conftest.$ac_ext >&5
11250
11251 ac_cv_type_long_long=no
11252fi
11253
11254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11255fi
11256{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11257echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11258
Martin v. Löwiseba40652007-08-30 20:10:57 +000011259# The cast to long int works around a bug in the HP C Compiler
11260# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11261# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11262# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011263{ echo "$as_me:$LINENO: checking size of long long" >&5
11264echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011265if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011266 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011267else
Martin v. Löwis11437992002-04-12 09:54:03 +000011268 if test "$cross_compiling" = yes; then
11269 # Depending upon the size, compute the lo and hi bounds.
11270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011271/* confdefs.h. */
11272_ACEOF
11273cat confdefs.h >>conftest.$ac_ext
11274cat >>conftest.$ac_ext <<_ACEOF
11275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011276$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011277 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011278int
11279main ()
11280{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011281static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011282test_array [0] = 0
11283
11284 ;
11285 return 0;
11286}
11287_ACEOF
11288rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011289if { (ac_try="$ac_compile"
11290case "(($ac_try" in
11291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11292 *) ac_try_echo=$ac_try;;
11293esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011295 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011297 grep -v '^ *+' conftest.er1 >conftest.err
11298 rm -f conftest.er1
11299 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011301 (exit $ac_status); } && {
11302 test -z "$ac_c_werror_flag" ||
11303 test ! -s conftest.err
11304 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011305 ac_lo=0 ac_mid=0
11306 while :; do
11307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* confdefs.h. */
11309_ACEOF
11310cat confdefs.h >>conftest.$ac_ext
11311cat >>conftest.$ac_ext <<_ACEOF
11312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011313$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011314 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011315int
11316main ()
11317{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011318static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011319test_array [0] = 0
11320
11321 ;
11322 return 0;
11323}
11324_ACEOF
11325rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011326if { (ac_try="$ac_compile"
11327case "(($ac_try" in
11328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11329 *) ac_try_echo=$ac_try;;
11330esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011334 grep -v '^ *+' conftest.er1 >conftest.err
11335 rm -f conftest.er1
11336 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011338 (exit $ac_status); } && {
11339 test -z "$ac_c_werror_flag" ||
11340 test ! -s conftest.err
11341 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 ac_hi=$ac_mid; break
11343else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011345sed 's/^/| /' conftest.$ac_ext >&5
11346
Martin v. Löwiseba40652007-08-30 20:10:57 +000011347 ac_lo=`expr $ac_mid + 1`
11348 if test $ac_lo -le $ac_mid; then
11349 ac_lo= ac_hi=
11350 break
11351 fi
11352 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011354
11355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 done
11357else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011359sed 's/^/| /' conftest.$ac_ext >&5
11360
Martin v. Löwiseba40652007-08-30 20:10:57 +000011361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011362/* confdefs.h. */
11363_ACEOF
11364cat confdefs.h >>conftest.$ac_ext
11365cat >>conftest.$ac_ext <<_ACEOF
11366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011367$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011368 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011369int
11370main ()
11371{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011372static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011373test_array [0] = 0
11374
11375 ;
11376 return 0;
11377}
11378_ACEOF
11379rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011380if { (ac_try="$ac_compile"
11381case "(($ac_try" in
11382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11383 *) ac_try_echo=$ac_try;;
11384esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011388 grep -v '^ *+' conftest.er1 >conftest.err
11389 rm -f conftest.er1
11390 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011392 (exit $ac_status); } && {
11393 test -z "$ac_c_werror_flag" ||
11394 test ! -s conftest.err
11395 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 ac_hi=-1 ac_mid=-1
11397 while :; do
11398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011399/* confdefs.h. */
11400_ACEOF
11401cat confdefs.h >>conftest.$ac_ext
11402cat >>conftest.$ac_ext <<_ACEOF
11403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011404$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011405 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011406int
11407main ()
11408{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011410test_array [0] = 0
11411
11412 ;
11413 return 0;
11414}
11415_ACEOF
11416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011417if { (ac_try="$ac_compile"
11418case "(($ac_try" in
11419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11420 *) ac_try_echo=$ac_try;;
11421esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011425 grep -v '^ *+' conftest.er1 >conftest.err
11426 rm -f conftest.er1
11427 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011429 (exit $ac_status); } && {
11430 test -z "$ac_c_werror_flag" ||
11431 test ! -s conftest.err
11432 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 ac_lo=$ac_mid; break
11434else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011436sed 's/^/| /' conftest.$ac_ext >&5
11437
Martin v. Löwiseba40652007-08-30 20:10:57 +000011438 ac_hi=`expr '(' $ac_mid ')' - 1`
11439 if test $ac_mid -le $ac_hi; then
11440 ac_lo= ac_hi=
11441 break
11442 fi
11443 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445
11446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 done
11448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011450sed 's/^/| /' conftest.$ac_ext >&5
11451
Martin v. Löwiseba40652007-08-30 20:10:57 +000011452 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011454
11455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011457
11458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011459# Binary search between lo and hi bounds.
11460while test "x$ac_lo" != "x$ac_hi"; do
11461 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011463/* confdefs.h. */
11464_ACEOF
11465cat confdefs.h >>conftest.$ac_ext
11466cat >>conftest.$ac_ext <<_ACEOF
11467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011468$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011469 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011470int
11471main ()
11472{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011473static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011474test_array [0] = 0
11475
11476 ;
11477 return 0;
11478}
11479_ACEOF
11480rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011481if { (ac_try="$ac_compile"
11482case "(($ac_try" in
11483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11484 *) ac_try_echo=$ac_try;;
11485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011489 grep -v '^ *+' conftest.er1 >conftest.err
11490 rm -f conftest.er1
11491 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011493 (exit $ac_status); } && {
11494 test -z "$ac_c_werror_flag" ||
11495 test ! -s conftest.err
11496 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 ac_hi=$ac_mid
11498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011500sed 's/^/| /' conftest.$ac_ext >&5
11501
Martin v. Löwiseba40652007-08-30 20:10:57 +000011502 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011504
11505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011506done
11507case $ac_lo in
11508?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011509'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011510 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011511See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011512echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011513See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011514 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515 else
11516 ac_cv_sizeof_long_long=0
11517 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011518esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011519else
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011521/* confdefs.h. */
11522_ACEOF
11523cat confdefs.h >>conftest.$ac_ext
11524cat >>conftest.$ac_ext <<_ACEOF
11525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011526$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011527 typedef long long ac__type_sizeof_;
11528static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11529static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011530#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011531#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011532int
11533main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011534{
Martin v. Löwis11437992002-04-12 09:54:03 +000011535
11536 FILE *f = fopen ("conftest.val", "w");
11537 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011538 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011539 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011541 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011542 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011544 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 }
11546 else
11547 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011548 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011549 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011550 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011551 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011553 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011554
11555 ;
11556 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011557}
Martin v. Löwis11437992002-04-12 09:54:03 +000011558_ACEOF
11559rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560if { (ac_try="$ac_link"
11561case "(($ac_try" in
11562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11563 *) ac_try_echo=$ac_try;;
11564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011566 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570 { (case "(($ac_try" in
11571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11572 *) ac_try_echo=$ac_try;;
11573esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011575 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 (exit $ac_status); }; }; then
11579 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011581 echo "$as_me: program exited with status $ac_status" >&5
11582echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011583sed 's/^/| /' conftest.$ac_ext >&5
11584
Martin v. Löwis11437992002-04-12 09:54:03 +000011585( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011586if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011587 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011588See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011589echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011590See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011591 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592 else
11593 ac_cv_sizeof_long_long=0
11594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011596rm -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 +000011597fi
11598rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011599fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011600{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11601echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011602
11603
11604
Martin v. Löwis11437992002-04-12 09:54:03 +000011605cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011606#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011607_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011608
Michael W. Hudson54241132001-12-07 15:38:26 +000011609
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011610fi
11611
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011612{ echo "$as_me:$LINENO: checking for long double support" >&5
11613echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011614have_long_double=no
11615cat >conftest.$ac_ext <<_ACEOF
11616/* confdefs.h. */
11617_ACEOF
11618cat confdefs.h >>conftest.$ac_ext
11619cat >>conftest.$ac_ext <<_ACEOF
11620/* end confdefs.h. */
11621
11622int
11623main ()
11624{
11625long double x; x = (long double)0.;
11626 ;
11627 return 0;
11628}
11629_ACEOF
11630rm -f conftest.$ac_objext
11631if { (ac_try="$ac_compile"
11632case "(($ac_try" in
11633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11634 *) ac_try_echo=$ac_try;;
11635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011637 (eval "$ac_compile") 2>conftest.er1
11638 ac_status=$?
11639 grep -v '^ *+' conftest.er1 >conftest.err
11640 rm -f conftest.er1
11641 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011643 (exit $ac_status); } && {
11644 test -z "$ac_c_werror_flag" ||
11645 test ! -s conftest.err
11646 } && test -s conftest.$ac_objext; then
11647
11648
11649cat >>confdefs.h <<\_ACEOF
11650#define HAVE_LONG_DOUBLE 1
11651_ACEOF
11652
11653 have_long_double=yes
11654
11655else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011656 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011657sed 's/^/| /' conftest.$ac_ext >&5
11658
11659
11660fi
11661
11662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011663{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11664echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011665if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011666{ echo "$as_me:$LINENO: checking for long double" >&5
11667echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11668if test "${ac_cv_type_long_double+set}" = set; then
11669 echo $ECHO_N "(cached) $ECHO_C" >&6
11670else
11671 cat >conftest.$ac_ext <<_ACEOF
11672/* confdefs.h. */
11673_ACEOF
11674cat confdefs.h >>conftest.$ac_ext
11675cat >>conftest.$ac_ext <<_ACEOF
11676/* end confdefs.h. */
11677$ac_includes_default
11678typedef long double ac__type_new_;
11679int
11680main ()
11681{
11682if ((ac__type_new_ *) 0)
11683 return 0;
11684if (sizeof (ac__type_new_))
11685 return 0;
11686 ;
11687 return 0;
11688}
11689_ACEOF
11690rm -f conftest.$ac_objext
11691if { (ac_try="$ac_compile"
11692case "(($ac_try" in
11693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11694 *) ac_try_echo=$ac_try;;
11695esac
11696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11697 (eval "$ac_compile") 2>conftest.er1
11698 ac_status=$?
11699 grep -v '^ *+' conftest.er1 >conftest.err
11700 rm -f conftest.er1
11701 cat conftest.err >&5
11702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11703 (exit $ac_status); } && {
11704 test -z "$ac_c_werror_flag" ||
11705 test ! -s conftest.err
11706 } && test -s conftest.$ac_objext; then
11707 ac_cv_type_long_double=yes
11708else
11709 echo "$as_me: failed program was:" >&5
11710sed 's/^/| /' conftest.$ac_ext >&5
11711
11712 ac_cv_type_long_double=no
11713fi
11714
11715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11716fi
11717{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11718echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11719
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011720# The cast to long int works around a bug in the HP C Compiler
11721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11723# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011724{ echo "$as_me:$LINENO: checking size of long double" >&5
11725echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011726if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011727 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011728else
11729 if test "$cross_compiling" = yes; then
11730 # Depending upon the size, compute the lo and hi bounds.
11731cat >conftest.$ac_ext <<_ACEOF
11732/* confdefs.h. */
11733_ACEOF
11734cat confdefs.h >>conftest.$ac_ext
11735cat >>conftest.$ac_ext <<_ACEOF
11736/* end confdefs.h. */
11737$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011738 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011739int
11740main ()
11741{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011743test_array [0] = 0
11744
11745 ;
11746 return 0;
11747}
11748_ACEOF
11749rm -f conftest.$ac_objext
11750if { (ac_try="$ac_compile"
11751case "(($ac_try" in
11752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11753 *) ac_try_echo=$ac_try;;
11754esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011756 (eval "$ac_compile") 2>conftest.er1
11757 ac_status=$?
11758 grep -v '^ *+' conftest.er1 >conftest.err
11759 rm -f conftest.er1
11760 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011762 (exit $ac_status); } && {
11763 test -z "$ac_c_werror_flag" ||
11764 test ! -s conftest.err
11765 } && test -s conftest.$ac_objext; then
11766 ac_lo=0 ac_mid=0
11767 while :; do
11768 cat >conftest.$ac_ext <<_ACEOF
11769/* confdefs.h. */
11770_ACEOF
11771cat confdefs.h >>conftest.$ac_ext
11772cat >>conftest.$ac_ext <<_ACEOF
11773/* end confdefs.h. */
11774$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011775 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011776int
11777main ()
11778{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011780test_array [0] = 0
11781
11782 ;
11783 return 0;
11784}
11785_ACEOF
11786rm -f conftest.$ac_objext
11787if { (ac_try="$ac_compile"
11788case "(($ac_try" in
11789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11790 *) ac_try_echo=$ac_try;;
11791esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011793 (eval "$ac_compile") 2>conftest.er1
11794 ac_status=$?
11795 grep -v '^ *+' conftest.er1 >conftest.err
11796 rm -f conftest.er1
11797 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011799 (exit $ac_status); } && {
11800 test -z "$ac_c_werror_flag" ||
11801 test ! -s conftest.err
11802 } && test -s conftest.$ac_objext; then
11803 ac_hi=$ac_mid; break
11804else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011805 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011806sed 's/^/| /' conftest.$ac_ext >&5
11807
11808 ac_lo=`expr $ac_mid + 1`
11809 if test $ac_lo -le $ac_mid; then
11810 ac_lo= ac_hi=
11811 break
11812 fi
11813 ac_mid=`expr 2 '*' $ac_mid + 1`
11814fi
11815
11816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11817 done
11818else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011819 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011820sed 's/^/| /' conftest.$ac_ext >&5
11821
11822 cat >conftest.$ac_ext <<_ACEOF
11823/* confdefs.h. */
11824_ACEOF
11825cat confdefs.h >>conftest.$ac_ext
11826cat >>conftest.$ac_ext <<_ACEOF
11827/* end confdefs.h. */
11828$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011829 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011830int
11831main ()
11832{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011834test_array [0] = 0
11835
11836 ;
11837 return 0;
11838}
11839_ACEOF
11840rm -f conftest.$ac_objext
11841if { (ac_try="$ac_compile"
11842case "(($ac_try" in
11843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11844 *) ac_try_echo=$ac_try;;
11845esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011847 (eval "$ac_compile") 2>conftest.er1
11848 ac_status=$?
11849 grep -v '^ *+' conftest.er1 >conftest.err
11850 rm -f conftest.er1
11851 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011853 (exit $ac_status); } && {
11854 test -z "$ac_c_werror_flag" ||
11855 test ! -s conftest.err
11856 } && test -s conftest.$ac_objext; then
11857 ac_hi=-1 ac_mid=-1
11858 while :; do
11859 cat >conftest.$ac_ext <<_ACEOF
11860/* confdefs.h. */
11861_ACEOF
11862cat confdefs.h >>conftest.$ac_ext
11863cat >>conftest.$ac_ext <<_ACEOF
11864/* end confdefs.h. */
11865$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011866 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011867int
11868main ()
11869{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011870static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011871test_array [0] = 0
11872
11873 ;
11874 return 0;
11875}
11876_ACEOF
11877rm -f conftest.$ac_objext
11878if { (ac_try="$ac_compile"
11879case "(($ac_try" in
11880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11881 *) ac_try_echo=$ac_try;;
11882esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011884 (eval "$ac_compile") 2>conftest.er1
11885 ac_status=$?
11886 grep -v '^ *+' conftest.er1 >conftest.err
11887 rm -f conftest.er1
11888 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011890 (exit $ac_status); } && {
11891 test -z "$ac_c_werror_flag" ||
11892 test ! -s conftest.err
11893 } && test -s conftest.$ac_objext; then
11894 ac_lo=$ac_mid; break
11895else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011896 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011897sed 's/^/| /' conftest.$ac_ext >&5
11898
11899 ac_hi=`expr '(' $ac_mid ')' - 1`
11900 if test $ac_mid -le $ac_hi; then
11901 ac_lo= ac_hi=
11902 break
11903 fi
11904 ac_mid=`expr 2 '*' $ac_mid`
11905fi
11906
11907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11908 done
11909else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011910 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011911sed 's/^/| /' conftest.$ac_ext >&5
11912
11913 ac_lo= ac_hi=
11914fi
11915
11916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11917fi
11918
11919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11920# Binary search between lo and hi bounds.
11921while test "x$ac_lo" != "x$ac_hi"; do
11922 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11923 cat >conftest.$ac_ext <<_ACEOF
11924/* confdefs.h. */
11925_ACEOF
11926cat confdefs.h >>conftest.$ac_ext
11927cat >>conftest.$ac_ext <<_ACEOF
11928/* end confdefs.h. */
11929$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011930 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011931int
11932main ()
11933{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011935test_array [0] = 0
11936
11937 ;
11938 return 0;
11939}
11940_ACEOF
11941rm -f conftest.$ac_objext
11942if { (ac_try="$ac_compile"
11943case "(($ac_try" in
11944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11945 *) ac_try_echo=$ac_try;;
11946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011948 (eval "$ac_compile") 2>conftest.er1
11949 ac_status=$?
11950 grep -v '^ *+' conftest.er1 >conftest.err
11951 rm -f conftest.er1
11952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011954 (exit $ac_status); } && {
11955 test -z "$ac_c_werror_flag" ||
11956 test ! -s conftest.err
11957 } && test -s conftest.$ac_objext; then
11958 ac_hi=$ac_mid
11959else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011960 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011961sed 's/^/| /' conftest.$ac_ext >&5
11962
11963 ac_lo=`expr '(' $ac_mid ')' + 1`
11964fi
11965
11966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11967done
11968case $ac_lo in
11969?*) ac_cv_sizeof_long_double=$ac_lo;;
11970'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011971 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011972See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011973echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011974See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011975 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011976 else
11977 ac_cv_sizeof_long_double=0
11978 fi ;;
11979esac
11980else
11981 cat >conftest.$ac_ext <<_ACEOF
11982/* confdefs.h. */
11983_ACEOF
11984cat confdefs.h >>conftest.$ac_ext
11985cat >>conftest.$ac_ext <<_ACEOF
11986/* end confdefs.h. */
11987$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011988 typedef long double ac__type_sizeof_;
11989static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11990static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011991#include <stdio.h>
11992#include <stdlib.h>
11993int
11994main ()
11995{
11996
11997 FILE *f = fopen ("conftest.val", "w");
11998 if (! f)
11999 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012000 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012001 {
12002 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012003 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012004 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012005 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012006 }
12007 else
12008 {
12009 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012010 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012011 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012012 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012013 }
12014 return ferror (f) || fclose (f) != 0;
12015
12016 ;
12017 return 0;
12018}
12019_ACEOF
12020rm -f conftest$ac_exeext
12021if { (ac_try="$ac_link"
12022case "(($ac_try" in
12023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12024 *) ac_try_echo=$ac_try;;
12025esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012027 (eval "$ac_link") 2>&5
12028 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12031 { (case "(($ac_try" in
12032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12033 *) ac_try_echo=$ac_try;;
12034esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012036 (eval "$ac_try") 2>&5
12037 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012039 (exit $ac_status); }; }; then
12040 ac_cv_sizeof_long_double=`cat conftest.val`
12041else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012042 echo "$as_me: program exited with status $ac_status" >&5
12043echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012044sed 's/^/| /' conftest.$ac_ext >&5
12045
12046( exit $ac_status )
12047if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012048 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012049See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012050echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012051See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012052 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012053 else
12054 ac_cv_sizeof_long_double=0
12055 fi
12056fi
12057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12058fi
12059rm -f conftest.val
12060fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012061{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12062echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012063
12064
12065
12066cat >>confdefs.h <<_ACEOF
12067#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12068_ACEOF
12069
12070
12071fi
12072
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012073{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12074echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012075have_c99_bool=no
12076cat >conftest.$ac_ext <<_ACEOF
12077/* confdefs.h. */
12078_ACEOF
12079cat confdefs.h >>conftest.$ac_ext
12080cat >>conftest.$ac_ext <<_ACEOF
12081/* end confdefs.h. */
12082
12083int
12084main ()
12085{
12086_Bool x; x = (_Bool)0;
12087 ;
12088 return 0;
12089}
12090_ACEOF
12091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012092if { (ac_try="$ac_compile"
12093case "(($ac_try" in
12094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12095 *) ac_try_echo=$ac_try;;
12096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012099 ac_status=$?
12100 grep -v '^ *+' conftest.er1 >conftest.err
12101 rm -f conftest.er1
12102 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012104 (exit $ac_status); } && {
12105 test -z "$ac_c_werror_flag" ||
12106 test ! -s conftest.err
12107 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012108
12109
12110cat >>confdefs.h <<\_ACEOF
12111#define HAVE_C99_BOOL 1
12112_ACEOF
12113
12114 have_c99_bool=yes
12115
12116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012117 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012118sed 's/^/| /' conftest.$ac_ext >&5
12119
Martin v. Löwiseba40652007-08-30 20:10:57 +000012120
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012122
12123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012124{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12125echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012126if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012127{ echo "$as_me:$LINENO: checking for _Bool" >&5
12128echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12129if test "${ac_cv_type__Bool+set}" = set; then
12130 echo $ECHO_N "(cached) $ECHO_C" >&6
12131else
12132 cat >conftest.$ac_ext <<_ACEOF
12133/* confdefs.h. */
12134_ACEOF
12135cat confdefs.h >>conftest.$ac_ext
12136cat >>conftest.$ac_ext <<_ACEOF
12137/* end confdefs.h. */
12138$ac_includes_default
12139typedef _Bool ac__type_new_;
12140int
12141main ()
12142{
12143if ((ac__type_new_ *) 0)
12144 return 0;
12145if (sizeof (ac__type_new_))
12146 return 0;
12147 ;
12148 return 0;
12149}
12150_ACEOF
12151rm -f conftest.$ac_objext
12152if { (ac_try="$ac_compile"
12153case "(($ac_try" in
12154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12155 *) ac_try_echo=$ac_try;;
12156esac
12157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12158 (eval "$ac_compile") 2>conftest.er1
12159 ac_status=$?
12160 grep -v '^ *+' conftest.er1 >conftest.err
12161 rm -f conftest.er1
12162 cat conftest.err >&5
12163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12164 (exit $ac_status); } && {
12165 test -z "$ac_c_werror_flag" ||
12166 test ! -s conftest.err
12167 } && test -s conftest.$ac_objext; then
12168 ac_cv_type__Bool=yes
12169else
12170 echo "$as_me: failed program was:" >&5
12171sed 's/^/| /' conftest.$ac_ext >&5
12172
12173 ac_cv_type__Bool=no
12174fi
12175
12176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12177fi
12178{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12179echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12180
Martin v. Löwiseba40652007-08-30 20:10:57 +000012181# The cast to long int works around a bug in the HP C Compiler
12182# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12183# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12184# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012185{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12186echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012187if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012188 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012189else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012190 if test "$cross_compiling" = yes; then
12191 # Depending upon the size, compute the lo and hi bounds.
12192cat >conftest.$ac_ext <<_ACEOF
12193/* confdefs.h. */
12194_ACEOF
12195cat confdefs.h >>conftest.$ac_ext
12196cat >>conftest.$ac_ext <<_ACEOF
12197/* end confdefs.h. */
12198$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012199 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012200int
12201main ()
12202{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012203static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012204test_array [0] = 0
12205
12206 ;
12207 return 0;
12208}
12209_ACEOF
12210rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012211if { (ac_try="$ac_compile"
12212case "(($ac_try" in
12213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12214 *) ac_try_echo=$ac_try;;
12215esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012218 ac_status=$?
12219 grep -v '^ *+' conftest.er1 >conftest.err
12220 rm -f conftest.er1
12221 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012223 (exit $ac_status); } && {
12224 test -z "$ac_c_werror_flag" ||
12225 test ! -s conftest.err
12226 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012227 ac_lo=0 ac_mid=0
12228 while :; do
12229 cat >conftest.$ac_ext <<_ACEOF
12230/* confdefs.h. */
12231_ACEOF
12232cat confdefs.h >>conftest.$ac_ext
12233cat >>conftest.$ac_ext <<_ACEOF
12234/* end confdefs.h. */
12235$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012236 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012237int
12238main ()
12239{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012241test_array [0] = 0
12242
12243 ;
12244 return 0;
12245}
12246_ACEOF
12247rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012248if { (ac_try="$ac_compile"
12249case "(($ac_try" in
12250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12251 *) ac_try_echo=$ac_try;;
12252esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012255 ac_status=$?
12256 grep -v '^ *+' conftest.er1 >conftest.err
12257 rm -f conftest.er1
12258 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012260 (exit $ac_status); } && {
12261 test -z "$ac_c_werror_flag" ||
12262 test ! -s conftest.err
12263 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012264 ac_hi=$ac_mid; break
12265else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012266 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012267sed 's/^/| /' conftest.$ac_ext >&5
12268
Martin v. Löwiseba40652007-08-30 20:10:57 +000012269 ac_lo=`expr $ac_mid + 1`
12270 if test $ac_lo -le $ac_mid; then
12271 ac_lo= ac_hi=
12272 break
12273 fi
12274 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012276
12277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012278 done
12279else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012280 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012281sed 's/^/| /' conftest.$ac_ext >&5
12282
Martin v. Löwiseba40652007-08-30 20:10:57 +000012283 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012284/* confdefs.h. */
12285_ACEOF
12286cat confdefs.h >>conftest.$ac_ext
12287cat >>conftest.$ac_ext <<_ACEOF
12288/* end confdefs.h. */
12289$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012290 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012291int
12292main ()
12293{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012294static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012295test_array [0] = 0
12296
12297 ;
12298 return 0;
12299}
12300_ACEOF
12301rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012302if { (ac_try="$ac_compile"
12303case "(($ac_try" in
12304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12305 *) ac_try_echo=$ac_try;;
12306esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012309 ac_status=$?
12310 grep -v '^ *+' conftest.er1 >conftest.err
12311 rm -f conftest.er1
12312 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012314 (exit $ac_status); } && {
12315 test -z "$ac_c_werror_flag" ||
12316 test ! -s conftest.err
12317 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012318 ac_hi=-1 ac_mid=-1
12319 while :; do
12320 cat >conftest.$ac_ext <<_ACEOF
12321/* confdefs.h. */
12322_ACEOF
12323cat confdefs.h >>conftest.$ac_ext
12324cat >>conftest.$ac_ext <<_ACEOF
12325/* end confdefs.h. */
12326$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012327 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012328int
12329main ()
12330{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012332test_array [0] = 0
12333
12334 ;
12335 return 0;
12336}
12337_ACEOF
12338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012339if { (ac_try="$ac_compile"
12340case "(($ac_try" in
12341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12342 *) ac_try_echo=$ac_try;;
12343esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012346 ac_status=$?
12347 grep -v '^ *+' conftest.er1 >conftest.err
12348 rm -f conftest.er1
12349 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012351 (exit $ac_status); } && {
12352 test -z "$ac_c_werror_flag" ||
12353 test ! -s conftest.err
12354 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012355 ac_lo=$ac_mid; break
12356else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012357 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012358sed 's/^/| /' conftest.$ac_ext >&5
12359
Martin v. Löwiseba40652007-08-30 20:10:57 +000012360 ac_hi=`expr '(' $ac_mid ')' - 1`
12361 if test $ac_mid -le $ac_hi; then
12362 ac_lo= ac_hi=
12363 break
12364 fi
12365 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367
12368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012369 done
12370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012371 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012372sed 's/^/| /' conftest.$ac_ext >&5
12373
Martin v. Löwiseba40652007-08-30 20:10:57 +000012374 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376
12377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012379
12380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012381# Binary search between lo and hi bounds.
12382while test "x$ac_lo" != "x$ac_hi"; do
12383 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12384 cat >conftest.$ac_ext <<_ACEOF
12385/* confdefs.h. */
12386_ACEOF
12387cat confdefs.h >>conftest.$ac_ext
12388cat >>conftest.$ac_ext <<_ACEOF
12389/* end confdefs.h. */
12390$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012391 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012392int
12393main ()
12394{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012395static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012396test_array [0] = 0
12397
12398 ;
12399 return 0;
12400}
12401_ACEOF
12402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403if { (ac_try="$ac_compile"
12404case "(($ac_try" in
12405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12406 *) ac_try_echo=$ac_try;;
12407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012410 ac_status=$?
12411 grep -v '^ *+' conftest.er1 >conftest.err
12412 rm -f conftest.er1
12413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012415 (exit $ac_status); } && {
12416 test -z "$ac_c_werror_flag" ||
12417 test ! -s conftest.err
12418 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012419 ac_hi=$ac_mid
12420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012421 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012422sed 's/^/| /' conftest.$ac_ext >&5
12423
Martin v. Löwiseba40652007-08-30 20:10:57 +000012424 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012426
12427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012428done
12429case $ac_lo in
12430?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012431'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012432 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012433See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012434echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012435See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012436 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012437 else
12438 ac_cv_sizeof__Bool=0
12439 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012440esac
12441else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012442 cat >conftest.$ac_ext <<_ACEOF
12443/* confdefs.h. */
12444_ACEOF
12445cat confdefs.h >>conftest.$ac_ext
12446cat >>conftest.$ac_ext <<_ACEOF
12447/* end confdefs.h. */
12448$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012449 typedef _Bool ac__type_sizeof_;
12450static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12451static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012452#include <stdio.h>
12453#include <stdlib.h>
12454int
12455main ()
12456{
12457
12458 FILE *f = fopen ("conftest.val", "w");
12459 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012461 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012462 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012463 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012464 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012465 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012466 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012467 }
12468 else
12469 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012470 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012471 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012472 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012473 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012474 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012475 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012476
12477 ;
12478 return 0;
12479}
12480_ACEOF
12481rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482if { (ac_try="$ac_link"
12483case "(($ac_try" in
12484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12485 *) ac_try_echo=$ac_try;;
12486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012488 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012489 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012491 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492 { (case "(($ac_try" in
12493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12494 *) ac_try_echo=$ac_try;;
12495esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012497 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012498 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012500 (exit $ac_status); }; }; then
12501 ac_cv_sizeof__Bool=`cat conftest.val`
12502else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012503 echo "$as_me: program exited with status $ac_status" >&5
12504echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012505sed 's/^/| /' conftest.$ac_ext >&5
12506
12507( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012508if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012509 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012510See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012511echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012512See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012513 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514 else
12515 ac_cv_sizeof__Bool=0
12516 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518rm -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 +000012519fi
12520rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012521fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012522{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12523echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012524
12525
12526
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012527cat >>confdefs.h <<_ACEOF
12528#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12529_ACEOF
12530
12531
12532fi
12533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012534{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12535echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012536if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012537 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012538else
12539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012540/* confdefs.h. */
12541_ACEOF
12542cat confdefs.h >>conftest.$ac_ext
12543cat >>conftest.$ac_ext <<_ACEOF
12544/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012545#ifdef HAVE_STDINT_H
12546 #include <stdint.h>
12547 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012548
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012549typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012550int
12551main ()
12552{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012553if ((ac__type_new_ *) 0)
12554 return 0;
12555if (sizeof (ac__type_new_))
12556 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 ;
12558 return 0;
12559}
12560_ACEOF
12561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012562if { (ac_try="$ac_compile"
12563case "(($ac_try" in
12564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12565 *) ac_try_echo=$ac_try;;
12566esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012570 grep -v '^ *+' conftest.er1 >conftest.err
12571 rm -f conftest.er1
12572 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012574 (exit $ac_status); } && {
12575 test -z "$ac_c_werror_flag" ||
12576 test ! -s conftest.err
12577 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012578 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012581sed 's/^/| /' conftest.$ac_ext >&5
12582
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012583 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012585
12586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012587fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012588{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12589echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12590if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012591
12592cat >>confdefs.h <<_ACEOF
12593#define HAVE_UINTPTR_T 1
12594_ACEOF
12595
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012596{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12597echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12598if test "${ac_cv_type_uintptr_t+set}" = set; then
12599 echo $ECHO_N "(cached) $ECHO_C" >&6
12600else
12601 cat >conftest.$ac_ext <<_ACEOF
12602/* confdefs.h. */
12603_ACEOF
12604cat confdefs.h >>conftest.$ac_ext
12605cat >>conftest.$ac_ext <<_ACEOF
12606/* end confdefs.h. */
12607$ac_includes_default
12608typedef uintptr_t ac__type_new_;
12609int
12610main ()
12611{
12612if ((ac__type_new_ *) 0)
12613 return 0;
12614if (sizeof (ac__type_new_))
12615 return 0;
12616 ;
12617 return 0;
12618}
12619_ACEOF
12620rm -f conftest.$ac_objext
12621if { (ac_try="$ac_compile"
12622case "(($ac_try" in
12623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12624 *) ac_try_echo=$ac_try;;
12625esac
12626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12627 (eval "$ac_compile") 2>conftest.er1
12628 ac_status=$?
12629 grep -v '^ *+' conftest.er1 >conftest.err
12630 rm -f conftest.er1
12631 cat conftest.err >&5
12632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633 (exit $ac_status); } && {
12634 test -z "$ac_c_werror_flag" ||
12635 test ! -s conftest.err
12636 } && test -s conftest.$ac_objext; then
12637 ac_cv_type_uintptr_t=yes
12638else
12639 echo "$as_me: failed program was:" >&5
12640sed 's/^/| /' conftest.$ac_ext >&5
12641
12642 ac_cv_type_uintptr_t=no
12643fi
12644
12645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12646fi
12647{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12648echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12649
Martin v. Löwiseba40652007-08-30 20:10:57 +000012650# The cast to long int works around a bug in the HP C Compiler
12651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12653# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012654{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12655echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012656if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012657 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012658else
Martin v. Löwis11437992002-04-12 09:54:03 +000012659 if test "$cross_compiling" = yes; then
12660 # Depending upon the size, compute the lo and hi bounds.
12661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012662/* confdefs.h. */
12663_ACEOF
12664cat confdefs.h >>conftest.$ac_ext
12665cat >>conftest.$ac_ext <<_ACEOF
12666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012667$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012668 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012669int
12670main ()
12671{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012672static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012673test_array [0] = 0
12674
12675 ;
12676 return 0;
12677}
12678_ACEOF
12679rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012680if { (ac_try="$ac_compile"
12681case "(($ac_try" in
12682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12683 *) ac_try_echo=$ac_try;;
12684esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012688 grep -v '^ *+' conftest.er1 >conftest.err
12689 rm -f conftest.er1
12690 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012692 (exit $ac_status); } && {
12693 test -z "$ac_c_werror_flag" ||
12694 test ! -s conftest.err
12695 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 ac_lo=0 ac_mid=0
12697 while :; do
12698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012699/* confdefs.h. */
12700_ACEOF
12701cat confdefs.h >>conftest.$ac_ext
12702cat >>conftest.$ac_ext <<_ACEOF
12703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012704$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012705 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012706int
12707main ()
12708{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012709static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012710test_array [0] = 0
12711
12712 ;
12713 return 0;
12714}
12715_ACEOF
12716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012717if { (ac_try="$ac_compile"
12718case "(($ac_try" in
12719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12720 *) ac_try_echo=$ac_try;;
12721esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012725 grep -v '^ *+' conftest.er1 >conftest.err
12726 rm -f conftest.er1
12727 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012729 (exit $ac_status); } && {
12730 test -z "$ac_c_werror_flag" ||
12731 test ! -s conftest.err
12732 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012733 ac_hi=$ac_mid; break
12734else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012736sed 's/^/| /' conftest.$ac_ext >&5
12737
Martin v. Löwiseba40652007-08-30 20:10:57 +000012738 ac_lo=`expr $ac_mid + 1`
12739 if test $ac_lo -le $ac_mid; then
12740 ac_lo= ac_hi=
12741 break
12742 fi
12743 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745
12746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 done
12748else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012750sed 's/^/| /' conftest.$ac_ext >&5
12751
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012753/* confdefs.h. */
12754_ACEOF
12755cat confdefs.h >>conftest.$ac_ext
12756cat >>conftest.$ac_ext <<_ACEOF
12757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012758$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012759 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012760int
12761main ()
12762{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012763static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012764test_array [0] = 0
12765
12766 ;
12767 return 0;
12768}
12769_ACEOF
12770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012771if { (ac_try="$ac_compile"
12772case "(($ac_try" in
12773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12774 *) ac_try_echo=$ac_try;;
12775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012779 grep -v '^ *+' conftest.er1 >conftest.err
12780 rm -f conftest.er1
12781 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012783 (exit $ac_status); } && {
12784 test -z "$ac_c_werror_flag" ||
12785 test ! -s conftest.err
12786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 ac_hi=-1 ac_mid=-1
12788 while :; do
12789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012790/* confdefs.h. */
12791_ACEOF
12792cat confdefs.h >>conftest.$ac_ext
12793cat >>conftest.$ac_ext <<_ACEOF
12794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012795$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012796 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012797int
12798main ()
12799{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012801test_array [0] = 0
12802
12803 ;
12804 return 0;
12805}
12806_ACEOF
12807rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012808if { (ac_try="$ac_compile"
12809case "(($ac_try" in
12810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12811 *) ac_try_echo=$ac_try;;
12812esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012816 grep -v '^ *+' conftest.er1 >conftest.err
12817 rm -f conftest.er1
12818 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012820 (exit $ac_status); } && {
12821 test -z "$ac_c_werror_flag" ||
12822 test ! -s conftest.err
12823 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 ac_lo=$ac_mid; break
12825else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012827sed 's/^/| /' conftest.$ac_ext >&5
12828
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829 ac_hi=`expr '(' $ac_mid ')' - 1`
12830 if test $ac_mid -le $ac_hi; then
12831 ac_lo= ac_hi=
12832 break
12833 fi
12834 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012836
12837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 done
12839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012841sed 's/^/| /' conftest.$ac_ext >&5
12842
Martin v. Löwiseba40652007-08-30 20:10:57 +000012843 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012845
12846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012848
12849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012850# Binary search between lo and hi bounds.
12851while test "x$ac_lo" != "x$ac_hi"; do
12852 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012854/* confdefs.h. */
12855_ACEOF
12856cat confdefs.h >>conftest.$ac_ext
12857cat >>conftest.$ac_ext <<_ACEOF
12858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012859$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012860 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012861int
12862main ()
12863{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012864static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012865test_array [0] = 0
12866
12867 ;
12868 return 0;
12869}
12870_ACEOF
12871rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012872if { (ac_try="$ac_compile"
12873case "(($ac_try" in
12874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12875 *) ac_try_echo=$ac_try;;
12876esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012880 grep -v '^ *+' conftest.er1 >conftest.err
12881 rm -f conftest.er1
12882 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012884 (exit $ac_status); } && {
12885 test -z "$ac_c_werror_flag" ||
12886 test ! -s conftest.err
12887 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 ac_hi=$ac_mid
12889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012891sed 's/^/| /' conftest.$ac_ext >&5
12892
Martin v. Löwiseba40652007-08-30 20:10:57 +000012893 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012895
12896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012897done
12898case $ac_lo in
12899?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012900'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012901 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012902See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012903echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012904See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012905 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012906 else
12907 ac_cv_sizeof_uintptr_t=0
12908 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012909esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012910else
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012912/* confdefs.h. */
12913_ACEOF
12914cat confdefs.h >>conftest.$ac_ext
12915cat >>conftest.$ac_ext <<_ACEOF
12916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012917$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012918 typedef uintptr_t ac__type_sizeof_;
12919static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12920static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012921#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012922#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012923int
12924main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012925{
Martin v. Löwis11437992002-04-12 09:54:03 +000012926
12927 FILE *f = fopen ("conftest.val", "w");
12928 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012929 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012930 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012932 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012933 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012934 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012935 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 }
12937 else
12938 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012939 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012940 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012941 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012942 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012944 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012945
12946 ;
12947 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012948}
Martin v. Löwis11437992002-04-12 09:54:03 +000012949_ACEOF
12950rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951if { (ac_try="$ac_link"
12952case "(($ac_try" in
12953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12954 *) ac_try_echo=$ac_try;;
12955esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012957 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961 { (case "(($ac_try" in
12962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12963 *) ac_try_echo=$ac_try;;
12964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012966 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 (exit $ac_status); }; }; then
12970 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012972 echo "$as_me: program exited with status $ac_status" >&5
12973echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012974sed 's/^/| /' conftest.$ac_ext >&5
12975
Martin v. Löwis11437992002-04-12 09:54:03 +000012976( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012977if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012978 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012979See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012980echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012981See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012982 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012983 else
12984 ac_cv_sizeof_uintptr_t=0
12985 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012987rm -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 +000012988fi
12989rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012990fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012991{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12992echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012993
12994
12995
Martin v. Löwis11437992002-04-12 09:54:03 +000012996cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012997#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012998_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012999
Michael W. Hudson54241132001-12-07 15:38:26 +000013000
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013001fi
13002
Martin v. Löwisebe26702006-10-02 14:55:51 +000013003
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013004{ echo "$as_me:$LINENO: checking for off_t" >&5
13005echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13006if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013007 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013008else
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013010/* confdefs.h. */
13011_ACEOF
13012cat confdefs.h >>conftest.$ac_ext
13013cat >>conftest.$ac_ext <<_ACEOF
13014/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013015
13016#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013017#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013018#endif
13019
13020
13021typedef off_t ac__type_new_;
13022int
13023main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013024{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013025if ((ac__type_new_ *) 0)
13026 return 0;
13027if (sizeof (ac__type_new_))
13028 return 0;
13029 ;
13030 return 0;
13031}
13032_ACEOF
13033rm -f conftest.$ac_objext
13034if { (ac_try="$ac_compile"
13035case "(($ac_try" in
13036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13037 *) ac_try_echo=$ac_try;;
13038esac
13039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13040 (eval "$ac_compile") 2>conftest.er1
13041 ac_status=$?
13042 grep -v '^ *+' conftest.er1 >conftest.err
13043 rm -f conftest.er1
13044 cat conftest.err >&5
13045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13046 (exit $ac_status); } && {
13047 test -z "$ac_c_werror_flag" ||
13048 test ! -s conftest.err
13049 } && test -s conftest.$ac_objext; then
13050 ac_cv_type_off_t=yes
13051else
13052 echo "$as_me: failed program was:" >&5
13053sed 's/^/| /' conftest.$ac_ext >&5
13054
13055 ac_cv_type_off_t=no
13056fi
13057
13058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13059fi
13060{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13061echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13062
13063# The cast to long int works around a bug in the HP C Compiler
13064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13066# This bug is HP SR number 8606223364.
13067{ echo "$as_me:$LINENO: checking size of off_t" >&5
13068echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13069if test "${ac_cv_sizeof_off_t+set}" = set; then
13070 echo $ECHO_N "(cached) $ECHO_C" >&6
13071else
13072 if test "$cross_compiling" = yes; then
13073 # Depending upon the size, compute the lo and hi bounds.
13074cat >conftest.$ac_ext <<_ACEOF
13075/* confdefs.h. */
13076_ACEOF
13077cat confdefs.h >>conftest.$ac_ext
13078cat >>conftest.$ac_ext <<_ACEOF
13079/* end confdefs.h. */
13080
13081#ifdef HAVE_SYS_TYPES_H
13082#include <sys/types.h>
13083#endif
13084
13085
13086 typedef off_t ac__type_sizeof_;
13087int
13088main ()
13089{
13090static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13091test_array [0] = 0
13092
13093 ;
13094 return 0;
13095}
13096_ACEOF
13097rm -f conftest.$ac_objext
13098if { (ac_try="$ac_compile"
13099case "(($ac_try" in
13100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13101 *) ac_try_echo=$ac_try;;
13102esac
13103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13104 (eval "$ac_compile") 2>conftest.er1
13105 ac_status=$?
13106 grep -v '^ *+' conftest.er1 >conftest.err
13107 rm -f conftest.er1
13108 cat conftest.err >&5
13109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13110 (exit $ac_status); } && {
13111 test -z "$ac_c_werror_flag" ||
13112 test ! -s conftest.err
13113 } && test -s conftest.$ac_objext; then
13114 ac_lo=0 ac_mid=0
13115 while :; do
13116 cat >conftest.$ac_ext <<_ACEOF
13117/* confdefs.h. */
13118_ACEOF
13119cat confdefs.h >>conftest.$ac_ext
13120cat >>conftest.$ac_ext <<_ACEOF
13121/* end confdefs.h. */
13122
13123#ifdef HAVE_SYS_TYPES_H
13124#include <sys/types.h>
13125#endif
13126
13127
13128 typedef off_t ac__type_sizeof_;
13129int
13130main ()
13131{
13132static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13133test_array [0] = 0
13134
13135 ;
13136 return 0;
13137}
13138_ACEOF
13139rm -f conftest.$ac_objext
13140if { (ac_try="$ac_compile"
13141case "(($ac_try" in
13142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13143 *) ac_try_echo=$ac_try;;
13144esac
13145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13146 (eval "$ac_compile") 2>conftest.er1
13147 ac_status=$?
13148 grep -v '^ *+' conftest.er1 >conftest.err
13149 rm -f conftest.er1
13150 cat conftest.err >&5
13151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13152 (exit $ac_status); } && {
13153 test -z "$ac_c_werror_flag" ||
13154 test ! -s conftest.err
13155 } && test -s conftest.$ac_objext; then
13156 ac_hi=$ac_mid; break
13157else
13158 echo "$as_me: failed program was:" >&5
13159sed 's/^/| /' conftest.$ac_ext >&5
13160
13161 ac_lo=`expr $ac_mid + 1`
13162 if test $ac_lo -le $ac_mid; then
13163 ac_lo= ac_hi=
13164 break
13165 fi
13166 ac_mid=`expr 2 '*' $ac_mid + 1`
13167fi
13168
13169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13170 done
13171else
13172 echo "$as_me: failed program was:" >&5
13173sed 's/^/| /' conftest.$ac_ext >&5
13174
13175 cat >conftest.$ac_ext <<_ACEOF
13176/* confdefs.h. */
13177_ACEOF
13178cat confdefs.h >>conftest.$ac_ext
13179cat >>conftest.$ac_ext <<_ACEOF
13180/* end confdefs.h. */
13181
13182#ifdef HAVE_SYS_TYPES_H
13183#include <sys/types.h>
13184#endif
13185
13186
13187 typedef off_t ac__type_sizeof_;
13188int
13189main ()
13190{
13191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13192test_array [0] = 0
13193
13194 ;
13195 return 0;
13196}
13197_ACEOF
13198rm -f conftest.$ac_objext
13199if { (ac_try="$ac_compile"
13200case "(($ac_try" in
13201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13202 *) ac_try_echo=$ac_try;;
13203esac
13204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13205 (eval "$ac_compile") 2>conftest.er1
13206 ac_status=$?
13207 grep -v '^ *+' conftest.er1 >conftest.err
13208 rm -f conftest.er1
13209 cat conftest.err >&5
13210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13211 (exit $ac_status); } && {
13212 test -z "$ac_c_werror_flag" ||
13213 test ! -s conftest.err
13214 } && test -s conftest.$ac_objext; then
13215 ac_hi=-1 ac_mid=-1
13216 while :; do
13217 cat >conftest.$ac_ext <<_ACEOF
13218/* confdefs.h. */
13219_ACEOF
13220cat confdefs.h >>conftest.$ac_ext
13221cat >>conftest.$ac_ext <<_ACEOF
13222/* end confdefs.h. */
13223
13224#ifdef HAVE_SYS_TYPES_H
13225#include <sys/types.h>
13226#endif
13227
13228
13229 typedef off_t ac__type_sizeof_;
13230int
13231main ()
13232{
13233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13234test_array [0] = 0
13235
13236 ;
13237 return 0;
13238}
13239_ACEOF
13240rm -f conftest.$ac_objext
13241if { (ac_try="$ac_compile"
13242case "(($ac_try" in
13243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13244 *) ac_try_echo=$ac_try;;
13245esac
13246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13247 (eval "$ac_compile") 2>conftest.er1
13248 ac_status=$?
13249 grep -v '^ *+' conftest.er1 >conftest.err
13250 rm -f conftest.er1
13251 cat conftest.err >&5
13252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13253 (exit $ac_status); } && {
13254 test -z "$ac_c_werror_flag" ||
13255 test ! -s conftest.err
13256 } && test -s conftest.$ac_objext; then
13257 ac_lo=$ac_mid; break
13258else
13259 echo "$as_me: failed program was:" >&5
13260sed 's/^/| /' conftest.$ac_ext >&5
13261
13262 ac_hi=`expr '(' $ac_mid ')' - 1`
13263 if test $ac_mid -le $ac_hi; then
13264 ac_lo= ac_hi=
13265 break
13266 fi
13267 ac_mid=`expr 2 '*' $ac_mid`
13268fi
13269
13270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13271 done
13272else
13273 echo "$as_me: failed program was:" >&5
13274sed 's/^/| /' conftest.$ac_ext >&5
13275
13276 ac_lo= ac_hi=
13277fi
13278
13279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13280fi
13281
13282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13283# Binary search between lo and hi bounds.
13284while test "x$ac_lo" != "x$ac_hi"; do
13285 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13286 cat >conftest.$ac_ext <<_ACEOF
13287/* confdefs.h. */
13288_ACEOF
13289cat confdefs.h >>conftest.$ac_ext
13290cat >>conftest.$ac_ext <<_ACEOF
13291/* end confdefs.h. */
13292
13293#ifdef HAVE_SYS_TYPES_H
13294#include <sys/types.h>
13295#endif
13296
13297
13298 typedef off_t ac__type_sizeof_;
13299int
13300main ()
13301{
13302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13303test_array [0] = 0
13304
13305 ;
13306 return 0;
13307}
13308_ACEOF
13309rm -f conftest.$ac_objext
13310if { (ac_try="$ac_compile"
13311case "(($ac_try" in
13312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13313 *) ac_try_echo=$ac_try;;
13314esac
13315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13316 (eval "$ac_compile") 2>conftest.er1
13317 ac_status=$?
13318 grep -v '^ *+' conftest.er1 >conftest.err
13319 rm -f conftest.er1
13320 cat conftest.err >&5
13321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13322 (exit $ac_status); } && {
13323 test -z "$ac_c_werror_flag" ||
13324 test ! -s conftest.err
13325 } && test -s conftest.$ac_objext; then
13326 ac_hi=$ac_mid
13327else
13328 echo "$as_me: failed program was:" >&5
13329sed 's/^/| /' conftest.$ac_ext >&5
13330
13331 ac_lo=`expr '(' $ac_mid ')' + 1`
13332fi
13333
13334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13335done
13336case $ac_lo in
13337?*) ac_cv_sizeof_off_t=$ac_lo;;
13338'') if test "$ac_cv_type_off_t" = yes; then
13339 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13340See \`config.log' for more details." >&5
13341echo "$as_me: error: cannot compute sizeof (off_t)
13342See \`config.log' for more details." >&2;}
13343 { (exit 77); exit 77; }; }
13344 else
13345 ac_cv_sizeof_off_t=0
13346 fi ;;
13347esac
13348else
13349 cat >conftest.$ac_ext <<_ACEOF
13350/* confdefs.h. */
13351_ACEOF
13352cat confdefs.h >>conftest.$ac_ext
13353cat >>conftest.$ac_ext <<_ACEOF
13354/* end confdefs.h. */
13355
13356#ifdef HAVE_SYS_TYPES_H
13357#include <sys/types.h>
13358#endif
13359
13360
13361 typedef off_t ac__type_sizeof_;
13362static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13363static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13364#include <stdio.h>
13365#include <stdlib.h>
13366int
13367main ()
13368{
13369
13370 FILE *f = fopen ("conftest.val", "w");
13371 if (! f)
13372 return 1;
13373 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13374 {
13375 long int i = longval ();
13376 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13377 return 1;
13378 fprintf (f, "%ld\n", i);
13379 }
13380 else
13381 {
13382 unsigned long int i = ulongval ();
13383 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13384 return 1;
13385 fprintf (f, "%lu\n", i);
13386 }
13387 return ferror (f) || fclose (f) != 0;
13388
13389 ;
13390 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013391}
Martin v. Löwis11437992002-04-12 09:54:03 +000013392_ACEOF
13393rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013394if { (ac_try="$ac_link"
13395case "(($ac_try" in
13396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13397 *) ac_try_echo=$ac_try;;
13398esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013400 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013401 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013404 { (case "(($ac_try" in
13405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13406 *) ac_try_echo=$ac_try;;
13407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013409 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013413 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013415 echo "$as_me: program exited with status $ac_status" >&5
13416echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013417sed 's/^/| /' conftest.$ac_ext >&5
13418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013420if test "$ac_cv_type_off_t" = yes; then
13421 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13422See \`config.log' for more details." >&5
13423echo "$as_me: error: cannot compute sizeof (off_t)
13424See \`config.log' for more details." >&2;}
13425 { (exit 77); exit 77; }; }
13426 else
13427 ac_cv_sizeof_off_t=0
13428 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013430rm -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 +000013431fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013432rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013433fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013434{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13435echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013436
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013437
13438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013440#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013441_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013442
Michael W. Hudson54241132001-12-07 15:38:26 +000013443
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013444
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013445{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13446echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013447if test "$have_long_long" = yes -a \
13448 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13449 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013450
Martin v. Löwis11437992002-04-12 09:54:03 +000013451cat >>confdefs.h <<\_ACEOF
13452#define HAVE_LARGEFILE_SUPPORT 1
13453_ACEOF
13454
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013455 { echo "$as_me:$LINENO: result: yes" >&5
13456echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013458 { echo "$as_me:$LINENO: result: no" >&5
13459echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013460fi
13461
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013462{ echo "$as_me:$LINENO: checking for time_t" >&5
13463echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13464if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013465 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013466else
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013468/* confdefs.h. */
13469_ACEOF
13470cat confdefs.h >>conftest.$ac_ext
13471cat >>conftest.$ac_ext <<_ACEOF
13472/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013473
13474#ifdef HAVE_SYS_TYPES_H
13475#include <sys/types.h>
13476#endif
13477#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013478#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013479#endif
13480
13481
13482typedef time_t ac__type_new_;
13483int
13484main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013485{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013486if ((ac__type_new_ *) 0)
13487 return 0;
13488if (sizeof (ac__type_new_))
13489 return 0;
13490 ;
13491 return 0;
13492}
13493_ACEOF
13494rm -f conftest.$ac_objext
13495if { (ac_try="$ac_compile"
13496case "(($ac_try" in
13497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13498 *) ac_try_echo=$ac_try;;
13499esac
13500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13501 (eval "$ac_compile") 2>conftest.er1
13502 ac_status=$?
13503 grep -v '^ *+' conftest.er1 >conftest.err
13504 rm -f conftest.er1
13505 cat conftest.err >&5
13506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13507 (exit $ac_status); } && {
13508 test -z "$ac_c_werror_flag" ||
13509 test ! -s conftest.err
13510 } && test -s conftest.$ac_objext; then
13511 ac_cv_type_time_t=yes
13512else
13513 echo "$as_me: failed program was:" >&5
13514sed 's/^/| /' conftest.$ac_ext >&5
13515
13516 ac_cv_type_time_t=no
13517fi
13518
13519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13520fi
13521{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13522echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13523
13524# The cast to long int works around a bug in the HP C Compiler
13525# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13526# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13527# This bug is HP SR number 8606223364.
13528{ echo "$as_me:$LINENO: checking size of time_t" >&5
13529echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13530if test "${ac_cv_sizeof_time_t+set}" = set; then
13531 echo $ECHO_N "(cached) $ECHO_C" >&6
13532else
13533 if test "$cross_compiling" = yes; then
13534 # Depending upon the size, compute the lo and hi bounds.
13535cat >conftest.$ac_ext <<_ACEOF
13536/* confdefs.h. */
13537_ACEOF
13538cat confdefs.h >>conftest.$ac_ext
13539cat >>conftest.$ac_ext <<_ACEOF
13540/* end confdefs.h. */
13541
13542#ifdef HAVE_SYS_TYPES_H
13543#include <sys/types.h>
13544#endif
13545#ifdef HAVE_TIME_H
13546#include <time.h>
13547#endif
13548
13549
13550 typedef time_t ac__type_sizeof_;
13551int
13552main ()
13553{
13554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13555test_array [0] = 0
13556
13557 ;
13558 return 0;
13559}
13560_ACEOF
13561rm -f conftest.$ac_objext
13562if { (ac_try="$ac_compile"
13563case "(($ac_try" in
13564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13565 *) ac_try_echo=$ac_try;;
13566esac
13567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13568 (eval "$ac_compile") 2>conftest.er1
13569 ac_status=$?
13570 grep -v '^ *+' conftest.er1 >conftest.err
13571 rm -f conftest.er1
13572 cat conftest.err >&5
13573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574 (exit $ac_status); } && {
13575 test -z "$ac_c_werror_flag" ||
13576 test ! -s conftest.err
13577 } && test -s conftest.$ac_objext; then
13578 ac_lo=0 ac_mid=0
13579 while :; do
13580 cat >conftest.$ac_ext <<_ACEOF
13581/* confdefs.h. */
13582_ACEOF
13583cat confdefs.h >>conftest.$ac_ext
13584cat >>conftest.$ac_ext <<_ACEOF
13585/* end confdefs.h. */
13586
13587#ifdef HAVE_SYS_TYPES_H
13588#include <sys/types.h>
13589#endif
13590#ifdef HAVE_TIME_H
13591#include <time.h>
13592#endif
13593
13594
13595 typedef time_t ac__type_sizeof_;
13596int
13597main ()
13598{
13599static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13600test_array [0] = 0
13601
13602 ;
13603 return 0;
13604}
13605_ACEOF
13606rm -f conftest.$ac_objext
13607if { (ac_try="$ac_compile"
13608case "(($ac_try" in
13609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13610 *) ac_try_echo=$ac_try;;
13611esac
13612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13613 (eval "$ac_compile") 2>conftest.er1
13614 ac_status=$?
13615 grep -v '^ *+' conftest.er1 >conftest.err
13616 rm -f conftest.er1
13617 cat conftest.err >&5
13618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13619 (exit $ac_status); } && {
13620 test -z "$ac_c_werror_flag" ||
13621 test ! -s conftest.err
13622 } && test -s conftest.$ac_objext; then
13623 ac_hi=$ac_mid; break
13624else
13625 echo "$as_me: failed program was:" >&5
13626sed 's/^/| /' conftest.$ac_ext >&5
13627
13628 ac_lo=`expr $ac_mid + 1`
13629 if test $ac_lo -le $ac_mid; then
13630 ac_lo= ac_hi=
13631 break
13632 fi
13633 ac_mid=`expr 2 '*' $ac_mid + 1`
13634fi
13635
13636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13637 done
13638else
13639 echo "$as_me: failed program was:" >&5
13640sed 's/^/| /' conftest.$ac_ext >&5
13641
13642 cat >conftest.$ac_ext <<_ACEOF
13643/* confdefs.h. */
13644_ACEOF
13645cat confdefs.h >>conftest.$ac_ext
13646cat >>conftest.$ac_ext <<_ACEOF
13647/* end confdefs.h. */
13648
13649#ifdef HAVE_SYS_TYPES_H
13650#include <sys/types.h>
13651#endif
13652#ifdef HAVE_TIME_H
13653#include <time.h>
13654#endif
13655
13656
13657 typedef time_t ac__type_sizeof_;
13658int
13659main ()
13660{
13661static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13662test_array [0] = 0
13663
13664 ;
13665 return 0;
13666}
13667_ACEOF
13668rm -f conftest.$ac_objext
13669if { (ac_try="$ac_compile"
13670case "(($ac_try" in
13671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13672 *) ac_try_echo=$ac_try;;
13673esac
13674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13675 (eval "$ac_compile") 2>conftest.er1
13676 ac_status=$?
13677 grep -v '^ *+' conftest.er1 >conftest.err
13678 rm -f conftest.er1
13679 cat conftest.err >&5
13680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13681 (exit $ac_status); } && {
13682 test -z "$ac_c_werror_flag" ||
13683 test ! -s conftest.err
13684 } && test -s conftest.$ac_objext; then
13685 ac_hi=-1 ac_mid=-1
13686 while :; do
13687 cat >conftest.$ac_ext <<_ACEOF
13688/* confdefs.h. */
13689_ACEOF
13690cat confdefs.h >>conftest.$ac_ext
13691cat >>conftest.$ac_ext <<_ACEOF
13692/* end confdefs.h. */
13693
13694#ifdef HAVE_SYS_TYPES_H
13695#include <sys/types.h>
13696#endif
13697#ifdef HAVE_TIME_H
13698#include <time.h>
13699#endif
13700
13701
13702 typedef time_t ac__type_sizeof_;
13703int
13704main ()
13705{
13706static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13707test_array [0] = 0
13708
13709 ;
13710 return 0;
13711}
13712_ACEOF
13713rm -f conftest.$ac_objext
13714if { (ac_try="$ac_compile"
13715case "(($ac_try" in
13716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13717 *) ac_try_echo=$ac_try;;
13718esac
13719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13720 (eval "$ac_compile") 2>conftest.er1
13721 ac_status=$?
13722 grep -v '^ *+' conftest.er1 >conftest.err
13723 rm -f conftest.er1
13724 cat conftest.err >&5
13725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13726 (exit $ac_status); } && {
13727 test -z "$ac_c_werror_flag" ||
13728 test ! -s conftest.err
13729 } && test -s conftest.$ac_objext; then
13730 ac_lo=$ac_mid; break
13731else
13732 echo "$as_me: failed program was:" >&5
13733sed 's/^/| /' conftest.$ac_ext >&5
13734
13735 ac_hi=`expr '(' $ac_mid ')' - 1`
13736 if test $ac_mid -le $ac_hi; then
13737 ac_lo= ac_hi=
13738 break
13739 fi
13740 ac_mid=`expr 2 '*' $ac_mid`
13741fi
13742
13743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13744 done
13745else
13746 echo "$as_me: failed program was:" >&5
13747sed 's/^/| /' conftest.$ac_ext >&5
13748
13749 ac_lo= ac_hi=
13750fi
13751
13752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13753fi
13754
13755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13756# Binary search between lo and hi bounds.
13757while test "x$ac_lo" != "x$ac_hi"; do
13758 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13759 cat >conftest.$ac_ext <<_ACEOF
13760/* confdefs.h. */
13761_ACEOF
13762cat confdefs.h >>conftest.$ac_ext
13763cat >>conftest.$ac_ext <<_ACEOF
13764/* end confdefs.h. */
13765
13766#ifdef HAVE_SYS_TYPES_H
13767#include <sys/types.h>
13768#endif
13769#ifdef HAVE_TIME_H
13770#include <time.h>
13771#endif
13772
13773
13774 typedef time_t ac__type_sizeof_;
13775int
13776main ()
13777{
13778static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13779test_array [0] = 0
13780
13781 ;
13782 return 0;
13783}
13784_ACEOF
13785rm -f conftest.$ac_objext
13786if { (ac_try="$ac_compile"
13787case "(($ac_try" in
13788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13789 *) ac_try_echo=$ac_try;;
13790esac
13791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13792 (eval "$ac_compile") 2>conftest.er1
13793 ac_status=$?
13794 grep -v '^ *+' conftest.er1 >conftest.err
13795 rm -f conftest.er1
13796 cat conftest.err >&5
13797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13798 (exit $ac_status); } && {
13799 test -z "$ac_c_werror_flag" ||
13800 test ! -s conftest.err
13801 } && test -s conftest.$ac_objext; then
13802 ac_hi=$ac_mid
13803else
13804 echo "$as_me: failed program was:" >&5
13805sed 's/^/| /' conftest.$ac_ext >&5
13806
13807 ac_lo=`expr '(' $ac_mid ')' + 1`
13808fi
13809
13810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13811done
13812case $ac_lo in
13813?*) ac_cv_sizeof_time_t=$ac_lo;;
13814'') if test "$ac_cv_type_time_t" = yes; then
13815 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13816See \`config.log' for more details." >&5
13817echo "$as_me: error: cannot compute sizeof (time_t)
13818See \`config.log' for more details." >&2;}
13819 { (exit 77); exit 77; }; }
13820 else
13821 ac_cv_sizeof_time_t=0
13822 fi ;;
13823esac
13824else
13825 cat >conftest.$ac_ext <<_ACEOF
13826/* confdefs.h. */
13827_ACEOF
13828cat confdefs.h >>conftest.$ac_ext
13829cat >>conftest.$ac_ext <<_ACEOF
13830/* end confdefs.h. */
13831
13832#ifdef HAVE_SYS_TYPES_H
13833#include <sys/types.h>
13834#endif
13835#ifdef HAVE_TIME_H
13836#include <time.h>
13837#endif
13838
13839
13840 typedef time_t ac__type_sizeof_;
13841static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13842static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13843#include <stdio.h>
13844#include <stdlib.h>
13845int
13846main ()
13847{
13848
13849 FILE *f = fopen ("conftest.val", "w");
13850 if (! f)
13851 return 1;
13852 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13853 {
13854 long int i = longval ();
13855 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13856 return 1;
13857 fprintf (f, "%ld\n", i);
13858 }
13859 else
13860 {
13861 unsigned long int i = ulongval ();
13862 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13863 return 1;
13864 fprintf (f, "%lu\n", i);
13865 }
13866 return ferror (f) || fclose (f) != 0;
13867
13868 ;
13869 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013870}
Martin v. Löwis11437992002-04-12 09:54:03 +000013871_ACEOF
13872rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013873if { (ac_try="$ac_link"
13874case "(($ac_try" in
13875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13876 *) ac_try_echo=$ac_try;;
13877esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013879 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013883 { (case "(($ac_try" in
13884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13885 *) ac_try_echo=$ac_try;;
13886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013888 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013891 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013892 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013893else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013894 echo "$as_me: program exited with status $ac_status" >&5
13895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013896sed 's/^/| /' conftest.$ac_ext >&5
13897
Martin v. Löwis11437992002-04-12 09:54:03 +000013898( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013899if test "$ac_cv_type_time_t" = yes; then
13900 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13901See \`config.log' for more details." >&5
13902echo "$as_me: error: cannot compute sizeof (time_t)
13903See \`config.log' for more details." >&2;}
13904 { (exit 77); exit 77; }; }
13905 else
13906 ac_cv_sizeof_time_t=0
13907 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909rm -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 +000013910fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013911rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013912fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013913{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13914echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013915
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013916
13917
Martin v. Löwis11437992002-04-12 09:54:03 +000013918cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013919#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013920_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013921
Michael W. Hudson54241132001-12-07 15:38:26 +000013922
13923
Trent Mick635f6fb2000-08-23 21:33:05 +000013924# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013925ac_save_cc="$CC"
13926if test "$ac_cv_kpthread" = "yes"
13927then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013928elif test "$ac_cv_kthread" = "yes"
13929then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013930elif test "$ac_cv_pthread" = "yes"
13931then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013932fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013933{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13934echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013935have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013936cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013937/* confdefs.h. */
13938_ACEOF
13939cat confdefs.h >>conftest.$ac_ext
13940cat >>conftest.$ac_ext <<_ACEOF
13941/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013942#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013943int
13944main ()
13945{
Guido van Rossum12580492000-09-24 16:47:19 +000013946pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 ;
13948 return 0;
13949}
13950_ACEOF
13951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013952if { (ac_try="$ac_compile"
13953case "(($ac_try" in
13954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13955 *) ac_try_echo=$ac_try;;
13956esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013960 grep -v '^ *+' conftest.er1 >conftest.err
13961 rm -f conftest.er1
13962 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013964 (exit $ac_status); } && {
13965 test -z "$ac_c_werror_flag" ||
13966 test ! -s conftest.err
13967 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013968 have_pthread_t=yes
13969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013971sed 's/^/| /' conftest.$ac_ext >&5
13972
Martin v. Löwiseba40652007-08-30 20:10:57 +000013973
Trent Mick635f6fb2000-08-23 21:33:05 +000013974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013975
13976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013977{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13978echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013979if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013980 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13981echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13982if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013983 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013984else
Martin v. Löwis11437992002-04-12 09:54:03 +000013985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013986/* confdefs.h. */
13987_ACEOF
13988cat confdefs.h >>conftest.$ac_ext
13989cat >>conftest.$ac_ext <<_ACEOF
13990/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013991
13992#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013993#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013994#endif
13995
13996
13997typedef pthread_t ac__type_new_;
13998int
13999main ()
14000{
14001if ((ac__type_new_ *) 0)
14002 return 0;
14003if (sizeof (ac__type_new_))
14004 return 0;
14005 ;
14006 return 0;
14007}
14008_ACEOF
14009rm -f conftest.$ac_objext
14010if { (ac_try="$ac_compile"
14011case "(($ac_try" in
14012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14013 *) ac_try_echo=$ac_try;;
14014esac
14015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14016 (eval "$ac_compile") 2>conftest.er1
14017 ac_status=$?
14018 grep -v '^ *+' conftest.er1 >conftest.err
14019 rm -f conftest.er1
14020 cat conftest.err >&5
14021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14022 (exit $ac_status); } && {
14023 test -z "$ac_c_werror_flag" ||
14024 test ! -s conftest.err
14025 } && test -s conftest.$ac_objext; then
14026 ac_cv_type_pthread_t=yes
14027else
14028 echo "$as_me: failed program was:" >&5
14029sed 's/^/| /' conftest.$ac_ext >&5
14030
14031 ac_cv_type_pthread_t=no
14032fi
14033
14034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14035fi
14036{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14037echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14038
14039# The cast to long int works around a bug in the HP C Compiler
14040# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14041# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14042# This bug is HP SR number 8606223364.
14043{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14044echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14045if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14046 echo $ECHO_N "(cached) $ECHO_C" >&6
14047else
14048 if test "$cross_compiling" = yes; then
14049 # Depending upon the size, compute the lo and hi bounds.
14050cat >conftest.$ac_ext <<_ACEOF
14051/* confdefs.h. */
14052_ACEOF
14053cat confdefs.h >>conftest.$ac_ext
14054cat >>conftest.$ac_ext <<_ACEOF
14055/* end confdefs.h. */
14056
14057#ifdef HAVE_PTHREAD_H
14058#include <pthread.h>
14059#endif
14060
14061
14062 typedef pthread_t ac__type_sizeof_;
14063int
14064main ()
14065{
14066static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14067test_array [0] = 0
14068
14069 ;
14070 return 0;
14071}
14072_ACEOF
14073rm -f conftest.$ac_objext
14074if { (ac_try="$ac_compile"
14075case "(($ac_try" in
14076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14077 *) ac_try_echo=$ac_try;;
14078esac
14079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14080 (eval "$ac_compile") 2>conftest.er1
14081 ac_status=$?
14082 grep -v '^ *+' conftest.er1 >conftest.err
14083 rm -f conftest.er1
14084 cat conftest.err >&5
14085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14086 (exit $ac_status); } && {
14087 test -z "$ac_c_werror_flag" ||
14088 test ! -s conftest.err
14089 } && test -s conftest.$ac_objext; then
14090 ac_lo=0 ac_mid=0
14091 while :; do
14092 cat >conftest.$ac_ext <<_ACEOF
14093/* confdefs.h. */
14094_ACEOF
14095cat confdefs.h >>conftest.$ac_ext
14096cat >>conftest.$ac_ext <<_ACEOF
14097/* end confdefs.h. */
14098
14099#ifdef HAVE_PTHREAD_H
14100#include <pthread.h>
14101#endif
14102
14103
14104 typedef pthread_t ac__type_sizeof_;
14105int
14106main ()
14107{
14108static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14109test_array [0] = 0
14110
14111 ;
14112 return 0;
14113}
14114_ACEOF
14115rm -f conftest.$ac_objext
14116if { (ac_try="$ac_compile"
14117case "(($ac_try" in
14118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14119 *) ac_try_echo=$ac_try;;
14120esac
14121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14122 (eval "$ac_compile") 2>conftest.er1
14123 ac_status=$?
14124 grep -v '^ *+' conftest.er1 >conftest.err
14125 rm -f conftest.er1
14126 cat conftest.err >&5
14127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14128 (exit $ac_status); } && {
14129 test -z "$ac_c_werror_flag" ||
14130 test ! -s conftest.err
14131 } && test -s conftest.$ac_objext; then
14132 ac_hi=$ac_mid; break
14133else
14134 echo "$as_me: failed program was:" >&5
14135sed 's/^/| /' conftest.$ac_ext >&5
14136
14137 ac_lo=`expr $ac_mid + 1`
14138 if test $ac_lo -le $ac_mid; then
14139 ac_lo= ac_hi=
14140 break
14141 fi
14142 ac_mid=`expr 2 '*' $ac_mid + 1`
14143fi
14144
14145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14146 done
14147else
14148 echo "$as_me: failed program was:" >&5
14149sed 's/^/| /' conftest.$ac_ext >&5
14150
14151 cat >conftest.$ac_ext <<_ACEOF
14152/* confdefs.h. */
14153_ACEOF
14154cat confdefs.h >>conftest.$ac_ext
14155cat >>conftest.$ac_ext <<_ACEOF
14156/* end confdefs.h. */
14157
14158#ifdef HAVE_PTHREAD_H
14159#include <pthread.h>
14160#endif
14161
14162
14163 typedef pthread_t ac__type_sizeof_;
14164int
14165main ()
14166{
14167static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14168test_array [0] = 0
14169
14170 ;
14171 return 0;
14172}
14173_ACEOF
14174rm -f conftest.$ac_objext
14175if { (ac_try="$ac_compile"
14176case "(($ac_try" in
14177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14178 *) ac_try_echo=$ac_try;;
14179esac
14180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14181 (eval "$ac_compile") 2>conftest.er1
14182 ac_status=$?
14183 grep -v '^ *+' conftest.er1 >conftest.err
14184 rm -f conftest.er1
14185 cat conftest.err >&5
14186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14187 (exit $ac_status); } && {
14188 test -z "$ac_c_werror_flag" ||
14189 test ! -s conftest.err
14190 } && test -s conftest.$ac_objext; then
14191 ac_hi=-1 ac_mid=-1
14192 while :; do
14193 cat >conftest.$ac_ext <<_ACEOF
14194/* confdefs.h. */
14195_ACEOF
14196cat confdefs.h >>conftest.$ac_ext
14197cat >>conftest.$ac_ext <<_ACEOF
14198/* end confdefs.h. */
14199
14200#ifdef HAVE_PTHREAD_H
14201#include <pthread.h>
14202#endif
14203
14204
14205 typedef pthread_t ac__type_sizeof_;
14206int
14207main ()
14208{
14209static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14210test_array [0] = 0
14211
14212 ;
14213 return 0;
14214}
14215_ACEOF
14216rm -f conftest.$ac_objext
14217if { (ac_try="$ac_compile"
14218case "(($ac_try" in
14219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14220 *) ac_try_echo=$ac_try;;
14221esac
14222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14223 (eval "$ac_compile") 2>conftest.er1
14224 ac_status=$?
14225 grep -v '^ *+' conftest.er1 >conftest.err
14226 rm -f conftest.er1
14227 cat conftest.err >&5
14228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14229 (exit $ac_status); } && {
14230 test -z "$ac_c_werror_flag" ||
14231 test ! -s conftest.err
14232 } && test -s conftest.$ac_objext; then
14233 ac_lo=$ac_mid; break
14234else
14235 echo "$as_me: failed program was:" >&5
14236sed 's/^/| /' conftest.$ac_ext >&5
14237
14238 ac_hi=`expr '(' $ac_mid ')' - 1`
14239 if test $ac_mid -le $ac_hi; then
14240 ac_lo= ac_hi=
14241 break
14242 fi
14243 ac_mid=`expr 2 '*' $ac_mid`
14244fi
14245
14246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14247 done
14248else
14249 echo "$as_me: failed program was:" >&5
14250sed 's/^/| /' conftest.$ac_ext >&5
14251
14252 ac_lo= ac_hi=
14253fi
14254
14255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14256fi
14257
14258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14259# Binary search between lo and hi bounds.
14260while test "x$ac_lo" != "x$ac_hi"; do
14261 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14262 cat >conftest.$ac_ext <<_ACEOF
14263/* confdefs.h. */
14264_ACEOF
14265cat confdefs.h >>conftest.$ac_ext
14266cat >>conftest.$ac_ext <<_ACEOF
14267/* end confdefs.h. */
14268
14269#ifdef HAVE_PTHREAD_H
14270#include <pthread.h>
14271#endif
14272
14273
14274 typedef pthread_t ac__type_sizeof_;
14275int
14276main ()
14277{
14278static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14279test_array [0] = 0
14280
14281 ;
14282 return 0;
14283}
14284_ACEOF
14285rm -f conftest.$ac_objext
14286if { (ac_try="$ac_compile"
14287case "(($ac_try" in
14288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14289 *) ac_try_echo=$ac_try;;
14290esac
14291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14292 (eval "$ac_compile") 2>conftest.er1
14293 ac_status=$?
14294 grep -v '^ *+' conftest.er1 >conftest.err
14295 rm -f conftest.er1
14296 cat conftest.err >&5
14297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14298 (exit $ac_status); } && {
14299 test -z "$ac_c_werror_flag" ||
14300 test ! -s conftest.err
14301 } && test -s conftest.$ac_objext; then
14302 ac_hi=$ac_mid
14303else
14304 echo "$as_me: failed program was:" >&5
14305sed 's/^/| /' conftest.$ac_ext >&5
14306
14307 ac_lo=`expr '(' $ac_mid ')' + 1`
14308fi
14309
14310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14311done
14312case $ac_lo in
14313?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14314'') if test "$ac_cv_type_pthread_t" = yes; then
14315 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14316See \`config.log' for more details." >&5
14317echo "$as_me: error: cannot compute sizeof (pthread_t)
14318See \`config.log' for more details." >&2;}
14319 { (exit 77); exit 77; }; }
14320 else
14321 ac_cv_sizeof_pthread_t=0
14322 fi ;;
14323esac
14324else
14325 cat >conftest.$ac_ext <<_ACEOF
14326/* confdefs.h. */
14327_ACEOF
14328cat confdefs.h >>conftest.$ac_ext
14329cat >>conftest.$ac_ext <<_ACEOF
14330/* end confdefs.h. */
14331
14332#ifdef HAVE_PTHREAD_H
14333#include <pthread.h>
14334#endif
14335
14336
14337 typedef pthread_t ac__type_sizeof_;
14338static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14339static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14340#include <stdio.h>
14341#include <stdlib.h>
14342int
14343main ()
14344{
14345
14346 FILE *f = fopen ("conftest.val", "w");
14347 if (! f)
14348 return 1;
14349 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14350 {
14351 long int i = longval ();
14352 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14353 return 1;
14354 fprintf (f, "%ld\n", i);
14355 }
14356 else
14357 {
14358 unsigned long int i = ulongval ();
14359 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14360 return 1;
14361 fprintf (f, "%lu\n", i);
14362 }
14363 return ferror (f) || fclose (f) != 0;
14364
14365 ;
14366 return 0;
14367}
Martin v. Löwis11437992002-04-12 09:54:03 +000014368_ACEOF
14369rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014370if { (ac_try="$ac_link"
14371case "(($ac_try" in
14372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14373 *) ac_try_echo=$ac_try;;
14374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014376 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014380 { (case "(($ac_try" in
14381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14382 *) ac_try_echo=$ac_try;;
14383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014385 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014388 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014389 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014391 echo "$as_me: program exited with status $ac_status" >&5
14392echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014393sed 's/^/| /' conftest.$ac_ext >&5
14394
Martin v. Löwis11437992002-04-12 09:54:03 +000014395( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014396if test "$ac_cv_type_pthread_t" = yes; then
14397 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14398See \`config.log' for more details." >&5
14399echo "$as_me: error: cannot compute sizeof (pthread_t)
14400See \`config.log' for more details." >&2;}
14401 { (exit 77); exit 77; }; }
14402 else
14403 ac_cv_sizeof_pthread_t=0
14404 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014406rm -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 +000014407fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014408rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014409fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014410{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014411echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014412
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014413
14414
Martin v. Löwis11437992002-04-12 09:54:03 +000014415cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014416#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014417_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014418
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014419
Trent Mick635f6fb2000-08-23 21:33:05 +000014420fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014421CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014422
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014423{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14424echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014425# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014426if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014427 enableval=$enable_toolbox_glue;
14428fi
Jack Jansene578a632001-08-15 01:27:14 +000014429
14430
14431if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014432then
Jack Jansene578a632001-08-15 01:27:14 +000014433 case $ac_sys_system/$ac_sys_release in
14434 Darwin/*)
14435 enable_toolbox_glue="yes";;
14436 *)
14437 enable_toolbox_glue="no";;
14438 esac
14439fi
14440case "$enable_toolbox_glue" in
14441yes)
Jack Jansene578a632001-08-15 01:27:14 +000014442 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014443 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014444
14445cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014446#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014447_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014448
14449 ;;
14450*)
Jack Jansene578a632001-08-15 01:27:14 +000014451 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014452 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014453 ;;
14454esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014455{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14456echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014457
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014458
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014459
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014460case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014461 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014462 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14463 ;;
14464 Darwin/*)
14465 OTHER_LIBTOOL_OPT=""
14466 ;;
14467esac
14468
14469
Ronald Oussoren25967582009-09-06 10:00:26 +000014470ARCH_RUN_32BIT=""
14471
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014472case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014473 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014474 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14475 if test "${enable_universalsdk}"; then
14476 :
14477 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014478 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014479 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014480 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014481 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014482 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014483 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14484 if test ${gcc_version} '<' 4.0
14485 then
14486 LIBTOOL_CRUFT="-lcc_dynamic"
14487 else
14488 LIBTOOL_CRUFT=""
14489 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014490 if test "$cross_compiling" = yes; then
14491 ac_osx_32bit=no
14492else
14493 cat >conftest.$ac_ext <<_ACEOF
14494/* confdefs.h. */
14495_ACEOF
14496cat confdefs.h >>conftest.$ac_ext
14497cat >>conftest.$ac_ext <<_ACEOF
14498/* end confdefs.h. */
14499[
14500 #include <unistd.h>
14501 int main(int argc, char*argv[])
14502 {
14503 if (sizeof(long) == 4) {
14504 return 0;
14505 } else {
14506 return 1;
14507 }
14508 ]
14509_ACEOF
14510rm -f conftest$ac_exeext
14511if { (ac_try="$ac_link"
14512case "(($ac_try" in
14513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14514 *) ac_try_echo=$ac_try;;
14515esac
14516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14517 (eval "$ac_link") 2>&5
14518 ac_status=$?
14519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14521 { (case "(($ac_try" in
14522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14523 *) ac_try_echo=$ac_try;;
14524esac
14525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14526 (eval "$ac_try") 2>&5
14527 ac_status=$?
14528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14529 (exit $ac_status); }; }; then
14530 ac_osx_32bit=yes
14531else
14532 echo "$as_me: program exited with status $ac_status" >&5
14533echo "$as_me: failed program was:" >&5
14534sed 's/^/| /' conftest.$ac_ext >&5
14535
14536( exit $ac_status )
14537ac_osx_32bit=no
14538fi
14539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14540fi
14541
14542
14543
14544 if test "${ac_osx_32bit}" = "yes"; then
14545 case `arch` in
14546 i386)
14547 MACOSX_DEFAULT_ARCH="i386"
14548 ;;
14549 ppc)
14550 MACOSX_DEFAULT_ARCH="ppc"
14551 ;;
14552 *)
14553 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14554echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14555 { (exit 1); exit 1; }; }
14556 ;;
14557 esac
14558 else
14559 case `arch` in
14560 i386)
14561 MACOSX_DEFAULT_ARCH="x86_64"
14562 ;;
14563 ppc)
14564 MACOSX_DEFAULT_ARCH="ppc64"
14565 ;;
14566 *)
14567 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14568echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14569 { (exit 1); exit 1; }; }
14570 ;;
14571 esac
14572
14573 #ARCH_RUN_32BIT="true"
14574 fi
14575
14576 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014577 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014578 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014579esac
14580
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014581{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14582echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014583if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014584then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014585 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014586 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014587 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014588
Martin v. Löwis11437992002-04-12 09:54:03 +000014589cat >>confdefs.h <<\_ACEOF
14590#define WITH_NEXT_FRAMEWORK 1
14591_ACEOF
14592
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014593 { echo "$as_me:$LINENO: result: yes" >&5
14594echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014595 if test $enable_shared = "yes"
14596 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014597 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14598echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
Ronald Oussoren450d5612009-06-08 21:12:41 +000014599 { (exit 1); exit 1; }; }
14600 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014602 { echo "$as_me:$LINENO: result: no" >&5
14603echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014604fi
14605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014606{ echo "$as_me:$LINENO: checking for dyld" >&5
14607echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014608case $ac_sys_system/$ac_sys_release in
14609 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014610
Martin v. Löwis11437992002-04-12 09:54:03 +000014611cat >>confdefs.h <<\_ACEOF
14612#define WITH_DYLD 1
14613_ACEOF
14614
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014615 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14616echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014617 ;;
14618 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014619 { echo "$as_me:$LINENO: result: no" >&5
14620echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014621 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014622esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014623
Guido van Rossum0a516c91994-09-12 10:58:40 +000014624# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014625
Michael W. Hudson54241132001-12-07 15:38:26 +000014626
14627
14628
14629
Guido van Rossum0a516c91994-09-12 10:58:40 +000014630# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014631# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014632{ echo "$as_me:$LINENO: checking SO" >&5
14633echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014634if test -z "$SO"
14635then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014636 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014637 hp*|HP*)
14638 case `uname -m` in
14639 ia64) SO=.so;;
14640 *) SO=.sl;;
14641 esac
14642 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014643 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014644 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014645 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014646else
14647 # this might also be a termcap variable, see #610332
14648 echo
14649 echo '====================================================================='
14650 echo '+ +'
14651 echo '+ WARNING: You have set SO in your environment. +'
14652 echo '+ Do you really mean to change the extension for shared libraries? +'
14653 echo '+ Continuing in 10 seconds to let you to ponder. +'
14654 echo '+ +'
14655 echo '====================================================================='
14656 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014657fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014658{ echo "$as_me:$LINENO: result: $SO" >&5
14659echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014660
Ronald Oussoren79f90492009-01-02 10:44:46 +000014661
Neal Norwitz58e28882006-05-19 07:00:58 +000014662cat >>confdefs.h <<_ACEOF
14663#define SHLIB_EXT "$SO"
14664_ACEOF
14665
Guido van Rossum0a516c91994-09-12 10:58:40 +000014666# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014667# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014668# (Shared libraries in this instance are shared modules to be loaded into
14669# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014670{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14671echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014672if test -z "$LDSHARED"
14673then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014674 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014675 AIX*)
14676 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014677 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014678 ;;
14679 BeOS*)
14680 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014681 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014682 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014683 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014684 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014686 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014687 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014688 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014689 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014690 hp*|HP*)
14691 if test "$GCC" = "yes"
14692 then LDSHARED='$(CC) -shared'
14693 else LDSHARED='ld -b';
14694 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014695 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014696 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014697 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14698 if test "$enable_framework" ; then
14699 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014700 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14701 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014702 else
14703 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014704 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014705 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014706 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014707 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14708 if test "$enable_framework" ; then
14709 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014710 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14711 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014712 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014713 # No framework, use the Python app as bundle-loader
14714 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014715 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014716 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014717 Darwin/*)
14718 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14719 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014720
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014721 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014722 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014723 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014724 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014725 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014726 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14727 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014728 else
14729 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14730 if test "$enable_framework" ; then
14731 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014732 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14733 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014734 else
14735 # No framework, use the Python app as bundle-loader
14736 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14737 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14738 fi
14739 fi
14740 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014741 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014742 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014743 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014744 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014745 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014746 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014747 else
14748 LDSHARED="ld -Bshareable ${LDFLAGS}"
14749 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014750 OpenBSD*)
14751 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14752 then
14753 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14754 else
14755 case `uname -r` in
14756 [01].* | 2.[0-7] | 2.[0-7].*)
14757 LDSHARED="ld -Bshareable ${LDFLAGS}"
14758 ;;
14759 *)
14760 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14761 ;;
14762 esac
14763 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014764 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014765 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014766 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014767 then LDSHARED='$(CC) -shared'
14768 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014769 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014770 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014771 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014772 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014773 *) LDSHARED="ld";;
14774 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014775fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014776{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14777echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014778BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014779# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014780# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014781{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14782echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014783if test -z "$CCSHARED"
14784then
Guido van Rossum07397971997-04-29 21:49:50 +000014785 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014786 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014787 then CCSHARED="-fPIC";
14788 elif test `uname -p` = sparc;
14789 then CCSHARED="-xcode=pic32";
14790 else CCSHARED="-Kpic";
14791 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014792 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014793 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014794 else CCSHARED="+z";
14795 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014796 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014797 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014798 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014799 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014800 if test "$GCC" = "yes"
14801 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014802 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014803 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014804 SCO_SV*)
14805 if test "$GCC" = "yes"
14806 then CCSHARED="-fPIC"
14807 else CCSHARED="-Kpic -belf"
14808 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014809 IRIX*/6*) case $CC in
14810 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014811 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014812 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014813 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014814 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014815fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014816{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14817echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014818# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014819# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014820{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14821echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014822if test -z "$LINKFORSHARED"
14823then
Guido van Rossum07397971997-04-29 21:49:50 +000014824 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014825 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014826 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014827 LINKFORSHARED="-Wl,-E -Wl,+s";;
14828# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014829 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014830 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014831 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014832 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014833 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14834 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014835 # not used by the core itself but which needs to be in the core so
14836 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014837 # -prebind is no longer used, because it actually seems to give a
14838 # slowdown in stead of a speedup, maybe due to the large number of
14839 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014840
14841 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014842 if test "$enable_framework"
14843 then
Jack Jansenda49e192005-01-07 13:08:22 +000014844 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014845 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014846 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014847 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014848 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014849 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014850 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014851 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14852 then
14853 LINKFORSHARED="-Wl,--export-dynamic"
14854 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014855 SunOS/5*) case $CC in
14856 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014857 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014858 then
14859 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014860 fi;;
14861 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014862 CYGWIN*)
14863 if test $enable_shared = "no"
14864 then
14865 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14866 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014867 QNX*)
14868 # -Wl,-E causes the symbols to be added to the dynamic
14869 # symbol table so that they can be found when a module
14870 # is loaded. -N 2048K causes the stack size to be set
14871 # to 2048 kilobytes so that the stack doesn't overflow
14872 # when running test_compile.py.
14873 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014874 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014875fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014876{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14877echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014878
Michael W. Hudson54241132001-12-07 15:38:26 +000014879
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014880
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014881{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14882echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014883if test ! "$LIBRARY" = "$LDLIBRARY"
14884then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014885 case $ac_sys_system in
14886 CYGWIN*)
14887 # Cygwin needs CCSHARED when building extension DLLs
14888 # but not when building the interpreter DLL.
14889 CFLAGSFORSHARED='';;
14890 *)
14891 CFLAGSFORSHARED='$(CCSHARED)'
14892 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014893fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014894{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14895echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014896
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014897# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14898# library (with --enable-shared).
14899# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014900# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14901# if it is not required, since it creates a dependency of the shared library
14902# to LIBS. This, in turn, means that applications linking the shared libpython
14903# don't need to link LIBS explicitly. The default should be only changed
14904# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014905
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014906{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14907echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014908case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014909 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014910 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014912{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14913echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014914
14915
Guido van Rossum627b2d71993-12-24 10:39:16 +000014916# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014917
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014918{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14919echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014920if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014922else
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014924LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014926/* confdefs.h. */
14927_ACEOF
14928cat confdefs.h >>conftest.$ac_ext
14929cat >>conftest.$ac_ext <<_ACEOF
14930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014931
Martin v. Löwiseba40652007-08-30 20:10:57 +000014932/* Override any GCC internal prototype to avoid an error.
14933 Use char because int might match the return type of a GCC
14934 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014935#ifdef __cplusplus
14936extern "C"
14937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014938char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014939int
14940main ()
14941{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014942return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 ;
14944 return 0;
14945}
14946_ACEOF
14947rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014948if { (ac_try="$ac_link"
14949case "(($ac_try" in
14950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14951 *) ac_try_echo=$ac_try;;
14952esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014954 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014956 grep -v '^ *+' conftest.er1 >conftest.err
14957 rm -f conftest.er1
14958 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014960 (exit $ac_status); } && {
14961 test -z "$ac_c_werror_flag" ||
14962 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014963 } && test -s conftest$ac_exeext &&
14964 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014966else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014968sed 's/^/| /' conftest.$ac_ext >&5
14969
Martin v. Löwiseba40652007-08-30 20:10:57 +000014970 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014972
14973rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014975LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014976fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014977{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14978echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14979if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014980 cat >>confdefs.h <<_ACEOF
14981#define HAVE_LIBDL 1
14982_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014983
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014984 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014985
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014986fi
14987 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014988
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014989{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14990echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014991if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014992 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014993else
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014995LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014996cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014997/* confdefs.h. */
14998_ACEOF
14999cat confdefs.h >>conftest.$ac_ext
15000cat >>conftest.$ac_ext <<_ACEOF
15001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015002
Martin v. Löwiseba40652007-08-30 20:10:57 +000015003/* Override any GCC internal prototype to avoid an error.
15004 Use char because int might match the return type of a GCC
15005 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015006#ifdef __cplusplus
15007extern "C"
15008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015009char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015010int
15011main ()
15012{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015013return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 ;
15015 return 0;
15016}
15017_ACEOF
15018rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015019if { (ac_try="$ac_link"
15020case "(($ac_try" in
15021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15022 *) ac_try_echo=$ac_try;;
15023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015025 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015027 grep -v '^ *+' conftest.er1 >conftest.err
15028 rm -f conftest.er1
15029 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015031 (exit $ac_status); } && {
15032 test -z "$ac_c_werror_flag" ||
15033 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015034 } && test -s conftest$ac_exeext &&
15035 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015036 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015037else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015039sed 's/^/| /' conftest.$ac_ext >&5
15040
Martin v. Löwiseba40652007-08-30 20:10:57 +000015041 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043
15044rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015045 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015046LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015047fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015048{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15049echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15050if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 cat >>confdefs.h <<_ACEOF
15052#define HAVE_LIBDLD 1
15053_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015054
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015055 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015056
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015057fi
15058 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015059
Ronald Oussoren79f90492009-01-02 10:44:46 +000015060# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015061if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015062 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15063echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015064if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015065 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015066else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015067 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015068cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015069/* confdefs.h. */
15070_ACEOF
15071cat confdefs.h >>conftest.$ac_ext
15072cat >>conftest.$ac_ext <<_ACEOF
15073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015074
Martin v. Löwiseba40652007-08-30 20:10:57 +000015075/* Override any GCC internal prototype to avoid an error.
15076 Use char because int might match the return type of a GCC
15077 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015078#ifdef __cplusplus
15079extern "C"
15080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015081char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015082int
15083main ()
15084{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015085return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 ;
15087 return 0;
15088}
15089_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015090for ac_lib in '' pthread rt posix4; do
15091 if test -z "$ac_lib"; then
15092 ac_res="none required"
15093 else
15094 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015095 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015096 fi
15097 rm -f conftest.$ac_objext conftest$ac_exeext
15098if { (ac_try="$ac_link"
15099case "(($ac_try" in
15100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15101 *) ac_try_echo=$ac_try;;
15102esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015104 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015105 ac_status=$?
15106 grep -v '^ *+' conftest.er1 >conftest.err
15107 rm -f conftest.er1
15108 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015110 (exit $ac_status); } && {
15111 test -z "$ac_c_werror_flag" ||
15112 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015113 } && test -s conftest$ac_exeext &&
15114 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015115 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015117 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015118sed 's/^/| /' conftest.$ac_ext >&5
15119
Martin v. Löwiseba40652007-08-30 20:10:57 +000015120
Brett Cannon19fab762007-06-02 03:02:29 +000015121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122
15123rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15124 conftest$ac_exeext
15125 if test "${ac_cv_search_sem_init+set}" = set; then
15126 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128done
15129if test "${ac_cv_search_sem_init+set}" = set; then
15130 :
15131else
15132 ac_cv_search_sem_init=no
15133fi
15134rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015135LIBS=$ac_func_search_save_LIBS
15136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015137{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15138echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015139ac_res=$ac_cv_search_sem_init
15140if test "$ac_res" != no; then
15141 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015142
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015143fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015144 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015145 # posix4 on Solaris 2.6
15146 # pthread (first!) on Linux
15147fi
15148
Martin v. Löwis19d17342003-06-14 21:03:05 +000015149# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015150{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15151echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015152if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015153 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015154else
15155 ac_check_lib_save_LIBS=$LIBS
15156LIBS="-lintl $LIBS"
15157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015158/* confdefs.h. */
15159_ACEOF
15160cat confdefs.h >>conftest.$ac_ext
15161cat >>conftest.$ac_ext <<_ACEOF
15162/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015163
Martin v. Löwiseba40652007-08-30 20:10:57 +000015164/* Override any GCC internal prototype to avoid an error.
15165 Use char because int might match the return type of a GCC
15166 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015167#ifdef __cplusplus
15168extern "C"
15169#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015170char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015171int
15172main ()
15173{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015174return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015175 ;
15176 return 0;
15177}
15178_ACEOF
15179rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180if { (ac_try="$ac_link"
15181case "(($ac_try" in
15182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15183 *) ac_try_echo=$ac_try;;
15184esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015186 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015188 grep -v '^ *+' conftest.er1 >conftest.err
15189 rm -f conftest.er1
15190 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015192 (exit $ac_status); } && {
15193 test -z "$ac_c_werror_flag" ||
15194 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015195 } && test -s conftest$ac_exeext &&
15196 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015197 ac_cv_lib_intl_textdomain=yes
15198else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015200sed 's/^/| /' conftest.$ac_ext >&5
15201
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015204
15205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015206 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015207LIBS=$ac_check_lib_save_LIBS
15208fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015209{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15210echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15211if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015212
15213cat >>confdefs.h <<\_ACEOF
15214#define WITH_LIBINTL 1
15215_ACEOF
15216
15217fi
15218
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015219
15220# checks for system dependent C++ extensions support
15221case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015222 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15223echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015225/* confdefs.h. */
15226_ACEOF
15227cat confdefs.h >>conftest.$ac_ext
15228cat >>conftest.$ac_ext <<_ACEOF
15229/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015230#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015231int
15232main ()
15233{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015234loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 ;
15236 return 0;
15237}
15238_ACEOF
15239rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015240if { (ac_try="$ac_link"
15241case "(($ac_try" in
15242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15243 *) ac_try_echo=$ac_try;;
15244esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015246 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015248 grep -v '^ *+' conftest.er1 >conftest.err
15249 rm -f conftest.er1
15250 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015252 (exit $ac_status); } && {
15253 test -z "$ac_c_werror_flag" ||
15254 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015255 } && test -s conftest$ac_exeext &&
15256 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015257
Martin v. Löwis11437992002-04-12 09:54:03 +000015258cat >>confdefs.h <<\_ACEOF
15259#define AIX_GENUINE_CPLUSPLUS 1
15260_ACEOF
15261
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015262 { echo "$as_me:$LINENO: result: yes" >&5
15263echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015264else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015266sed 's/^/| /' conftest.$ac_ext >&5
15267
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015268 { echo "$as_me:$LINENO: result: no" >&5
15269echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015271
15272rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015273 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015274 *) ;;
15275esac
15276
Guido van Rossum70c7f481998-03-26 18:44:10 +000015277# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015278# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015279{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15280echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015281if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015282 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015283else
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015285LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015287/* confdefs.h. */
15288_ACEOF
15289cat confdefs.h >>conftest.$ac_ext
15290cat >>conftest.$ac_ext <<_ACEOF
15291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015292
Martin v. Löwiseba40652007-08-30 20:10:57 +000015293/* Override any GCC internal prototype to avoid an error.
15294 Use char because int might match the return type of a GCC
15295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015296#ifdef __cplusplus
15297extern "C"
15298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015299char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015300int
15301main ()
15302{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 ;
15305 return 0;
15306}
15307_ACEOF
15308rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015309if { (ac_try="$ac_link"
15310case "(($ac_try" in
15311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15312 *) ac_try_echo=$ac_try;;
15313esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015317 grep -v '^ *+' conftest.er1 >conftest.err
15318 rm -f conftest.er1
15319 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321 (exit $ac_status); } && {
15322 test -z "$ac_c_werror_flag" ||
15323 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015324 } && test -s conftest$ac_exeext &&
15325 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015329sed 's/^/| /' conftest.$ac_ext >&5
15330
Martin v. Löwiseba40652007-08-30 20:10:57 +000015331 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333
15334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015336LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015337fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015338{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15339echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15340if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015341 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015342fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015343 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015344{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15345echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015346if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015347 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015348else
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015350LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015351cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015352/* confdefs.h. */
15353_ACEOF
15354cat confdefs.h >>conftest.$ac_ext
15355cat >>conftest.$ac_ext <<_ACEOF
15356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015357
Martin v. Löwiseba40652007-08-30 20:10:57 +000015358/* Override any GCC internal prototype to avoid an error.
15359 Use char because int might match the return type of a GCC
15360 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015361#ifdef __cplusplus
15362extern "C"
15363#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015364char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015365int
15366main ()
15367{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015369 ;
15370 return 0;
15371}
15372_ACEOF
15373rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015374if { (ac_try="$ac_link"
15375case "(($ac_try" in
15376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15377 *) ac_try_echo=$ac_try;;
15378esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015380 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015382 grep -v '^ *+' conftest.er1 >conftest.err
15383 rm -f conftest.er1
15384 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015386 (exit $ac_status); } && {
15387 test -z "$ac_c_werror_flag" ||
15388 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015389 } && test -s conftest$ac_exeext &&
15390 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015392else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015394sed 's/^/| /' conftest.$ac_ext >&5
15395
Martin v. Löwiseba40652007-08-30 20:10:57 +000015396 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015398
15399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015400 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015401LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015402fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015403{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15404echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15405if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015406 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015407fi
15408 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015409
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015410case "$ac_sys_system" in
15411BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015412{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15413echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015414if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015415 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015416else
Martin v. Löwis11437992002-04-12 09:54:03 +000015417 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015418LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015419cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015420/* confdefs.h. */
15421_ACEOF
15422cat confdefs.h >>conftest.$ac_ext
15423cat >>conftest.$ac_ext <<_ACEOF
15424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015425
Martin v. Löwiseba40652007-08-30 20:10:57 +000015426/* Override any GCC internal prototype to avoid an error.
15427 Use char because int might match the return type of a GCC
15428 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015429#ifdef __cplusplus
15430extern "C"
15431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015432char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015433int
15434main ()
15435{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015436return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 ;
15438 return 0;
15439}
15440_ACEOF
15441rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015442if { (ac_try="$ac_link"
15443case "(($ac_try" in
15444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15445 *) ac_try_echo=$ac_try;;
15446esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015448 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015449 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015450 grep -v '^ *+' conftest.er1 >conftest.err
15451 rm -f conftest.er1
15452 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015454 (exit $ac_status); } && {
15455 test -z "$ac_c_werror_flag" ||
15456 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015457 } && test -s conftest$ac_exeext &&
15458 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015459 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015460else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015462sed 's/^/| /' conftest.$ac_ext >&5
15463
Martin v. Löwiseba40652007-08-30 20:10:57 +000015464 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015466
15467rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015468 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015469LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015470fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015471{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15472echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15473if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015474 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015475fi
15476 # BeOS
15477;;
15478esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015479
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015480{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15481echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015482
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015484if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015485 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015486{ echo "$as_me:$LINENO: result: $withval" >&5
15487echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015488LIBS="$withval $LIBS"
15489
15490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015491 { echo "$as_me:$LINENO: result: no" >&5
15492echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015493fi
15494
Guido van Rossum7f43da71994-08-01 12:15:30 +000015495
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015496# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015497{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15498echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015499
Martin v. Löwiseba40652007-08-30 20:10:57 +000015500# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015501if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015502 withval=$with_system_ffi;
15503fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015504
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015505
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015506{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15507echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015508
Benjamin Peterson867475c2009-04-29 20:36:25 +000015509# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015510{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15511echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015512
15513# Check whether --with-dbmliborder was given.
15514if test "${with_dbmliborder+set}" = set; then
15515 withval=$with_dbmliborder;
15516if test x$with_dbmliborder = xyes
15517then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015518{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15519echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015520 { (exit 1); exit 1; }; }
15521else
15522 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15523 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15524 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015525 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15526echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015527 { (exit 1); exit 1; }; }
15528 fi
15529 done
15530fi
15531fi
15532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015533{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15534echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015535
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015536# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015537
15538
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015539{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15540echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015541
Martin v. Löwiseba40652007-08-30 20:10:57 +000015542# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015543if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015544 withval=$with_signal_module;
15545fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015546
15547
15548if test -z "$with_signal_module"
15549then with_signal_module="yes"
15550fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015551{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15552echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015553
15554if test "${with_signal_module}" = "yes"; then
15555 USE_SIGNAL_MODULE=""
15556 SIGNAL_OBJS=""
15557else
15558 USE_SIGNAL_MODULE="#"
15559 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15560fi
15561
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015562# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015563
Barry Warsawc0d24d82000-06-29 16:12:00 +000015564USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015565
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015566{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15567echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
Guido van Rossumec2f0731997-01-22 20:54:01 +000015569
Martin v. Löwiseba40652007-08-30 20:10:57 +000015570# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015571if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015572 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015573{ echo "$as_me:$LINENO: result: $withval" >&5
15574echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015575LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015576if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015577 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015578fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015580 { echo "$as_me:$LINENO: result: no" >&5
15581echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015582fi
15583
Martin v. Löwis11437992002-04-12 09:54:03 +000015584
15585# Templates for things AC_DEFINEd more than once.
15586# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015587
15588
Martin v. Löwis11437992002-04-12 09:54:03 +000015589
15590
15591
15592
15593
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015594{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15595echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015596
Martin v. Löwiseba40652007-08-30 20:10:57 +000015597# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015598if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015599 withval=$with_threads;
15600fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015601
15602
Barry Warsawc0d24d82000-06-29 16:12:00 +000015603# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015606if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015607 withval=$with_thread; with_threads=$with_thread
15608fi
15609
Barry Warsawc0d24d82000-06-29 16:12:00 +000015610
15611if test -z "$with_threads"
15612then with_threads="yes"
15613fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015614{ echo "$as_me:$LINENO: result: $with_threads" >&5
15615echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015616
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015617
Barry Warsawc0d24d82000-06-29 16:12:00 +000015618if test "$with_threads" = "no"
15619then
15620 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015621elif test "$ac_cv_pthread_is_default" = yes
15622then
Martin v. Löwis11437992002-04-12 09:54:03 +000015623 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015624#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015625_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015626
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015627 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015629#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015630_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015631
15632 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015633 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015634elif test "$ac_cv_kpthread" = "yes"
15635then
15636 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015637 if test "$ac_cv_cxx_thread" = "yes"; then
15638 CXX="$CXX -Kpthread"
15639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015640 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015641#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015642_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015643
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015644 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015645 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015646elif test "$ac_cv_kthread" = "yes"
15647then
15648 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015649 if test "$ac_cv_cxx_thread" = "yes"; then
15650 CXX="$CXX -Kthread"
15651 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015652 cat >>confdefs.h <<\_ACEOF
15653#define WITH_THREAD 1
15654_ACEOF
15655
15656 posix_threads=yes
15657 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015658elif test "$ac_cv_pthread" = "yes"
15659then
15660 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015661 if test "$ac_cv_cxx_thread" = "yes"; then
15662 CXX="$CXX -pthread"
15663 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015664 cat >>confdefs.h <<\_ACEOF
15665#define WITH_THREAD 1
15666_ACEOF
15667
15668 posix_threads=yes
15669 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015670else
15671 if test ! -z "$with_threads" -a -d "$with_threads"
15672 then LDFLAGS="$LDFLAGS -L$with_threads"
15673 fi
15674 if test ! -z "$withval" -a -d "$withval"
15675 then LDFLAGS="$LDFLAGS -L$withval"
15676 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015677
15678 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015679 # define _POSIX_THREADS in unistd.h. Some apparently don't
15680 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015681 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15682echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015684/* confdefs.h. */
15685_ACEOF
15686cat confdefs.h >>conftest.$ac_ext
15687cat >>conftest.$ac_ext <<_ACEOF
15688/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015689
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015690#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015691#ifdef _POSIX_THREADS
15692yes
15693#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
15695_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015696if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015697 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015698 unistd_defines_pthreads=yes
15699else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015700 unistd_defines_pthreads=no
15701fi
Ronald Oussoren25967582009-09-06 10:00:26 +000015702rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015703
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015704 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15705echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015706
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015708#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015709_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015710
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015712 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15713echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015714if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015715 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015716fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015717{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15718echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015719else
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015721{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15722echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015723cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015724/* confdefs.h. */
15725_ACEOF
15726cat confdefs.h >>conftest.$ac_ext
15727cat >>conftest.$ac_ext <<_ACEOF
15728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015729$ac_includes_default
15730#include <cthreads.h>
15731_ACEOF
15732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015733if { (ac_try="$ac_compile"
15734case "(($ac_try" in
15735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15736 *) ac_try_echo=$ac_try;;
15737esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015739 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015741 grep -v '^ *+' conftest.er1 >conftest.err
15742 rm -f conftest.er1
15743 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015745 (exit $ac_status); } && {
15746 test -z "$ac_c_werror_flag" ||
15747 test ! -s conftest.err
15748 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015749 ac_header_compiler=yes
15750else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015752sed 's/^/| /' conftest.$ac_ext >&5
15753
Martin v. Löwiseba40652007-08-30 20:10:57 +000015754 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756
15757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015758{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15759echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015760
15761# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015762{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15763echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015764cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015765/* confdefs.h. */
15766_ACEOF
15767cat confdefs.h >>conftest.$ac_ext
15768cat >>conftest.$ac_ext <<_ACEOF
15769/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015770#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015771_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015772if { (ac_try="$ac_cpp conftest.$ac_ext"
15773case "(($ac_try" in
15774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15775 *) ac_try_echo=$ac_try;;
15776esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015778 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015779 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015780 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015781 rm -f conftest.er1
15782 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015784 (exit $ac_status); } >/dev/null && {
15785 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15786 test ! -s conftest.err
15787 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015788 ac_header_preproc=yes
15789else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015791sed 's/^/| /' conftest.$ac_ext >&5
15792
Martin v. Löwis11437992002-04-12 09:54:03 +000015793 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795
Martin v. Löwis11437992002-04-12 09:54:03 +000015796rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015797{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15798echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015799
15800# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015801case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15802 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015803 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15804echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15805 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15806echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015807 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015808 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015809 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015810 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15811echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15812 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15813echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15814 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15815echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15816 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15817echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15818 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15819echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15820 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15821echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015822 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015823## -------------------------------------- ##
15824## Report this to http://bugs.python.org/ ##
15825## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015826_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015827 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015828 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015830{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15831echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015832if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015833 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015834else
15835 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015836fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015837{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15838echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015839
15840fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015841if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015842 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015843#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015844_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015845
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015847#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015848_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015849
Martin v. Löwis11437992002-04-12 09:54:03 +000015850
15851cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015852#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015853_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015854
15855 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015856 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015857else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015860 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15861echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015862if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015863 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015864fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015865{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15866echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015867else
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015869{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15870echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015872/* confdefs.h. */
15873_ACEOF
15874cat confdefs.h >>conftest.$ac_ext
15875cat >>conftest.$ac_ext <<_ACEOF
15876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015877$ac_includes_default
15878#include <mach/cthreads.h>
15879_ACEOF
15880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015881if { (ac_try="$ac_compile"
15882case "(($ac_try" in
15883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15884 *) ac_try_echo=$ac_try;;
15885esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015889 grep -v '^ *+' conftest.er1 >conftest.err
15890 rm -f conftest.er1
15891 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015893 (exit $ac_status); } && {
15894 test -z "$ac_c_werror_flag" ||
15895 test ! -s conftest.err
15896 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015897 ac_header_compiler=yes
15898else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015900sed 's/^/| /' conftest.$ac_ext >&5
15901
Martin v. Löwiseba40652007-08-30 20:10:57 +000015902 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904
15905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015906{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15907echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015908
15909# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015910{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15911echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015912cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015913/* confdefs.h. */
15914_ACEOF
15915cat confdefs.h >>conftest.$ac_ext
15916cat >>conftest.$ac_ext <<_ACEOF
15917/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015918#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015919_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015920if { (ac_try="$ac_cpp conftest.$ac_ext"
15921case "(($ac_try" in
15922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15923 *) ac_try_echo=$ac_try;;
15924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015926 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015927 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015928 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 rm -f conftest.er1
15930 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015932 (exit $ac_status); } >/dev/null && {
15933 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15934 test ! -s conftest.err
15935 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015936 ac_header_preproc=yes
15937else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015939sed 's/^/| /' conftest.$ac_ext >&5
15940
Martin v. Löwis11437992002-04-12 09:54:03 +000015941 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943
Martin v. Löwis11437992002-04-12 09:54:03 +000015944rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015945{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15946echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015947
15948# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015949case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15950 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015951 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15952echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15953 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15954echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015955 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015956 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015957 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015958 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15959echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15960 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15961echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15962 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15963echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15964 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15965echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15966 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15967echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15968 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15969echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015970 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015971## -------------------------------------- ##
15972## Report this to http://bugs.python.org/ ##
15973## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015974_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015975 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015976 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015978{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15979echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015980if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015981 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015982else
15983 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015984fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015985{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15986echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015987
15988fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015989if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015990 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015991#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015992_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015993
Martin v. Löwis11437992002-04-12 09:54:03 +000015994 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015995#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015996_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015997
Martin v. Löwis11437992002-04-12 09:54:03 +000015998
15999cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016000#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016001_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016002
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016003 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016004else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016005
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016006 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16007echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016008
Martin v. Löwiseba40652007-08-30 20:10:57 +000016009# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016010if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016011 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16012echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016013 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016014#define WITH_THREAD 1
16015_ACEOF
16016
16017
16018cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016019#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016020_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016021
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016022 LIBS="-lpth $LIBS"
16023 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016024else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016025 { echo "$as_me:$LINENO: result: no" >&5
16026echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016027
16028 # Just looking for pthread_create in libpthread is not enough:
16029 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16030 # So we really have to include pthread.h, and then link.
16031 _libs=$LIBS
16032 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016033 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16034echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016036/* confdefs.h. */
16037_ACEOF
16038cat confdefs.h >>conftest.$ac_ext
16039cat >>conftest.$ac_ext <<_ACEOF
16040/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016041#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016042
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016043void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016044int
16045main ()
16046{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016047
16048pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016049 ;
16050 return 0;
16051}
16052_ACEOF
16053rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016054if { (ac_try="$ac_link"
16055case "(($ac_try" in
16056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16057 *) ac_try_echo=$ac_try;;
16058esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016060 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016062 grep -v '^ *+' conftest.er1 >conftest.err
16063 rm -f conftest.er1
16064 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016066 (exit $ac_status); } && {
16067 test -z "$ac_c_werror_flag" ||
16068 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016069 } && test -s conftest$ac_exeext &&
16070 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016071
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016072 { echo "$as_me:$LINENO: result: yes" >&5
16073echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016074 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016075#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016076_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016077
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016078 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016079 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016080else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016082sed 's/^/| /' conftest.$ac_ext >&5
16083
Martin v. Löwis11437992002-04-12 09:54:03 +000016084
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016085 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016086 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16087echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016088if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016090else
Martin v. Löwis11437992002-04-12 09:54:03 +000016091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016092/* confdefs.h. */
16093_ACEOF
16094cat confdefs.h >>conftest.$ac_ext
16095cat >>conftest.$ac_ext <<_ACEOF
16096/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016097/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16098 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16099#define pthread_detach innocuous_pthread_detach
16100
Guido van Rossumad678af1998-10-02 14:42:15 +000016101/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016102 which can conflict with char pthread_detach (); below.
16103 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016104 <limits.h> exists even on freestanding compilers. */
16105
16106#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016107# include <limits.h>
16108#else
16109# include <assert.h>
16110#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016111
16112#undef pthread_detach
16113
Martin v. Löwiseba40652007-08-30 20:10:57 +000016114/* Override any GCC internal prototype to avoid an error.
16115 Use char because int might match the return type of a GCC
16116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016117#ifdef __cplusplus
16118extern "C"
16119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016120char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016121/* The GNU C library defines this for functions which it implements
16122 to always fail with ENOSYS. Some functions are actually named
16123 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016124#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016125choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016126#endif
16127
Skip Montanaro6dead952003-09-25 14:50:04 +000016128int
16129main ()
16130{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016131return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 ;
16133 return 0;
16134}
16135_ACEOF
16136rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016137if { (ac_try="$ac_link"
16138case "(($ac_try" in
16139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16140 *) ac_try_echo=$ac_try;;
16141esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016143 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016145 grep -v '^ *+' conftest.er1 >conftest.err
16146 rm -f conftest.er1
16147 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016149 (exit $ac_status); } && {
16150 test -z "$ac_c_werror_flag" ||
16151 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016152 } && test -s conftest$ac_exeext &&
16153 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016154 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016155else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016157sed 's/^/| /' conftest.$ac_ext >&5
16158
Martin v. Löwiseba40652007-08-30 20:10:57 +000016159 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016161
16162rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016163 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016164fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016165{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16166echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16167if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016168 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016169#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016170_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016171
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016172 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016173 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016174else
Guido van Rossumad678af1998-10-02 14:42:15 +000016175
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016176 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016177 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16178echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016179if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016180 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016181fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016182{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16183echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016184else
16185 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016186{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16187echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016189/* confdefs.h. */
16190_ACEOF
16191cat confdefs.h >>conftest.$ac_ext
16192cat >>conftest.$ac_ext <<_ACEOF
16193/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016194$ac_includes_default
16195#include <atheos/threads.h>
16196_ACEOF
16197rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016198if { (ac_try="$ac_compile"
16199case "(($ac_try" in
16200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16201 *) ac_try_echo=$ac_try;;
16202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016206 grep -v '^ *+' conftest.er1 >conftest.err
16207 rm -f conftest.er1
16208 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016210 (exit $ac_status); } && {
16211 test -z "$ac_c_werror_flag" ||
16212 test ! -s conftest.err
16213 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016214 ac_header_compiler=yes
16215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016217sed 's/^/| /' conftest.$ac_ext >&5
16218
Martin v. Löwiseba40652007-08-30 20:10:57 +000016219 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221
16222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016223{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16224echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016225
16226# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016227{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16228echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016230/* confdefs.h. */
16231_ACEOF
16232cat confdefs.h >>conftest.$ac_ext
16233cat >>conftest.$ac_ext <<_ACEOF
16234/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016235#include <atheos/threads.h>
16236_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016237if { (ac_try="$ac_cpp conftest.$ac_ext"
16238case "(($ac_try" in
16239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16240 *) ac_try_echo=$ac_try;;
16241esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016243 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016244 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016245 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016246 rm -f conftest.er1
16247 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016249 (exit $ac_status); } >/dev/null && {
16250 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16251 test ! -s conftest.err
16252 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016253 ac_header_preproc=yes
16254else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016256sed 's/^/| /' conftest.$ac_ext >&5
16257
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016258 ac_header_preproc=no
16259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016260
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016261rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016262{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16263echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016264
16265# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016266case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16267 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016268 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16269echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16270 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16271echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016272 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016273 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016274 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016275 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16276echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16277 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16278echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16279 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16280echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16281 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16282echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16283 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16284echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16285 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16286echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016287 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016288## -------------------------------------- ##
16289## Report this to http://bugs.python.org/ ##
16290## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016291_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016292 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016293 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016295{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16296echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016297if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016298 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016299else
16300 ac_cv_header_atheos_threads_h=$ac_header_preproc
16301fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016302{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16303echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016304
16305fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016306if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016307 cat >>confdefs.h <<\_ACEOF
16308#define WITH_THREAD 1
16309_ACEOF
16310
16311
16312cat >>confdefs.h <<\_ACEOF
16313#define ATHEOS_THREADS 1
16314_ACEOF
16315
16316 THREADOBJ="Python/thread.o"
16317else
16318
Martin v. Löwis11437992002-04-12 09:54:03 +000016319 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016320 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16321echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016322if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016323 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016324fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016325{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16326echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016327else
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016329{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16330echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016332/* confdefs.h. */
16333_ACEOF
16334cat confdefs.h >>conftest.$ac_ext
16335cat >>conftest.$ac_ext <<_ACEOF
16336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016337$ac_includes_default
16338#include <kernel/OS.h>
16339_ACEOF
16340rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016341if { (ac_try="$ac_compile"
16342case "(($ac_try" in
16343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16344 *) ac_try_echo=$ac_try;;
16345esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016347 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016349 grep -v '^ *+' conftest.er1 >conftest.err
16350 rm -f conftest.er1
16351 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016353 (exit $ac_status); } && {
16354 test -z "$ac_c_werror_flag" ||
16355 test ! -s conftest.err
16356 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 ac_header_compiler=yes
16358else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016360sed 's/^/| /' conftest.$ac_ext >&5
16361
Martin v. Löwiseba40652007-08-30 20:10:57 +000016362 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364
16365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016366{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16367echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016368
16369# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016370{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16371echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016373/* confdefs.h. */
16374_ACEOF
16375cat confdefs.h >>conftest.$ac_ext
16376cat >>conftest.$ac_ext <<_ACEOF
16377/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016378#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016379_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016380if { (ac_try="$ac_cpp conftest.$ac_ext"
16381case "(($ac_try" in
16382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16383 *) ac_try_echo=$ac_try;;
16384esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016386 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016388 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 rm -f conftest.er1
16390 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016392 (exit $ac_status); } >/dev/null && {
16393 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16394 test ! -s conftest.err
16395 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 ac_header_preproc=yes
16397else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016399sed 's/^/| /' conftest.$ac_ext >&5
16400
Martin v. Löwis11437992002-04-12 09:54:03 +000016401 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016403
Martin v. Löwis11437992002-04-12 09:54:03 +000016404rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016405{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16406echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016407
Martin v. Löwis11437992002-04-12 09:54:03 +000016408# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016409case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16410 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016411 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16412echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16413 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16414echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016415 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016416 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016417 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016418 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16419echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16420 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16421echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16422 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16423echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16424 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16425echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16426 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16427echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16428 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16429echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016430 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016431## -------------------------------------- ##
16432## Report this to http://bugs.python.org/ ##
16433## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016434_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016435 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016436 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016437esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016438{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16439echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016440if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016441 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016442else
16443 ac_cv_header_kernel_OS_h=$ac_header_preproc
16444fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016445{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16446echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016447
16448fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016449if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016450 cat >>confdefs.h <<\_ACEOF
16451#define WITH_THREAD 1
16452_ACEOF
16453
16454
16455cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016456#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016457_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016458
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016459 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016460else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016461
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016462 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16463echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016464if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016465 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016466else
Martin v. Löwis11437992002-04-12 09:54:03 +000016467 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016468LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016470/* confdefs.h. */
16471_ACEOF
16472cat confdefs.h >>conftest.$ac_ext
16473cat >>conftest.$ac_ext <<_ACEOF
16474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016475
Martin v. Löwiseba40652007-08-30 20:10:57 +000016476/* Override any GCC internal prototype to avoid an error.
16477 Use char because int might match the return type of a GCC
16478 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016479#ifdef __cplusplus
16480extern "C"
16481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016482char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016483int
16484main ()
16485{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016486return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016487 ;
16488 return 0;
16489}
16490_ACEOF
16491rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016492if { (ac_try="$ac_link"
16493case "(($ac_try" in
16494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16495 *) ac_try_echo=$ac_try;;
16496esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016498 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016500 grep -v '^ *+' conftest.er1 >conftest.err
16501 rm -f conftest.er1
16502 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016504 (exit $ac_status); } && {
16505 test -z "$ac_c_werror_flag" ||
16506 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016507 } && test -s conftest$ac_exeext &&
16508 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016509 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016510else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016512sed 's/^/| /' conftest.$ac_ext >&5
16513
Martin v. Löwiseba40652007-08-30 20:10:57 +000016514 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016516
16517rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016518 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016519LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016520fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016521{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16522echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16523if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016524 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016525#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016526_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016527
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016528 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016529 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016530 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016531else
Greg Steinadf63d62000-07-05 10:38:09 +000016532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016533 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16534echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016535if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016536 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016537else
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016539LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016540cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016541/* confdefs.h. */
16542_ACEOF
16543cat confdefs.h >>conftest.$ac_ext
16544cat >>conftest.$ac_ext <<_ACEOF
16545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016546
Martin v. Löwiseba40652007-08-30 20:10:57 +000016547/* Override any GCC internal prototype to avoid an error.
16548 Use char because int might match the return type of a GCC
16549 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016550#ifdef __cplusplus
16551extern "C"
16552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016553char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016554int
16555main ()
16556{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016557return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 ;
16559 return 0;
16560}
16561_ACEOF
16562rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016563if { (ac_try="$ac_link"
16564case "(($ac_try" in
16565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16566 *) ac_try_echo=$ac_try;;
16567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016569 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016571 grep -v '^ *+' conftest.er1 >conftest.err
16572 rm -f conftest.er1
16573 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016575 (exit $ac_status); } && {
16576 test -z "$ac_c_werror_flag" ||
16577 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016578 } && test -s conftest$ac_exeext &&
16579 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016581else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016583sed 's/^/| /' conftest.$ac_ext >&5
16584
Martin v. Löwiseba40652007-08-30 20:10:57 +000016585 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587
16588rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016589 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016590LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016591fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016592{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16593echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16594if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016595 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016596#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016597_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016598
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016599 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016600 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016601 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016602else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016603
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016604 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16605echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016606if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016607 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016608else
Martin v. Löwis11437992002-04-12 09:54:03 +000016609 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016610LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016612/* confdefs.h. */
16613_ACEOF
16614cat confdefs.h >>conftest.$ac_ext
16615cat >>conftest.$ac_ext <<_ACEOF
16616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016617
Martin v. Löwiseba40652007-08-30 20:10:57 +000016618/* Override any GCC internal prototype to avoid an error.
16619 Use char because int might match the return type of a GCC
16620 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016621#ifdef __cplusplus
16622extern "C"
16623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016624char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016625int
16626main ()
16627{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016628return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016629 ;
16630 return 0;
16631}
16632_ACEOF
16633rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016634if { (ac_try="$ac_link"
16635case "(($ac_try" in
16636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16637 *) ac_try_echo=$ac_try;;
16638esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016640 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016642 grep -v '^ *+' conftest.er1 >conftest.err
16643 rm -f conftest.er1
16644 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016646 (exit $ac_status); } && {
16647 test -z "$ac_c_werror_flag" ||
16648 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016649 } && test -s conftest$ac_exeext &&
16650 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016651 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016652else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016654sed 's/^/| /' conftest.$ac_ext >&5
16655
Martin v. Löwiseba40652007-08-30 20:10:57 +000016656 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016658
16659rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016661LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016662fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016663{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16664echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16665if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016666 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016667#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016668_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016669
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016670 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016671 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016672 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016673else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016674
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016675 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16676echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016677if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016678 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016679else
Martin v. Löwis11437992002-04-12 09:54:03 +000016680 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016681LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016683/* confdefs.h. */
16684_ACEOF
16685cat confdefs.h >>conftest.$ac_ext
16686cat >>conftest.$ac_ext <<_ACEOF
16687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016688
Martin v. Löwiseba40652007-08-30 20:10:57 +000016689/* Override any GCC internal prototype to avoid an error.
16690 Use char because int might match the return type of a GCC
16691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016692#ifdef __cplusplus
16693extern "C"
16694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016695char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016696int
16697main ()
16698{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016699return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016700 ;
16701 return 0;
16702}
16703_ACEOF
16704rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016705if { (ac_try="$ac_link"
16706case "(($ac_try" in
16707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16708 *) ac_try_echo=$ac_try;;
16709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016711 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016713 grep -v '^ *+' conftest.er1 >conftest.err
16714 rm -f conftest.er1
16715 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016717 (exit $ac_status); } && {
16718 test -z "$ac_c_werror_flag" ||
16719 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016720 } && test -s conftest$ac_exeext &&
16721 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016722 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016723else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016725sed 's/^/| /' conftest.$ac_ext >&5
16726
Martin v. Löwiseba40652007-08-30 20:10:57 +000016727 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729
16730rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016732LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016733fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016734{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16735echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16736if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016737 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016738#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016739_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016740
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016741 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016742 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016743 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016744else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016745
Martin v. Löwis130fb172001-07-19 11:00:41 +000016746 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016747fi
16748
Guido van Rossum627b2d71993-12-24 10:39:16 +000016749
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016750fi
16751
Guido van Rossum0be3e491997-05-22 20:33:33 +000016752fi
16753
Guido van Rossum49545951997-12-02 19:28:29 +000016754fi
16755
Guido van Rossumb93a8621998-05-07 13:27:32 +000016756fi
16757
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016758
Michael W. Hudson54241132001-12-07 15:38:26 +000016759fi
16760
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016761
16762fi
16763
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016765
16766rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016767 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016768fi
16769
Martin v. Löwis11437992002-04-12 09:54:03 +000016770fi
16771
16772
16773fi
16774
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016775
Michael W. Hudson54241132001-12-07 15:38:26 +000016776
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016777 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16778echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016779if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016780 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016781else
Martin v. Löwis11437992002-04-12 09:54:03 +000016782 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016783LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016784cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016785/* confdefs.h. */
16786_ACEOF
16787cat confdefs.h >>conftest.$ac_ext
16788cat >>conftest.$ac_ext <<_ACEOF
16789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016790
Martin v. Löwiseba40652007-08-30 20:10:57 +000016791/* Override any GCC internal prototype to avoid an error.
16792 Use char because int might match the return type of a GCC
16793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016794#ifdef __cplusplus
16795extern "C"
16796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016797char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016798int
16799main ()
16800{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016801return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016802 ;
16803 return 0;
16804}
16805_ACEOF
16806rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016807if { (ac_try="$ac_link"
16808case "(($ac_try" in
16809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16810 *) ac_try_echo=$ac_try;;
16811esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016813 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016815 grep -v '^ *+' conftest.er1 >conftest.err
16816 rm -f conftest.er1
16817 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016819 (exit $ac_status); } && {
16820 test -z "$ac_c_werror_flag" ||
16821 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016822 } && test -s conftest$ac_exeext &&
16823 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016824 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016825else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016827sed 's/^/| /' conftest.$ac_ext >&5
16828
Martin v. Löwiseba40652007-08-30 20:10:57 +000016829 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016831
16832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016834LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016835fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016836{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16837echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16838if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016839 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016840#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016841_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016842
Martin v. Löwis130fb172001-07-19 11:00:41 +000016843 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016844 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016845 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016846fi
16847
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016848
Neal Norwitza978ab02002-11-02 16:58:05 +000016849 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016850 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16851echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016852if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016853 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016854else
Martin v. Löwis11437992002-04-12 09:54:03 +000016855 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016856LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016863
Martin v. Löwiseba40652007-08-30 20:10:57 +000016864/* Override any GCC internal prototype to avoid an error.
16865 Use char because int might match the return type of a GCC
16866 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016867#ifdef __cplusplus
16868extern "C"
16869#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016870char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016871int
16872main ()
16873{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016874return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016875 ;
16876 return 0;
16877}
16878_ACEOF
16879rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016880if { (ac_try="$ac_link"
16881case "(($ac_try" in
16882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16883 *) ac_try_echo=$ac_try;;
16884esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016886 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016888 grep -v '^ *+' conftest.er1 >conftest.err
16889 rm -f conftest.er1
16890 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016892 (exit $ac_status); } && {
16893 test -z "$ac_c_werror_flag" ||
16894 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016895 } && test -s conftest$ac_exeext &&
16896 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016897 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016898else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016900sed 's/^/| /' conftest.$ac_ext >&5
16901
Martin v. Löwiseba40652007-08-30 20:10:57 +000016902 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016904
16905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016907LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016908fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016909{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16910echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16911if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016912 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016913#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016914_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016915
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016916 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016917 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016918 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016919fi
16920
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016921 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016922
Martin v. Löwis130fb172001-07-19 11:00:41 +000016923 if test "$USE_THREAD_MODULE" != "#"
16924 then
16925 # If the above checks didn't disable threads, (at least) OSF1
16926 # needs this '-threads' argument during linking.
16927 case $ac_sys_system in
16928 OSF1) LDLAST=-threads;;
16929 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016930 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016931fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016932
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016933if test "$posix_threads" = "yes"; then
16934 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016935
16936cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016937#define _POSIX_THREADS 1
16938_ACEOF
16939
16940 fi
16941
16942 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16943 case $ac_sys_system/$ac_sys_release in
16944 SunOS/5.6)
16945cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016946#define HAVE_PTHREAD_DESTRUCTOR 1
16947_ACEOF
16948
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016949 ;;
16950 SunOS/5.8)
16951cat >>confdefs.h <<\_ACEOF
16952#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16953_ACEOF
16954
16955 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016956 AIX/5)
16957cat >>confdefs.h <<\_ACEOF
16958#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16959_ACEOF
16960
16961 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016962 esac
16963
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016964 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16965echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016966 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016967 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016968else
16969 if test "$cross_compiling" = yes; then
16970 ac_cv_pthread_system_supported=no
16971else
16972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016973/* confdefs.h. */
16974_ACEOF
16975cat confdefs.h >>conftest.$ac_ext
16976cat >>conftest.$ac_ext <<_ACEOF
16977/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016978#include <pthread.h>
16979 void *foo(void *parm) {
16980 return NULL;
16981 }
16982 main() {
16983 pthread_attr_t attr;
16984 pthread_t id;
16985 if (pthread_attr_init(&attr)) exit(-1);
16986 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16987 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16988 exit(0);
16989 }
16990_ACEOF
16991rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016992if { (ac_try="$ac_link"
16993case "(($ac_try" in
16994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16995 *) ac_try_echo=$ac_try;;
16996esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016998 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016999 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017001 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017002 { (case "(($ac_try" in
17003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17004 *) ac_try_echo=$ac_try;;
17005esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017007 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017008 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017010 (exit $ac_status); }; }; then
17011 ac_cv_pthread_system_supported=yes
17012else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017013 echo "$as_me: program exited with status $ac_status" >&5
17014echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017015sed 's/^/| /' conftest.$ac_ext >&5
17016
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017017( exit $ac_status )
17018ac_cv_pthread_system_supported=no
17019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017020rm -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 +000017021fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017022
Martin v. Löwiseba40652007-08-30 20:10:57 +000017023
17024
Guido van Rossum627b2d71993-12-24 10:39:16 +000017025fi
17026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017027 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17028echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017029 if test "$ac_cv_pthread_system_supported" = "yes"; then
17030
17031cat >>confdefs.h <<\_ACEOF
17032#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17033_ACEOF
17034
17035 fi
17036
17037for ac_func in pthread_sigmask
17038do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017039as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17040{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17041echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017042if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017043 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017044else
17045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017046/* confdefs.h. */
17047_ACEOF
17048cat confdefs.h >>conftest.$ac_ext
17049cat >>conftest.$ac_ext <<_ACEOF
17050/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017051/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17052 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17053#define $ac_func innocuous_$ac_func
17054
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017055/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017056 which can conflict with char $ac_func (); below.
17057 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017058 <limits.h> exists even on freestanding compilers. */
17059
17060#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017061# include <limits.h>
17062#else
17063# include <assert.h>
17064#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017065
17066#undef $ac_func
17067
Martin v. Löwiseba40652007-08-30 20:10:57 +000017068/* Override any GCC internal prototype to avoid an error.
17069 Use char because int might match the return type of a GCC
17070 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017071#ifdef __cplusplus
17072extern "C"
17073#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017074char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017075/* The GNU C library defines this for functions which it implements
17076 to always fail with ENOSYS. Some functions are actually named
17077 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017078#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017079choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017080#endif
17081
Skip Montanaro6dead952003-09-25 14:50:04 +000017082int
17083main ()
17084{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017085return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017086 ;
17087 return 0;
17088}
17089_ACEOF
17090rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017091if { (ac_try="$ac_link"
17092case "(($ac_try" in
17093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17094 *) ac_try_echo=$ac_try;;
17095esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017097 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017099 grep -v '^ *+' conftest.er1 >conftest.err
17100 rm -f conftest.er1
17101 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017103 (exit $ac_status); } && {
17104 test -z "$ac_c_werror_flag" ||
17105 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017106 } && test -s conftest$ac_exeext &&
17107 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017108 eval "$as_ac_var=yes"
17109else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017111sed 's/^/| /' conftest.$ac_ext >&5
17112
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017115
17116rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017117 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017118fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017119ac_res=`eval echo '${'$as_ac_var'}'`
17120 { echo "$as_me:$LINENO: result: $ac_res" >&5
17121echo "${ECHO_T}$ac_res" >&6; }
17122if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017123 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017124#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017125_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017126 case $ac_sys_system in
17127 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017128
Jason Tishlerfac083d2003-07-22 15:20:49 +000017129cat >>confdefs.h <<\_ACEOF
17130#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17131_ACEOF
17132
17133 ;;
17134 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017135fi
17136done
17137
17138fi
17139
17140
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017141# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017142
17143
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017144{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17145echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017146# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017147if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017148 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017149 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017150 { echo "$as_me:$LINENO: result: no" >&5
17151echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017152 ipv6=no
17153 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017154 *) { echo "$as_me:$LINENO: result: yes" >&5
17155echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017156 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017157#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017158_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017159
17160 ipv6=yes
17161 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017162 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017163else
Martin v. Löwis11437992002-04-12 09:54:03 +000017164
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017165 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017166 { echo "$as_me:$LINENO: result: no" >&5
17167echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017168 ipv6=no
17169
17170else
Martin v. Löwis11437992002-04-12 09:54:03 +000017171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017172/* confdefs.h. */
17173_ACEOF
17174cat confdefs.h >>conftest.$ac_ext
17175cat >>conftest.$ac_ext <<_ACEOF
17176/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017177 /* AF_INET6 available check */
17178#include <sys/types.h>
17179#include <sys/socket.h>
17180main()
17181{
17182 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17183 exit(1);
17184 else
17185 exit(0);
17186}
17187
Martin v. Löwis11437992002-04-12 09:54:03 +000017188_ACEOF
17189rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017190if { (ac_try="$ac_link"
17191case "(($ac_try" in
17192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17193 *) ac_try_echo=$ac_try;;
17194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017196 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017197 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017200 { (case "(($ac_try" in
17201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17202 *) ac_try_echo=$ac_try;;
17203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017205 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017206 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017208 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017209 { echo "$as_me:$LINENO: result: yes" >&5
17210echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017211 ipv6=yes
17212else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017213 echo "$as_me: program exited with status $ac_status" >&5
17214echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017215sed 's/^/| /' conftest.$ac_ext >&5
17216
Martin v. Löwis11437992002-04-12 09:54:03 +000017217( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017218{ echo "$as_me:$LINENO: result: no" >&5
17219echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017220 ipv6=no
17221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017222rm -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 +000017223fi
17224
Martin v. Löwiseba40652007-08-30 20:10:57 +000017225
17226
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017227if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017228 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17229echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017231/* confdefs.h. */
17232_ACEOF
17233cat confdefs.h >>conftest.$ac_ext
17234cat >>conftest.$ac_ext <<_ACEOF
17235/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017236#include <sys/types.h>
17237#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017238int
17239main ()
17240{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017241struct sockaddr_in6 x;
17242x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017243 ;
17244 return 0;
17245}
17246_ACEOF
17247rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248if { (ac_try="$ac_compile"
17249case "(($ac_try" in
17250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17251 *) ac_try_echo=$ac_try;;
17252esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017256 grep -v '^ *+' conftest.er1 >conftest.err
17257 rm -f conftest.er1
17258 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017260 (exit $ac_status); } && {
17261 test -z "$ac_c_werror_flag" ||
17262 test ! -s conftest.err
17263 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017264 { echo "$as_me:$LINENO: result: yes" >&5
17265echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017266 ipv6=yes
17267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017269sed 's/^/| /' conftest.$ac_ext >&5
17270
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017271 { echo "$as_me:$LINENO: result: no" >&5
17272echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017273 ipv6=no
17274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017275
17276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017277fi
17278
17279if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017280 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017281#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017282_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017283
17284fi
17285
Martin v. Löwiseba40652007-08-30 20:10:57 +000017286fi
17287
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017288
17289ipv6type=unknown
17290ipv6lib=none
17291ipv6trylibc=no
17292
17293if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017294 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17295echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017296 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17297 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017298 case $i in
17299 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017301/* confdefs.h. */
17302_ACEOF
17303cat confdefs.h >>conftest.$ac_ext
17304cat >>conftest.$ac_ext <<_ACEOF
17305/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017306
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017307#include <netinet/in.h>
17308#ifdef IPV6_INRIA_VERSION
17309yes
17310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017311_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017312if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017313 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017314 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017315fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017316rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017317
17318 ;;
17319 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017321/* confdefs.h. */
17322_ACEOF
17323cat confdefs.h >>conftest.$ac_ext
17324cat >>conftest.$ac_ext <<_ACEOF
17325/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017326
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017327#include <netinet/in.h>
17328#ifdef __KAME__
17329yes
17330#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017331_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017333 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017334 ipv6type=$i;
17335 ipv6lib=inet6
17336 ipv6libdir=/usr/local/v6/lib
17337 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017338fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017339rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017340
17341 ;;
17342 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017344/* confdefs.h. */
17345_ACEOF
17346cat confdefs.h >>conftest.$ac_ext
17347cat >>conftest.$ac_ext <<_ACEOF
17348/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017349
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017350#include <features.h>
17351#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17352yes
17353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017354_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017356 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017357 ipv6type=$i;
17358 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017359fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017360rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017361
17362 ;;
17363 linux-inet6)
17364 if test -d /usr/inet6; then
17365 ipv6type=$i
17366 ipv6lib=inet6
17367 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017368 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017369 fi
17370 ;;
17371 solaris)
17372 if test -f /etc/netconfig; then
17373 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17374 ipv6type=$i
17375 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017376 fi
17377 fi
17378 ;;
17379 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017381/* confdefs.h. */
17382_ACEOF
17383cat confdefs.h >>conftest.$ac_ext
17384cat >>conftest.$ac_ext <<_ACEOF
17385/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017386
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017387#include <sys/param.h>
17388#ifdef _TOSHIBA_INET6
17389yes
17390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017391_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017393 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017394 ipv6type=$i;
17395 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017396 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017397fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017398rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017399
17400 ;;
17401 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017403/* confdefs.h. */
17404_ACEOF
17405cat confdefs.h >>conftest.$ac_ext
17406cat >>conftest.$ac_ext <<_ACEOF
17407/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017408
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017409#include </usr/local/v6/include/sys/v6config.h>
17410#ifdef __V6D__
17411yes
17412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017413_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017415 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017416 ipv6type=$i;
17417 ipv6lib=v6;
17418 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017419 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017420fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017421rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017422
17423 ;;
17424 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017426/* confdefs.h. */
17427_ACEOF
17428cat confdefs.h >>conftest.$ac_ext
17429cat >>conftest.$ac_ext <<_ACEOF
17430/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017431
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017432#include <sys/param.h>
17433#ifdef _ZETA_MINAMI_INET6
17434yes
17435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017436_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017438 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017439 ipv6type=$i;
17440 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017441 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017442fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017443rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017444
17445 ;;
17446 esac
17447 if test "$ipv6type" != "unknown"; then
17448 break
17449 fi
17450 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017451 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17452echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017453fi
17454
17455if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17456 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17457 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17458 echo "using lib$ipv6lib"
17459 else
17460 if test $ipv6trylibc = "yes"; then
17461 echo "using libc"
17462 else
17463 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17464 echo "You need to fetch lib$ipv6lib.a from appropriate"
17465 echo 'ipv6 kit and compile beforehand.'
17466 exit 1
17467 fi
17468 fi
17469fi
17470
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017471{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17472echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017473cat >conftest.$ac_ext <<_ACEOF
17474/* confdefs.h. */
17475_ACEOF
17476cat confdefs.h >>conftest.$ac_ext
17477cat >>conftest.$ac_ext <<_ACEOF
17478/* end confdefs.h. */
17479#include <Carbon/Carbon.h>
17480int
17481main ()
17482{
17483FSIORefNum fRef = 0
17484 ;
17485 return 0;
17486}
17487_ACEOF
17488rm -f conftest.$ac_objext
17489if { (ac_try="$ac_compile"
17490case "(($ac_try" in
17491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17492 *) ac_try_echo=$ac_try;;
17493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017495 (eval "$ac_compile") 2>conftest.er1
17496 ac_status=$?
17497 grep -v '^ *+' conftest.er1 >conftest.err
17498 rm -f conftest.er1
17499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017501 (exit $ac_status); } && {
17502 test -z "$ac_c_werror_flag" ||
17503 test ! -s conftest.err
17504 } && test -s conftest.$ac_objext; then
17505
17506cat >>confdefs.h <<\_ACEOF
17507#define HAVE_OSX105_SDK 1
17508_ACEOF
17509
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017510 { echo "$as_me:$LINENO: result: yes" >&5
17511echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017512else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017513 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017514sed 's/^/| /' conftest.$ac_ext >&5
17515
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017516 { echo "$as_me:$LINENO: result: no" >&5
17517echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017518
17519fi
17520
17521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17522
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017523# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017524{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17525echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017526
Martin v. Löwiseba40652007-08-30 20:10:57 +000017527# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017528if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017529 withval=$with_doc_strings;
17530fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017531
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017532
17533if test -z "$with_doc_strings"
17534then with_doc_strings="yes"
17535fi
17536if test "$with_doc_strings" != "no"
17537then
17538
17539cat >>confdefs.h <<\_ACEOF
17540#define WITH_DOC_STRINGS 1
17541_ACEOF
17542
17543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017544{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17545echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017546
Neil Schemenauera35c6882001-02-27 04:45:05 +000017547# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017548{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17549echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017550
Martin v. Löwiseba40652007-08-30 20:10:57 +000017551# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017552if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017553 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017554if test "$withval" != no
17555then
17556
17557cat >>confdefs.h <<\_ACEOF
17558#define WITH_TSC 1
17559_ACEOF
17560
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017561 { echo "$as_me:$LINENO: result: yes" >&5
17562echo "${ECHO_T}yes" >&6; }
17563else { echo "$as_me:$LINENO: result: no" >&5
17564echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017565fi
17566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017567 { echo "$as_me:$LINENO: result: no" >&5
17568echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017569fi
17570
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017571
17572# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017573{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17574echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017575
Martin v. Löwiseba40652007-08-30 20:10:57 +000017576# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017577if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017578 withval=$with_pymalloc;
17579fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017580
Neil Schemenauera35c6882001-02-27 04:45:05 +000017581
Neil Schemenauer16c22972002-03-22 15:34:49 +000017582if test -z "$with_pymalloc"
17583then with_pymalloc="yes"
17584fi
17585if test "$with_pymalloc" != "no"
17586then
Martin v. Löwis11437992002-04-12 09:54:03 +000017587
17588cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017589#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017590_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017591
17592fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017593{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17594echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017595
Barry Warsawef82cd72000-06-30 16:21:01 +000017596# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017597{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17598echo $ECHO_N "checking for --with-wctype-functions... $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-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017601if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017602 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017603if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017604then
17605
17606cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017607#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017608_ACEOF
17609
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017610 { echo "$as_me:$LINENO: result: yes" >&5
17611echo "${ECHO_T}yes" >&6; }
17612else { echo "$as_me:$LINENO: result: no" >&5
17613echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017614fi
17615else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017616 { echo "$as_me:$LINENO: result: no" >&5
17617echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017618fi
17619
Barry Warsawef82cd72000-06-30 16:21:01 +000017620
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017621# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017622
Guido van Rossum98935bf2001-09-05 19:13:16 +000017623DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017624
Guido van Rossume97ee181999-12-20 21:27:22 +000017625# the dlopen() function means we might want to use dynload_shlib.o. some
17626# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017627
Thomas Wouters3a584202000-08-05 23:28:51 +000017628for ac_func in dlopen
17629do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017630as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17631{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17632echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017633if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017634 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017635else
Martin v. Löwis11437992002-04-12 09:54:03 +000017636 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017637/* confdefs.h. */
17638_ACEOF
17639cat confdefs.h >>conftest.$ac_ext
17640cat >>conftest.$ac_ext <<_ACEOF
17641/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017642/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17643 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17644#define $ac_func innocuous_$ac_func
17645
Guido van Rossume97ee181999-12-20 21:27:22 +000017646/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017647 which can conflict with char $ac_func (); below.
17648 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017649 <limits.h> exists even on freestanding compilers. */
17650
17651#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017652# include <limits.h>
17653#else
17654# include <assert.h>
17655#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017656
17657#undef $ac_func
17658
Martin v. Löwiseba40652007-08-30 20:10:57 +000017659/* Override any GCC internal prototype to avoid an error.
17660 Use char because int might match the return type of a GCC
17661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017662#ifdef __cplusplus
17663extern "C"
17664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017665char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017666/* The GNU C library defines this for functions which it implements
17667 to always fail with ENOSYS. Some functions are actually named
17668 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017669#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017670choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017671#endif
17672
Skip Montanaro6dead952003-09-25 14:50:04 +000017673int
17674main ()
17675{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017676return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017677 ;
17678 return 0;
17679}
17680_ACEOF
17681rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017682if { (ac_try="$ac_link"
17683case "(($ac_try" in
17684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17685 *) ac_try_echo=$ac_try;;
17686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017688 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017690 grep -v '^ *+' conftest.er1 >conftest.err
17691 rm -f conftest.er1
17692 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017694 (exit $ac_status); } && {
17695 test -z "$ac_c_werror_flag" ||
17696 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017697 } && test -s conftest$ac_exeext &&
17698 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017699 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017700else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017702sed 's/^/| /' conftest.$ac_ext >&5
17703
Martin v. Löwiseba40652007-08-30 20:10:57 +000017704 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017706
17707rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017708 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017709fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017710ac_res=`eval echo '${'$as_ac_var'}'`
17711 { echo "$as_me:$LINENO: result: $ac_res" >&5
17712echo "${ECHO_T}$ac_res" >&6; }
17713if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017714 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017715#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017716_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017717
Guido van Rossume97ee181999-12-20 21:27:22 +000017718fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017719done
Guido van Rossume97ee181999-12-20 21:27:22 +000017720
Michael W. Hudson54241132001-12-07 15:38:26 +000017721
Guido van Rossume97ee181999-12-20 21:27:22 +000017722# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17723# loading of modules.
17724
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017725{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17726echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017727if test -z "$DYNLOADFILE"
17728then
17729 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017730 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17731 if test "$ac_cv_func_dlopen" = yes
17732 then DYNLOADFILE="dynload_shlib.o"
17733 else DYNLOADFILE="dynload_aix.o"
17734 fi
17735 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017736 BeOS*) DYNLOADFILE="dynload_beos.o";;
17737 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017738 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17739 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017740 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017741 *)
17742 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17743 # out any dynamic loading
17744 if test "$ac_cv_func_dlopen" = yes
17745 then DYNLOADFILE="dynload_shlib.o"
17746 else DYNLOADFILE="dynload_stub.o"
17747 fi
17748 ;;
17749 esac
17750fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017751{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17752echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017753if test "$DYNLOADFILE" != "dynload_stub.o"
17754then
Martin v. Löwis11437992002-04-12 09:54:03 +000017755
17756cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017757#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017758_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017759
17760fi
17761
Neil Schemenauer4e425612001-06-19 15:44:15 +000017762# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17763
Michael W. Hudson54241132001-12-07 15:38:26 +000017764
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017765{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17766echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017767if test -z "$MACHDEP_OBJS"
17768then
Jack Jansene578a632001-08-15 01:27:14 +000017769 MACHDEP_OBJS=$extra_machdep_objs
17770else
17771 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017772fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017773{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17774echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017775
Guido van Rossum627b2d71993-12-24 10:39:16 +000017776# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
Martin v. Löwisd6320502004-08-12 13:45:08 +000017848
Martin v. Löwisc3001752005-01-23 09:27:24 +000017849
17850
Neal Norwitz05a45592006-03-20 06:30:08 +000017851
17852
Martin v. Löwis382abef2007-02-19 10:55:19 +000017853
17854
Christian Heimes36281872007-11-30 21:11:28 +000017855
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017856
17857
Jesse Noller355b1262009-04-02 00:03:28 +000017858
17859
17860
17861
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017862for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17863 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017864 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017865 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017866 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017867 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017868 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000017869 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17870 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017871 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000017872 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017873 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000017874 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017875do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017876as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17877{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17878echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017879if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017880 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017881else
Martin v. Löwis11437992002-04-12 09:54:03 +000017882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017883/* confdefs.h. */
17884_ACEOF
17885cat confdefs.h >>conftest.$ac_ext
17886cat >>conftest.$ac_ext <<_ACEOF
17887/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017888/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17889 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17890#define $ac_func innocuous_$ac_func
17891
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017892/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017893 which can conflict with char $ac_func (); below.
17894 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017895 <limits.h> exists even on freestanding compilers. */
17896
17897#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017898# include <limits.h>
17899#else
17900# include <assert.h>
17901#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017902
17903#undef $ac_func
17904
Martin v. Löwiseba40652007-08-30 20:10:57 +000017905/* Override any GCC internal prototype to avoid an error.
17906 Use char because int might match the return type of a GCC
17907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017908#ifdef __cplusplus
17909extern "C"
17910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017911char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017912/* The GNU C library defines this for functions which it implements
17913 to always fail with ENOSYS. Some functions are actually named
17914 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017915#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017916choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017917#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017918
Skip Montanaro6dead952003-09-25 14:50:04 +000017919int
17920main ()
17921{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017922return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017923 ;
17924 return 0;
17925}
17926_ACEOF
17927rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017928if { (ac_try="$ac_link"
17929case "(($ac_try" in
17930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17931 *) ac_try_echo=$ac_try;;
17932esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017934 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017936 grep -v '^ *+' conftest.er1 >conftest.err
17937 rm -f conftest.er1
17938 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017940 (exit $ac_status); } && {
17941 test -z "$ac_c_werror_flag" ||
17942 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017943 } && test -s conftest$ac_exeext &&
17944 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017945 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017946else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017948sed 's/^/| /' conftest.$ac_ext >&5
17949
Martin v. Löwiseba40652007-08-30 20:10:57 +000017950 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017952
17953rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017954 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017955fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017956ac_res=`eval echo '${'$as_ac_var'}'`
17957 { echo "$as_me:$LINENO: result: $ac_res" >&5
17958echo "${ECHO_T}$ac_res" >&6; }
17959if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017961#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017962_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017963
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017964fi
17965done
17966
Michael W. Hudson54241132001-12-07 15:38:26 +000017967
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017968# For some functions, having a definition is not sufficient, since
17969# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017970{ echo "$as_me:$LINENO: checking for chroot" >&5
17971echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017972cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017973/* confdefs.h. */
17974_ACEOF
17975cat confdefs.h >>conftest.$ac_ext
17976cat >>conftest.$ac_ext <<_ACEOF
17977/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017978#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017979int
17980main ()
17981{
17982void *x=chroot
17983 ;
17984 return 0;
17985}
17986_ACEOF
17987rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017988if { (ac_try="$ac_compile"
17989case "(($ac_try" in
17990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17991 *) ac_try_echo=$ac_try;;
17992esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017996 grep -v '^ *+' conftest.er1 >conftest.err
17997 rm -f conftest.er1
17998 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018000 (exit $ac_status); } && {
18001 test -z "$ac_c_werror_flag" ||
18002 test ! -s conftest.err
18003 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018004
18005cat >>confdefs.h <<\_ACEOF
18006#define HAVE_CHROOT 1
18007_ACEOF
18008
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018009 { echo "$as_me:$LINENO: result: yes" >&5
18010echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018011else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018013sed 's/^/| /' conftest.$ac_ext >&5
18014
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018015 { echo "$as_me:$LINENO: result: no" >&5
18016echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018017
18018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018019
18020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018021{ echo "$as_me:$LINENO: checking for link" >&5
18022echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018024/* confdefs.h. */
18025_ACEOF
18026cat confdefs.h >>conftest.$ac_ext
18027cat >>conftest.$ac_ext <<_ACEOF
18028/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018029#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018030int
18031main ()
18032{
18033void *x=link
18034 ;
18035 return 0;
18036}
18037_ACEOF
18038rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018039if { (ac_try="$ac_compile"
18040case "(($ac_try" in
18041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18042 *) ac_try_echo=$ac_try;;
18043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018047 grep -v '^ *+' conftest.er1 >conftest.err
18048 rm -f conftest.er1
18049 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018051 (exit $ac_status); } && {
18052 test -z "$ac_c_werror_flag" ||
18053 test ! -s conftest.err
18054 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018055
18056cat >>confdefs.h <<\_ACEOF
18057#define HAVE_LINK 1
18058_ACEOF
18059
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018060 { echo "$as_me:$LINENO: result: yes" >&5
18061echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018064sed 's/^/| /' conftest.$ac_ext >&5
18065
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018066 { echo "$as_me:$LINENO: result: no" >&5
18067echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018068
18069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018070
18071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018072{ echo "$as_me:$LINENO: checking for symlink" >&5
18073echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018075/* confdefs.h. */
18076_ACEOF
18077cat confdefs.h >>conftest.$ac_ext
18078cat >>conftest.$ac_ext <<_ACEOF
18079/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018080#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018081int
18082main ()
18083{
18084void *x=symlink
18085 ;
18086 return 0;
18087}
18088_ACEOF
18089rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018090if { (ac_try="$ac_compile"
18091case "(($ac_try" in
18092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18093 *) ac_try_echo=$ac_try;;
18094esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018096 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018098 grep -v '^ *+' conftest.er1 >conftest.err
18099 rm -f conftest.er1
18100 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018102 (exit $ac_status); } && {
18103 test -z "$ac_c_werror_flag" ||
18104 test ! -s conftest.err
18105 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018106
18107cat >>confdefs.h <<\_ACEOF
18108#define HAVE_SYMLINK 1
18109_ACEOF
18110
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018111 { echo "$as_me:$LINENO: result: yes" >&5
18112echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018113else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018115sed 's/^/| /' conftest.$ac_ext >&5
18116
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018117 { echo "$as_me:$LINENO: result: no" >&5
18118echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018119
18120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018121
18122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018123{ echo "$as_me:$LINENO: checking for fchdir" >&5
18124echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018125cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018126/* confdefs.h. */
18127_ACEOF
18128cat confdefs.h >>conftest.$ac_ext
18129cat >>conftest.$ac_ext <<_ACEOF
18130/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018131#include <unistd.h>
18132int
18133main ()
18134{
18135void *x=fchdir
18136 ;
18137 return 0;
18138}
18139_ACEOF
18140rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018141if { (ac_try="$ac_compile"
18142case "(($ac_try" in
18143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18144 *) ac_try_echo=$ac_try;;
18145esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018149 grep -v '^ *+' conftest.er1 >conftest.err
18150 rm -f conftest.er1
18151 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018153 (exit $ac_status); } && {
18154 test -z "$ac_c_werror_flag" ||
18155 test ! -s conftest.err
18156 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018157
18158cat >>confdefs.h <<\_ACEOF
18159#define HAVE_FCHDIR 1
18160_ACEOF
18161
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018162 { echo "$as_me:$LINENO: result: yes" >&5
18163echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018164else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018166sed 's/^/| /' conftest.$ac_ext >&5
18167
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018168 { echo "$as_me:$LINENO: result: no" >&5
18169echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018170
18171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018172
18173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018174{ echo "$as_me:$LINENO: checking for fsync" >&5
18175echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018177/* confdefs.h. */
18178_ACEOF
18179cat confdefs.h >>conftest.$ac_ext
18180cat >>conftest.$ac_ext <<_ACEOF
18181/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018182#include <unistd.h>
18183int
18184main ()
18185{
18186void *x=fsync
18187 ;
18188 return 0;
18189}
18190_ACEOF
18191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018192if { (ac_try="$ac_compile"
18193case "(($ac_try" in
18194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18195 *) ac_try_echo=$ac_try;;
18196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018200 grep -v '^ *+' conftest.er1 >conftest.err
18201 rm -f conftest.er1
18202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018204 (exit $ac_status); } && {
18205 test -z "$ac_c_werror_flag" ||
18206 test ! -s conftest.err
18207 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018208
18209cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018210#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018211_ACEOF
18212
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018213 { echo "$as_me:$LINENO: result: yes" >&5
18214echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018217sed 's/^/| /' conftest.$ac_ext >&5
18218
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018219 { echo "$as_me:$LINENO: result: no" >&5
18220echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018221
18222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018223
18224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018225{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18226echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018227cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018228/* confdefs.h. */
18229_ACEOF
18230cat confdefs.h >>conftest.$ac_ext
18231cat >>conftest.$ac_ext <<_ACEOF
18232/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018233#include <unistd.h>
18234int
18235main ()
18236{
18237void *x=fdatasync
18238 ;
18239 return 0;
18240}
18241_ACEOF
18242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018243if { (ac_try="$ac_compile"
18244case "(($ac_try" in
18245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18246 *) ac_try_echo=$ac_try;;
18247esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018251 grep -v '^ *+' conftest.er1 >conftest.err
18252 rm -f conftest.er1
18253 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018255 (exit $ac_status); } && {
18256 test -z "$ac_c_werror_flag" ||
18257 test ! -s conftest.err
18258 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018259
18260cat >>confdefs.h <<\_ACEOF
18261#define HAVE_FDATASYNC 1
18262_ACEOF
18263
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018264 { echo "$as_me:$LINENO: result: yes" >&5
18265echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018266else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018268sed 's/^/| /' conftest.$ac_ext >&5
18269
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018270 { echo "$as_me:$LINENO: result: no" >&5
18271echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018272
18273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018274
18275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018276{ echo "$as_me:$LINENO: checking for epoll" >&5
18277echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018278cat >conftest.$ac_ext <<_ACEOF
18279/* confdefs.h. */
18280_ACEOF
18281cat confdefs.h >>conftest.$ac_ext
18282cat >>conftest.$ac_ext <<_ACEOF
18283/* end confdefs.h. */
18284#include <sys/epoll.h>
18285int
18286main ()
18287{
18288void *x=epoll_create
18289 ;
18290 return 0;
18291}
18292_ACEOF
18293rm -f conftest.$ac_objext
18294if { (ac_try="$ac_compile"
18295case "(($ac_try" in
18296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18297 *) ac_try_echo=$ac_try;;
18298esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018300 (eval "$ac_compile") 2>conftest.er1
18301 ac_status=$?
18302 grep -v '^ *+' conftest.er1 >conftest.err
18303 rm -f conftest.er1
18304 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018306 (exit $ac_status); } && {
18307 test -z "$ac_c_werror_flag" ||
18308 test ! -s conftest.err
18309 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018310
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018311cat >>confdefs.h <<\_ACEOF
18312#define HAVE_EPOLL 1
18313_ACEOF
18314
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018315 { echo "$as_me:$LINENO: result: yes" >&5
18316echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018317else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018318 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018319sed 's/^/| /' conftest.$ac_ext >&5
18320
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018321 { echo "$as_me:$LINENO: result: no" >&5
18322echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018323
18324fi
18325
18326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018327{ echo "$as_me:$LINENO: checking for kqueue" >&5
18328echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018329cat >conftest.$ac_ext <<_ACEOF
18330/* confdefs.h. */
18331_ACEOF
18332cat confdefs.h >>conftest.$ac_ext
18333cat >>conftest.$ac_ext <<_ACEOF
18334/* end confdefs.h. */
18335
18336#include <sys/types.h>
18337#include <sys/event.h>
18338
18339int
18340main ()
18341{
18342int x=kqueue()
18343 ;
18344 return 0;
18345}
18346_ACEOF
18347rm -f conftest.$ac_objext
18348if { (ac_try="$ac_compile"
18349case "(($ac_try" in
18350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18351 *) ac_try_echo=$ac_try;;
18352esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018354 (eval "$ac_compile") 2>conftest.er1
18355 ac_status=$?
18356 grep -v '^ *+' conftest.er1 >conftest.err
18357 rm -f conftest.er1
18358 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018360 (exit $ac_status); } && {
18361 test -z "$ac_c_werror_flag" ||
18362 test ! -s conftest.err
18363 } && test -s conftest.$ac_objext; then
18364
18365cat >>confdefs.h <<\_ACEOF
18366#define HAVE_KQUEUE 1
18367_ACEOF
18368
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018369 { echo "$as_me:$LINENO: result: yes" >&5
18370echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018371else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018372 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018373sed 's/^/| /' conftest.$ac_ext >&5
18374
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018375 { echo "$as_me:$LINENO: result: no" >&5
18376echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018377
18378fi
18379
18380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018381# On some systems (eg. FreeBSD 5), we would find a definition of the
18382# functions ctermid_r, setgroups in the library, but no prototype
18383# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18384# address to avoid compiler warnings and potential miscompilations
18385# because of the missing prototypes.
18386
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018387{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18388echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018389cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018390/* confdefs.h. */
18391_ACEOF
18392cat confdefs.h >>conftest.$ac_ext
18393cat >>conftest.$ac_ext <<_ACEOF
18394/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018395
18396#include "confdefs.h"
18397#include <stdio.h>
18398
Martin v. Löwisd5843682002-11-21 20:41:28 +000018399int
18400main ()
18401{
18402void* p = ctermid_r
18403 ;
18404 return 0;
18405}
18406_ACEOF
18407rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018408if { (ac_try="$ac_compile"
18409case "(($ac_try" in
18410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18411 *) ac_try_echo=$ac_try;;
18412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018416 grep -v '^ *+' conftest.er1 >conftest.err
18417 rm -f conftest.er1
18418 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018420 (exit $ac_status); } && {
18421 test -z "$ac_c_werror_flag" ||
18422 test ! -s conftest.err
18423 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018424
18425cat >>confdefs.h <<\_ACEOF
18426#define HAVE_CTERMID_R 1
18427_ACEOF
18428
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018429 { echo "$as_me:$LINENO: result: yes" >&5
18430echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018431else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018433sed 's/^/| /' conftest.$ac_ext >&5
18434
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018435 { echo "$as_me:$LINENO: result: no" >&5
18436echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018437
18438fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018439
Martin v. Löwiseba40652007-08-30 20:10:57 +000018440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18441
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018442{ echo "$as_me:$LINENO: checking for flock" >&5
18443echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018444cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018445/* confdefs.h. */
18446_ACEOF
18447cat confdefs.h >>conftest.$ac_ext
18448cat >>conftest.$ac_ext <<_ACEOF
18449/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018450
18451#include "confdefs.h"
18452#include <sys/file.h>
18453
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018454int
18455main ()
18456{
18457void* p = flock
18458 ;
18459 return 0;
18460}
18461_ACEOF
18462rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018463if { (ac_try="$ac_compile"
18464case "(($ac_try" in
18465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18466 *) ac_try_echo=$ac_try;;
18467esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018471 grep -v '^ *+' conftest.er1 >conftest.err
18472 rm -f conftest.er1
18473 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018475 (exit $ac_status); } && {
18476 test -z "$ac_c_werror_flag" ||
18477 test ! -s conftest.err
18478 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018479
18480cat >>confdefs.h <<\_ACEOF
18481#define HAVE_FLOCK 1
18482_ACEOF
18483
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018484 { echo "$as_me:$LINENO: result: yes" >&5
18485echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018486else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018488sed 's/^/| /' conftest.$ac_ext >&5
18489
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018490 { echo "$as_me:$LINENO: result: no" >&5
18491echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018492
18493fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018494
Martin v. Löwiseba40652007-08-30 20:10:57 +000018495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18496
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018497{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18498echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018500/* confdefs.h. */
18501_ACEOF
18502cat confdefs.h >>conftest.$ac_ext
18503cat >>conftest.$ac_ext <<_ACEOF
18504/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018505
18506#include "confdefs.h"
18507#include <unistd.h>
18508
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018509int
18510main ()
18511{
18512void* p = getpagesize
18513 ;
18514 return 0;
18515}
18516_ACEOF
18517rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518if { (ac_try="$ac_compile"
18519case "(($ac_try" in
18520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18521 *) ac_try_echo=$ac_try;;
18522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018526 grep -v '^ *+' conftest.er1 >conftest.err
18527 rm -f conftest.er1
18528 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018530 (exit $ac_status); } && {
18531 test -z "$ac_c_werror_flag" ||
18532 test ! -s conftest.err
18533 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018534
18535cat >>confdefs.h <<\_ACEOF
18536#define HAVE_GETPAGESIZE 1
18537_ACEOF
18538
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018539 { echo "$as_me:$LINENO: result: yes" >&5
18540echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018541else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018543sed 's/^/| /' conftest.$ac_ext >&5
18544
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018545 { echo "$as_me:$LINENO: result: no" >&5
18546echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018547
18548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018549
18550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018551
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018552for ac_prog in true
18553do
18554 # Extract the first word of "$ac_prog", so it can be a program name with args.
18555set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018556{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18557echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018558if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018559 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018560else
18561 if test -n "$TRUE"; then
18562 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18563else
18564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18565for as_dir in $PATH
18566do
18567 IFS=$as_save_IFS
18568 test -z "$as_dir" && as_dir=.
18569 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018570 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 +000018571 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018572 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018573 break 2
18574 fi
18575done
18576done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018577IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018578
18579fi
18580fi
18581TRUE=$ac_cv_prog_TRUE
18582if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018583 { echo "$as_me:$LINENO: result: $TRUE" >&5
18584echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018585else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018586 { echo "$as_me:$LINENO: result: no" >&5
18587echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018588fi
18589
Martin v. Löwiseba40652007-08-30 20:10:57 +000018590
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018591 test -n "$TRUE" && break
18592done
18593test -n "$TRUE" || TRUE="/bin/true"
18594
18595
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018596{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18597echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018598if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018599 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018600else
18601 ac_check_lib_save_LIBS=$LIBS
18602LIBS="-lc $LIBS"
18603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018604/* confdefs.h. */
18605_ACEOF
18606cat confdefs.h >>conftest.$ac_ext
18607cat >>conftest.$ac_ext <<_ACEOF
18608/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018609
Martin v. Löwiseba40652007-08-30 20:10:57 +000018610/* Override any GCC internal prototype to avoid an error.
18611 Use char because int might match the return type of a GCC
18612 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018613#ifdef __cplusplus
18614extern "C"
18615#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018616char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018617int
18618main ()
18619{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018620return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018621 ;
18622 return 0;
18623}
18624_ACEOF
18625rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018626if { (ac_try="$ac_link"
18627case "(($ac_try" in
18628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18629 *) ac_try_echo=$ac_try;;
18630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018632 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018634 grep -v '^ *+' conftest.er1 >conftest.err
18635 rm -f conftest.er1
18636 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018638 (exit $ac_status); } && {
18639 test -z "$ac_c_werror_flag" ||
18640 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018641 } && test -s conftest$ac_exeext &&
18642 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018643 ac_cv_lib_c_inet_aton=yes
18644else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018646sed 's/^/| /' conftest.$ac_ext >&5
18647
Martin v. Löwiseba40652007-08-30 20:10:57 +000018648 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018650
18651rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018652 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018653LIBS=$ac_check_lib_save_LIBS
18654fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018655{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18656echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18657if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018658 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018659else
18660
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018661{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18662echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018663if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018665else
18666 ac_check_lib_save_LIBS=$LIBS
18667LIBS="-lresolv $LIBS"
18668cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018669/* confdefs.h. */
18670_ACEOF
18671cat confdefs.h >>conftest.$ac_ext
18672cat >>conftest.$ac_ext <<_ACEOF
18673/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018674
Martin v. Löwiseba40652007-08-30 20:10:57 +000018675/* Override any GCC internal prototype to avoid an error.
18676 Use char because int might match the return type of a GCC
18677 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018678#ifdef __cplusplus
18679extern "C"
18680#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018681char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018682int
18683main ()
18684{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018685return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018686 ;
18687 return 0;
18688}
18689_ACEOF
18690rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018691if { (ac_try="$ac_link"
18692case "(($ac_try" in
18693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18694 *) ac_try_echo=$ac_try;;
18695esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018697 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018699 grep -v '^ *+' conftest.er1 >conftest.err
18700 rm -f conftest.er1
18701 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018703 (exit $ac_status); } && {
18704 test -z "$ac_c_werror_flag" ||
18705 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018706 } && test -s conftest$ac_exeext &&
18707 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018708 ac_cv_lib_resolv_inet_aton=yes
18709else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018711sed 's/^/| /' conftest.$ac_ext >&5
18712
Martin v. Löwiseba40652007-08-30 20:10:57 +000018713 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018715
18716rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018718LIBS=$ac_check_lib_save_LIBS
18719fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018720{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18721echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18722if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018723 cat >>confdefs.h <<_ACEOF
18724#define HAVE_LIBRESOLV 1
18725_ACEOF
18726
18727 LIBS="-lresolv $LIBS"
18728
18729fi
18730
18731
18732fi
18733
18734
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018735# On Tru64, chflags seems to be present, but calling it will
18736# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018737{ echo "$as_me:$LINENO: checking for chflags" >&5
18738echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018739if test "${ac_cv_have_chflags+set}" = set; then
18740 echo $ECHO_N "(cached) $ECHO_C" >&6
18741else
18742 if test "$cross_compiling" = yes; then
18743 ac_cv_have_chflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018744else
18745 cat >conftest.$ac_ext <<_ACEOF
18746/* confdefs.h. */
18747_ACEOF
18748cat confdefs.h >>conftest.$ac_ext
18749cat >>conftest.$ac_ext <<_ACEOF
18750/* end confdefs.h. */
18751
18752#include <sys/stat.h>
18753#include <unistd.h>
18754int main(int argc, char*argv[])
18755{
18756 if(chflags(argv[0], 0) != 0)
18757 return 1;
18758 return 0;
18759}
18760
18761_ACEOF
18762rm -f conftest$ac_exeext
18763if { (ac_try="$ac_link"
18764case "(($ac_try" in
18765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18766 *) ac_try_echo=$ac_try;;
18767esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018769 (eval "$ac_link") 2>&5
18770 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018772 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18773 { (case "(($ac_try" in
18774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18775 *) ac_try_echo=$ac_try;;
18776esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018778 (eval "$ac_try") 2>&5
18779 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018781 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018782 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018783else
18784 echo "$as_me: program exited with status $ac_status" >&5
18785echo "$as_me: failed program was:" >&5
18786sed 's/^/| /' conftest.$ac_ext >&5
18787
18788( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018789ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018790fi
18791rm -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 +000018792fi
18793
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018794
18795
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018796fi
18797
18798{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18799echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
18800if test $ac_cv_have_chflags = yes
18801then
18802
18803cat >>confdefs.h <<\_ACEOF
18804#define HAVE_CHFLAGS 1
18805_ACEOF
18806
18807fi
18808
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018809{ echo "$as_me:$LINENO: checking for lchflags" >&5
18810echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018811if test "${ac_cv_have_lchflags+set}" = set; then
18812 echo $ECHO_N "(cached) $ECHO_C" >&6
18813else
18814 if test "$cross_compiling" = yes; then
18815 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018816else
18817 cat >conftest.$ac_ext <<_ACEOF
18818/* confdefs.h. */
18819_ACEOF
18820cat confdefs.h >>conftest.$ac_ext
18821cat >>conftest.$ac_ext <<_ACEOF
18822/* end confdefs.h. */
18823
18824#include <sys/stat.h>
18825#include <unistd.h>
18826int main(int argc, char*argv[])
18827{
18828 if(lchflags(argv[0], 0) != 0)
18829 return 1;
18830 return 0;
18831}
18832
18833_ACEOF
18834rm -f conftest$ac_exeext
18835if { (ac_try="$ac_link"
18836case "(($ac_try" in
18837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18838 *) ac_try_echo=$ac_try;;
18839esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018841 (eval "$ac_link") 2>&5
18842 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018844 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18845 { (case "(($ac_try" in
18846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18847 *) ac_try_echo=$ac_try;;
18848esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018850 (eval "$ac_try") 2>&5
18851 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018853 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018854 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018855else
18856 echo "$as_me: program exited with status $ac_status" >&5
18857echo "$as_me: failed program was:" >&5
18858sed 's/^/| /' conftest.$ac_ext >&5
18859
18860( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018861ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018862fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18864fi
18865
18866
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018867
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018868fi
18869
18870{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18871echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
18872if test $ac_cv_have_lchflags = yes
18873then
18874
18875cat >>confdefs.h <<\_ACEOF
18876#define HAVE_LCHFLAGS 1
18877_ACEOF
18878
18879fi
18880
Ronald Oussorenf8752642006-07-06 10:13:35 +000018881case $ac_sys_system/$ac_sys_release in
18882Darwin/*)
18883 _CUR_CFLAGS="${CFLAGS}"
18884 _CUR_LDFLAGS="${LDFLAGS}"
18885 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18886 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18887 ;;
18888esac
18889
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018890{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18891echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018892if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018893 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018894else
18895 ac_check_lib_save_LIBS=$LIBS
18896LIBS="-lz $LIBS"
18897cat >conftest.$ac_ext <<_ACEOF
18898/* confdefs.h. */
18899_ACEOF
18900cat confdefs.h >>conftest.$ac_ext
18901cat >>conftest.$ac_ext <<_ACEOF
18902/* end confdefs.h. */
18903
Martin v. Löwiseba40652007-08-30 20:10:57 +000018904/* Override any GCC internal prototype to avoid an error.
18905 Use char because int might match the return type of a GCC
18906 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018907#ifdef __cplusplus
18908extern "C"
18909#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018910char inflateCopy ();
18911int
18912main ()
18913{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018914return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018915 ;
18916 return 0;
18917}
18918_ACEOF
18919rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018920if { (ac_try="$ac_link"
18921case "(($ac_try" in
18922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18923 *) ac_try_echo=$ac_try;;
18924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018926 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018927 ac_status=$?
18928 grep -v '^ *+' conftest.er1 >conftest.err
18929 rm -f conftest.er1
18930 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018932 (exit $ac_status); } && {
18933 test -z "$ac_c_werror_flag" ||
18934 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018935 } && test -s conftest$ac_exeext &&
18936 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018937 ac_cv_lib_z_inflateCopy=yes
18938else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018939 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018940sed 's/^/| /' conftest.$ac_ext >&5
18941
Martin v. Löwiseba40652007-08-30 20:10:57 +000018942 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018944
18945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018946 conftest$ac_exeext conftest.$ac_ext
18947LIBS=$ac_check_lib_save_LIBS
18948fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018949{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18950echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18951if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018952
18953cat >>confdefs.h <<\_ACEOF
18954#define HAVE_ZLIB_COPY 1
18955_ACEOF
18956
18957fi
18958
18959
Ronald Oussorenf8752642006-07-06 10:13:35 +000018960case $ac_sys_system/$ac_sys_release in
18961Darwin/*)
18962 CFLAGS="${_CUR_CFLAGS}"
18963 LDFLAGS="${_CUR_LDFLAGS}"
18964 ;;
18965esac
18966
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018967{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18968echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018970/* confdefs.h. */
18971_ACEOF
18972cat confdefs.h >>conftest.$ac_ext
18973cat >>conftest.$ac_ext <<_ACEOF
18974/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018975
18976#include "confdefs.h"
18977#include <netdb.h>
18978
Martin v. Löwise9416172003-05-03 10:12:45 +000018979int
18980main ()
18981{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018982void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018983 ;
18984 return 0;
18985}
18986_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018987rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018988if { (ac_try="$ac_link"
18989case "(($ac_try" in
18990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18991 *) ac_try_echo=$ac_try;;
18992esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018994 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018996 grep -v '^ *+' conftest.er1 >conftest.err
18997 rm -f conftest.er1
18998 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019000 (exit $ac_status); } && {
19001 test -z "$ac_c_werror_flag" ||
19002 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019003 } && test -s conftest$ac_exeext &&
19004 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019005
19006cat >>confdefs.h <<\_ACEOF
19007#define HAVE_HSTRERROR 1
19008_ACEOF
19009
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019010 { echo "$as_me:$LINENO: result: yes" >&5
19011echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019012else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019014sed 's/^/| /' conftest.$ac_ext >&5
19015
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019016 { echo "$as_me:$LINENO: result: no" >&5
19017echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019018
19019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019020
19021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019023
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019024{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19025echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019026cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019027/* confdefs.h. */
19028_ACEOF
19029cat confdefs.h >>conftest.$ac_ext
19030cat >>conftest.$ac_ext <<_ACEOF
19031/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019032
19033#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019034#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019035#include <sys/socket.h>
19036#include <netinet/in.h>
19037#include <arpa/inet.h>
19038
Martin v. Löwise9416172003-05-03 10:12:45 +000019039int
19040main ()
19041{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019042void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019043 ;
19044 return 0;
19045}
19046_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019047rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019048if { (ac_try="$ac_link"
19049case "(($ac_try" in
19050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19051 *) ac_try_echo=$ac_try;;
19052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019054 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019056 grep -v '^ *+' conftest.er1 >conftest.err
19057 rm -f conftest.er1
19058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019060 (exit $ac_status); } && {
19061 test -z "$ac_c_werror_flag" ||
19062 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019063 } && test -s conftest$ac_exeext &&
19064 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019065
19066cat >>confdefs.h <<\_ACEOF
19067#define HAVE_INET_ATON 1
19068_ACEOF
19069
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019070 { echo "$as_me:$LINENO: result: yes" >&5
19071echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019074sed 's/^/| /' conftest.$ac_ext >&5
19075
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019076 { echo "$as_me:$LINENO: result: no" >&5
19077echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019078
19079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019080
19081rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019082 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019083
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019084{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19085echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019086cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019087/* confdefs.h. */
19088_ACEOF
19089cat confdefs.h >>conftest.$ac_ext
19090cat >>conftest.$ac_ext <<_ACEOF
19091/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019092
19093#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019094#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019095#include <sys/socket.h>
19096#include <netinet/in.h>
19097#include <arpa/inet.h>
19098
Martin v. Löwise9416172003-05-03 10:12:45 +000019099int
19100main ()
19101{
19102void* p = inet_pton
19103 ;
19104 return 0;
19105}
19106_ACEOF
19107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019108if { (ac_try="$ac_compile"
19109case "(($ac_try" in
19110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19111 *) ac_try_echo=$ac_try;;
19112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019116 grep -v '^ *+' conftest.er1 >conftest.err
19117 rm -f conftest.er1
19118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019120 (exit $ac_status); } && {
19121 test -z "$ac_c_werror_flag" ||
19122 test ! -s conftest.err
19123 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019124
19125cat >>confdefs.h <<\_ACEOF
19126#define HAVE_INET_PTON 1
19127_ACEOF
19128
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019129 { echo "$as_me:$LINENO: result: yes" >&5
19130echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019133sed 's/^/| /' conftest.$ac_ext >&5
19134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019135 { echo "$as_me:$LINENO: result: no" >&5
19136echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019137
19138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019139
19140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019141
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019142# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019143{ echo "$as_me:$LINENO: checking for setgroups" >&5
19144echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019146/* confdefs.h. */
19147_ACEOF
19148cat confdefs.h >>conftest.$ac_ext
19149cat >>conftest.$ac_ext <<_ACEOF
19150/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019151
19152#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019153#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019154#ifdef HAVE_GRP_H
19155#include <grp.h>
19156#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019157
Martin v. Löwisd5843682002-11-21 20:41:28 +000019158int
19159main ()
19160{
19161void* p = setgroups
19162 ;
19163 return 0;
19164}
19165_ACEOF
19166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019167if { (ac_try="$ac_compile"
19168case "(($ac_try" in
19169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19170 *) ac_try_echo=$ac_try;;
19171esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019175 grep -v '^ *+' conftest.er1 >conftest.err
19176 rm -f conftest.er1
19177 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019179 (exit $ac_status); } && {
19180 test -z "$ac_c_werror_flag" ||
19181 test ! -s conftest.err
19182 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019183
19184cat >>confdefs.h <<\_ACEOF
19185#define HAVE_SETGROUPS 1
19186_ACEOF
19187
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019188 { echo "$as_me:$LINENO: result: yes" >&5
19189echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019192sed 's/^/| /' conftest.$ac_ext >&5
19193
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019194 { echo "$as_me:$LINENO: result: no" >&5
19195echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019196
19197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019198
19199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019200
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019201# check for openpty and forkpty
19202
Martin v. Löwis11437992002-04-12 09:54:03 +000019203
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019204for ac_func in openpty
19205do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019206as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19207{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19208echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019209if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019210 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019211else
Martin v. Löwis11437992002-04-12 09:54:03 +000019212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019213/* confdefs.h. */
19214_ACEOF
19215cat confdefs.h >>conftest.$ac_ext
19216cat >>conftest.$ac_ext <<_ACEOF
19217/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019218/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19219 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19220#define $ac_func innocuous_$ac_func
19221
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019222/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019223 which can conflict with char $ac_func (); below.
19224 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019225 <limits.h> exists even on freestanding compilers. */
19226
19227#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019228# include <limits.h>
19229#else
19230# include <assert.h>
19231#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019232
19233#undef $ac_func
19234
Martin v. Löwiseba40652007-08-30 20:10:57 +000019235/* Override any GCC internal prototype to avoid an error.
19236 Use char because int might match the return type of a GCC
19237 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019238#ifdef __cplusplus
19239extern "C"
19240#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019241char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019242/* The GNU C library defines this for functions which it implements
19243 to always fail with ENOSYS. Some functions are actually named
19244 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019245#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019246choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019247#endif
19248
Skip Montanaro6dead952003-09-25 14:50:04 +000019249int
19250main ()
19251{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019252return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019253 ;
19254 return 0;
19255}
19256_ACEOF
19257rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019258if { (ac_try="$ac_link"
19259case "(($ac_try" in
19260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19261 *) ac_try_echo=$ac_try;;
19262esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019264 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019266 grep -v '^ *+' conftest.er1 >conftest.err
19267 rm -f conftest.er1
19268 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019270 (exit $ac_status); } && {
19271 test -z "$ac_c_werror_flag" ||
19272 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019273 } && test -s conftest$ac_exeext &&
19274 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019275 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019276else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019278sed 's/^/| /' conftest.$ac_ext >&5
19279
Martin v. Löwiseba40652007-08-30 20:10:57 +000019280 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019282
19283rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019284 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019285fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019286ac_res=`eval echo '${'$as_ac_var'}'`
19287 { echo "$as_me:$LINENO: result: $ac_res" >&5
19288echo "${ECHO_T}$ac_res" >&6; }
19289if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019290 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019291#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019292_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019293
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019294else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019295 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19296echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019297if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019298 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019299else
Martin v. Löwis11437992002-04-12 09:54:03 +000019300 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019301LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019302cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019303/* confdefs.h. */
19304_ACEOF
19305cat confdefs.h >>conftest.$ac_ext
19306cat >>conftest.$ac_ext <<_ACEOF
19307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019308
Martin v. Löwiseba40652007-08-30 20:10:57 +000019309/* Override any GCC internal prototype to avoid an error.
19310 Use char because int might match the return type of a GCC
19311 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019312#ifdef __cplusplus
19313extern "C"
19314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019315char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019316int
19317main ()
19318{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019319return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019320 ;
19321 return 0;
19322}
19323_ACEOF
19324rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019325if { (ac_try="$ac_link"
19326case "(($ac_try" in
19327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19328 *) ac_try_echo=$ac_try;;
19329esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019331 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019333 grep -v '^ *+' conftest.er1 >conftest.err
19334 rm -f conftest.er1
19335 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019337 (exit $ac_status); } && {
19338 test -z "$ac_c_werror_flag" ||
19339 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019340 } && test -s conftest$ac_exeext &&
19341 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019342 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019343else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019345sed 's/^/| /' conftest.$ac_ext >&5
19346
Martin v. Löwiseba40652007-08-30 20:10:57 +000019347 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019349
19350rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019351 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019352LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019353fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019354{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19355echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19356if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019357 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019358#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019359_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019360 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019361else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019362 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19363echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019364if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019365 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019366else
19367 ac_check_lib_save_LIBS=$LIBS
19368LIBS="-lbsd $LIBS"
19369cat >conftest.$ac_ext <<_ACEOF
19370/* confdefs.h. */
19371_ACEOF
19372cat confdefs.h >>conftest.$ac_ext
19373cat >>conftest.$ac_ext <<_ACEOF
19374/* end confdefs.h. */
19375
Martin v. Löwiseba40652007-08-30 20:10:57 +000019376/* Override any GCC internal prototype to avoid an error.
19377 Use char because int might match the return type of a GCC
19378 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019379#ifdef __cplusplus
19380extern "C"
19381#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019382char openpty ();
19383int
19384main ()
19385{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019386return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019387 ;
19388 return 0;
19389}
19390_ACEOF
19391rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019392if { (ac_try="$ac_link"
19393case "(($ac_try" in
19394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19395 *) ac_try_echo=$ac_try;;
19396esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019398 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019399 ac_status=$?
19400 grep -v '^ *+' conftest.er1 >conftest.err
19401 rm -f conftest.er1
19402 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019404 (exit $ac_status); } && {
19405 test -z "$ac_c_werror_flag" ||
19406 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019407 } && test -s conftest$ac_exeext &&
19408 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019409 ac_cv_lib_bsd_openpty=yes
19410else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019411 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019412sed 's/^/| /' conftest.$ac_ext >&5
19413
Martin v. Löwiseba40652007-08-30 20:10:57 +000019414 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019416
19417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019418 conftest$ac_exeext conftest.$ac_ext
19419LIBS=$ac_check_lib_save_LIBS
19420fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019421{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19422echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19423if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019424 cat >>confdefs.h <<\_ACEOF
19425#define HAVE_OPENPTY 1
19426_ACEOF
19427 LIBS="$LIBS -lbsd"
19428fi
19429
19430
19431fi
19432
Fred Drake8cef4cf2000-06-28 16:40:38 +000019433
19434fi
19435done
19436
Martin v. Löwis11437992002-04-12 09:54:03 +000019437
Fred Drake8cef4cf2000-06-28 16:40:38 +000019438for ac_func in forkpty
19439do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019440as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19441{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19442echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019443if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019444 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019445else
Martin v. Löwis11437992002-04-12 09:54:03 +000019446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019447/* confdefs.h. */
19448_ACEOF
19449cat confdefs.h >>conftest.$ac_ext
19450cat >>conftest.$ac_ext <<_ACEOF
19451/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019452/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19453 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19454#define $ac_func innocuous_$ac_func
19455
Fred Drake8cef4cf2000-06-28 16:40:38 +000019456/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019457 which can conflict with char $ac_func (); below.
19458 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019459 <limits.h> exists even on freestanding compilers. */
19460
19461#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019462# include <limits.h>
19463#else
19464# include <assert.h>
19465#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019466
19467#undef $ac_func
19468
Martin v. Löwiseba40652007-08-30 20:10:57 +000019469/* Override any GCC internal prototype to avoid an error.
19470 Use char because int might match the return type of a GCC
19471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019472#ifdef __cplusplus
19473extern "C"
19474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019475char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019476/* The GNU C library defines this for functions which it implements
19477 to always fail with ENOSYS. Some functions are actually named
19478 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019479#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019480choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019481#endif
19482
Skip Montanaro6dead952003-09-25 14:50:04 +000019483int
19484main ()
19485{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019486return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019487 ;
19488 return 0;
19489}
19490_ACEOF
19491rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019492if { (ac_try="$ac_link"
19493case "(($ac_try" in
19494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19495 *) ac_try_echo=$ac_try;;
19496esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019498 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019500 grep -v '^ *+' conftest.er1 >conftest.err
19501 rm -f conftest.er1
19502 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019504 (exit $ac_status); } && {
19505 test -z "$ac_c_werror_flag" ||
19506 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019507 } && test -s conftest$ac_exeext &&
19508 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019509 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019510else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019512sed 's/^/| /' conftest.$ac_ext >&5
19513
Martin v. Löwiseba40652007-08-30 20:10:57 +000019514 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019516
19517rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019518 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019519fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019520ac_res=`eval echo '${'$as_ac_var'}'`
19521 { echo "$as_me:$LINENO: result: $ac_res" >&5
19522echo "${ECHO_T}$ac_res" >&6; }
19523if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019524 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019525#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019526_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019527
Fred Drake8cef4cf2000-06-28 16:40:38 +000019528else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019529 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19530echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019531if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019532 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019533else
Martin v. Löwis11437992002-04-12 09:54:03 +000019534 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019535LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019537/* confdefs.h. */
19538_ACEOF
19539cat confdefs.h >>conftest.$ac_ext
19540cat >>conftest.$ac_ext <<_ACEOF
19541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019542
Martin v. Löwiseba40652007-08-30 20:10:57 +000019543/* Override any GCC internal prototype to avoid an error.
19544 Use char because int might match the return type of a GCC
19545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019546#ifdef __cplusplus
19547extern "C"
19548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019549char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019550int
19551main ()
19552{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019553return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 ;
19555 return 0;
19556}
19557_ACEOF
19558rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019559if { (ac_try="$ac_link"
19560case "(($ac_try" in
19561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19562 *) ac_try_echo=$ac_try;;
19563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019565 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019567 grep -v '^ *+' conftest.er1 >conftest.err
19568 rm -f conftest.er1
19569 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019571 (exit $ac_status); } && {
19572 test -z "$ac_c_werror_flag" ||
19573 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019574 } && test -s conftest$ac_exeext &&
19575 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019576 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019579sed 's/^/| /' conftest.$ac_ext >&5
19580
Martin v. Löwiseba40652007-08-30 20:10:57 +000019581 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583
19584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019586LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019587fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019588{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19589echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19590if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019591 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019592#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019593_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019594 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019595else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019596 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19597echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019598if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019599 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019600else
19601 ac_check_lib_save_LIBS=$LIBS
19602LIBS="-lbsd $LIBS"
19603cat >conftest.$ac_ext <<_ACEOF
19604/* confdefs.h. */
19605_ACEOF
19606cat confdefs.h >>conftest.$ac_ext
19607cat >>conftest.$ac_ext <<_ACEOF
19608/* end confdefs.h. */
19609
Martin v. Löwiseba40652007-08-30 20:10:57 +000019610/* Override any GCC internal prototype to avoid an error.
19611 Use char because int might match the return type of a GCC
19612 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019613#ifdef __cplusplus
19614extern "C"
19615#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019616char forkpty ();
19617int
19618main ()
19619{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019620return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019621 ;
19622 return 0;
19623}
19624_ACEOF
19625rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019626if { (ac_try="$ac_link"
19627case "(($ac_try" in
19628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19629 *) ac_try_echo=$ac_try;;
19630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019632 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019633 ac_status=$?
19634 grep -v '^ *+' conftest.er1 >conftest.err
19635 rm -f conftest.er1
19636 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019638 (exit $ac_status); } && {
19639 test -z "$ac_c_werror_flag" ||
19640 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019641 } && test -s conftest$ac_exeext &&
19642 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019643 ac_cv_lib_bsd_forkpty=yes
19644else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019645 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019646sed 's/^/| /' conftest.$ac_ext >&5
19647
Martin v. Löwiseba40652007-08-30 20:10:57 +000019648 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019650
19651rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019652 conftest$ac_exeext conftest.$ac_ext
19653LIBS=$ac_check_lib_save_LIBS
19654fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019655{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19656echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19657if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019658 cat >>confdefs.h <<\_ACEOF
19659#define HAVE_FORKPTY 1
19660_ACEOF
19661 LIBS="$LIBS -lbsd"
19662fi
19663
19664
19665fi
19666
Fred Drake8cef4cf2000-06-28 16:40:38 +000019667
19668fi
19669done
19670
Jack Jansendd19cf82001-12-06 22:36:17 +000019671
Brett Cannonaa5778d2008-03-18 04:09:00 +000019672# Stuff for expat.
19673
19674for ac_func in memmove
19675do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019676as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19677{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19678echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000019679if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019680 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000019681else
19682 cat >conftest.$ac_ext <<_ACEOF
19683/* confdefs.h. */
19684_ACEOF
19685cat confdefs.h >>conftest.$ac_ext
19686cat >>conftest.$ac_ext <<_ACEOF
19687/* end confdefs.h. */
19688/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19689 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19690#define $ac_func innocuous_$ac_func
19691
19692/* System header to define __stub macros and hopefully few prototypes,
19693 which can conflict with char $ac_func (); below.
19694 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19695 <limits.h> exists even on freestanding compilers. */
19696
19697#ifdef __STDC__
19698# include <limits.h>
19699#else
19700# include <assert.h>
19701#endif
19702
19703#undef $ac_func
19704
19705/* Override any GCC internal prototype to avoid an error.
19706 Use char because int might match the return type of a GCC
19707 builtin and then its argument prototype would still apply. */
19708#ifdef __cplusplus
19709extern "C"
19710#endif
19711char $ac_func ();
19712/* The GNU C library defines this for functions which it implements
19713 to always fail with ENOSYS. Some functions are actually named
19714 something starting with __ and the normal name is an alias. */
19715#if defined __stub_$ac_func || defined __stub___$ac_func
19716choke me
19717#endif
19718
19719int
19720main ()
19721{
19722return $ac_func ();
19723 ;
19724 return 0;
19725}
19726_ACEOF
19727rm -f conftest.$ac_objext conftest$ac_exeext
19728if { (ac_try="$ac_link"
19729case "(($ac_try" in
19730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19731 *) ac_try_echo=$ac_try;;
19732esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019734 (eval "$ac_link") 2>conftest.er1
19735 ac_status=$?
19736 grep -v '^ *+' conftest.er1 >conftest.err
19737 rm -f conftest.er1
19738 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019740 (exit $ac_status); } && {
19741 test -z "$ac_c_werror_flag" ||
19742 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019743 } && test -s conftest$ac_exeext &&
19744 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019745 eval "$as_ac_var=yes"
19746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019747 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019748sed 's/^/| /' conftest.$ac_ext >&5
19749
19750 eval "$as_ac_var=no"
19751fi
19752
19753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19754 conftest$ac_exeext conftest.$ac_ext
19755fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019756ac_res=`eval echo '${'$as_ac_var'}'`
19757 { echo "$as_me:$LINENO: result: $ac_res" >&5
19758echo "${ECHO_T}$ac_res" >&6; }
19759if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019760 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019761#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000019762_ACEOF
19763
19764fi
19765done
19766
19767
Michael W. Hudson54241132001-12-07 15:38:26 +000019768# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019769
19770
19771
19772
19773
19774
Fred Drake8cef4cf2000-06-28 16:40:38 +000019775for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19776do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019777as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19778{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19779echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019780if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019782else
Martin v. Löwis11437992002-04-12 09:54:03 +000019783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019784/* confdefs.h. */
19785_ACEOF
19786cat confdefs.h >>conftest.$ac_ext
19787cat >>conftest.$ac_ext <<_ACEOF
19788/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019789/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19790 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19791#define $ac_func innocuous_$ac_func
19792
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019793/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019794 which can conflict with char $ac_func (); below.
19795 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019796 <limits.h> exists even on freestanding compilers. */
19797
19798#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019799# include <limits.h>
19800#else
19801# include <assert.h>
19802#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019803
19804#undef $ac_func
19805
Martin v. Löwiseba40652007-08-30 20:10:57 +000019806/* Override any GCC internal prototype to avoid an error.
19807 Use char because int might match the return type of a GCC
19808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019809#ifdef __cplusplus
19810extern "C"
19811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019812char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019813/* The GNU C library defines this for functions which it implements
19814 to always fail with ENOSYS. Some functions are actually named
19815 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019816#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019817choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019818#endif
19819
Skip Montanaro6dead952003-09-25 14:50:04 +000019820int
19821main ()
19822{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019823return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019824 ;
19825 return 0;
19826}
19827_ACEOF
19828rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019829if { (ac_try="$ac_link"
19830case "(($ac_try" in
19831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19832 *) ac_try_echo=$ac_try;;
19833esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019835 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019837 grep -v '^ *+' conftest.er1 >conftest.err
19838 rm -f conftest.er1
19839 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019841 (exit $ac_status); } && {
19842 test -z "$ac_c_werror_flag" ||
19843 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019844 } && test -s conftest$ac_exeext &&
19845 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019846 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019849sed 's/^/| /' conftest.$ac_ext >&5
19850
Martin v. Löwiseba40652007-08-30 20:10:57 +000019851 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019853
19854rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019855 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019856fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019857ac_res=`eval echo '${'$as_ac_var'}'`
19858 { echo "$as_me:$LINENO: result: $ac_res" >&5
19859echo "${ECHO_T}$ac_res" >&6; }
19860if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019861 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019862#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019863_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019864
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019865fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019866done
19867
Michael W. Hudson54241132001-12-07 15:38:26 +000019868
Martin v. Löwis11437992002-04-12 09:54:03 +000019869
19870
19871
Brett Cannonaa5778d2008-03-18 04:09:00 +000019872for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019873do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019874as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19875{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19876echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019877if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019878 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019879else
Martin v. Löwis11437992002-04-12 09:54:03 +000019880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019881/* confdefs.h. */
19882_ACEOF
19883cat confdefs.h >>conftest.$ac_ext
19884cat >>conftest.$ac_ext <<_ACEOF
19885/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019886/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19887 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19888#define $ac_func innocuous_$ac_func
19889
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019890/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019891 which can conflict with char $ac_func (); below.
19892 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019893 <limits.h> exists even on freestanding compilers. */
19894
19895#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019896# include <limits.h>
19897#else
19898# include <assert.h>
19899#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019900
19901#undef $ac_func
19902
Martin v. Löwiseba40652007-08-30 20:10:57 +000019903/* Override any GCC internal prototype to avoid an error.
19904 Use char because int might match the return type of a GCC
19905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019906#ifdef __cplusplus
19907extern "C"
19908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019909char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019910/* The GNU C library defines this for functions which it implements
19911 to always fail with ENOSYS. Some functions are actually named
19912 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019913#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019914choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019915#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019916
Skip Montanaro6dead952003-09-25 14:50:04 +000019917int
19918main ()
19919{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019920return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019921 ;
19922 return 0;
19923}
19924_ACEOF
19925rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019926if { (ac_try="$ac_link"
19927case "(($ac_try" in
19928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19929 *) ac_try_echo=$ac_try;;
19930esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019932 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019934 grep -v '^ *+' conftest.er1 >conftest.err
19935 rm -f conftest.er1
19936 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019938 (exit $ac_status); } && {
19939 test -z "$ac_c_werror_flag" ||
19940 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019941 } && test -s conftest$ac_exeext &&
19942 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019943 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019944else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019946sed 's/^/| /' conftest.$ac_ext >&5
19947
Martin v. Löwiseba40652007-08-30 20:10:57 +000019948 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019950
19951rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019952 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019953fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019954ac_res=`eval echo '${'$as_ac_var'}'`
19955 { echo "$as_me:$LINENO: result: $ac_res" >&5
19956echo "${ECHO_T}$ac_res" >&6; }
19957if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019958 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019959#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019960_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019961
Martin v. Löwis1142de32002-03-29 16:28:31 +000019962else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019963 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019964 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019965 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19966 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019967esac
19968
Martin v. Löwis1142de32002-03-29 16:28:31 +000019969fi
19970done
19971
19972
Martin v. Löwis11437992002-04-12 09:54:03 +000019973
Martin v. Löwis1142de32002-03-29 16:28:31 +000019974for ac_func in getpgrp
19975do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019976as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19977{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19978echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019979if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019980 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019981else
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019983/* confdefs.h. */
19984_ACEOF
19985cat confdefs.h >>conftest.$ac_ext
19986cat >>conftest.$ac_ext <<_ACEOF
19987/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019988/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19989 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19990#define $ac_func innocuous_$ac_func
19991
Martin v. Löwis1142de32002-03-29 16:28:31 +000019992/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019993 which can conflict with char $ac_func (); below.
19994 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019995 <limits.h> exists even on freestanding compilers. */
19996
19997#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019998# include <limits.h>
19999#else
20000# include <assert.h>
20001#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020002
20003#undef $ac_func
20004
Martin v. Löwiseba40652007-08-30 20:10:57 +000020005/* Override any GCC internal prototype to avoid an error.
20006 Use char because int might match the return type of a GCC
20007 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020008#ifdef __cplusplus
20009extern "C"
20010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020011char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020012/* The GNU C library defines this for functions which it implements
20013 to always fail with ENOSYS. Some functions are actually named
20014 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020015#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020016choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020017#endif
20018
Skip Montanaro6dead952003-09-25 14:50:04 +000020019int
20020main ()
20021{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020022return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020023 ;
20024 return 0;
20025}
20026_ACEOF
20027rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020028if { (ac_try="$ac_link"
20029case "(($ac_try" in
20030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20031 *) ac_try_echo=$ac_try;;
20032esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020034 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020036 grep -v '^ *+' conftest.er1 >conftest.err
20037 rm -f conftest.er1
20038 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020040 (exit $ac_status); } && {
20041 test -z "$ac_c_werror_flag" ||
20042 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020043 } && test -s conftest$ac_exeext &&
20044 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020045 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020046else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020048sed 's/^/| /' conftest.$ac_ext >&5
20049
Martin v. Löwiseba40652007-08-30 20:10:57 +000020050 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020052
20053rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020054 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020055fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020056ac_res=`eval echo '${'$as_ac_var'}'`
20057 { echo "$as_me:$LINENO: result: $ac_res" >&5
20058echo "${ECHO_T}$ac_res" >&6; }
20059if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020060 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020061#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020062_ACEOF
20063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020064/* confdefs.h. */
20065_ACEOF
20066cat confdefs.h >>conftest.$ac_ext
20067cat >>conftest.$ac_ext <<_ACEOF
20068/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020069#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020070int
20071main ()
20072{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020073getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020074 ;
20075 return 0;
20076}
20077_ACEOF
20078rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020079if { (ac_try="$ac_compile"
20080case "(($ac_try" in
20081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20082 *) ac_try_echo=$ac_try;;
20083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020087 grep -v '^ *+' conftest.er1 >conftest.err
20088 rm -f conftest.er1
20089 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020091 (exit $ac_status); } && {
20092 test -z "$ac_c_werror_flag" ||
20093 test ! -s conftest.err
20094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020095
20096cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020097#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020098_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020099
Martin v. Löwis11437992002-04-12 09:54:03 +000020100
Guido van Rossumf78abae1997-01-21 22:02:36 +000020101else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020103sed 's/^/| /' conftest.$ac_ext >&5
20104
Martin v. Löwiseba40652007-08-30 20:10:57 +000020105
Guido van Rossum627b2d71993-12-24 10:39:16 +000020106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020107
20108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020109
Guido van Rossum627b2d71993-12-24 10:39:16 +000020110fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020111done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020112
Jack Jansen150753c2003-03-29 22:07:47 +000020113
20114for ac_func in setpgrp
20115do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020116as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20117{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20118echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020119if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020120 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020121else
Martin v. Löwis11437992002-04-12 09:54:03 +000020122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020123/* confdefs.h. */
20124_ACEOF
20125cat confdefs.h >>conftest.$ac_ext
20126cat >>conftest.$ac_ext <<_ACEOF
20127/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020128/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20129 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20130#define $ac_func innocuous_$ac_func
20131
Jack Jansen150753c2003-03-29 22:07:47 +000020132/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020133 which can conflict with char $ac_func (); below.
20134 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020135 <limits.h> exists even on freestanding compilers. */
20136
20137#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020138# include <limits.h>
20139#else
20140# include <assert.h>
20141#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020142
20143#undef $ac_func
20144
Martin v. Löwiseba40652007-08-30 20:10:57 +000020145/* Override any GCC internal prototype to avoid an error.
20146 Use char because int might match the return type of a GCC
20147 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020148#ifdef __cplusplus
20149extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020150#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020151char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020152/* The GNU C library defines this for functions which it implements
20153 to always fail with ENOSYS. Some functions are actually named
20154 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020155#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020156choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020157#endif
20158
Skip Montanaro6dead952003-09-25 14:50:04 +000020159int
20160main ()
20161{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020162return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020163 ;
20164 return 0;
20165}
20166_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020167rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020168if { (ac_try="$ac_link"
20169case "(($ac_try" in
20170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20171 *) ac_try_echo=$ac_try;;
20172esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020174 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020176 grep -v '^ *+' conftest.er1 >conftest.err
20177 rm -f conftest.er1
20178 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020180 (exit $ac_status); } && {
20181 test -z "$ac_c_werror_flag" ||
20182 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020183 } && test -s conftest$ac_exeext &&
20184 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020185 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020188sed 's/^/| /' conftest.$ac_ext >&5
20189
Martin v. Löwiseba40652007-08-30 20:10:57 +000020190 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020192
20193rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020194 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020195fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020196ac_res=`eval echo '${'$as_ac_var'}'`
20197 { echo "$as_me:$LINENO: result: $ac_res" >&5
20198echo "${ECHO_T}$ac_res" >&6; }
20199if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020200 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020201#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020202_ACEOF
20203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020204/* confdefs.h. */
20205_ACEOF
20206cat confdefs.h >>conftest.$ac_ext
20207cat >>conftest.$ac_ext <<_ACEOF
20208/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020209#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020210int
20211main ()
20212{
20213setpgrp(0,0);
20214 ;
20215 return 0;
20216}
20217_ACEOF
20218rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020219if { (ac_try="$ac_compile"
20220case "(($ac_try" in
20221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20222 *) ac_try_echo=$ac_try;;
20223esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020225 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020227 grep -v '^ *+' conftest.er1 >conftest.err
20228 rm -f conftest.er1
20229 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020231 (exit $ac_status); } && {
20232 test -z "$ac_c_werror_flag" ||
20233 test ! -s conftest.err
20234 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020235
20236cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020237#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020238_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020239
Jack Jansen150753c2003-03-29 22:07:47 +000020240
20241else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020243sed 's/^/| /' conftest.$ac_ext >&5
20244
Martin v. Löwiseba40652007-08-30 20:10:57 +000020245
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020247
20248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020249
20250fi
20251done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020252
Martin v. Löwis11437992002-04-12 09:54:03 +000020253
Thomas Wouters3a584202000-08-05 23:28:51 +000020254for ac_func in gettimeofday
20255do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020256as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20257{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20258echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020259if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020260 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020261else
Martin v. Löwis11437992002-04-12 09:54:03 +000020262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020263/* confdefs.h. */
20264_ACEOF
20265cat confdefs.h >>conftest.$ac_ext
20266cat >>conftest.$ac_ext <<_ACEOF
20267/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020268/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20269 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20270#define $ac_func innocuous_$ac_func
20271
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020272/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020273 which can conflict with char $ac_func (); below.
20274 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020275 <limits.h> exists even on freestanding compilers. */
20276
20277#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020278# include <limits.h>
20279#else
20280# include <assert.h>
20281#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020282
20283#undef $ac_func
20284
Martin v. Löwiseba40652007-08-30 20:10:57 +000020285/* Override any GCC internal prototype to avoid an error.
20286 Use char because int might match the return type of a GCC
20287 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020288#ifdef __cplusplus
20289extern "C"
20290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020291char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020292/* The GNU C library defines this for functions which it implements
20293 to always fail with ENOSYS. Some functions are actually named
20294 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020295#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020296choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020297#endif
20298
Skip Montanaro6dead952003-09-25 14:50:04 +000020299int
20300main ()
20301{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020302return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020303 ;
20304 return 0;
20305}
20306_ACEOF
20307rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020308if { (ac_try="$ac_link"
20309case "(($ac_try" in
20310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20311 *) ac_try_echo=$ac_try;;
20312esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020314 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020316 grep -v '^ *+' conftest.er1 >conftest.err
20317 rm -f conftest.er1
20318 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020320 (exit $ac_status); } && {
20321 test -z "$ac_c_werror_flag" ||
20322 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020323 } && test -s conftest$ac_exeext &&
20324 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020325 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020326else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020328sed 's/^/| /' conftest.$ac_ext >&5
20329
Martin v. Löwiseba40652007-08-30 20:10:57 +000020330 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020332
20333rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020334 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020335fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020336ac_res=`eval echo '${'$as_ac_var'}'`
20337 { echo "$as_me:$LINENO: result: $ac_res" >&5
20338echo "${ECHO_T}$ac_res" >&6; }
20339if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020340 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020341#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020342_ACEOF
20343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020344/* confdefs.h. */
20345_ACEOF
20346cat confdefs.h >>conftest.$ac_ext
20347cat >>conftest.$ac_ext <<_ACEOF
20348/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020349#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020350int
20351main ()
20352{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020353gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020354 ;
20355 return 0;
20356}
20357_ACEOF
20358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020359if { (ac_try="$ac_compile"
20360case "(($ac_try" in
20361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20362 *) ac_try_echo=$ac_try;;
20363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020367 grep -v '^ *+' conftest.er1 >conftest.err
20368 rm -f conftest.er1
20369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020371 (exit $ac_status); } && {
20372 test -z "$ac_c_werror_flag" ||
20373 test ! -s conftest.err
20374 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020375 :
20376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020378sed 's/^/| /' conftest.$ac_ext >&5
20379
Martin v. Löwis11437992002-04-12 09:54:03 +000020380
20381cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020382#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020383_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020384
Martin v. Löwis11437992002-04-12 09:54:03 +000020385
Guido van Rossum627b2d71993-12-24 10:39:16 +000020386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020387
20388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020389
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020390fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020391done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020392
Michael W. Hudson54241132001-12-07 15:38:26 +000020393
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020394{ echo "$as_me:$LINENO: checking for major" >&5
20395echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020397/* confdefs.h. */
20398_ACEOF
20399cat confdefs.h >>conftest.$ac_ext
20400cat >>conftest.$ac_ext <<_ACEOF
20401/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020402
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020403#if defined(MAJOR_IN_MKDEV)
20404#include <sys/mkdev.h>
20405#elif defined(MAJOR_IN_SYSMACROS)
20406#include <sys/sysmacros.h>
20407#else
20408#include <sys/types.h>
20409#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020410
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020411int
20412main ()
20413{
20414
20415 makedev(major(0),minor(0));
20416
20417 ;
20418 return 0;
20419}
20420_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020421rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422if { (ac_try="$ac_link"
20423case "(($ac_try" in
20424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20425 *) ac_try_echo=$ac_try;;
20426esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020428 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020430 grep -v '^ *+' conftest.er1 >conftest.err
20431 rm -f conftest.er1
20432 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020434 (exit $ac_status); } && {
20435 test -z "$ac_c_werror_flag" ||
20436 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020437 } && test -s conftest$ac_exeext &&
20438 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020439
20440
20441cat >>confdefs.h <<\_ACEOF
20442#define HAVE_DEVICE_MACROS 1
20443_ACEOF
20444
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020445 { echo "$as_me:$LINENO: result: yes" >&5
20446echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020447
20448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020450sed 's/^/| /' conftest.$ac_ext >&5
20451
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020452
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020453 { echo "$as_me:$LINENO: result: no" >&5
20454echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020455
20456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020457
20458rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020459 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020460
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020461# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020462# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020463{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20464echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020466/* confdefs.h. */
20467_ACEOF
20468cat confdefs.h >>conftest.$ac_ext
20469cat >>conftest.$ac_ext <<_ACEOF
20470/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020471
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020472#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020473#include <sys/socket.h>
20474#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020475#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020476
Martin v. Löwis11437992002-04-12 09:54:03 +000020477int
20478main ()
20479{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020480getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020481 ;
20482 return 0;
20483}
20484_ACEOF
20485rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020486if { (ac_try="$ac_link"
20487case "(($ac_try" in
20488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20489 *) ac_try_echo=$ac_try;;
20490esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020492 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020494 grep -v '^ *+' conftest.er1 >conftest.err
20495 rm -f conftest.er1
20496 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020498 (exit $ac_status); } && {
20499 test -z "$ac_c_werror_flag" ||
20500 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020501 } && test -s conftest$ac_exeext &&
20502 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020503 have_getaddrinfo=yes
20504else
20505 echo "$as_me: failed program was:" >&5
20506sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020507
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020508 have_getaddrinfo=no
20509fi
20510
20511rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20512 conftest$ac_exeext conftest.$ac_ext
20513{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20514echo "${ECHO_T}$have_getaddrinfo" >&6; }
20515if test $have_getaddrinfo = yes
20516then
20517 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020518echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020519 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20520 echo $ECHO_N "(cached) $ECHO_C" >&6
20521else
20522 if test "$cross_compiling" = yes; then
20523 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020524else
Martin v. Löwis11437992002-04-12 09:54:03 +000020525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020526/* confdefs.h. */
20527_ACEOF
20528cat confdefs.h >>conftest.$ac_ext
20529cat >>conftest.$ac_ext <<_ACEOF
20530/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020531
20532#include <sys/types.h>
20533#include <netdb.h>
20534#include <string.h>
20535#include <sys/socket.h>
20536#include <netinet/in.h>
20537
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020538int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020539{
20540 int passive, gaierr, inet4 = 0, inet6 = 0;
20541 struct addrinfo hints, *ai, *aitop;
20542 char straddr[INET6_ADDRSTRLEN], strport[16];
20543
20544 for (passive = 0; passive <= 1; passive++) {
20545 memset(&hints, 0, sizeof(hints));
20546 hints.ai_family = AF_UNSPEC;
20547 hints.ai_flags = passive ? AI_PASSIVE : 0;
20548 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020549 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020550 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20551 (void)gai_strerror(gaierr);
20552 goto bad;
20553 }
20554 for (ai = aitop; ai; ai = ai->ai_next) {
20555 if (ai->ai_addr == NULL ||
20556 ai->ai_addrlen == 0 ||
20557 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20558 straddr, sizeof(straddr), strport, sizeof(strport),
20559 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20560 goto bad;
20561 }
20562 switch (ai->ai_family) {
20563 case AF_INET:
20564 if (strcmp(strport, "54321") != 0) {
20565 goto bad;
20566 }
20567 if (passive) {
20568 if (strcmp(straddr, "0.0.0.0") != 0) {
20569 goto bad;
20570 }
20571 } else {
20572 if (strcmp(straddr, "127.0.0.1") != 0) {
20573 goto bad;
20574 }
20575 }
20576 inet4++;
20577 break;
20578 case AF_INET6:
20579 if (strcmp(strport, "54321") != 0) {
20580 goto bad;
20581 }
20582 if (passive) {
20583 if (strcmp(straddr, "::") != 0) {
20584 goto bad;
20585 }
20586 } else {
20587 if (strcmp(straddr, "::1") != 0) {
20588 goto bad;
20589 }
20590 }
20591 inet6++;
20592 break;
20593 case AF_UNSPEC:
20594 goto bad;
20595 break;
20596 default:
20597 /* another family support? */
20598 break;
20599 }
20600 }
20601 }
20602
20603 if (!(inet4 == 0 || inet4 == 2))
20604 goto bad;
20605 if (!(inet6 == 0 || inet6 == 2))
20606 goto bad;
20607
20608 if (aitop)
20609 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020610 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020611
20612 bad:
20613 if (aitop)
20614 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020615 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020616}
20617
Martin v. Löwis11437992002-04-12 09:54:03 +000020618_ACEOF
20619rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020620if { (ac_try="$ac_link"
20621case "(($ac_try" in
20622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20623 *) ac_try_echo=$ac_try;;
20624esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020626 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020627 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020629 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020630 { (case "(($ac_try" in
20631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20632 *) ac_try_echo=$ac_try;;
20633esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020635 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020636 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020638 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020639 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020640else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020641 echo "$as_me: program exited with status $ac_status" >&5
20642echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020643sed 's/^/| /' conftest.$ac_ext >&5
20644
Martin v. Löwis11437992002-04-12 09:54:03 +000020645( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020646ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020648rm -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 +000020649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020650
20651
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020652fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020653
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020655
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020656if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20657then
20658 if test $ipv6 = yes
20659 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020660 echo 'Fatal: You must get working getaddrinfo() function.'
20661 echo ' or you can specify "--disable-ipv6"'.
20662 exit 1
20663 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020664else
Martin v. Löwis11437992002-04-12 09:54:03 +000020665
20666cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020667#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020668_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020669
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020671
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020672for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020673do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020674as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20675{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20676echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020677if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020678 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020679else
Martin v. Löwis11437992002-04-12 09:54:03 +000020680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020681/* confdefs.h. */
20682_ACEOF
20683cat confdefs.h >>conftest.$ac_ext
20684cat >>conftest.$ac_ext <<_ACEOF
20685/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020686/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20687 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20688#define $ac_func innocuous_$ac_func
20689
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020690/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020691 which can conflict with char $ac_func (); below.
20692 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020693 <limits.h> exists even on freestanding compilers. */
20694
20695#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020696# include <limits.h>
20697#else
20698# include <assert.h>
20699#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020700
20701#undef $ac_func
20702
Martin v. Löwiseba40652007-08-30 20:10:57 +000020703/* Override any GCC internal prototype to avoid an error.
20704 Use char because int might match the return type of a GCC
20705 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020706#ifdef __cplusplus
20707extern "C"
20708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020709char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020710/* The GNU C library defines this for functions which it implements
20711 to always fail with ENOSYS. Some functions are actually named
20712 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020713#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020714choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020715#endif
20716
Skip Montanaro6dead952003-09-25 14:50:04 +000020717int
20718main ()
20719{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020720return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020721 ;
20722 return 0;
20723}
20724_ACEOF
20725rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020726if { (ac_try="$ac_link"
20727case "(($ac_try" in
20728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20729 *) ac_try_echo=$ac_try;;
20730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020734 grep -v '^ *+' conftest.er1 >conftest.err
20735 rm -f conftest.er1
20736 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020738 (exit $ac_status); } && {
20739 test -z "$ac_c_werror_flag" ||
20740 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020741 } && test -s conftest$ac_exeext &&
20742 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020743 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020744else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020746sed 's/^/| /' conftest.$ac_ext >&5
20747
Martin v. Löwiseba40652007-08-30 20:10:57 +000020748 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020750
20751rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020752 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020754ac_res=`eval echo '${'$as_ac_var'}'`
20755 { echo "$as_me:$LINENO: result: $ac_res" >&5
20756echo "${ECHO_T}$ac_res" >&6; }
20757if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020758 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020759#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020760_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020761
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020762fi
20763done
20764
Michael W. Hudson54241132001-12-07 15:38:26 +000020765
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020766# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020767{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20768echo $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 +000020769if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020771else
Martin v. Löwis11437992002-04-12 09:54:03 +000020772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020773/* confdefs.h. */
20774_ACEOF
20775cat confdefs.h >>conftest.$ac_ext
20776cat >>conftest.$ac_ext <<_ACEOF
20777/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020778#include <sys/types.h>
20779#include <sys/time.h>
20780#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020781
Martin v. Löwis11437992002-04-12 09:54:03 +000020782int
20783main ()
20784{
20785if ((struct tm *) 0)
20786return 0;
20787 ;
20788 return 0;
20789}
20790_ACEOF
20791rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020792if { (ac_try="$ac_compile"
20793case "(($ac_try" in
20794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20795 *) ac_try_echo=$ac_try;;
20796esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020800 grep -v '^ *+' conftest.er1 >conftest.err
20801 rm -f conftest.er1
20802 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020804 (exit $ac_status); } && {
20805 test -z "$ac_c_werror_flag" ||
20806 test ! -s conftest.err
20807 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020808 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020809else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020811sed 's/^/| /' conftest.$ac_ext >&5
20812
Martin v. Löwiseba40652007-08-30 20:10:57 +000020813 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020815
20816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020817fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020818{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20819echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020820if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020821
20822cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020823#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020824_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020825
20826fi
20827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020828{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20829echo $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 +000020830if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020831 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020832else
Martin v. Löwis11437992002-04-12 09:54:03 +000020833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020834/* confdefs.h. */
20835_ACEOF
20836cat confdefs.h >>conftest.$ac_ext
20837cat >>conftest.$ac_ext <<_ACEOF
20838/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020839#include <sys/types.h>
20840#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020841
Martin v. Löwis11437992002-04-12 09:54:03 +000020842int
20843main ()
20844{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020845struct tm tm;
20846 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020847 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 ;
20849 return 0;
20850}
20851_ACEOF
20852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020853if { (ac_try="$ac_compile"
20854case "(($ac_try" in
20855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20856 *) ac_try_echo=$ac_try;;
20857esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020861 grep -v '^ *+' conftest.er1 >conftest.err
20862 rm -f conftest.er1
20863 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020865 (exit $ac_status); } && {
20866 test -z "$ac_c_werror_flag" ||
20867 test ! -s conftest.err
20868 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020869 ac_cv_struct_tm=time.h
20870else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020872sed 's/^/| /' conftest.$ac_ext >&5
20873
Martin v. Löwiseba40652007-08-30 20:10:57 +000020874 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020876
20877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020878fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020879{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20880echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020881if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020882
20883cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020884#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020885_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020886
20887fi
20888
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020889{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20890echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020891if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020892 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020893else
Martin v. Löwis11437992002-04-12 09:54:03 +000020894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020895/* confdefs.h. */
20896_ACEOF
20897cat confdefs.h >>conftest.$ac_ext
20898cat >>conftest.$ac_ext <<_ACEOF
20899/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020900#include <sys/types.h>
20901#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020902
20903
Martin v. Löwis11437992002-04-12 09:54:03 +000020904int
20905main ()
20906{
20907static struct tm ac_aggr;
20908if (ac_aggr.tm_zone)
20909return 0;
20910 ;
20911 return 0;
20912}
20913_ACEOF
20914rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020915if { (ac_try="$ac_compile"
20916case "(($ac_try" in
20917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20918 *) ac_try_echo=$ac_try;;
20919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020923 grep -v '^ *+' conftest.er1 >conftest.err
20924 rm -f conftest.er1
20925 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020927 (exit $ac_status); } && {
20928 test -z "$ac_c_werror_flag" ||
20929 test ! -s conftest.err
20930 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020931 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020934sed 's/^/| /' conftest.$ac_ext >&5
20935
Martin v. Löwiseba40652007-08-30 20:10:57 +000020936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020937/* confdefs.h. */
20938_ACEOF
20939cat confdefs.h >>conftest.$ac_ext
20940cat >>conftest.$ac_ext <<_ACEOF
20941/* end confdefs.h. */
20942#include <sys/types.h>
20943#include <$ac_cv_struct_tm>
20944
20945
20946int
20947main ()
20948{
20949static struct tm ac_aggr;
20950if (sizeof ac_aggr.tm_zone)
20951return 0;
20952 ;
20953 return 0;
20954}
20955_ACEOF
20956rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020957if { (ac_try="$ac_compile"
20958case "(($ac_try" in
20959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20960 *) ac_try_echo=$ac_try;;
20961esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020963 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020965 grep -v '^ *+' conftest.er1 >conftest.err
20966 rm -f conftest.er1
20967 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020969 (exit $ac_status); } && {
20970 test -z "$ac_c_werror_flag" ||
20971 test ! -s conftest.err
20972 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020973 ac_cv_member_struct_tm_tm_zone=yes
20974else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020976sed 's/^/| /' conftest.$ac_ext >&5
20977
Martin v. Löwiseba40652007-08-30 20:10:57 +000020978 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020980
20981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020983
20984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020985fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020986{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20987echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20988if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020989
20990cat >>confdefs.h <<_ACEOF
20991#define HAVE_STRUCT_TM_TM_ZONE 1
20992_ACEOF
20993
20994
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020995fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020996
Martin v. Löwis11437992002-04-12 09:54:03 +000020997if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20998
20999cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021000#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021001_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021002
21003else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021004 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21005echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021006if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021007 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021008else
21009 cat >conftest.$ac_ext <<_ACEOF
21010/* confdefs.h. */
21011_ACEOF
21012cat confdefs.h >>conftest.$ac_ext
21013cat >>conftest.$ac_ext <<_ACEOF
21014/* end confdefs.h. */
21015#include <time.h>
21016
21017int
21018main ()
21019{
21020#ifndef tzname
21021 (void) tzname;
21022#endif
21023
21024 ;
21025 return 0;
21026}
21027_ACEOF
21028rm -f conftest.$ac_objext
21029if { (ac_try="$ac_compile"
21030case "(($ac_try" in
21031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21032 *) ac_try_echo=$ac_try;;
21033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021035 (eval "$ac_compile") 2>conftest.er1
21036 ac_status=$?
21037 grep -v '^ *+' conftest.er1 >conftest.err
21038 rm -f conftest.er1
21039 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021041 (exit $ac_status); } && {
21042 test -z "$ac_c_werror_flag" ||
21043 test ! -s conftest.err
21044 } && test -s conftest.$ac_objext; then
21045 ac_cv_have_decl_tzname=yes
21046else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021047 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021048sed 's/^/| /' conftest.$ac_ext >&5
21049
21050 ac_cv_have_decl_tzname=no
21051fi
21052
21053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21054fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021055{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21056echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21057if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021058
21059cat >>confdefs.h <<_ACEOF
21060#define HAVE_DECL_TZNAME 1
21061_ACEOF
21062
21063
21064else
21065 cat >>confdefs.h <<_ACEOF
21066#define HAVE_DECL_TZNAME 0
21067_ACEOF
21068
21069
21070fi
21071
21072
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021073 { echo "$as_me:$LINENO: checking for tzname" >&5
21074echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021075if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021077else
Martin v. Löwis11437992002-04-12 09:54:03 +000021078 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021079/* confdefs.h. */
21080_ACEOF
21081cat confdefs.h >>conftest.$ac_ext
21082cat >>conftest.$ac_ext <<_ACEOF
21083/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021084#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021085#if !HAVE_DECL_TZNAME
21086extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021088
Martin v. Löwis11437992002-04-12 09:54:03 +000021089int
21090main ()
21091{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021092return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021093 ;
21094 return 0;
21095}
21096_ACEOF
21097rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021098if { (ac_try="$ac_link"
21099case "(($ac_try" in
21100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21101 *) ac_try_echo=$ac_try;;
21102esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021104 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021106 grep -v '^ *+' conftest.er1 >conftest.err
21107 rm -f conftest.er1
21108 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021110 (exit $ac_status); } && {
21111 test -z "$ac_c_werror_flag" ||
21112 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021113 } && test -s conftest$ac_exeext &&
21114 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021115 ac_cv_var_tzname=yes
21116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021118sed 's/^/| /' conftest.$ac_ext >&5
21119
Martin v. Löwiseba40652007-08-30 20:10:57 +000021120 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021122
21123rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021124 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021125fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021126{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21127echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021128 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021129
21130cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021131#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021132_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021133
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021134 fi
21135fi
21136
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021137{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21138echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021139if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021140 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021141else
21142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021143/* confdefs.h. */
21144_ACEOF
21145cat confdefs.h >>conftest.$ac_ext
21146cat >>conftest.$ac_ext <<_ACEOF
21147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021148$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021149int
21150main ()
21151{
21152static struct stat ac_aggr;
21153if (ac_aggr.st_rdev)
21154return 0;
21155 ;
21156 return 0;
21157}
21158_ACEOF
21159rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021160if { (ac_try="$ac_compile"
21161case "(($ac_try" in
21162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21163 *) ac_try_echo=$ac_try;;
21164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021168 grep -v '^ *+' conftest.er1 >conftest.err
21169 rm -f conftest.er1
21170 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021172 (exit $ac_status); } && {
21173 test -z "$ac_c_werror_flag" ||
21174 test ! -s conftest.err
21175 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021176 ac_cv_member_struct_stat_st_rdev=yes
21177else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021179sed 's/^/| /' conftest.$ac_ext >&5
21180
Martin v. Löwiseba40652007-08-30 20:10:57 +000021181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021182/* confdefs.h. */
21183_ACEOF
21184cat confdefs.h >>conftest.$ac_ext
21185cat >>conftest.$ac_ext <<_ACEOF
21186/* end confdefs.h. */
21187$ac_includes_default
21188int
21189main ()
21190{
21191static struct stat ac_aggr;
21192if (sizeof ac_aggr.st_rdev)
21193return 0;
21194 ;
21195 return 0;
21196}
21197_ACEOF
21198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021199if { (ac_try="$ac_compile"
21200case "(($ac_try" in
21201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21202 *) ac_try_echo=$ac_try;;
21203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021205 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021207 grep -v '^ *+' conftest.er1 >conftest.err
21208 rm -f conftest.er1
21209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021211 (exit $ac_status); } && {
21212 test -z "$ac_c_werror_flag" ||
21213 test ! -s conftest.err
21214 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021215 ac_cv_member_struct_stat_st_rdev=yes
21216else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021218sed 's/^/| /' conftest.$ac_ext >&5
21219
Martin v. Löwiseba40652007-08-30 20:10:57 +000021220 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021222
21223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021225
21226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021227fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021228{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21229echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21230if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021231
21232cat >>confdefs.h <<_ACEOF
21233#define HAVE_STRUCT_STAT_ST_RDEV 1
21234_ACEOF
21235
21236
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021237fi
21238
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021239{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21240echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021241if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021242 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021243else
Martin v. Löwis11437992002-04-12 09:54:03 +000021244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021245/* confdefs.h. */
21246_ACEOF
21247cat confdefs.h >>conftest.$ac_ext
21248cat >>conftest.$ac_ext <<_ACEOF
21249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021250$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021251int
21252main ()
21253{
21254static struct stat ac_aggr;
21255if (ac_aggr.st_blksize)
21256return 0;
21257 ;
21258 return 0;
21259}
21260_ACEOF
21261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021262if { (ac_try="$ac_compile"
21263case "(($ac_try" in
21264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21265 *) ac_try_echo=$ac_try;;
21266esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021270 grep -v '^ *+' conftest.er1 >conftest.err
21271 rm -f conftest.er1
21272 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021274 (exit $ac_status); } && {
21275 test -z "$ac_c_werror_flag" ||
21276 test ! -s conftest.err
21277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021278 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021279else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021281sed 's/^/| /' conftest.$ac_ext >&5
21282
Martin v. Löwiseba40652007-08-30 20:10:57 +000021283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021284/* confdefs.h. */
21285_ACEOF
21286cat confdefs.h >>conftest.$ac_ext
21287cat >>conftest.$ac_ext <<_ACEOF
21288/* end confdefs.h. */
21289$ac_includes_default
21290int
21291main ()
21292{
21293static struct stat ac_aggr;
21294if (sizeof ac_aggr.st_blksize)
21295return 0;
21296 ;
21297 return 0;
21298}
21299_ACEOF
21300rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021301if { (ac_try="$ac_compile"
21302case "(($ac_try" in
21303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21304 *) ac_try_echo=$ac_try;;
21305esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021307 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021309 grep -v '^ *+' conftest.er1 >conftest.err
21310 rm -f conftest.er1
21311 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021313 (exit $ac_status); } && {
21314 test -z "$ac_c_werror_flag" ||
21315 test ! -s conftest.err
21316 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021317 ac_cv_member_struct_stat_st_blksize=yes
21318else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021320sed 's/^/| /' conftest.$ac_ext >&5
21321
Martin v. Löwiseba40652007-08-30 20:10:57 +000021322 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021324
21325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021327
21328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021329fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021330{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21331echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21332if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021333
Martin v. Löwis11437992002-04-12 09:54:03 +000021334cat >>confdefs.h <<_ACEOF
21335#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21336_ACEOF
21337
21338
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021339fi
21340
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021341{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21342echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021343if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021344 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021345else
21346 cat >conftest.$ac_ext <<_ACEOF
21347/* confdefs.h. */
21348_ACEOF
21349cat confdefs.h >>conftest.$ac_ext
21350cat >>conftest.$ac_ext <<_ACEOF
21351/* end confdefs.h. */
21352$ac_includes_default
21353int
21354main ()
21355{
21356static struct stat ac_aggr;
21357if (ac_aggr.st_flags)
21358return 0;
21359 ;
21360 return 0;
21361}
21362_ACEOF
21363rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021364if { (ac_try="$ac_compile"
21365case "(($ac_try" in
21366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21367 *) ac_try_echo=$ac_try;;
21368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021370 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021371 ac_status=$?
21372 grep -v '^ *+' conftest.er1 >conftest.err
21373 rm -f conftest.er1
21374 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021376 (exit $ac_status); } && {
21377 test -z "$ac_c_werror_flag" ||
21378 test ! -s conftest.err
21379 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021380 ac_cv_member_struct_stat_st_flags=yes
21381else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021382 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021383sed 's/^/| /' conftest.$ac_ext >&5
21384
Martin v. Löwiseba40652007-08-30 20:10:57 +000021385 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021386/* confdefs.h. */
21387_ACEOF
21388cat confdefs.h >>conftest.$ac_ext
21389cat >>conftest.$ac_ext <<_ACEOF
21390/* end confdefs.h. */
21391$ac_includes_default
21392int
21393main ()
21394{
21395static struct stat ac_aggr;
21396if (sizeof ac_aggr.st_flags)
21397return 0;
21398 ;
21399 return 0;
21400}
21401_ACEOF
21402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021403if { (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
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021410 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
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021419 ac_cv_member_struct_stat_st_flags=yes
21420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021421 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021422sed 's/^/| /' conftest.$ac_ext >&5
21423
Martin v. Löwiseba40652007-08-30 20:10:57 +000021424 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021426
21427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021429
21430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021431fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021432{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21433echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21434if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021435
21436cat >>confdefs.h <<_ACEOF
21437#define HAVE_STRUCT_STAT_ST_FLAGS 1
21438_ACEOF
21439
21440
21441fi
21442
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021443{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21444echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021445if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021446 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021447else
21448 cat >conftest.$ac_ext <<_ACEOF
21449/* confdefs.h. */
21450_ACEOF
21451cat confdefs.h >>conftest.$ac_ext
21452cat >>conftest.$ac_ext <<_ACEOF
21453/* end confdefs.h. */
21454$ac_includes_default
21455int
21456main ()
21457{
21458static struct stat ac_aggr;
21459if (ac_aggr.st_gen)
21460return 0;
21461 ;
21462 return 0;
21463}
21464_ACEOF
21465rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021466if { (ac_try="$ac_compile"
21467case "(($ac_try" in
21468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21469 *) ac_try_echo=$ac_try;;
21470esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021473 ac_status=$?
21474 grep -v '^ *+' conftest.er1 >conftest.err
21475 rm -f conftest.er1
21476 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021478 (exit $ac_status); } && {
21479 test -z "$ac_c_werror_flag" ||
21480 test ! -s conftest.err
21481 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021482 ac_cv_member_struct_stat_st_gen=yes
21483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021484 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021485sed 's/^/| /' conftest.$ac_ext >&5
21486
Martin v. Löwiseba40652007-08-30 20:10:57 +000021487 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021488/* confdefs.h. */
21489_ACEOF
21490cat confdefs.h >>conftest.$ac_ext
21491cat >>conftest.$ac_ext <<_ACEOF
21492/* end confdefs.h. */
21493$ac_includes_default
21494int
21495main ()
21496{
21497static struct stat ac_aggr;
21498if (sizeof ac_aggr.st_gen)
21499return 0;
21500 ;
21501 return 0;
21502}
21503_ACEOF
21504rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021505if { (ac_try="$ac_compile"
21506case "(($ac_try" in
21507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21508 *) ac_try_echo=$ac_try;;
21509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021512 ac_status=$?
21513 grep -v '^ *+' conftest.er1 >conftest.err
21514 rm -f conftest.er1
21515 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021517 (exit $ac_status); } && {
21518 test -z "$ac_c_werror_flag" ||
21519 test ! -s conftest.err
21520 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021521 ac_cv_member_struct_stat_st_gen=yes
21522else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021523 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021524sed 's/^/| /' conftest.$ac_ext >&5
21525
Martin v. Löwiseba40652007-08-30 20:10:57 +000021526 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021528
21529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021531
21532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021533fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021534{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21535echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21536if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021537
21538cat >>confdefs.h <<_ACEOF
21539#define HAVE_STRUCT_STAT_ST_GEN 1
21540_ACEOF
21541
21542
21543fi
21544
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021545{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21546echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021547if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021548 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021549else
21550 cat >conftest.$ac_ext <<_ACEOF
21551/* confdefs.h. */
21552_ACEOF
21553cat confdefs.h >>conftest.$ac_ext
21554cat >>conftest.$ac_ext <<_ACEOF
21555/* end confdefs.h. */
21556$ac_includes_default
21557int
21558main ()
21559{
21560static struct stat ac_aggr;
21561if (ac_aggr.st_birthtime)
21562return 0;
21563 ;
21564 return 0;
21565}
21566_ACEOF
21567rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021568if { (ac_try="$ac_compile"
21569case "(($ac_try" in
21570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21571 *) ac_try_echo=$ac_try;;
21572esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021574 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021575 ac_status=$?
21576 grep -v '^ *+' conftest.er1 >conftest.err
21577 rm -f conftest.er1
21578 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021580 (exit $ac_status); } && {
21581 test -z "$ac_c_werror_flag" ||
21582 test ! -s conftest.err
21583 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021584 ac_cv_member_struct_stat_st_birthtime=yes
21585else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021586 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021587sed 's/^/| /' conftest.$ac_ext >&5
21588
Martin v. Löwiseba40652007-08-30 20:10:57 +000021589 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021590/* confdefs.h. */
21591_ACEOF
21592cat confdefs.h >>conftest.$ac_ext
21593cat >>conftest.$ac_ext <<_ACEOF
21594/* end confdefs.h. */
21595$ac_includes_default
21596int
21597main ()
21598{
21599static struct stat ac_aggr;
21600if (sizeof ac_aggr.st_birthtime)
21601return 0;
21602 ;
21603 return 0;
21604}
21605_ACEOF
21606rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021607if { (ac_try="$ac_compile"
21608case "(($ac_try" in
21609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21610 *) ac_try_echo=$ac_try;;
21611esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021614 ac_status=$?
21615 grep -v '^ *+' conftest.er1 >conftest.err
21616 rm -f conftest.er1
21617 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021619 (exit $ac_status); } && {
21620 test -z "$ac_c_werror_flag" ||
21621 test ! -s conftest.err
21622 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021623 ac_cv_member_struct_stat_st_birthtime=yes
21624else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021625 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021626sed 's/^/| /' conftest.$ac_ext >&5
21627
Martin v. Löwiseba40652007-08-30 20:10:57 +000021628 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630
21631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021633
21634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021635fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021636{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21637echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21638if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021639
21640cat >>confdefs.h <<_ACEOF
21641#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21642_ACEOF
21643
21644
21645fi
21646
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021647{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21648echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021649if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021650 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021651else
Martin v. Löwis11437992002-04-12 09:54:03 +000021652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021653/* confdefs.h. */
21654_ACEOF
21655cat confdefs.h >>conftest.$ac_ext
21656cat >>conftest.$ac_ext <<_ACEOF
21657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021658$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021659int
21660main ()
21661{
21662static struct stat ac_aggr;
21663if (ac_aggr.st_blocks)
21664return 0;
21665 ;
21666 return 0;
21667}
21668_ACEOF
21669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021670if { (ac_try="$ac_compile"
21671case "(($ac_try" in
21672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21673 *) ac_try_echo=$ac_try;;
21674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021678 grep -v '^ *+' conftest.er1 >conftest.err
21679 rm -f conftest.er1
21680 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021682 (exit $ac_status); } && {
21683 test -z "$ac_c_werror_flag" ||
21684 test ! -s conftest.err
21685 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021686 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021687else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021689sed 's/^/| /' conftest.$ac_ext >&5
21690
Martin v. Löwiseba40652007-08-30 20:10:57 +000021691 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021692/* confdefs.h. */
21693_ACEOF
21694cat confdefs.h >>conftest.$ac_ext
21695cat >>conftest.$ac_ext <<_ACEOF
21696/* end confdefs.h. */
21697$ac_includes_default
21698int
21699main ()
21700{
21701static struct stat ac_aggr;
21702if (sizeof ac_aggr.st_blocks)
21703return 0;
21704 ;
21705 return 0;
21706}
21707_ACEOF
21708rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021709if { (ac_try="$ac_compile"
21710case "(($ac_try" in
21711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21712 *) ac_try_echo=$ac_try;;
21713esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021715 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021717 grep -v '^ *+' conftest.er1 >conftest.err
21718 rm -f conftest.er1
21719 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021721 (exit $ac_status); } && {
21722 test -z "$ac_c_werror_flag" ||
21723 test ! -s conftest.err
21724 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021725 ac_cv_member_struct_stat_st_blocks=yes
21726else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021728sed 's/^/| /' conftest.$ac_ext >&5
21729
Martin v. Löwiseba40652007-08-30 20:10:57 +000021730 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021732
21733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021735
21736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021737fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021738{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21739echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21740if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021741
Martin v. Löwis11437992002-04-12 09:54:03 +000021742cat >>confdefs.h <<_ACEOF
21743#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21744_ACEOF
21745
21746
21747cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021748#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021749_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021750
21751else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021752 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021753 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021754 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21755 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021756esac
21757
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021758fi
21759
Michael W. Hudson54241132001-12-07 15:38:26 +000021760
Martin v. Löwis11437992002-04-12 09:54:03 +000021761
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021762{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21763echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021764if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021765 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021766else
Martin v. Löwis11437992002-04-12 09:54:03 +000021767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021768/* confdefs.h. */
21769_ACEOF
21770cat confdefs.h >>conftest.$ac_ext
21771cat >>conftest.$ac_ext <<_ACEOF
21772/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021773#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021774int
21775main ()
21776{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021777return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021778 ;
21779 return 0;
21780}
21781_ACEOF
21782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021783if { (ac_try="$ac_compile"
21784case "(($ac_try" in
21785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21786 *) ac_try_echo=$ac_try;;
21787esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021791 grep -v '^ *+' conftest.er1 >conftest.err
21792 rm -f conftest.er1
21793 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021795 (exit $ac_status); } && {
21796 test -z "$ac_c_werror_flag" ||
21797 test ! -s conftest.err
21798 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021799 ac_cv_header_time_altzone=yes
21800else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021802sed 's/^/| /' conftest.$ac_ext >&5
21803
Martin v. Löwiseba40652007-08-30 20:10:57 +000021804 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021805fi
21806
Martin v. Löwiseba40652007-08-30 20:10:57 +000021807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21808fi
21809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021810{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21811echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021812if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021813
21814cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021815#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021816_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021817
21818fi
21819
Guido van Rossumda88dad1995-01-26 00:46:29 +000021820was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021821{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21822echo $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 +000021823cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021824/* confdefs.h. */
21825_ACEOF
21826cat confdefs.h >>conftest.$ac_ext
21827cat >>conftest.$ac_ext <<_ACEOF
21828/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021829
21830#include <sys/types.h>
21831#include <sys/select.h>
21832#include <sys/time.h>
21833
Martin v. Löwis11437992002-04-12 09:54:03 +000021834int
21835main ()
21836{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021837;
Martin v. Löwis11437992002-04-12 09:54:03 +000021838 ;
21839 return 0;
21840}
21841_ACEOF
21842rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021843if { (ac_try="$ac_compile"
21844case "(($ac_try" in
21845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21846 *) ac_try_echo=$ac_try;;
21847esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021851 grep -v '^ *+' conftest.er1 >conftest.err
21852 rm -f conftest.er1
21853 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021855 (exit $ac_status); } && {
21856 test -z "$ac_c_werror_flag" ||
21857 test ! -s conftest.err
21858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021859
21860
21861cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021862#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021863_ACEOF
21864
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021865 was_it_defined=yes
21866
Guido van Rossumf78abae1997-01-21 22:02:36 +000021867else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021869sed 's/^/| /' conftest.$ac_ext >&5
21870
Brett Cannon19fab762007-06-02 03:02:29 +000021871
Martin v. Löwiseba40652007-08-30 20:10:57 +000021872fi
21873
21874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021875{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21876echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021878{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21879echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021880if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021881 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021882else
Martin v. Löwis11437992002-04-12 09:54:03 +000021883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021884/* confdefs.h. */
21885_ACEOF
21886cat confdefs.h >>conftest.$ac_ext
21887cat >>conftest.$ac_ext <<_ACEOF
21888/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021889
21890# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021891int
21892main ()
21893{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021894struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021895 ;
21896 return 0;
21897}
21898_ACEOF
21899rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021900if { (ac_try="$ac_compile"
21901case "(($ac_try" in
21902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21903 *) ac_try_echo=$ac_try;;
21904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021908 grep -v '^ *+' conftest.er1 >conftest.err
21909 rm -f conftest.er1
21910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021912 (exit $ac_status); } && {
21913 test -z "$ac_c_werror_flag" ||
21914 test ! -s conftest.err
21915 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021916 ac_cv_struct_addrinfo=yes
21917else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021919sed 's/^/| /' conftest.$ac_ext >&5
21920
Martin v. Löwiseba40652007-08-30 20:10:57 +000021921 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021922fi
21923
Martin v. Löwiseba40652007-08-30 20:10:57 +000021924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21925fi
21926
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021927{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21928echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021929if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021930
21931cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021932#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021933_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021934
21935fi
21936
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021937{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21938echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021939if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021940 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021941else
Martin v. Löwis11437992002-04-12 09:54:03 +000021942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021943/* confdefs.h. */
21944_ACEOF
21945cat confdefs.h >>conftest.$ac_ext
21946cat >>conftest.$ac_ext <<_ACEOF
21947/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021948
21949# include <sys/types.h>
21950# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021951int
21952main ()
21953{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021954struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021955 ;
21956 return 0;
21957}
21958_ACEOF
21959rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021960if { (ac_try="$ac_compile"
21961case "(($ac_try" in
21962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21963 *) ac_try_echo=$ac_try;;
21964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021968 grep -v '^ *+' conftest.er1 >conftest.err
21969 rm -f conftest.er1
21970 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021972 (exit $ac_status); } && {
21973 test -z "$ac_c_werror_flag" ||
21974 test ! -s conftest.err
21975 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021976 ac_cv_struct_sockaddr_storage=yes
21977else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021979sed 's/^/| /' conftest.$ac_ext >&5
21980
Martin v. Löwiseba40652007-08-30 20:10:57 +000021981 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021982fi
21983
Martin v. Löwiseba40652007-08-30 20:10:57 +000021984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21985fi
21986
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021987{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21988echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021989if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021990
21991cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021992#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021993_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021994
21995fi
21996
Guido van Rossum627b2d71993-12-24 10:39:16 +000021997# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021998
Michael W. Hudson54241132001-12-07 15:38:26 +000021999
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022000{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22001echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022002if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022003 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022004else
Martin v. Löwis11437992002-04-12 09:54:03 +000022005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022006/* confdefs.h. */
22007_ACEOF
22008cat confdefs.h >>conftest.$ac_ext
22009cat >>conftest.$ac_ext <<_ACEOF
22010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022011$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022012int
22013main ()
22014{
22015static int test_array [1 - 2 * !(((char) -1) < 0)];
22016test_array [0] = 0
22017
22018 ;
22019 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022020}
Martin v. Löwis11437992002-04-12 09:54:03 +000022021_ACEOF
22022rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022023if { (ac_try="$ac_compile"
22024case "(($ac_try" in
22025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22026 *) ac_try_echo=$ac_try;;
22027esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022029 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022031 grep -v '^ *+' conftest.er1 >conftest.err
22032 rm -f conftest.er1
22033 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022035 (exit $ac_status); } && {
22036 test -z "$ac_c_werror_flag" ||
22037 test ! -s conftest.err
22038 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022039 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022040else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022042sed 's/^/| /' conftest.$ac_ext >&5
22043
Martin v. Löwiseba40652007-08-30 20:10:57 +000022044 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022046
22047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022048fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022049{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22050echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022051if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022052 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022053#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022054_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022055
22056fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022057
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022058{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22059echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022060if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022061 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022062else
22063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022064/* confdefs.h. */
22065_ACEOF
22066cat confdefs.h >>conftest.$ac_ext
22067cat >>conftest.$ac_ext <<_ACEOF
22068/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022069
Martin v. Löwis11437992002-04-12 09:54:03 +000022070int
22071main ()
22072{
22073/* FIXME: Include the comments suggested by Paul. */
22074#ifndef __cplusplus
22075 /* Ultrix mips cc rejects this. */
22076 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022077 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022078 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022079 char const *const *pcpcc;
22080 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022081 /* NEC SVR4.0.2 mips cc rejects this. */
22082 struct point {int x, y;};
22083 static struct point const zero = {0,0};
22084 /* AIX XL C 1.02.0.0 rejects this.
22085 It does not let you subtract one const X* pointer from another in
22086 an arm of an if-expression whose if-part is not a constant
22087 expression */
22088 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022089 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022090 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022091 ++pcpcc;
22092 ppc = (char**) pcpcc;
22093 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022094 { /* SCO 3.2v4 cc rejects this. */
22095 char *t;
22096 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022097
Martin v. Löwis11437992002-04-12 09:54:03 +000022098 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022099 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022100 }
22101 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22102 int x[] = {25, 17};
22103 const int *foo = &x[0];
22104 ++foo;
22105 }
22106 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22107 typedef const int *iptr;
22108 iptr p = 0;
22109 ++p;
22110 }
22111 { /* AIX XL C 1.02.0.0 rejects this saying
22112 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22113 struct s { int j; const int *ap[3]; };
22114 struct s *b; b->j = 5;
22115 }
22116 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22117 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022118 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022119 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022120 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022121#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022122
Martin v. Löwis11437992002-04-12 09:54:03 +000022123 ;
22124 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022125}
Martin v. Löwis11437992002-04-12 09:54:03 +000022126_ACEOF
22127rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022128if { (ac_try="$ac_compile"
22129case "(($ac_try" in
22130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22131 *) ac_try_echo=$ac_try;;
22132esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022136 grep -v '^ *+' conftest.er1 >conftest.err
22137 rm -f conftest.er1
22138 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022140 (exit $ac_status); } && {
22141 test -z "$ac_c_werror_flag" ||
22142 test ! -s conftest.err
22143 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022144 ac_cv_c_const=yes
22145else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022147sed 's/^/| /' conftest.$ac_ext >&5
22148
Martin v. Löwiseba40652007-08-30 20:10:57 +000022149 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022151
22152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022153fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022154{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22155echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022156if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022157
22158cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022159#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022160_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022161
22162fi
22163
Michael W. Hudson54241132001-12-07 15:38:26 +000022164
Guido van Rossumda88dad1995-01-26 00:46:29 +000022165works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022166{ echo "$as_me:$LINENO: checking for working volatile" >&5
22167echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022168cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022169/* confdefs.h. */
22170_ACEOF
22171cat confdefs.h >>conftest.$ac_ext
22172cat >>conftest.$ac_ext <<_ACEOF
22173/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022174
Martin v. Löwis11437992002-04-12 09:54:03 +000022175int
22176main ()
22177{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022178volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022179 ;
22180 return 0;
22181}
22182_ACEOF
22183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022184if { (ac_try="$ac_compile"
22185case "(($ac_try" in
22186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22187 *) ac_try_echo=$ac_try;;
22188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022192 grep -v '^ *+' conftest.er1 >conftest.err
22193 rm -f conftest.er1
22194 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022196 (exit $ac_status); } && {
22197 test -z "$ac_c_werror_flag" ||
22198 test ! -s conftest.err
22199 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022200 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022201else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022203sed 's/^/| /' conftest.$ac_ext >&5
22204
Martin v. Löwis11437992002-04-12 09:54:03 +000022205
22206cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022207#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022208_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022209
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022210
Guido van Rossum627b2d71993-12-24 10:39:16 +000022211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022212
22213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022214{ echo "$as_me:$LINENO: result: $works" >&5
22215echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022216
Guido van Rossumda88dad1995-01-26 00:46:29 +000022217works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022218{ echo "$as_me:$LINENO: checking for working signed char" >&5
22219echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022221/* confdefs.h. */
22222_ACEOF
22223cat confdefs.h >>conftest.$ac_ext
22224cat >>conftest.$ac_ext <<_ACEOF
22225/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022226
Martin v. Löwis11437992002-04-12 09:54:03 +000022227int
22228main ()
22229{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022230signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022231 ;
22232 return 0;
22233}
22234_ACEOF
22235rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022236if { (ac_try="$ac_compile"
22237case "(($ac_try" in
22238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22239 *) ac_try_echo=$ac_try;;
22240esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022244 grep -v '^ *+' conftest.er1 >conftest.err
22245 rm -f conftest.er1
22246 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022248 (exit $ac_status); } && {
22249 test -z "$ac_c_werror_flag" ||
22250 test ! -s conftest.err
22251 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022252 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022253else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022255sed 's/^/| /' conftest.$ac_ext >&5
22256
Martin v. Löwis11437992002-04-12 09:54:03 +000022257
22258cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022259#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022260_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022261
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022262
Guido van Rossum7f43da71994-08-01 12:15:30 +000022263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022264
22265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022266{ echo "$as_me:$LINENO: result: $works" >&5
22267echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022268
Guido van Rossumda88dad1995-01-26 00:46:29 +000022269have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022270{ echo "$as_me:$LINENO: checking for prototypes" >&5
22271echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022273/* confdefs.h. */
22274_ACEOF
22275cat confdefs.h >>conftest.$ac_ext
22276cat >>conftest.$ac_ext <<_ACEOF
22277/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022278int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022279int
22280main ()
22281{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022282return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022283 ;
22284 return 0;
22285}
22286_ACEOF
22287rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022288if { (ac_try="$ac_compile"
22289case "(($ac_try" in
22290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22291 *) ac_try_echo=$ac_try;;
22292esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022294 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022296 grep -v '^ *+' conftest.er1 >conftest.err
22297 rm -f conftest.er1
22298 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022300 (exit $ac_status); } && {
22301 test -z "$ac_c_werror_flag" ||
22302 test ! -s conftest.err
22303 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022304
22305
22306cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022307#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022308_ACEOF
22309
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022310 have_prototypes=yes
22311
Guido van Rossumf78abae1997-01-21 22:02:36 +000022312else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022314sed 's/^/| /' conftest.$ac_ext >&5
22315
Martin v. Löwiseba40652007-08-30 20:10:57 +000022316
Guido van Rossum7f43da71994-08-01 12:15:30 +000022317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022318
22319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022320{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22321echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022322
Guido van Rossumda88dad1995-01-26 00:46:29 +000022323works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022324{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22325echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022327/* confdefs.h. */
22328_ACEOF
22329cat confdefs.h >>conftest.$ac_ext
22330cat >>conftest.$ac_ext <<_ACEOF
22331/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022332
22333#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022334int foo(int x, ...) {
22335 va_list va;
22336 va_start(va, x);
22337 va_arg(va, int);
22338 va_arg(va, char *);
22339 va_arg(va, double);
22340 return 0;
22341}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022342
Martin v. Löwis11437992002-04-12 09:54:03 +000022343int
22344main ()
22345{
Guido van Rossum90eea071996-08-30 20:58:57 +000022346return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022347 ;
22348 return 0;
22349}
22350_ACEOF
22351rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022352if { (ac_try="$ac_compile"
22353case "(($ac_try" in
22354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22355 *) ac_try_echo=$ac_try;;
22356esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022358 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022360 grep -v '^ *+' conftest.er1 >conftest.err
22361 rm -f conftest.er1
22362 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022364 (exit $ac_status); } && {
22365 test -z "$ac_c_werror_flag" ||
22366 test ! -s conftest.err
22367 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022368
22369
22370cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022371#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022372_ACEOF
22373
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022374 works=yes
22375
Guido van Rossumf78abae1997-01-21 22:02:36 +000022376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022378sed 's/^/| /' conftest.$ac_ext >&5
22379
Martin v. Löwiseba40652007-08-30 20:10:57 +000022380
Guido van Rossum627b2d71993-12-24 10:39:16 +000022381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022382
22383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022384{ echo "$as_me:$LINENO: result: $works" >&5
22385echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022386
Martin v. Löwisd6320502004-08-12 13:45:08 +000022387# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022388{ echo "$as_me:$LINENO: checking for socketpair" >&5
22389echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022390cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022391/* confdefs.h. */
22392_ACEOF
22393cat confdefs.h >>conftest.$ac_ext
22394cat >>conftest.$ac_ext <<_ACEOF
22395/* end confdefs.h. */
22396
22397#include <sys/types.h>
22398#include <sys/socket.h>
22399
22400int
22401main ()
22402{
22403void *x=socketpair
22404 ;
22405 return 0;
22406}
22407_ACEOF
22408rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022409if { (ac_try="$ac_compile"
22410case "(($ac_try" in
22411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22412 *) ac_try_echo=$ac_try;;
22413esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022417 grep -v '^ *+' conftest.er1 >conftest.err
22418 rm -f conftest.er1
22419 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022421 (exit $ac_status); } && {
22422 test -z "$ac_c_werror_flag" ||
22423 test ! -s conftest.err
22424 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022425
22426cat >>confdefs.h <<\_ACEOF
22427#define HAVE_SOCKETPAIR 1
22428_ACEOF
22429
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022430 { echo "$as_me:$LINENO: result: yes" >&5
22431echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022433 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022434sed 's/^/| /' conftest.$ac_ext >&5
22435
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022436 { echo "$as_me:$LINENO: result: no" >&5
22437echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022438
22439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022440
22441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022442
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022443# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022444{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22445echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022446cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022447/* confdefs.h. */
22448_ACEOF
22449cat confdefs.h >>conftest.$ac_ext
22450cat >>conftest.$ac_ext <<_ACEOF
22451/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022452#include <sys/types.h>
22453#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022454int
22455main ()
22456{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022457struct sockaddr x;
22458x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022459 ;
22460 return 0;
22461}
22462_ACEOF
22463rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022464if { (ac_try="$ac_compile"
22465case "(($ac_try" in
22466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22467 *) ac_try_echo=$ac_try;;
22468esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022472 grep -v '^ *+' conftest.er1 >conftest.err
22473 rm -f conftest.er1
22474 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022476 (exit $ac_status); } && {
22477 test -z "$ac_c_werror_flag" ||
22478 test ! -s conftest.err
22479 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022480 { echo "$as_me:$LINENO: result: yes" >&5
22481echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022482
22483cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022484#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022485_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022486
22487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022489sed 's/^/| /' conftest.$ac_ext >&5
22490
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022491 { echo "$as_me:$LINENO: result: no" >&5
22492echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022494
22495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022496
Guido van Rossumda88dad1995-01-26 00:46:29 +000022497va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022498{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22499echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022500cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022501/* confdefs.h. */
22502_ACEOF
22503cat confdefs.h >>conftest.$ac_ext
22504cat >>conftest.$ac_ext <<_ACEOF
22505/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022506
22507#ifdef HAVE_STDARG_PROTOTYPES
22508#include <stdarg.h>
22509#else
22510#include <varargs.h>
22511#endif
22512
Martin v. Löwis11437992002-04-12 09:54:03 +000022513int
22514main ()
22515{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022516va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022517 ;
22518 return 0;
22519}
22520_ACEOF
22521rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022522if { (ac_try="$ac_compile"
22523case "(($ac_try" in
22524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22525 *) ac_try_echo=$ac_try;;
22526esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022530 grep -v '^ *+' conftest.er1 >conftest.err
22531 rm -f conftest.er1
22532 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022534 (exit $ac_status); } && {
22535 test -z "$ac_c_werror_flag" ||
22536 test ! -s conftest.err
22537 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022538 :
22539else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022541sed 's/^/| /' conftest.$ac_ext >&5
22542
Martin v. Löwis11437992002-04-12 09:54:03 +000022543
22544
22545cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022546#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022547_ACEOF
22548
Guido van Rossumda88dad1995-01-26 00:46:29 +000022549 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022550
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022552
22553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022554{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22555echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022556
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022557# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022558
22559
22560
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022561{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22562echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022563if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022564 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022565else
Martin v. Löwis11437992002-04-12 09:54:03 +000022566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022567/* confdefs.h. */
22568_ACEOF
22569cat confdefs.h >>conftest.$ac_ext
22570cat >>conftest.$ac_ext <<_ACEOF
22571/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022572/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22573 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22574#define gethostbyname_r innocuous_gethostbyname_r
22575
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022576/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022577 which can conflict with char gethostbyname_r (); below.
22578 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022579 <limits.h> exists even on freestanding compilers. */
22580
22581#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022582# include <limits.h>
22583#else
22584# include <assert.h>
22585#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022586
22587#undef gethostbyname_r
22588
Martin v. Löwiseba40652007-08-30 20:10:57 +000022589/* Override any GCC internal prototype to avoid an error.
22590 Use char because int might match the return type of a GCC
22591 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022592#ifdef __cplusplus
22593extern "C"
22594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022595char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022596/* The GNU C library defines this for functions which it implements
22597 to always fail with ENOSYS. Some functions are actually named
22598 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022599#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022600choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022601#endif
22602
Skip Montanaro6dead952003-09-25 14:50:04 +000022603int
22604main ()
22605{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022606return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022607 ;
22608 return 0;
22609}
22610_ACEOF
22611rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022612if { (ac_try="$ac_link"
22613case "(($ac_try" in
22614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22615 *) ac_try_echo=$ac_try;;
22616esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022618 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022620 grep -v '^ *+' conftest.er1 >conftest.err
22621 rm -f conftest.er1
22622 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022624 (exit $ac_status); } && {
22625 test -z "$ac_c_werror_flag" ||
22626 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022627 } && test -s conftest$ac_exeext &&
22628 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022629 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022632sed 's/^/| /' conftest.$ac_ext >&5
22633
Martin v. Löwiseba40652007-08-30 20:10:57 +000022634 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022636
22637rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022638 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022639fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022640{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22641echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22642if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022643
Martin v. Löwis11437992002-04-12 09:54:03 +000022644 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022645#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022646_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022647
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022648 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22649echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022650 OLD_CFLAGS=$CFLAGS
22651 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022653/* confdefs.h. */
22654_ACEOF
22655cat confdefs.h >>conftest.$ac_ext
22656cat >>conftest.$ac_ext <<_ACEOF
22657/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022658
22659# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022660
Martin v. Löwis11437992002-04-12 09:54:03 +000022661int
22662main ()
22663{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022664
22665 char *name;
22666 struct hostent *he, *res;
22667 char buffer[2048];
22668 int buflen = 2048;
22669 int h_errnop;
22670
22671 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022672
22673 ;
22674 return 0;
22675}
22676_ACEOF
22677rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678if { (ac_try="$ac_compile"
22679case "(($ac_try" in
22680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22681 *) ac_try_echo=$ac_try;;
22682esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022686 grep -v '^ *+' conftest.er1 >conftest.err
22687 rm -f conftest.er1
22688 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022690 (exit $ac_status); } && {
22691 test -z "$ac_c_werror_flag" ||
22692 test ! -s conftest.err
22693 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022694
22695 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022696#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022697_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022698
Martin v. Löwis11437992002-04-12 09:54:03 +000022699
22700cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022701#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022702_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022703
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022704 { echo "$as_me:$LINENO: result: yes" >&5
22705echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022706
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022707else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022709sed 's/^/| /' conftest.$ac_ext >&5
22710
Martin v. Löwis11437992002-04-12 09:54:03 +000022711
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022712 { echo "$as_me:$LINENO: result: no" >&5
22713echo "${ECHO_T}no" >&6; }
22714 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22715echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022716 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022717/* confdefs.h. */
22718_ACEOF
22719cat confdefs.h >>conftest.$ac_ext
22720cat >>conftest.$ac_ext <<_ACEOF
22721/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022722
22723# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022724
Martin v. Löwis11437992002-04-12 09:54:03 +000022725int
22726main ()
22727{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022728
22729 char *name;
22730 struct hostent *he;
22731 char buffer[2048];
22732 int buflen = 2048;
22733 int h_errnop;
22734
22735 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022736
22737 ;
22738 return 0;
22739}
22740_ACEOF
22741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022742if { (ac_try="$ac_compile"
22743case "(($ac_try" in
22744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22745 *) ac_try_echo=$ac_try;;
22746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022750 grep -v '^ *+' conftest.er1 >conftest.err
22751 rm -f conftest.er1
22752 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022754 (exit $ac_status); } && {
22755 test -z "$ac_c_werror_flag" ||
22756 test ! -s conftest.err
22757 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022758
22759 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022760#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022761_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022762
Martin v. Löwis11437992002-04-12 09:54:03 +000022763
22764cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022765#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022766_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022767
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022768 { echo "$as_me:$LINENO: result: yes" >&5
22769echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022770
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022771else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022773sed 's/^/| /' conftest.$ac_ext >&5
22774
Martin v. Löwis11437992002-04-12 09:54:03 +000022775
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022776 { echo "$as_me:$LINENO: result: no" >&5
22777echo "${ECHO_T}no" >&6; }
22778 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22779echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022781/* confdefs.h. */
22782_ACEOF
22783cat confdefs.h >>conftest.$ac_ext
22784cat >>conftest.$ac_ext <<_ACEOF
22785/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022786
22787# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022788
Martin v. Löwis11437992002-04-12 09:54:03 +000022789int
22790main ()
22791{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022792
22793 char *name;
22794 struct hostent *he;
22795 struct hostent_data data;
22796
22797 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022798
22799 ;
22800 return 0;
22801}
22802_ACEOF
22803rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022804if { (ac_try="$ac_compile"
22805case "(($ac_try" in
22806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22807 *) ac_try_echo=$ac_try;;
22808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022812 grep -v '^ *+' conftest.er1 >conftest.err
22813 rm -f conftest.er1
22814 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022816 (exit $ac_status); } && {
22817 test -z "$ac_c_werror_flag" ||
22818 test ! -s conftest.err
22819 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022820
22821 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022822#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022823_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022824
Martin v. Löwis11437992002-04-12 09:54:03 +000022825
22826cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022827#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022828_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022829
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022830 { echo "$as_me:$LINENO: result: yes" >&5
22831echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022832
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022833else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022835sed 's/^/| /' conftest.$ac_ext >&5
22836
Martin v. Löwis11437992002-04-12 09:54:03 +000022837
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022838 { echo "$as_me:$LINENO: result: no" >&5
22839echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022840
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022842
22843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022844
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022846
22847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022848
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022850
22851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022852 CFLAGS=$OLD_CFLAGS
22853
22854else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022855
Martin v. Löwis11437992002-04-12 09:54:03 +000022856
22857for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022858do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022859as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22860{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22861echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022862if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022863 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022864else
Martin v. Löwis11437992002-04-12 09:54:03 +000022865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022866/* confdefs.h. */
22867_ACEOF
22868cat confdefs.h >>conftest.$ac_ext
22869cat >>conftest.$ac_ext <<_ACEOF
22870/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022871/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22872 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22873#define $ac_func innocuous_$ac_func
22874
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022875/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022876 which can conflict with char $ac_func (); below.
22877 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022878 <limits.h> exists even on freestanding compilers. */
22879
22880#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022881# include <limits.h>
22882#else
22883# include <assert.h>
22884#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022885
22886#undef $ac_func
22887
Martin v. Löwiseba40652007-08-30 20:10:57 +000022888/* Override any GCC internal prototype to avoid an error.
22889 Use char because int might match the return type of a GCC
22890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022891#ifdef __cplusplus
22892extern "C"
22893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022894char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022895/* The GNU C library defines this for functions which it implements
22896 to always fail with ENOSYS. Some functions are actually named
22897 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022898#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022899choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022900#endif
22901
Skip Montanaro6dead952003-09-25 14:50:04 +000022902int
22903main ()
22904{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022905return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022906 ;
22907 return 0;
22908}
22909_ACEOF
22910rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022911if { (ac_try="$ac_link"
22912case "(($ac_try" in
22913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22914 *) ac_try_echo=$ac_try;;
22915esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022917 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022919 grep -v '^ *+' conftest.er1 >conftest.err
22920 rm -f conftest.er1
22921 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022923 (exit $ac_status); } && {
22924 test -z "$ac_c_werror_flag" ||
22925 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022926 } && test -s conftest$ac_exeext &&
22927 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022928 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022929else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022931sed 's/^/| /' conftest.$ac_ext >&5
22932
Martin v. Löwiseba40652007-08-30 20:10:57 +000022933 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022935
22936rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022937 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022938fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022939ac_res=`eval echo '${'$as_ac_var'}'`
22940 { echo "$as_me:$LINENO: result: $ac_res" >&5
22941echo "${ECHO_T}$ac_res" >&6; }
22942if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022943 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022944#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022945_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022946
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022947fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022948done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022949
Michael W. Hudson54241132001-12-07 15:38:26 +000022950
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022951fi
22952
Michael W. Hudson54241132001-12-07 15:38:26 +000022953
22954
22955
22956
22957
22958
Guido van Rossum627b2d71993-12-24 10:39:16 +000022959# checks for system services
22960# (none yet)
22961
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022962# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022963{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22964echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022965if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022966 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022967else
Martin v. Löwis11437992002-04-12 09:54:03 +000022968 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022969/* confdefs.h. */
22970_ACEOF
22971cat confdefs.h >>conftest.$ac_ext
22972cat >>conftest.$ac_ext <<_ACEOF
22973/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022974/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22975 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22976#define __fpu_control innocuous___fpu_control
22977
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022978/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022979 which can conflict with char __fpu_control (); below.
22980 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022981 <limits.h> exists even on freestanding compilers. */
22982
22983#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022984# include <limits.h>
22985#else
22986# include <assert.h>
22987#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022988
22989#undef __fpu_control
22990
Martin v. Löwiseba40652007-08-30 20:10:57 +000022991/* Override any GCC internal prototype to avoid an error.
22992 Use char because int might match the return type of a GCC
22993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022994#ifdef __cplusplus
22995extern "C"
22996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022997char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022998/* The GNU C library defines this for functions which it implements
22999 to always fail with ENOSYS. Some functions are actually named
23000 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023001#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023002choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023003#endif
23004
Skip Montanaro6dead952003-09-25 14:50:04 +000023005int
23006main ()
23007{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023008return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023009 ;
23010 return 0;
23011}
23012_ACEOF
23013rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023014if { (ac_try="$ac_link"
23015case "(($ac_try" in
23016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23017 *) ac_try_echo=$ac_try;;
23018esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023020 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023022 grep -v '^ *+' conftest.er1 >conftest.err
23023 rm -f conftest.er1
23024 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023026 (exit $ac_status); } && {
23027 test -z "$ac_c_werror_flag" ||
23028 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023029 } && test -s conftest$ac_exeext &&
23030 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023031 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023032else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023034sed 's/^/| /' conftest.$ac_ext >&5
23035
Martin v. Löwiseba40652007-08-30 20:10:57 +000023036 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023038
23039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023040 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023041fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023042{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23043echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23044if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023045 :
23046else
Martin v. Löwis11437992002-04-12 09:54:03 +000023047
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023048{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23049echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023050if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023051 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023052else
Martin v. Löwis11437992002-04-12 09:54:03 +000023053 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023054LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023055cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023056/* confdefs.h. */
23057_ACEOF
23058cat confdefs.h >>conftest.$ac_ext
23059cat >>conftest.$ac_ext <<_ACEOF
23060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023061
Martin v. Löwiseba40652007-08-30 20:10:57 +000023062/* Override any GCC internal prototype to avoid an error.
23063 Use char because int might match the return type of a GCC
23064 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023065#ifdef __cplusplus
23066extern "C"
23067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023068char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023069int
23070main ()
23071{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023072return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023073 ;
23074 return 0;
23075}
23076_ACEOF
23077rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023078if { (ac_try="$ac_link"
23079case "(($ac_try" in
23080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23081 *) ac_try_echo=$ac_try;;
23082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023084 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023086 grep -v '^ *+' conftest.er1 >conftest.err
23087 rm -f conftest.er1
23088 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023090 (exit $ac_status); } && {
23091 test -z "$ac_c_werror_flag" ||
23092 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023093 } && test -s conftest$ac_exeext &&
23094 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023095 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023096else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023098sed 's/^/| /' conftest.$ac_ext >&5
23099
Martin v. Löwiseba40652007-08-30 20:10:57 +000023100 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023102
23103rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023104 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023105LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023106fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023107{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23108echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23109if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023110 cat >>confdefs.h <<_ACEOF
23111#define HAVE_LIBIEEE 1
23112_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023113
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023114 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023115
Guido van Rossum627b2d71993-12-24 10:39:16 +000023116fi
23117
Michael W. Hudson54241132001-12-07 15:38:26 +000023118
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023119fi
23120
Michael W. Hudson54241132001-12-07 15:38:26 +000023121
Guido van Rossum7f253911997-05-09 02:42:48 +000023122# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023123{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23124echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023125
Martin v. Löwiseba40652007-08-30 20:10:57 +000023126# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023127if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023128 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023129if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023130then
23131
23132cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023133#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023134_ACEOF
23135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023136 { echo "$as_me:$LINENO: result: yes" >&5
23137echo "${ECHO_T}yes" >&6; }
23138else { echo "$as_me:$LINENO: result: no" >&5
23139echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023140fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023142 { echo "$as_me:$LINENO: result: no" >&5
23143echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023144fi
23145
Guido van Rossum7f253911997-05-09 02:42:48 +000023146
Guido van Rossum7f43da71994-08-01 12:15:30 +000023147# check for --with-libm=...
23148
Guido van Rossum563e7081996-09-10 18:20:48 +000023149case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023150Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023151BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023152*) LIBM=-lm
23153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023154{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23155echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023156
Martin v. Löwiseba40652007-08-30 20:10:57 +000023157# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023158if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023159 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023160if test "$withval" = no
23161then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023162 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23163echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023164elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023165then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023166 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23167echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23168else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23169echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023170 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023171fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023173 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23174echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023175fi
23176
Guido van Rossum7f43da71994-08-01 12:15:30 +000023177
23178# check for --with-libc=...
23179
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023180{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23181echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023182
Martin v. Löwiseba40652007-08-30 20:10:57 +000023183# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023184if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023185 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023186if test "$withval" = no
23187then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023188 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23189echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023190elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023191then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023192 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23193echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23194else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23195echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023196 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023197fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023198else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023199 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23200echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023201fi
23202
Guido van Rossum7f43da71994-08-01 12:15:30 +000023203
Christian Heimes0a8143f2007-12-18 23:22:54 +000023204# ************************************
23205# * Check for mathematical functions *
23206# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023207
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023208LIBS_SAVE=$LIBS
23209LIBS="$LIBS $LIBM"
23210
Mark Dickinson04b27232009-01-04 12:29:36 +000023211# Detect whether system arithmetic is subject to x87-style double
23212# rounding issues. The result of this test has little meaning on non
23213# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23214# mode is round-to-nearest and double rounding issues are present, and
23215# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023216{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23217echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023218if test "${ac_cv_x87_double_rounding+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023219 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson04b27232009-01-04 12:29:36 +000023220else
23221
23222if test "$cross_compiling" = yes; then
23223 ac_cv_x87_double_rounding=no
23224else
23225 cat >conftest.$ac_ext <<_ACEOF
23226/* confdefs.h. */
23227_ACEOF
23228cat confdefs.h >>conftest.$ac_ext
23229cat >>conftest.$ac_ext <<_ACEOF
23230/* end confdefs.h. */
23231
23232#include <stdlib.h>
23233#include <math.h>
23234int main() {
23235 volatile double x, y, z;
23236 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23237 x = 0.99999999999999989; /* 1-2**-53 */
23238 y = 1./x;
23239 if (y != 1.)
23240 exit(0);
23241 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23242 x = 1e16;
23243 y = 2.99999;
23244 z = x + y;
23245 if (z != 1e16+4.)
23246 exit(0);
23247 /* both tests show evidence of double rounding */
23248 exit(1);
23249}
23250
23251_ACEOF
23252rm -f conftest$ac_exeext
23253if { (ac_try="$ac_link"
23254case "(($ac_try" in
23255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23256 *) ac_try_echo=$ac_try;;
23257esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023259 (eval "$ac_link") 2>&5
23260 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023262 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23263 { (case "(($ac_try" in
23264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23265 *) ac_try_echo=$ac_try;;
23266esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023268 (eval "$ac_try") 2>&5
23269 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023271 (exit $ac_status); }; }; then
23272 ac_cv_x87_double_rounding=no
23273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023274 echo "$as_me: program exited with status $ac_status" >&5
23275echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023276sed 's/^/| /' conftest.$ac_ext >&5
23277
23278( exit $ac_status )
23279ac_cv_x87_double_rounding=yes
23280fi
23281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23282fi
23283
23284
23285fi
23286
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023287{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23288echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023289if test "$ac_cv_x87_double_rounding" = yes
23290then
23291
23292cat >>confdefs.h <<\_ACEOF
23293#define X87_DOUBLE_ROUNDING 1
23294_ACEOF
23295
23296fi
23297
Jesse Noller355b1262009-04-02 00:03:28 +000023298# Multiprocessing check for broken sem_getvalue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023299{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23300echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023301if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23302 echo $ECHO_N "(cached) $ECHO_C" >&6
23303else
23304 if test "$cross_compiling" = yes; then
23305 ac_cv_broken_sem_getvalue=yes
Jesse Noller355b1262009-04-02 00:03:28 +000023306else
23307 cat >conftest.$ac_ext <<_ACEOF
23308/* confdefs.h. */
23309_ACEOF
23310cat confdefs.h >>conftest.$ac_ext
23311cat >>conftest.$ac_ext <<_ACEOF
23312/* end confdefs.h. */
23313
23314#include <unistd.h>
23315#include <fcntl.h>
23316#include <stdio.h>
23317#include <semaphore.h>
23318#include <sys/stat.h>
23319
23320int main(void){
23321 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23322 int count;
23323 int res;
23324 if(a==SEM_FAILED){
23325 perror("sem_open");
23326 return 1;
23327
23328 }
23329 res = sem_getvalue(a, &count);
23330 sem_close(a);
23331 return res==-1 ? 1 : 0;
23332}
23333
Jesse Noller355b1262009-04-02 00:03:28 +000023334_ACEOF
23335rm -f conftest$ac_exeext
23336if { (ac_try="$ac_link"
23337case "(($ac_try" in
23338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23339 *) ac_try_echo=$ac_try;;
23340esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023342 (eval "$ac_link") 2>&5
23343 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23346 { (case "(($ac_try" in
23347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23348 *) ac_try_echo=$ac_try;;
23349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023351 (eval "$ac_try") 2>&5
23352 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023354 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023355 ac_cv_broken_sem_getvalue=no
Jesse Noller355b1262009-04-02 00:03:28 +000023356else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023357 echo "$as_me: program exited with status $ac_status" >&5
23358echo "$as_me: failed program was:" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023359sed 's/^/| /' conftest.$ac_ext >&5
23360
23361( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023362ac_cv_broken_sem_getvalue=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023363fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23365fi
23366
23367
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023368
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023369fi
23370
23371{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23372echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23373if test $ac_cv_broken_sem_getvalue = yes
23374then
23375
23376cat >>confdefs.h <<\_ACEOF
23377#define HAVE_BROKEN_SEM_GETVALUE 1
23378_ACEOF
23379
23380fi
23381
Mark Dickinson265d7382008-04-21 22:32:24 +000023382# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23383# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023384{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23385echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023386if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023387 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023388else
23389
23390if test "$cross_compiling" = yes; then
23391 ac_cv_tanh_preserves_zero_sign=no
23392else
23393 cat >conftest.$ac_ext <<_ACEOF
23394/* confdefs.h. */
23395_ACEOF
23396cat confdefs.h >>conftest.$ac_ext
23397cat >>conftest.$ac_ext <<_ACEOF
23398/* end confdefs.h. */
23399
23400#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023401#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023402int main() {
23403 /* return 0 if either negative zeros don't exist
23404 on this platform or if negative zeros exist
23405 and tanh(-0.) == -0. */
23406 if (atan2(0., -1.) == atan2(-0., -1.) ||
23407 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23408 else exit(1);
23409}
23410
23411_ACEOF
23412rm -f conftest$ac_exeext
23413if { (ac_try="$ac_link"
23414case "(($ac_try" in
23415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23416 *) ac_try_echo=$ac_try;;
23417esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023419 (eval "$ac_link") 2>&5
23420 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23423 { (case "(($ac_try" in
23424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23425 *) ac_try_echo=$ac_try;;
23426esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023428 (eval "$ac_try") 2>&5
23429 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023431 (exit $ac_status); }; }; then
23432 ac_cv_tanh_preserves_zero_sign=yes
23433else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023434 echo "$as_me: program exited with status $ac_status" >&5
23435echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023436sed 's/^/| /' conftest.$ac_ext >&5
23437
23438( exit $ac_status )
23439ac_cv_tanh_preserves_zero_sign=no
23440fi
23441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23442fi
23443
23444
23445fi
23446
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023447{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23448echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023449if test "$ac_cv_tanh_preserves_zero_sign" = yes
23450then
23451
23452cat >>confdefs.h <<\_ACEOF
23453#define TANH_PRESERVES_ZERO_SIGN 1
23454_ACEOF
23455
23456fi
23457
Martin v. Löwis11437992002-04-12 09:54:03 +000023458
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023459
Michael W. Hudson54241132001-12-07 15:38:26 +000023460
Christian Heimes0a8143f2007-12-18 23:22:54 +000023461
23462
23463
23464
23465
Mark Dickinson8e5446f2009-04-18 14:41:37 +000023466
Mark Dickinson65898e02009-09-05 10:27:00 +000023467for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23468do
23469as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23470{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23471echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23472if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23473 echo $ECHO_N "(cached) $ECHO_C" >&6
23474else
23475 cat >conftest.$ac_ext <<_ACEOF
23476/* confdefs.h. */
23477_ACEOF
23478cat confdefs.h >>conftest.$ac_ext
23479cat >>conftest.$ac_ext <<_ACEOF
23480/* end confdefs.h. */
23481/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23482 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23483#define $ac_func innocuous_$ac_func
23484
23485/* System header to define __stub macros and hopefully few prototypes,
23486 which can conflict with char $ac_func (); below.
23487 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23488 <limits.h> exists even on freestanding compilers. */
23489
23490#ifdef __STDC__
23491# include <limits.h>
23492#else
23493# include <assert.h>
23494#endif
23495
23496#undef $ac_func
23497
23498/* Override any GCC internal prototype to avoid an error.
23499 Use char because int might match the return type of a GCC
23500 builtin and then its argument prototype would still apply. */
23501#ifdef __cplusplus
23502extern "C"
23503#endif
23504char $ac_func ();
23505/* The GNU C library defines this for functions which it implements
23506 to always fail with ENOSYS. Some functions are actually named
23507 something starting with __ and the normal name is an alias. */
23508#if defined __stub_$ac_func || defined __stub___$ac_func
23509choke me
23510#endif
23511
23512int
23513main ()
23514{
23515return $ac_func ();
23516 ;
23517 return 0;
23518}
23519_ACEOF
23520rm -f conftest.$ac_objext conftest$ac_exeext
23521if { (ac_try="$ac_link"
23522case "(($ac_try" in
23523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23524 *) ac_try_echo=$ac_try;;
23525esac
23526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23527 (eval "$ac_link") 2>conftest.er1
23528 ac_status=$?
23529 grep -v '^ *+' conftest.er1 >conftest.err
23530 rm -f conftest.er1
23531 cat conftest.err >&5
23532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23533 (exit $ac_status); } && {
23534 test -z "$ac_c_werror_flag" ||
23535 test ! -s conftest.err
23536 } && test -s conftest$ac_exeext &&
23537 $as_test_x conftest$ac_exeext; then
23538 eval "$as_ac_var=yes"
23539else
23540 echo "$as_me: failed program was:" >&5
23541sed 's/^/| /' conftest.$ac_ext >&5
23542
23543 eval "$as_ac_var=no"
23544fi
23545
23546rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23547 conftest$ac_exeext conftest.$ac_ext
23548fi
23549ac_res=`eval echo '${'$as_ac_var'}'`
23550 { echo "$as_me:$LINENO: result: $ac_res" >&5
23551echo "${ECHO_T}$ac_res" >&6; }
23552if test `eval echo '${'$as_ac_var'}'` = yes; then
23553 cat >>confdefs.h <<_ACEOF
23554#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23555_ACEOF
23556
23557fi
23558done
23559
23560
23561
23562
23563
23564
23565for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000023566do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023567as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23568{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23569echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000023570if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023571 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000023572else
23573 cat >conftest.$ac_ext <<_ACEOF
23574/* confdefs.h. */
23575_ACEOF
23576cat confdefs.h >>conftest.$ac_ext
23577cat >>conftest.$ac_ext <<_ACEOF
23578/* end confdefs.h. */
23579/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23580 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23581#define $ac_func innocuous_$ac_func
23582
23583/* System header to define __stub macros and hopefully few prototypes,
23584 which can conflict with char $ac_func (); below.
23585 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23586 <limits.h> exists even on freestanding compilers. */
23587
23588#ifdef __STDC__
23589# include <limits.h>
23590#else
23591# include <assert.h>
23592#endif
23593
23594#undef $ac_func
23595
23596/* Override any GCC internal prototype to avoid an error.
23597 Use char because int might match the return type of a GCC
23598 builtin and then its argument prototype would still apply. */
23599#ifdef __cplusplus
23600extern "C"
23601#endif
23602char $ac_func ();
23603/* The GNU C library defines this for functions which it implements
23604 to always fail with ENOSYS. Some functions are actually named
23605 something starting with __ and the normal name is an alias. */
23606#if defined __stub_$ac_func || defined __stub___$ac_func
23607choke me
23608#endif
23609
23610int
23611main ()
23612{
23613return $ac_func ();
23614 ;
23615 return 0;
23616}
23617_ACEOF
23618rm -f conftest.$ac_objext conftest$ac_exeext
23619if { (ac_try="$ac_link"
23620case "(($ac_try" in
23621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23622 *) ac_try_echo=$ac_try;;
23623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023625 (eval "$ac_link") 2>conftest.er1
23626 ac_status=$?
23627 grep -v '^ *+' conftest.er1 >conftest.err
23628 rm -f conftest.er1
23629 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023631 (exit $ac_status); } && {
23632 test -z "$ac_c_werror_flag" ||
23633 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023634 } && test -s conftest$ac_exeext &&
23635 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023636 eval "$as_ac_var=yes"
23637else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023638 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023639sed 's/^/| /' conftest.$ac_ext >&5
23640
23641 eval "$as_ac_var=no"
23642fi
23643
23644rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23645 conftest$ac_exeext conftest.$ac_ext
23646fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023647ac_res=`eval echo '${'$as_ac_var'}'`
23648 { echo "$as_me:$LINENO: result: $ac_res" >&5
23649echo "${ECHO_T}$ac_res" >&6; }
23650if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023651 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023652#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000023653_ACEOF
23654
23655fi
23656done
23657
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023658{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23659echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023660if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023661 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023662else
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#include <math.h>
23670
23671int
23672main ()
23673{
23674#ifndef isinf
23675 (void) isinf;
23676#endif
23677
23678 ;
23679 return 0;
23680}
23681_ACEOF
23682rm -f conftest.$ac_objext
23683if { (ac_try="$ac_compile"
23684case "(($ac_try" in
23685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23686 *) ac_try_echo=$ac_try;;
23687esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023689 (eval "$ac_compile") 2>conftest.er1
23690 ac_status=$?
23691 grep -v '^ *+' conftest.er1 >conftest.err
23692 rm -f conftest.er1
23693 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023695 (exit $ac_status); } && {
23696 test -z "$ac_c_werror_flag" ||
23697 test ! -s conftest.err
23698 } && test -s conftest.$ac_objext; then
23699 ac_cv_have_decl_isinf=yes
23700else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023701 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023702sed 's/^/| /' conftest.$ac_ext >&5
23703
23704 ac_cv_have_decl_isinf=no
23705fi
23706
23707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23708fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023709{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23710echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23711if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023712
23713cat >>confdefs.h <<_ACEOF
23714#define HAVE_DECL_ISINF 1
23715_ACEOF
23716
23717
23718else
23719 cat >>confdefs.h <<_ACEOF
23720#define HAVE_DECL_ISINF 0
23721_ACEOF
23722
23723
23724fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023725{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23726echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023727if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023728 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023729else
23730 cat >conftest.$ac_ext <<_ACEOF
23731/* confdefs.h. */
23732_ACEOF
23733cat confdefs.h >>conftest.$ac_ext
23734cat >>conftest.$ac_ext <<_ACEOF
23735/* end confdefs.h. */
23736#include <math.h>
23737
23738int
23739main ()
23740{
23741#ifndef isnan
23742 (void) isnan;
23743#endif
23744
23745 ;
23746 return 0;
23747}
23748_ACEOF
23749rm -f conftest.$ac_objext
23750if { (ac_try="$ac_compile"
23751case "(($ac_try" in
23752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23753 *) ac_try_echo=$ac_try;;
23754esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023756 (eval "$ac_compile") 2>conftest.er1
23757 ac_status=$?
23758 grep -v '^ *+' conftest.er1 >conftest.err
23759 rm -f conftest.er1
23760 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023762 (exit $ac_status); } && {
23763 test -z "$ac_c_werror_flag" ||
23764 test ! -s conftest.err
23765 } && test -s conftest.$ac_objext; then
23766 ac_cv_have_decl_isnan=yes
23767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023768 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023769sed 's/^/| /' conftest.$ac_ext >&5
23770
23771 ac_cv_have_decl_isnan=no
23772fi
23773
23774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23775fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023776{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23777echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23778if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023779
23780cat >>confdefs.h <<_ACEOF
23781#define HAVE_DECL_ISNAN 1
23782_ACEOF
23783
23784
23785else
23786 cat >>confdefs.h <<_ACEOF
23787#define HAVE_DECL_ISNAN 0
23788_ACEOF
23789
23790
23791fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023792{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23793echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023794if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023795 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023796else
23797 cat >conftest.$ac_ext <<_ACEOF
23798/* confdefs.h. */
23799_ACEOF
23800cat confdefs.h >>conftest.$ac_ext
23801cat >>conftest.$ac_ext <<_ACEOF
23802/* end confdefs.h. */
23803#include <math.h>
23804
23805int
23806main ()
23807{
23808#ifndef isfinite
23809 (void) isfinite;
23810#endif
23811
23812 ;
23813 return 0;
23814}
23815_ACEOF
23816rm -f conftest.$ac_objext
23817if { (ac_try="$ac_compile"
23818case "(($ac_try" in
23819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23820 *) ac_try_echo=$ac_try;;
23821esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023823 (eval "$ac_compile") 2>conftest.er1
23824 ac_status=$?
23825 grep -v '^ *+' conftest.er1 >conftest.err
23826 rm -f conftest.er1
23827 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023829 (exit $ac_status); } && {
23830 test -z "$ac_c_werror_flag" ||
23831 test ! -s conftest.err
23832 } && test -s conftest.$ac_objext; then
23833 ac_cv_have_decl_isfinite=yes
23834else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023835 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023836sed 's/^/| /' conftest.$ac_ext >&5
23837
23838 ac_cv_have_decl_isfinite=no
23839fi
23840
23841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23842fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023843{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23844echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23845if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023846
23847cat >>confdefs.h <<_ACEOF
23848#define HAVE_DECL_ISFINITE 1
23849_ACEOF
23850
23851
23852else
23853 cat >>confdefs.h <<_ACEOF
23854#define HAVE_DECL_ISFINITE 0
23855_ACEOF
23856
23857
23858fi
23859
23860
Christian Heimes0a8143f2007-12-18 23:22:54 +000023861
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023862LIBS=$LIBS_SAVE
23863
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023864# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023865{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23866echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023867# Check whether --enable-big-digits was given.
23868if test "${enable_big_digits+set}" = set; then
23869 enableval=$enable_big_digits; case $enable_big_digits in
23870yes)
23871 enable_big_digits=30 ;;
23872no)
23873 enable_big_digits=15 ;;
2387415|30)
23875 ;;
23876*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023877 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23878echo "$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 +000023879 { (exit 1); exit 1; }; } ;;
23880esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023881{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23882echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023883
23884cat >>confdefs.h <<_ACEOF
23885#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23886_ACEOF
23887
23888
23889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023890 { echo "$as_me:$LINENO: result: no value specified" >&5
23891echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023892fi
23893
23894
Guido van Rossumef2255b2000-03-10 22:30:29 +000023895# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023896if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023897 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23898echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023899if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023900 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023901fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023902{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23903echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023904else
Martin v. Löwis11437992002-04-12 09:54:03 +000023905 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023906{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23907echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023908cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023909/* confdefs.h. */
23910_ACEOF
23911cat confdefs.h >>conftest.$ac_ext
23912cat >>conftest.$ac_ext <<_ACEOF
23913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023914$ac_includes_default
23915#include <wchar.h>
23916_ACEOF
23917rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023918if { (ac_try="$ac_compile"
23919case "(($ac_try" in
23920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23921 *) ac_try_echo=$ac_try;;
23922esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023926 grep -v '^ *+' conftest.er1 >conftest.err
23927 rm -f conftest.er1
23928 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023930 (exit $ac_status); } && {
23931 test -z "$ac_c_werror_flag" ||
23932 test ! -s conftest.err
23933 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023934 ac_header_compiler=yes
23935else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023937sed 's/^/| /' conftest.$ac_ext >&5
23938
Martin v. Löwiseba40652007-08-30 20:10:57 +000023939 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023941
23942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023943{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23944echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023945
23946# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023947{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23948echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023949cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023950/* confdefs.h. */
23951_ACEOF
23952cat confdefs.h >>conftest.$ac_ext
23953cat >>conftest.$ac_ext <<_ACEOF
23954/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023955#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023956_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023957if { (ac_try="$ac_cpp conftest.$ac_ext"
23958case "(($ac_try" in
23959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23960 *) ac_try_echo=$ac_try;;
23961esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023963 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023964 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023965 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023966 rm -f conftest.er1
23967 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023969 (exit $ac_status); } >/dev/null && {
23970 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23971 test ! -s conftest.err
23972 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023973 ac_header_preproc=yes
23974else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023976sed 's/^/| /' conftest.$ac_ext >&5
23977
Martin v. Löwis11437992002-04-12 09:54:03 +000023978 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023980
Martin v. Löwis11437992002-04-12 09:54:03 +000023981rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023982{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23983echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023984
23985# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023986case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23987 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023988 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23989echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23990 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23991echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023992 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023993 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023994 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023995 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23996echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23997 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23998echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23999 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24000echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24001 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24002echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24003 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24004echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24005 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24006echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024007 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024008## -------------------------------------- ##
24009## Report this to http://bugs.python.org/ ##
24010## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024011_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024012 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024013 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024015{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24016echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024017if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024018 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024019else
24020 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024021fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024022{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24023echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024024
24025fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024026if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024027
24028
24029cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024030#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024031_ACEOF
24032
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024033 wchar_h="yes"
24034
Guido van Rossumef2255b2000-03-10 22:30:29 +000024035else
Martin v. Löwis11437992002-04-12 09:54:03 +000024036 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024037
24038fi
24039
Michael W. Hudson54241132001-12-07 15:38:26 +000024040
Martin v. Löwis11437992002-04-12 09:54:03 +000024041
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024042# determine wchar_t size
24043if test "$wchar_h" = yes
24044then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024045 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24046echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24047if test "${ac_cv_type_wchar_t+set}" = set; then
24048 echo $ECHO_N "(cached) $ECHO_C" >&6
24049else
24050 cat >conftest.$ac_ext <<_ACEOF
24051/* confdefs.h. */
24052_ACEOF
24053cat confdefs.h >>conftest.$ac_ext
24054cat >>conftest.$ac_ext <<_ACEOF
24055/* end confdefs.h. */
24056#include <wchar.h>
24057
24058typedef wchar_t ac__type_new_;
24059int
24060main ()
24061{
24062if ((ac__type_new_ *) 0)
24063 return 0;
24064if (sizeof (ac__type_new_))
24065 return 0;
24066 ;
24067 return 0;
24068}
24069_ACEOF
24070rm -f conftest.$ac_objext
24071if { (ac_try="$ac_compile"
24072case "(($ac_try" in
24073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24074 *) ac_try_echo=$ac_try;;
24075esac
24076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24077 (eval "$ac_compile") 2>conftest.er1
24078 ac_status=$?
24079 grep -v '^ *+' conftest.er1 >conftest.err
24080 rm -f conftest.er1
24081 cat conftest.err >&5
24082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24083 (exit $ac_status); } && {
24084 test -z "$ac_c_werror_flag" ||
24085 test ! -s conftest.err
24086 } && test -s conftest.$ac_objext; then
24087 ac_cv_type_wchar_t=yes
24088else
24089 echo "$as_me: failed program was:" >&5
24090sed 's/^/| /' conftest.$ac_ext >&5
24091
24092 ac_cv_type_wchar_t=no
24093fi
24094
24095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24096fi
24097{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24098echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24099
24100# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24103# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024104{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24105echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024106if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024107 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024108else
Martin v. Löwis11437992002-04-12 09:54:03 +000024109 if test "$cross_compiling" = yes; then
24110 # Depending upon the size, compute the lo and hi bounds.
24111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024112/* confdefs.h. */
24113_ACEOF
24114cat confdefs.h >>conftest.$ac_ext
24115cat >>conftest.$ac_ext <<_ACEOF
24116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024117#include <wchar.h>
24118
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024119 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024120int
24121main ()
24122{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024123static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024124test_array [0] = 0
24125
24126 ;
24127 return 0;
24128}
24129_ACEOF
24130rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024131if { (ac_try="$ac_compile"
24132case "(($ac_try" in
24133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24134 *) ac_try_echo=$ac_try;;
24135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024139 grep -v '^ *+' conftest.er1 >conftest.err
24140 rm -f conftest.er1
24141 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024143 (exit $ac_status); } && {
24144 test -z "$ac_c_werror_flag" ||
24145 test ! -s conftest.err
24146 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024147 ac_lo=0 ac_mid=0
24148 while :; do
24149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024150/* confdefs.h. */
24151_ACEOF
24152cat confdefs.h >>conftest.$ac_ext
24153cat >>conftest.$ac_ext <<_ACEOF
24154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024155#include <wchar.h>
24156
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024157 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024158int
24159main ()
24160{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024161static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024162test_array [0] = 0
24163
24164 ;
24165 return 0;
24166}
24167_ACEOF
24168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024169if { (ac_try="$ac_compile"
24170case "(($ac_try" in
24171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24172 *) ac_try_echo=$ac_try;;
24173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024177 grep -v '^ *+' conftest.er1 >conftest.err
24178 rm -f conftest.er1
24179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024181 (exit $ac_status); } && {
24182 test -z "$ac_c_werror_flag" ||
24183 test ! -s conftest.err
24184 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024185 ac_hi=$ac_mid; break
24186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024188sed 's/^/| /' conftest.$ac_ext >&5
24189
Martin v. Löwiseba40652007-08-30 20:10:57 +000024190 ac_lo=`expr $ac_mid + 1`
24191 if test $ac_lo -le $ac_mid; then
24192 ac_lo= ac_hi=
24193 break
24194 fi
24195 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024197
24198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024199 done
24200else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024202sed 's/^/| /' conftest.$ac_ext >&5
24203
Martin v. Löwiseba40652007-08-30 20:10:57 +000024204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024205/* confdefs.h. */
24206_ACEOF
24207cat confdefs.h >>conftest.$ac_ext
24208cat >>conftest.$ac_ext <<_ACEOF
24209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024210#include <wchar.h>
24211
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024212 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024213int
24214main ()
24215{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024216static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024217test_array [0] = 0
24218
24219 ;
24220 return 0;
24221}
24222_ACEOF
24223rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024224if { (ac_try="$ac_compile"
24225case "(($ac_try" in
24226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24227 *) ac_try_echo=$ac_try;;
24228esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024230 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024232 grep -v '^ *+' conftest.er1 >conftest.err
24233 rm -f conftest.er1
24234 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024236 (exit $ac_status); } && {
24237 test -z "$ac_c_werror_flag" ||
24238 test ! -s conftest.err
24239 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024240 ac_hi=-1 ac_mid=-1
24241 while :; do
24242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024243/* confdefs.h. */
24244_ACEOF
24245cat confdefs.h >>conftest.$ac_ext
24246cat >>conftest.$ac_ext <<_ACEOF
24247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024248#include <wchar.h>
24249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024250 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024251int
24252main ()
24253{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024255test_array [0] = 0
24256
24257 ;
24258 return 0;
24259}
24260_ACEOF
24261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024262if { (ac_try="$ac_compile"
24263case "(($ac_try" in
24264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24265 *) ac_try_echo=$ac_try;;
24266esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024270 grep -v '^ *+' conftest.er1 >conftest.err
24271 rm -f conftest.er1
24272 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024274 (exit $ac_status); } && {
24275 test -z "$ac_c_werror_flag" ||
24276 test ! -s conftest.err
24277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024278 ac_lo=$ac_mid; break
24279else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024281sed 's/^/| /' conftest.$ac_ext >&5
24282
Martin v. Löwiseba40652007-08-30 20:10:57 +000024283 ac_hi=`expr '(' $ac_mid ')' - 1`
24284 if test $ac_mid -le $ac_hi; then
24285 ac_lo= ac_hi=
24286 break
24287 fi
24288 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024290
24291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024292 done
24293else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024295sed 's/^/| /' conftest.$ac_ext >&5
24296
Martin v. Löwiseba40652007-08-30 20:10:57 +000024297 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024299
24300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024302
24303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024304# Binary search between lo and hi bounds.
24305while test "x$ac_lo" != "x$ac_hi"; do
24306 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024308/* confdefs.h. */
24309_ACEOF
24310cat confdefs.h >>conftest.$ac_ext
24311cat >>conftest.$ac_ext <<_ACEOF
24312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024313#include <wchar.h>
24314
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024315 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024316int
24317main ()
24318{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024320test_array [0] = 0
24321
24322 ;
24323 return 0;
24324}
24325_ACEOF
24326rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024327if { (ac_try="$ac_compile"
24328case "(($ac_try" in
24329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24330 *) ac_try_echo=$ac_try;;
24331esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024335 grep -v '^ *+' conftest.er1 >conftest.err
24336 rm -f conftest.er1
24337 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024339 (exit $ac_status); } && {
24340 test -z "$ac_c_werror_flag" ||
24341 test ! -s conftest.err
24342 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024343 ac_hi=$ac_mid
24344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024346sed 's/^/| /' conftest.$ac_ext >&5
24347
Martin v. Löwiseba40652007-08-30 20:10:57 +000024348 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024350
24351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024352done
24353case $ac_lo in
24354?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024355'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024356 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024357See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024358echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024359See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024360 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024361 else
24362 ac_cv_sizeof_wchar_t=0
24363 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024364esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024365else
Martin v. Löwis11437992002-04-12 09:54:03 +000024366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024367/* confdefs.h. */
24368_ACEOF
24369cat confdefs.h >>conftest.$ac_ext
24370cat >>conftest.$ac_ext <<_ACEOF
24371/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024372#include <wchar.h>
24373
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024374 typedef wchar_t ac__type_sizeof_;
24375static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24376static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024377#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024378#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024379int
24380main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024381{
Martin v. Löwis11437992002-04-12 09:54:03 +000024382
24383 FILE *f = fopen ("conftest.val", "w");
24384 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024385 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024386 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024387 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024388 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024389 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024390 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024391 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024392 }
24393 else
24394 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024395 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024396 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024397 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024398 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024399 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024400 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024401
24402 ;
24403 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024404}
Martin v. Löwis11437992002-04-12 09:54:03 +000024405_ACEOF
24406rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024407if { (ac_try="$ac_link"
24408case "(($ac_try" in
24409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24410 *) ac_try_echo=$ac_try;;
24411esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024413 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024414 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024416 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024417 { (case "(($ac_try" in
24418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24419 *) ac_try_echo=$ac_try;;
24420esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024422 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024423 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024425 (exit $ac_status); }; }; then
24426 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024427else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024428 echo "$as_me: program exited with status $ac_status" >&5
24429echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024430sed 's/^/| /' conftest.$ac_ext >&5
24431
Martin v. Löwis11437992002-04-12 09:54:03 +000024432( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024433if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024434 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024435See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024436echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024437See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024438 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024439 else
24440 ac_cv_sizeof_wchar_t=0
24441 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024443rm -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 +000024444fi
24445rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024446fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024447{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24448echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024449
24450
24451
Martin v. Löwis11437992002-04-12 09:54:03 +000024452cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024453#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024454_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024455
Michael W. Hudson54241132001-12-07 15:38:26 +000024456
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024457fi
24458
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024459{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24460echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024461have_ucs4_tcl=no
24462cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024463/* confdefs.h. */
24464_ACEOF
24465cat confdefs.h >>conftest.$ac_ext
24466cat >>conftest.$ac_ext <<_ACEOF
24467/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024468
24469#include <tcl.h>
24470#if TCL_UTF_MAX != 6
24471# error "NOT UCS4_TCL"
24472#endif
24473int
24474main ()
24475{
24476
24477 ;
24478 return 0;
24479}
24480_ACEOF
24481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024482if { (ac_try="$ac_compile"
24483case "(($ac_try" in
24484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24485 *) ac_try_echo=$ac_try;;
24486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024490 grep -v '^ *+' conftest.er1 >conftest.err
24491 rm -f conftest.er1
24492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024494 (exit $ac_status); } && {
24495 test -z "$ac_c_werror_flag" ||
24496 test ! -s conftest.err
24497 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024498
24499
24500cat >>confdefs.h <<\_ACEOF
24501#define HAVE_UCS4_TCL 1
24502_ACEOF
24503
24504 have_ucs4_tcl=yes
24505
24506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024508sed 's/^/| /' conftest.$ac_ext >&5
24509
Martin v. Löwiseba40652007-08-30 20:10:57 +000024510
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024512
24513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024514{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24515echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024516
Skip Montanaro6dead952003-09-25 14:50:04 +000024517# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024518if test "$wchar_h" = yes
24519then
24520 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024521 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24522echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024523 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024524 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024525else
24526
24527 if test "$cross_compiling" = yes; then
24528 ac_cv_wchar_t_signed=yes
24529else
24530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024531/* confdefs.h. */
24532_ACEOF
24533cat confdefs.h >>conftest.$ac_ext
24534cat >>conftest.$ac_ext <<_ACEOF
24535/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024536
24537 #include <wchar.h>
24538 int main()
24539 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000024540 /* Success: exit code 0 */
24541 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024542 }
24543
24544_ACEOF
24545rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024546if { (ac_try="$ac_link"
24547case "(($ac_try" in
24548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24549 *) ac_try_echo=$ac_try;;
24550esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024552 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024553 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024555 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024556 { (case "(($ac_try" in
24557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24558 *) ac_try_echo=$ac_try;;
24559esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024561 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024562 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024564 (exit $ac_status); }; }; then
24565 ac_cv_wchar_t_signed=yes
24566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024567 echo "$as_me: program exited with status $ac_status" >&5
24568echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024569sed 's/^/| /' conftest.$ac_ext >&5
24570
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024571( exit $ac_status )
24572ac_cv_wchar_t_signed=no
24573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024574rm -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 +000024575fi
24576
Martin v. Löwiseba40652007-08-30 20:10:57 +000024577
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024578fi
24579
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024580 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24581echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024582fi
24583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024584{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
24585echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024586# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024587if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024588 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024589else
24590 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000024591fi
24592
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024593
24594if test $enable_unicode = yes
24595then
Martin v. Löwisfd917792001-06-27 20:22:04 +000024596 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024597 case "$have_ucs4_tcl" in
24598 yes) enable_unicode="ucs4"
24599 ;;
24600 *) enable_unicode="ucs2"
24601 ;;
24602 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024603fi
24604
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024605
24606
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024607case "$enable_unicode" in
24608ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000024609 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024610#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000024611_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024612
24613 ;;
24614ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000024615 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024616#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024617_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024618
24619 ;;
24620esac
24621
Michael W. Hudson54241132001-12-07 15:38:26 +000024622
Martin v. Löwis11437992002-04-12 09:54:03 +000024623
24624
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024625
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024626if test "$enable_unicode" = "no"
24627then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024628 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024629 { echo "$as_me:$LINENO: result: not used" >&5
24630echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024631else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024632 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000024633
24634cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024635#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024636_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024637
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024638
24639 # wchar_t is only usable if it maps to an unsigned type
24640 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024641 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024642 then
24643 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024644
Martin v. Löwis11437992002-04-12 09:54:03 +000024645cat >>confdefs.h <<\_ACEOF
24646#define HAVE_USABLE_WCHAR_T 1
24647_ACEOF
24648
24649 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024650#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024651_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024652
24653 elif test "$ac_cv_sizeof_short" = "$unicode_size"
24654 then
24655 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000024656 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024657#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024658_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024659
24660 elif test "$ac_cv_sizeof_long" = "$unicode_size"
24661 then
24662 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000024663 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024664#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024665_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024666
24667 else
24668 PY_UNICODE_TYPE="no type found"
24669 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024670 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24671echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024672fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000024673
24674# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024675{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24676echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024677if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024678 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024679else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024680 # See if sys/param.h defines the BYTE_ORDER macro.
24681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024682/* confdefs.h. */
24683_ACEOF
24684cat confdefs.h >>conftest.$ac_ext
24685cat >>conftest.$ac_ext <<_ACEOF
24686/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024687#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024688#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024689
Martin v. Löwis11437992002-04-12 09:54:03 +000024690int
24691main ()
24692{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024693#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24694 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24695 bogus endian macros
24696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024697
24698 ;
24699 return 0;
24700}
24701_ACEOF
24702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024703if { (ac_try="$ac_compile"
24704case "(($ac_try" in
24705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24706 *) ac_try_echo=$ac_try;;
24707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024711 grep -v '^ *+' conftest.er1 >conftest.err
24712 rm -f conftest.er1
24713 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024715 (exit $ac_status); } && {
24716 test -z "$ac_c_werror_flag" ||
24717 test ! -s conftest.err
24718 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024719 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024720cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024721/* confdefs.h. */
24722_ACEOF
24723cat confdefs.h >>conftest.$ac_ext
24724cat >>conftest.$ac_ext <<_ACEOF
24725/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024726#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024727#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024728
Martin v. Löwis11437992002-04-12 09:54:03 +000024729int
24730main ()
24731{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024732#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024733 not big endian
24734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024735
24736 ;
24737 return 0;
24738}
24739_ACEOF
24740rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024741if { (ac_try="$ac_compile"
24742case "(($ac_try" in
24743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24744 *) ac_try_echo=$ac_try;;
24745esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024749 grep -v '^ *+' conftest.er1 >conftest.err
24750 rm -f conftest.er1
24751 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024753 (exit $ac_status); } && {
24754 test -z "$ac_c_werror_flag" ||
24755 test ! -s conftest.err
24756 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024757 ac_cv_c_bigendian=yes
24758else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024760sed 's/^/| /' conftest.$ac_ext >&5
24761
Martin v. Löwiseba40652007-08-30 20:10:57 +000024762 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024764
24765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024768sed 's/^/| /' conftest.$ac_ext >&5
24769
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024770 # It does not; compile a test program.
24771if test "$cross_compiling" = yes; then
24772 # try to guess the endianness by grepping values into an object file
24773 ac_cv_c_bigendian=unknown
24774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024775/* confdefs.h. */
24776_ACEOF
24777cat confdefs.h >>conftest.$ac_ext
24778cat >>conftest.$ac_ext <<_ACEOF
24779/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024780short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24781short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24782void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24783short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24784short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24785void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024786int
24787main ()
24788{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024789 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024790 ;
24791 return 0;
24792}
24793_ACEOF
24794rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024795if { (ac_try="$ac_compile"
24796case "(($ac_try" in
24797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24798 *) ac_try_echo=$ac_try;;
24799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024801 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024803 grep -v '^ *+' conftest.er1 >conftest.err
24804 rm -f conftest.er1
24805 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024807 (exit $ac_status); } && {
24808 test -z "$ac_c_werror_flag" ||
24809 test ! -s conftest.err
24810 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024811 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024812 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024813fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024814if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24815 if test "$ac_cv_c_bigendian" = unknown; then
24816 ac_cv_c_bigendian=no
24817 else
24818 # finding both strings is unlikely to happen, but who knows?
24819 ac_cv_c_bigendian=unknown
24820 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024821fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024822else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024824sed 's/^/| /' conftest.$ac_ext >&5
24825
Martin v. Löwiseba40652007-08-30 20:10:57 +000024826
Martin v. Löwis11437992002-04-12 09:54:03 +000024827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024828
24829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024830else
24831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024832/* confdefs.h. */
24833_ACEOF
24834cat confdefs.h >>conftest.$ac_ext
24835cat >>conftest.$ac_ext <<_ACEOF
24836/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000024837$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024838int
24839main ()
24840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024842 /* Are we little or big endian? From Harbison&Steele. */
24843 union
24844 {
24845 long int l;
24846 char c[sizeof (long int)];
24847 } u;
24848 u.l = 1;
24849 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024850
24851 ;
24852 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024853}
Martin v. Löwis11437992002-04-12 09:54:03 +000024854_ACEOF
24855rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024856if { (ac_try="$ac_link"
24857case "(($ac_try" in
24858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24859 *) ac_try_echo=$ac_try;;
24860esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024862 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024863 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024865 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024866 { (case "(($ac_try" in
24867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24868 *) ac_try_echo=$ac_try;;
24869esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024871 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024872 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024874 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024875 ac_cv_c_bigendian=no
24876else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024877 echo "$as_me: program exited with status $ac_status" >&5
24878echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024879sed 's/^/| /' conftest.$ac_ext >&5
24880
Martin v. Löwis11437992002-04-12 09:54:03 +000024881( exit $ac_status )
24882ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024883fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024884rm -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 +000024885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024886
24887
Martin v. Löwis11437992002-04-12 09:54:03 +000024888fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024889
24890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24891fi
24892{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24893echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24894case $ac_cv_c_bigendian in
24895 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024896
24897cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024898#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024899_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024900 ;;
24901 no)
24902 ;;
24903 *)
24904 { { echo "$as_me:$LINENO: error: unknown endianness
24905presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24906echo "$as_me: error: unknown endianness
24907presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024908 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024909esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024910
Michael W. Hudson54241132001-12-07 15:38:26 +000024911
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024912# Check whether right shifting a negative integer extends the sign bit
24913# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024914{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24915echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024916if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024917 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024918else
Martin v. Löwis11437992002-04-12 09:54:03 +000024919
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024920if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024921 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024922else
Martin v. Löwis11437992002-04-12 09:54:03 +000024923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024924/* confdefs.h. */
24925_ACEOF
24926cat confdefs.h >>conftest.$ac_ext
24927cat >>conftest.$ac_ext <<_ACEOF
24928/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024929
24930int main()
24931{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024932 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024933}
24934
Martin v. Löwis11437992002-04-12 09:54:03 +000024935_ACEOF
24936rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024937if { (ac_try="$ac_link"
24938case "(($ac_try" in
24939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24940 *) ac_try_echo=$ac_try;;
24941esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024943 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024944 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024947 { (case "(($ac_try" in
24948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24949 *) ac_try_echo=$ac_try;;
24950esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024952 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024953 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024955 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024956 ac_cv_rshift_extends_sign=yes
24957else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024958 echo "$as_me: program exited with status $ac_status" >&5
24959echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024960sed 's/^/| /' conftest.$ac_ext >&5
24961
Martin v. Löwis11437992002-04-12 09:54:03 +000024962( exit $ac_status )
24963ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024965rm -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 +000024966fi
24967
Martin v. Löwiseba40652007-08-30 20:10:57 +000024968
24969fi
24970
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024971{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24972echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024973if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024974then
Martin v. Löwis11437992002-04-12 09:54:03 +000024975
24976cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024977#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024978_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024979
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024980fi
24981
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024982# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024983{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24984echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024985if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024987else
Martin v. Löwis11437992002-04-12 09:54:03 +000024988
24989cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024990/* confdefs.h. */
24991_ACEOF
24992cat confdefs.h >>conftest.$ac_ext
24993cat >>conftest.$ac_ext <<_ACEOF
24994/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024995#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024996int
24997main ()
24998{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024999
25000 FILE *f = fopen("/dev/null", "r");
25001 flockfile(f);
25002 getc_unlocked(f);
25003 funlockfile(f);
25004
Martin v. Löwis11437992002-04-12 09:54:03 +000025005 ;
25006 return 0;
25007}
25008_ACEOF
25009rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025010if { (ac_try="$ac_link"
25011case "(($ac_try" in
25012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25013 *) ac_try_echo=$ac_try;;
25014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025016 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025018 grep -v '^ *+' conftest.er1 >conftest.err
25019 rm -f conftest.er1
25020 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025022 (exit $ac_status); } && {
25023 test -z "$ac_c_werror_flag" ||
25024 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025025 } && test -s conftest$ac_exeext &&
25026 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025027 ac_cv_have_getc_unlocked=yes
25028else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025030sed 's/^/| /' conftest.$ac_ext >&5
25031
Martin v. Löwiseba40652007-08-30 20:10:57 +000025032 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025034
25035rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025036 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025037fi
25038
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025039{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25040echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025041if test "$ac_cv_have_getc_unlocked" = yes
25042then
Martin v. Löwis11437992002-04-12 09:54:03 +000025043
25044cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025045#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025046_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025047
25048fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025049
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025050# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025051# save the value of LIBS so we don't actually link Python with readline
25052LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025053
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025054# On some systems we need to link readline to a termcap compatible
25055# library. NOTE: Keep the precedence of listed libraries synchronised
25056# with setup.py.
25057py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025058{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25059echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025060for py_libtermcap in "" ncursesw ncurses curses termcap; do
25061 if test -z "$py_libtermcap"; then
25062 READLINE_LIBS="-lreadline"
25063 else
25064 READLINE_LIBS="-lreadline -l$py_libtermcap"
25065 fi
25066 LIBS="$READLINE_LIBS $LIBS_no_readline"
25067 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025068/* confdefs.h. */
25069_ACEOF
25070cat confdefs.h >>conftest.$ac_ext
25071cat >>conftest.$ac_ext <<_ACEOF
25072/* end confdefs.h. */
25073
Martin v. Löwiseba40652007-08-30 20:10:57 +000025074/* Override any GCC internal prototype to avoid an error.
25075 Use char because int might match the return type of a GCC
25076 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025077#ifdef __cplusplus
25078extern "C"
25079#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025080char readline ();
25081int
25082main ()
25083{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025084return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025085 ;
25086 return 0;
25087}
25088_ACEOF
25089rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025090if { (ac_try="$ac_link"
25091case "(($ac_try" in
25092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25093 *) ac_try_echo=$ac_try;;
25094esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025096 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025097 ac_status=$?
25098 grep -v '^ *+' conftest.er1 >conftest.err
25099 rm -f conftest.er1
25100 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025102 (exit $ac_status); } && {
25103 test -z "$ac_c_werror_flag" ||
25104 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025105 } && test -s conftest$ac_exeext &&
25106 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025107 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025108else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025109 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025110sed 's/^/| /' conftest.$ac_ext >&5
25111
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025112
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025114
25115rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025116 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025117 if test $py_cv_lib_readline = yes; then
25118 break
25119 fi
25120done
25121# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25122#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025123if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025124 { echo "$as_me:$LINENO: result: none" >&5
25125echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025127 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25128echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025129
25130cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025131#define HAVE_LIBREADLINE 1
25132_ACEOF
25133
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025134fi
25135
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025136# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025137{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25138echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025139if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025140 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025141else
25142 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025143LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025144cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025145/* confdefs.h. */
25146_ACEOF
25147cat confdefs.h >>conftest.$ac_ext
25148cat >>conftest.$ac_ext <<_ACEOF
25149/* end confdefs.h. */
25150
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151/* Override any GCC internal prototype to avoid an error.
25152 Use char because int might match the return type of a GCC
25153 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025154#ifdef __cplusplus
25155extern "C"
25156#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025157char rl_callback_handler_install ();
25158int
25159main ()
25160{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025161return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025162 ;
25163 return 0;
25164}
25165_ACEOF
25166rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025167if { (ac_try="$ac_link"
25168case "(($ac_try" in
25169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25170 *) ac_try_echo=$ac_try;;
25171esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025173 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025175 grep -v '^ *+' conftest.er1 >conftest.err
25176 rm -f conftest.er1
25177 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179 (exit $ac_status); } && {
25180 test -z "$ac_c_werror_flag" ||
25181 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025182 } && test -s conftest$ac_exeext &&
25183 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025184 ac_cv_lib_readline_rl_callback_handler_install=yes
25185else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025186 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025187sed 's/^/| /' conftest.$ac_ext >&5
25188
Martin v. Löwiseba40652007-08-30 20:10:57 +000025189 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025191
25192rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025193 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025194LIBS=$ac_check_lib_save_LIBS
25195fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025196{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25197echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25198if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025199
25200cat >>confdefs.h <<\_ACEOF
25201#define HAVE_RL_CALLBACK 1
25202_ACEOF
25203
25204fi
25205
25206
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025207# check for readline 2.2
25208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025209/* confdefs.h. */
25210_ACEOF
25211cat confdefs.h >>conftest.$ac_ext
25212cat >>conftest.$ac_ext <<_ACEOF
25213/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025214#include <readline/readline.h>
25215_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025216if { (ac_try="$ac_cpp conftest.$ac_ext"
25217case "(($ac_try" in
25218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25219 *) ac_try_echo=$ac_try;;
25220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025222 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025223 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025224 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025225 rm -f conftest.er1
25226 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025228 (exit $ac_status); } >/dev/null && {
25229 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25230 test ! -s conftest.err
25231 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025232 have_readline=yes
25233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025235sed 's/^/| /' conftest.$ac_ext >&5
25236
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025237 have_readline=no
25238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025239
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025240rm -f conftest.err conftest.$ac_ext
25241if test $have_readline = yes
25242then
25243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025244/* confdefs.h. */
25245_ACEOF
25246cat confdefs.h >>conftest.$ac_ext
25247cat >>conftest.$ac_ext <<_ACEOF
25248/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025249#include <readline/readline.h>
25250
25251_ACEOF
25252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025253 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025254
25255cat >>confdefs.h <<\_ACEOF
25256#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25257_ACEOF
25258
25259fi
Ronald Oussoren25967582009-09-06 10:00:26 +000025260rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025261
25262fi
25263
Martin v. Löwis0daad592001-09-30 21:09:59 +000025264# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025265{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25266echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025267if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025268 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025269else
Martin v. Löwis11437992002-04-12 09:54:03 +000025270 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025271LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025273/* confdefs.h. */
25274_ACEOF
25275cat confdefs.h >>conftest.$ac_ext
25276cat >>conftest.$ac_ext <<_ACEOF
25277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025278
Martin v. Löwiseba40652007-08-30 20:10:57 +000025279/* Override any GCC internal prototype to avoid an error.
25280 Use char because int might match the return type of a GCC
25281 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025282#ifdef __cplusplus
25283extern "C"
25284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025285char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025286int
25287main ()
25288{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025289return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025290 ;
25291 return 0;
25292}
25293_ACEOF
25294rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025295if { (ac_try="$ac_link"
25296case "(($ac_try" in
25297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25298 *) ac_try_echo=$ac_try;;
25299esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025301 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025303 grep -v '^ *+' conftest.er1 >conftest.err
25304 rm -f conftest.er1
25305 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025307 (exit $ac_status); } && {
25308 test -z "$ac_c_werror_flag" ||
25309 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025310 } && test -s conftest$ac_exeext &&
25311 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025312 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025315sed 's/^/| /' conftest.$ac_ext >&5
25316
Martin v. Löwiseba40652007-08-30 20:10:57 +000025317 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025319
25320rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025321 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025322LIBS=$ac_check_lib_save_LIBS
25323fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025324{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25325echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25326if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025327
Martin v. Löwis11437992002-04-12 09:54:03 +000025328cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025329#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025330_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025331
Martin v. Löwis0daad592001-09-30 21:09:59 +000025332fi
25333
Michael W. Hudson54241132001-12-07 15:38:26 +000025334
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025335# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025336{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25337echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025338if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025339 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025340else
25341 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025342LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025343cat >conftest.$ac_ext <<_ACEOF
25344/* confdefs.h. */
25345_ACEOF
25346cat confdefs.h >>conftest.$ac_ext
25347cat >>conftest.$ac_ext <<_ACEOF
25348/* end confdefs.h. */
25349
25350/* Override any GCC internal prototype to avoid an error.
25351 Use char because int might match the return type of a GCC
25352 builtin and then its argument prototype would still apply. */
25353#ifdef __cplusplus
25354extern "C"
25355#endif
25356char rl_completion_display_matches_hook ();
25357int
25358main ()
25359{
25360return rl_completion_display_matches_hook ();
25361 ;
25362 return 0;
25363}
25364_ACEOF
25365rm -f conftest.$ac_objext conftest$ac_exeext
25366if { (ac_try="$ac_link"
25367case "(($ac_try" in
25368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25369 *) ac_try_echo=$ac_try;;
25370esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025372 (eval "$ac_link") 2>conftest.er1
25373 ac_status=$?
25374 grep -v '^ *+' conftest.er1 >conftest.err
25375 rm -f conftest.er1
25376 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025378 (exit $ac_status); } && {
25379 test -z "$ac_c_werror_flag" ||
25380 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025381 } && test -s conftest$ac_exeext &&
25382 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025383 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25384else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025385 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025386sed 's/^/| /' conftest.$ac_ext >&5
25387
25388 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25389fi
25390
25391rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25392 conftest$ac_exeext conftest.$ac_ext
25393LIBS=$ac_check_lib_save_LIBS
25394fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025395{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25396echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25397if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025398
25399cat >>confdefs.h <<\_ACEOF
25400#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25401_ACEOF
25402
25403fi
25404
25405
Martin v. Löwis0daad592001-09-30 21:09:59 +000025406# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025407{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25408echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025409if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025410 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025411else
Martin v. Löwis11437992002-04-12 09:54:03 +000025412 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025413LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025414cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025415/* confdefs.h. */
25416_ACEOF
25417cat confdefs.h >>conftest.$ac_ext
25418cat >>conftest.$ac_ext <<_ACEOF
25419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025420
Martin v. Löwiseba40652007-08-30 20:10:57 +000025421/* Override any GCC internal prototype to avoid an error.
25422 Use char because int might match the return type of a GCC
25423 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025424#ifdef __cplusplus
25425extern "C"
25426#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025427char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025428int
25429main ()
25430{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025431return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025432 ;
25433 return 0;
25434}
25435_ACEOF
25436rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025437if { (ac_try="$ac_link"
25438case "(($ac_try" in
25439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25440 *) ac_try_echo=$ac_try;;
25441esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025443 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025445 grep -v '^ *+' conftest.er1 >conftest.err
25446 rm -f conftest.er1
25447 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025449 (exit $ac_status); } && {
25450 test -z "$ac_c_werror_flag" ||
25451 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025452 } && test -s conftest$ac_exeext &&
25453 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025454 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025455else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025457sed 's/^/| /' conftest.$ac_ext >&5
25458
Martin v. Löwiseba40652007-08-30 20:10:57 +000025459 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025461
25462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025464LIBS=$ac_check_lib_save_LIBS
25465fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025466{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25467echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25468if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025469
Martin v. Löwis11437992002-04-12 09:54:03 +000025470cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025471#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025472_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025473
Guido van Rossum353ae582001-07-10 16:45:32 +000025474fi
25475
Jack Jansendd19cf82001-12-06 22:36:17 +000025476
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025477# also in readline 4.2
25478cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025479/* confdefs.h. */
25480_ACEOF
25481cat confdefs.h >>conftest.$ac_ext
25482cat >>conftest.$ac_ext <<_ACEOF
25483/* end confdefs.h. */
25484#include <readline/readline.h>
25485_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025486if { (ac_try="$ac_cpp conftest.$ac_ext"
25487case "(($ac_try" in
25488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25489 *) ac_try_echo=$ac_try;;
25490esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025492 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025493 ac_status=$?
25494 grep -v '^ *+' conftest.er1 >conftest.err
25495 rm -f conftest.er1
25496 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025498 (exit $ac_status); } >/dev/null && {
25499 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25500 test ! -s conftest.err
25501 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025502 have_readline=yes
25503else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025504 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025505sed 's/^/| /' conftest.$ac_ext >&5
25506
25507 have_readline=no
25508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025509
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025510rm -f conftest.err conftest.$ac_ext
25511if test $have_readline = yes
25512then
25513 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025514/* confdefs.h. */
25515_ACEOF
25516cat confdefs.h >>conftest.$ac_ext
25517cat >>conftest.$ac_ext <<_ACEOF
25518/* end confdefs.h. */
25519#include <readline/readline.h>
25520
25521_ACEOF
25522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25523 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25524
25525cat >>confdefs.h <<\_ACEOF
25526#define HAVE_RL_CATCH_SIGNAL 1
25527_ACEOF
25528
25529fi
Ronald Oussoren25967582009-09-06 10:00:26 +000025530rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025531
25532fi
25533
Martin v. Löwis82bca632006-02-10 20:49:30 +000025534# End of readline checks: restore LIBS
25535LIBS=$LIBS_no_readline
25536
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025537{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25538echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025539if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025540 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025541else
Martin v. Löwis11437992002-04-12 09:54:03 +000025542
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025543if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025544 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025545else
Martin v. Löwis11437992002-04-12 09:54:03 +000025546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025547/* confdefs.h. */
25548_ACEOF
25549cat confdefs.h >>conftest.$ac_ext
25550cat >>conftest.$ac_ext <<_ACEOF
25551/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025552
25553int main()
25554{
25555 int val1 = nice(1);
25556 if (val1 != -1 && val1 == nice(2))
25557 exit(0);
25558 exit(1);
25559}
25560
Martin v. Löwis11437992002-04-12 09:54:03 +000025561_ACEOF
25562rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025563if { (ac_try="$ac_link"
25564case "(($ac_try" in
25565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25566 *) ac_try_echo=$ac_try;;
25567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025569 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025570 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025573 { (case "(($ac_try" in
25574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25575 *) ac_try_echo=$ac_try;;
25576esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025578 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025579 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025581 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025582 ac_cv_broken_nice=yes
25583else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025584 echo "$as_me: program exited with status $ac_status" >&5
25585echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025586sed 's/^/| /' conftest.$ac_ext >&5
25587
Martin v. Löwis11437992002-04-12 09:54:03 +000025588( exit $ac_status )
25589ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025591rm -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 +000025592fi
25593
Martin v. Löwiseba40652007-08-30 20:10:57 +000025594
25595fi
25596
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025597{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25598echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025599if test "$ac_cv_broken_nice" = yes
25600then
Martin v. Löwis11437992002-04-12 09:54:03 +000025601
25602cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025603#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025604_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025605
25606fi
25607
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025608{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25609echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025610if test "${ac_cv_broken_poll+set}" = set; then
25611 echo $ECHO_N "(cached) $ECHO_C" >&6
25612else
25613 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025614 ac_cv_broken_poll=no
25615else
25616 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025617/* confdefs.h. */
25618_ACEOF
25619cat confdefs.h >>conftest.$ac_ext
25620cat >>conftest.$ac_ext <<_ACEOF
25621/* end confdefs.h. */
25622
25623#include <poll.h>
25624
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025625int main()
25626{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025627 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025628 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025629
25630 close (42);
25631
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025632 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025633 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025634 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025635 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025636 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025637 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025638 return 1;
25639}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025640
25641_ACEOF
25642rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025643if { (ac_try="$ac_link"
25644case "(($ac_try" in
25645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25646 *) ac_try_echo=$ac_try;;
25647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025649 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025650 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025653 { (case "(($ac_try" in
25654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25655 *) ac_try_echo=$ac_try;;
25656esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025658 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025659 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025661 (exit $ac_status); }; }; then
25662 ac_cv_broken_poll=yes
25663else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025664 echo "$as_me: program exited with status $ac_status" >&5
25665echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025666sed 's/^/| /' conftest.$ac_ext >&5
25667
25668( exit $ac_status )
25669ac_cv_broken_poll=no
25670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025671rm -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 +000025672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025673
25674
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025675fi
25676
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025677{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25678echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025679if test "$ac_cv_broken_poll" = yes
25680then
25681
25682cat >>confdefs.h <<\_ACEOF
25683#define HAVE_BROKEN_POLL 1
25684_ACEOF
25685
25686fi
25687
Brett Cannon43802422005-02-10 20:48:03 +000025688# 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 +000025689# (which is not required by ISO C or UNIX spec) and/or if we support
25690# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025691{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25692echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025693if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025694 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025695else
25696 cat >conftest.$ac_ext <<_ACEOF
25697/* confdefs.h. */
25698_ACEOF
25699cat confdefs.h >>conftest.$ac_ext
25700cat >>conftest.$ac_ext <<_ACEOF
25701/* end confdefs.h. */
25702#include <sys/types.h>
25703#include <$ac_cv_struct_tm>
25704
25705
25706int
25707main ()
25708{
25709static struct tm ac_aggr;
25710if (ac_aggr.tm_zone)
25711return 0;
25712 ;
25713 return 0;
25714}
25715_ACEOF
25716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025717if { (ac_try="$ac_compile"
25718case "(($ac_try" in
25719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25720 *) ac_try_echo=$ac_try;;
25721esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025723 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025724 ac_status=$?
25725 grep -v '^ *+' conftest.er1 >conftest.err
25726 rm -f conftest.er1
25727 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025729 (exit $ac_status); } && {
25730 test -z "$ac_c_werror_flag" ||
25731 test ! -s conftest.err
25732 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025733 ac_cv_member_struct_tm_tm_zone=yes
25734else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025735 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025736sed 's/^/| /' conftest.$ac_ext >&5
25737
Martin v. Löwiseba40652007-08-30 20:10:57 +000025738 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025739/* confdefs.h. */
25740_ACEOF
25741cat confdefs.h >>conftest.$ac_ext
25742cat >>conftest.$ac_ext <<_ACEOF
25743/* end confdefs.h. */
25744#include <sys/types.h>
25745#include <$ac_cv_struct_tm>
25746
25747
25748int
25749main ()
25750{
25751static struct tm ac_aggr;
25752if (sizeof ac_aggr.tm_zone)
25753return 0;
25754 ;
25755 return 0;
25756}
25757_ACEOF
25758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025759if { (ac_try="$ac_compile"
25760case "(($ac_try" in
25761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25762 *) ac_try_echo=$ac_try;;
25763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025765 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025766 ac_status=$?
25767 grep -v '^ *+' conftest.er1 >conftest.err
25768 rm -f conftest.er1
25769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025771 (exit $ac_status); } && {
25772 test -z "$ac_c_werror_flag" ||
25773 test ! -s conftest.err
25774 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025775 ac_cv_member_struct_tm_tm_zone=yes
25776else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025777 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025778sed 's/^/| /' conftest.$ac_ext >&5
25779
Martin v. Löwiseba40652007-08-30 20:10:57 +000025780 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025782
25783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025785
25786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025788{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25789echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25790if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025791
25792cat >>confdefs.h <<_ACEOF
25793#define HAVE_STRUCT_TM_TM_ZONE 1
25794_ACEOF
25795
25796
25797fi
25798
25799if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25800
25801cat >>confdefs.h <<\_ACEOF
25802#define HAVE_TM_ZONE 1
25803_ACEOF
25804
25805else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025806 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25807echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025808if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025809 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025810else
25811 cat >conftest.$ac_ext <<_ACEOF
25812/* confdefs.h. */
25813_ACEOF
25814cat confdefs.h >>conftest.$ac_ext
25815cat >>conftest.$ac_ext <<_ACEOF
25816/* end confdefs.h. */
25817#include <time.h>
25818
25819int
25820main ()
25821{
25822#ifndef tzname
25823 (void) tzname;
25824#endif
25825
25826 ;
25827 return 0;
25828}
25829_ACEOF
25830rm -f conftest.$ac_objext
25831if { (ac_try="$ac_compile"
25832case "(($ac_try" in
25833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25834 *) ac_try_echo=$ac_try;;
25835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025837 (eval "$ac_compile") 2>conftest.er1
25838 ac_status=$?
25839 grep -v '^ *+' conftest.er1 >conftest.err
25840 rm -f conftest.er1
25841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025843 (exit $ac_status); } && {
25844 test -z "$ac_c_werror_flag" ||
25845 test ! -s conftest.err
25846 } && test -s conftest.$ac_objext; then
25847 ac_cv_have_decl_tzname=yes
25848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025849 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025850sed 's/^/| /' conftest.$ac_ext >&5
25851
25852 ac_cv_have_decl_tzname=no
25853fi
25854
25855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25856fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025857{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25858echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25859if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025860
25861cat >>confdefs.h <<_ACEOF
25862#define HAVE_DECL_TZNAME 1
25863_ACEOF
25864
25865
25866else
25867 cat >>confdefs.h <<_ACEOF
25868#define HAVE_DECL_TZNAME 0
25869_ACEOF
25870
25871
25872fi
25873
25874
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025875 { echo "$as_me:$LINENO: checking for tzname" >&5
25876echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025877if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025878 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025879else
25880 cat >conftest.$ac_ext <<_ACEOF
25881/* confdefs.h. */
25882_ACEOF
25883cat confdefs.h >>conftest.$ac_ext
25884cat >>conftest.$ac_ext <<_ACEOF
25885/* end confdefs.h. */
25886#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000025887#if !HAVE_DECL_TZNAME
25888extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025889#endif
25890
25891int
25892main ()
25893{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025894return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025895 ;
25896 return 0;
25897}
25898_ACEOF
25899rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025900if { (ac_try="$ac_link"
25901case "(($ac_try" in
25902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25903 *) ac_try_echo=$ac_try;;
25904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025906 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025907 ac_status=$?
25908 grep -v '^ *+' conftest.er1 >conftest.err
25909 rm -f conftest.er1
25910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025912 (exit $ac_status); } && {
25913 test -z "$ac_c_werror_flag" ||
25914 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025915 } && test -s conftest$ac_exeext &&
25916 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025917 ac_cv_var_tzname=yes
25918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025919 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025920sed 's/^/| /' conftest.$ac_ext >&5
25921
Martin v. Löwiseba40652007-08-30 20:10:57 +000025922 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025924
25925rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025926 conftest$ac_exeext conftest.$ac_ext
25927fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025928{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25929echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025930 if test $ac_cv_var_tzname = yes; then
25931
25932cat >>confdefs.h <<\_ACEOF
25933#define HAVE_TZNAME 1
25934_ACEOF
25935
25936 fi
25937fi
25938
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025939
Martin v. Löwis1d459062005-03-14 21:23:33 +000025940# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025941{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25942echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025943if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025945else
25946
25947if test "$cross_compiling" = yes; then
25948 ac_cv_working_tzset=no
25949else
25950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025951/* confdefs.h. */
25952_ACEOF
25953cat confdefs.h >>conftest.$ac_ext
25954cat >>conftest.$ac_ext <<_ACEOF
25955/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025956
25957#include <stdlib.h>
25958#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025959#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025960
25961#if HAVE_TZNAME
25962extern char *tzname[];
25963#endif
25964
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025965int main()
25966{
Brett Cannon18367812003-09-19 00:59:16 +000025967 /* Note that we need to ensure that not only does tzset(3)
25968 do 'something' with localtime, but it works as documented
25969 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025970 This includes making sure that tzname is set properly if
25971 tm->tm_zone does not exist since it is the alternative way
25972 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025973
25974 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025975 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025976 */
25977
Martin v. Löwis1d459062005-03-14 21:23:33 +000025978 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025979 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25980
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025981 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025982 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025983 if (localtime(&groundhogday)->tm_hour != 0)
25984 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025985#if HAVE_TZNAME
25986 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25987 if (strcmp(tzname[0], "UTC") ||
25988 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25989 exit(1);
25990#endif
Brett Cannon18367812003-09-19 00:59:16 +000025991
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025992 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025993 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025994 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025995 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025996#if HAVE_TZNAME
25997 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25998 exit(1);
25999#endif
Brett Cannon18367812003-09-19 00:59:16 +000026000
26001 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26002 tzset();
26003 if (localtime(&groundhogday)->tm_hour != 11)
26004 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026005#if HAVE_TZNAME
26006 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26007 exit(1);
26008#endif
26009
26010#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026011 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26012 exit(1);
26013 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26014 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026015#endif
Brett Cannon18367812003-09-19 00:59:16 +000026016
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026017 exit(0);
26018}
26019
26020_ACEOF
26021rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026022if { (ac_try="$ac_link"
26023case "(($ac_try" in
26024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26025 *) ac_try_echo=$ac_try;;
26026esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026028 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026029 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026032 { (case "(($ac_try" in
26033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26034 *) ac_try_echo=$ac_try;;
26035esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026037 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026038 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026040 (exit $ac_status); }; }; then
26041 ac_cv_working_tzset=yes
26042else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026043 echo "$as_me: program exited with status $ac_status" >&5
26044echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026045sed 's/^/| /' conftest.$ac_ext >&5
26046
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026047( exit $ac_status )
26048ac_cv_working_tzset=no
26049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026050rm -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 +000026051fi
26052
Martin v. Löwiseba40652007-08-30 20:10:57 +000026053
26054fi
26055
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026056{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26057echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026058if test "$ac_cv_working_tzset" = yes
26059then
26060
26061cat >>confdefs.h <<\_ACEOF
26062#define HAVE_WORKING_TZSET 1
26063_ACEOF
26064
26065fi
26066
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026067# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026068{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26069echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026070if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026071 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026072else
26073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026074/* confdefs.h. */
26075_ACEOF
26076cat confdefs.h >>conftest.$ac_ext
26077cat >>conftest.$ac_ext <<_ACEOF
26078/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026079#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026080int
26081main ()
26082{
26083
26084struct stat st;
26085st.st_mtim.tv_nsec = 1;
26086
26087 ;
26088 return 0;
26089}
26090_ACEOF
26091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026092if { (ac_try="$ac_compile"
26093case "(($ac_try" in
26094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26095 *) ac_try_echo=$ac_try;;
26096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026100 grep -v '^ *+' conftest.er1 >conftest.err
26101 rm -f conftest.er1
26102 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026104 (exit $ac_status); } && {
26105 test -z "$ac_c_werror_flag" ||
26106 test ! -s conftest.err
26107 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026108 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026109else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026111sed 's/^/| /' conftest.$ac_ext >&5
26112
Martin v. Löwiseba40652007-08-30 20:10:57 +000026113 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026114fi
26115
Martin v. Löwiseba40652007-08-30 20:10:57 +000026116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26117fi
26118
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026119{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26120echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026121if test "$ac_cv_stat_tv_nsec" = yes
26122then
26123
26124cat >>confdefs.h <<\_ACEOF
26125#define HAVE_STAT_TV_NSEC 1
26126_ACEOF
26127
26128fi
26129
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026130# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026131{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26132echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026133if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026134 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026135else
26136 cat >conftest.$ac_ext <<_ACEOF
26137/* confdefs.h. */
26138_ACEOF
26139cat confdefs.h >>conftest.$ac_ext
26140cat >>conftest.$ac_ext <<_ACEOF
26141/* end confdefs.h. */
26142#include <sys/stat.h>
26143int
26144main ()
26145{
26146
26147struct stat st;
26148st.st_mtimespec.tv_nsec = 1;
26149
26150 ;
26151 return 0;
26152}
26153_ACEOF
26154rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026155if { (ac_try="$ac_compile"
26156case "(($ac_try" in
26157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26158 *) ac_try_echo=$ac_try;;
26159esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026162 ac_status=$?
26163 grep -v '^ *+' conftest.er1 >conftest.err
26164 rm -f conftest.er1
26165 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026167 (exit $ac_status); } && {
26168 test -z "$ac_c_werror_flag" ||
26169 test ! -s conftest.err
26170 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026171 ac_cv_stat_tv_nsec2=yes
26172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026173 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026174sed 's/^/| /' conftest.$ac_ext >&5
26175
Martin v. Löwiseba40652007-08-30 20:10:57 +000026176 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026177fi
26178
Martin v. Löwiseba40652007-08-30 20:10:57 +000026179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26180fi
26181
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026182{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26183echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026184if test "$ac_cv_stat_tv_nsec2" = yes
26185then
26186
26187cat >>confdefs.h <<\_ACEOF
26188#define HAVE_STAT_TV_NSEC2 1
26189_ACEOF
26190
26191fi
26192
Jack Jansen666b1e72001-10-31 12:11:48 +000026193# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026194{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26195echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026196if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026197 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026198else
Martin v. Löwis11437992002-04-12 09:54:03 +000026199 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026200/* confdefs.h. */
26201_ACEOF
26202cat confdefs.h >>conftest.$ac_ext
26203cat >>conftest.$ac_ext <<_ACEOF
26204/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026205#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026206int
26207main ()
26208{
Jack Jansen666b1e72001-10-31 12:11:48 +000026209
26210 int rtn;
26211 rtn = mvwdelch(0,0,0);
26212
Martin v. Löwis11437992002-04-12 09:54:03 +000026213 ;
26214 return 0;
26215}
26216_ACEOF
26217rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026218if { (ac_try="$ac_compile"
26219case "(($ac_try" in
26220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26221 *) ac_try_echo=$ac_try;;
26222esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026226 grep -v '^ *+' conftest.er1 >conftest.err
26227 rm -f conftest.er1
26228 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026230 (exit $ac_status); } && {
26231 test -z "$ac_c_werror_flag" ||
26232 test ! -s conftest.err
26233 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026234 ac_cv_mvwdelch_is_expression=yes
26235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026237sed 's/^/| /' conftest.$ac_ext >&5
26238
Martin v. Löwiseba40652007-08-30 20:10:57 +000026239 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026240fi
26241
Martin v. Löwiseba40652007-08-30 20:10:57 +000026242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26243fi
26244
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026245{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26246echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026247
26248if test "$ac_cv_mvwdelch_is_expression" = yes
26249then
Martin v. Löwis11437992002-04-12 09:54:03 +000026250
26251cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026252#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026253_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026254
26255fi
26256
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026257{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26258echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026259if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026260 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026261else
Martin v. Löwis11437992002-04-12 09:54:03 +000026262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026263/* confdefs.h. */
26264_ACEOF
26265cat confdefs.h >>conftest.$ac_ext
26266cat >>conftest.$ac_ext <<_ACEOF
26267/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026268#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026269int
26270main ()
26271{
Jack Jansen666b1e72001-10-31 12:11:48 +000026272
26273 WINDOW *w;
26274 w->_flags = 0;
26275
Martin v. Löwis11437992002-04-12 09:54:03 +000026276 ;
26277 return 0;
26278}
26279_ACEOF
26280rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026281if { (ac_try="$ac_compile"
26282case "(($ac_try" in
26283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26284 *) ac_try_echo=$ac_try;;
26285esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026289 grep -v '^ *+' conftest.er1 >conftest.err
26290 rm -f conftest.er1
26291 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026293 (exit $ac_status); } && {
26294 test -z "$ac_c_werror_flag" ||
26295 test ! -s conftest.err
26296 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026297 ac_cv_window_has_flags=yes
26298else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026300sed 's/^/| /' conftest.$ac_ext >&5
26301
Martin v. Löwiseba40652007-08-30 20:10:57 +000026302 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026303fi
26304
Martin v. Löwiseba40652007-08-30 20:10:57 +000026305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26306fi
26307
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026308{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26309echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026310
Jack Jansen666b1e72001-10-31 12:11:48 +000026311
26312if test "$ac_cv_window_has_flags" = yes
26313then
Martin v. Löwis11437992002-04-12 09:54:03 +000026314
26315cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026316#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026317_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026318
26319fi
26320
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026321{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26322echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026323cat >conftest.$ac_ext <<_ACEOF
26324/* confdefs.h. */
26325_ACEOF
26326cat confdefs.h >>conftest.$ac_ext
26327cat >>conftest.$ac_ext <<_ACEOF
26328/* end confdefs.h. */
26329#include <curses.h>
26330int
26331main ()
26332{
26333void *x=is_term_resized
26334 ;
26335 return 0;
26336}
26337_ACEOF
26338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026339if { (ac_try="$ac_compile"
26340case "(($ac_try" in
26341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26342 *) ac_try_echo=$ac_try;;
26343esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026345 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026346 ac_status=$?
26347 grep -v '^ *+' conftest.er1 >conftest.err
26348 rm -f conftest.er1
26349 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026351 (exit $ac_status); } && {
26352 test -z "$ac_c_werror_flag" ||
26353 test ! -s conftest.err
26354 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026355
26356cat >>confdefs.h <<\_ACEOF
26357#define HAVE_CURSES_IS_TERM_RESIZED 1
26358_ACEOF
26359
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026360 { echo "$as_me:$LINENO: result: yes" >&5
26361echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026363 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026364sed 's/^/| /' conftest.$ac_ext >&5
26365
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026366 { echo "$as_me:$LINENO: result: no" >&5
26367echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026368
26369fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026370
Martin v. Löwiseba40652007-08-30 20:10:57 +000026371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26372
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026373{ echo "$as_me:$LINENO: checking for resize_term" >&5
26374echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026375cat >conftest.$ac_ext <<_ACEOF
26376/* confdefs.h. */
26377_ACEOF
26378cat confdefs.h >>conftest.$ac_ext
26379cat >>conftest.$ac_ext <<_ACEOF
26380/* end confdefs.h. */
26381#include <curses.h>
26382int
26383main ()
26384{
26385void *x=resize_term
26386 ;
26387 return 0;
26388}
26389_ACEOF
26390rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026391if { (ac_try="$ac_compile"
26392case "(($ac_try" in
26393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26394 *) ac_try_echo=$ac_try;;
26395esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026397 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026398 ac_status=$?
26399 grep -v '^ *+' conftest.er1 >conftest.err
26400 rm -f conftest.er1
26401 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026403 (exit $ac_status); } && {
26404 test -z "$ac_c_werror_flag" ||
26405 test ! -s conftest.err
26406 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026407
26408cat >>confdefs.h <<\_ACEOF
26409#define HAVE_CURSES_RESIZE_TERM 1
26410_ACEOF
26411
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026412 { echo "$as_me:$LINENO: result: yes" >&5
26413echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026415 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026416sed 's/^/| /' conftest.$ac_ext >&5
26417
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026418 { echo "$as_me:$LINENO: result: no" >&5
26419echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026420
26421fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026422
Martin v. Löwiseba40652007-08-30 20:10:57 +000026423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26424
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026425{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26426echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026427cat >conftest.$ac_ext <<_ACEOF
26428/* confdefs.h. */
26429_ACEOF
26430cat confdefs.h >>conftest.$ac_ext
26431cat >>conftest.$ac_ext <<_ACEOF
26432/* end confdefs.h. */
26433#include <curses.h>
26434int
26435main ()
26436{
26437void *x=resizeterm
26438 ;
26439 return 0;
26440}
26441_ACEOF
26442rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026443if { (ac_try="$ac_compile"
26444case "(($ac_try" in
26445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26446 *) ac_try_echo=$ac_try;;
26447esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026449 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026450 ac_status=$?
26451 grep -v '^ *+' conftest.er1 >conftest.err
26452 rm -f conftest.er1
26453 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026455 (exit $ac_status); } && {
26456 test -z "$ac_c_werror_flag" ||
26457 test ! -s conftest.err
26458 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026459
26460cat >>confdefs.h <<\_ACEOF
26461#define HAVE_CURSES_RESIZETERM 1
26462_ACEOF
26463
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026464 { echo "$as_me:$LINENO: result: yes" >&5
26465echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026466else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026467 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026468sed 's/^/| /' conftest.$ac_ext >&5
26469
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026470 { echo "$as_me:$LINENO: result: no" >&5
26471echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026472
26473fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026474
Martin v. Löwiseba40652007-08-30 20:10:57 +000026475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026477{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26478echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026479
26480if test -r /dev/ptmx
26481then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026482 { echo "$as_me:$LINENO: result: yes" >&5
26483echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026484
26485cat >>confdefs.h <<\_ACEOF
26486#define HAVE_DEV_PTMX 1
26487_ACEOF
26488
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026489else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026490 { echo "$as_me:$LINENO: result: no" >&5
26491echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026492fi
26493
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026494{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26495echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026496
26497if test -r /dev/ptc
26498then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026499 { echo "$as_me:$LINENO: result: yes" >&5
26500echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026501
26502cat >>confdefs.h <<\_ACEOF
26503#define HAVE_DEV_PTC 1
26504_ACEOF
26505
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026507 { echo "$as_me:$LINENO: result: no" >&5
26508echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026509fi
26510
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026511{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26512echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026513if test "${ac_cv_have_size_t_format+set}" = set; then
26514 echo $ECHO_N "(cached) $ECHO_C" >&6
26515else
26516 if test "$cross_compiling" = yes; then
26517 ac_cv_have_size_t_format=no
Brett Cannon09d12362006-05-11 05:11:33 +000026518else
26519 cat >conftest.$ac_ext <<_ACEOF
26520/* confdefs.h. */
26521_ACEOF
26522cat confdefs.h >>conftest.$ac_ext
26523cat >>conftest.$ac_ext <<_ACEOF
26524/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026525
Brett Cannon09d12362006-05-11 05:11:33 +000026526#include <stdio.h>
26527#include <stddef.h>
26528#include <string.h>
26529
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026530#ifdef HAVE_SYS_TYPES_H
26531#include <sys/types.h>
26532#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026533
26534#ifdef HAVE_SSIZE_T
26535typedef ssize_t Py_ssize_t;
26536#elif SIZEOF_VOID_P == SIZEOF_LONG
26537typedef long Py_ssize_t;
26538#else
26539typedef int Py_ssize_t;
26540#endif
Brett Cannon09d12362006-05-11 05:11:33 +000026541
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026542int main()
26543{
26544 char buffer[256];
26545
Brett Cannon09d12362006-05-11 05:11:33 +000026546 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26547 return 1;
26548
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026549 if (strcmp(buffer, "123"))
26550 return 1;
26551
26552 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26553 return 1;
26554
26555 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000026556 return 1;
26557
26558 return 0;
26559}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026560
Brett Cannon09d12362006-05-11 05:11:33 +000026561_ACEOF
26562rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026563if { (ac_try="$ac_link"
26564case "(($ac_try" in
26565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26566 *) ac_try_echo=$ac_try;;
26567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026569 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026570 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026573 { (case "(($ac_try" in
26574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26575 *) ac_try_echo=$ac_try;;
26576esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026578 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026579 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026581 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026582 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026583else
26584 echo "$as_me: program exited with status $ac_status" >&5
26585echo "$as_me: failed program was:" >&5
26586sed 's/^/| /' conftest.$ac_ext >&5
26587
26588( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026589ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026590fi
26591rm -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 +000026592fi
26593
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026594
26595
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026596fi
26597
26598{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26599echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
26600if test $ac_cv_have_size_t_format = yes
26601then
26602
26603cat >>confdefs.h <<\_ACEOF
26604#define PY_FORMAT_SIZE_T "z"
26605_ACEOF
26606
26607fi
26608
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026609{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26610echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026611if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026613else
Martin v. Löwis11437992002-04-12 09:54:03 +000026614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026615/* confdefs.h. */
26616_ACEOF
26617cat confdefs.h >>conftest.$ac_ext
26618cat >>conftest.$ac_ext <<_ACEOF
26619/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026620
26621#ifdef HAVE_SYS_TYPES_H
26622#include <sys/types.h>
26623#endif
26624#ifdef HAVE_SYS_SOCKET_H
26625#include <sys/socket.h>
26626#endif
26627
26628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026629typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026630int
26631main ()
26632{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026633if ((ac__type_new_ *) 0)
26634 return 0;
26635if (sizeof (ac__type_new_))
26636 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026637 ;
26638 return 0;
26639}
26640_ACEOF
26641rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026642if { (ac_try="$ac_compile"
26643case "(($ac_try" in
26644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26645 *) ac_try_echo=$ac_try;;
26646esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026650 grep -v '^ *+' conftest.er1 >conftest.err
26651 rm -f conftest.er1
26652 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026654 (exit $ac_status); } && {
26655 test -z "$ac_c_werror_flag" ||
26656 test ! -s conftest.err
26657 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026658 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026659else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026661sed 's/^/| /' conftest.$ac_ext >&5
26662
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026663 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026665
26666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026667fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026668{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26669echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26670if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026671 :
26672else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026673
Martin v. Löwis01c04012002-11-11 14:58:44 +000026674cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026675#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026676_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026677
26678fi
26679
Michael W. Hudson54241132001-12-07 15:38:26 +000026680
Michael W. Hudson54241132001-12-07 15:38:26 +000026681
26682
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026683for h in `(cd $srcdir;echo Python/thread_*.h)`
26684do
26685 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26686done
26687
Michael W. Hudson54241132001-12-07 15:38:26 +000026688
Neal Norwitzd24499d2005-12-18 21:36:39 +000026689SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026690{ echo "$as_me:$LINENO: checking for build directories" >&5
26691echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026692for dir in $SRCDIRS; do
26693 if test ! -d $dir; then
26694 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026695 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026696done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026697{ echo "$as_me:$LINENO: result: done" >&5
26698echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026699
Guido van Rossum627b2d71993-12-24 10:39:16 +000026700# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000026701ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026702
Martin v. Löwis11437992002-04-12 09:54:03 +000026703cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026704# This file is a shell script that caches the results of configure
26705# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026706# scripts and configure runs, see configure's option --config-cache.
26707# It is not useful on other systems. If it contains results you don't
26708# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026709#
Martin v. Löwis11437992002-04-12 09:54:03 +000026710# config.status only pays attention to the cache file if you give it
26711# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026712#
Skip Montanaro6dead952003-09-25 14:50:04 +000026713# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026714# loading this file, other *unset* `ac_cv_foo' will be assigned the
26715# following values.
26716
26717_ACEOF
26718
Guido van Rossumf78abae1997-01-21 22:02:36 +000026719# The following way of writing the cache mishandles newlines in values,
26720# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026721# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026722# Ultrix sh set writes to stderr and can't be redirected directly,
26723# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026724(
26725 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26726 eval ac_val=\$$ac_var
26727 case $ac_val in #(
26728 *${as_nl}*)
26729 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026730 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26731echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026732 esac
26733 case $ac_var in #(
26734 _ | IFS | as_nl) ;; #(
26735 *) $as_unset $ac_var ;;
26736 esac ;;
26737 esac
26738 done
26739
Martin v. Löwis11437992002-04-12 09:54:03 +000026740 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026741 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26742 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026743 # `set' does not quote correctly, so add quotes (double-quote
26744 # substitution turns \\\\ into \\, and sed turns \\ into \).
26745 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026746 "s/'/'\\\\''/g;
26747 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000026748 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026749 *)
26750 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026751 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026752 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026753 esac |
26754 sort
26755) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026756 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026757 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026758 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000026759 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026760 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26761 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000026762 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26763 :end' >>confcache
26764if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26765 if test -w "$cache_file"; then
26766 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026767 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26768echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026769 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026770 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026771 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26772echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026773 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026774fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026775rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026777test "x$prefix" = xNONE && prefix=$ac_default_prefix
26778# Let make expand exec_prefix.
26779test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026780
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026781DEFS=-DHAVE_CONFIG_H
26782
Skip Montanaro6dead952003-09-25 14:50:04 +000026783ac_libobjs=
26784ac_ltlibobjs=
26785for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26786 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026787 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026788 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026789 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26790 # will be set to the directory where LIBOBJS objects are built.
26791 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26792 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026793done
26794LIBOBJS=$ac_libobjs
26795
26796LTLIBOBJS=$ac_ltlibobjs
26797
26798
Martin v. Löwis11437992002-04-12 09:54:03 +000026799
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026800: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026801ac_clean_files_save=$ac_clean_files
26802ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026803{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26804echo "$as_me: creating $CONFIG_STATUS" >&6;}
26805cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026806#! $SHELL
26807# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026808# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026809# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026810# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026811
Martin v. Löwis11437992002-04-12 09:54:03 +000026812debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026813ac_cs_recheck=false
26814ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026815SHELL=\${CONFIG_SHELL-$SHELL}
26816_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026817
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026818cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026819## --------------------- ##
26820## M4sh Initialization. ##
26821## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026822
Martin v. Löwiseba40652007-08-30 20:10:57 +000026823# Be more Bourne compatible
26824DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026825if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26826 emulate sh
26827 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026828 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026829 # is contrary to our usage. Disable this feature.
26830 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026831 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000026832else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026833 case `(set -o) 2>/dev/null` in
26834 *posix*) set -o posix ;;
26835esac
26836
Martin v. Löwis11437992002-04-12 09:54:03 +000026837fi
Michael W. Hudson54241132001-12-07 15:38:26 +000026838
Skip Montanaro6dead952003-09-25 14:50:04 +000026839
Martin v. Löwis11437992002-04-12 09:54:03 +000026840
26841
Martin v. Löwiseba40652007-08-30 20:10:57 +000026842# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026843# Avoid depending upon Character Ranges.
26844as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26845as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26846as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26847as_cr_digits='0123456789'
26848as_cr_alnum=$as_cr_Letters$as_cr_digits
26849
26850# The user is always right.
26851if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026852 echo "#! /bin/sh" >conf$$.sh
26853 echo "exit 0" >>conf$$.sh
26854 chmod +x conf$$.sh
26855 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26856 PATH_SEPARATOR=';'
26857 else
26858 PATH_SEPARATOR=:
26859 fi
26860 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026861fi
26862
Martin v. Löwiseba40652007-08-30 20:10:57 +000026863# Support unset when possible.
26864if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26865 as_unset=unset
26866else
26867 as_unset=false
26868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026869
Martin v. Löwiseba40652007-08-30 20:10:57 +000026870
26871# IFS
26872# We need space, tab and new line, in precisely that order. Quoting is
26873# there to prevent editors from complaining about space-tab.
26874# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26875# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026876as_nl='
26877'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026878IFS=" "" $as_nl"
26879
26880# Find who we are. Look in the path if we contain no directory separator.
26881case $0 in
26882 *[\\/]* ) as_myself=$0 ;;
26883 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026884for as_dir in $PATH
26885do
26886 IFS=$as_save_IFS
26887 test -z "$as_dir" && as_dir=.
26888 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26889done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026890IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026891
Martin v. Löwiseba40652007-08-30 20:10:57 +000026892 ;;
26893esac
26894# We did not find ourselves, most probably we were run as `sh COMMAND'
26895# in which case we are not to be found in the path.
26896if test "x$as_myself" = x; then
26897 as_myself=$0
26898fi
26899if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026900 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000026901 { (exit 1); exit 1; }
26902fi
26903
26904# Work around bugs in pre-3.0 UWIN ksh.
26905for as_var in ENV MAIL MAILPATH
26906do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26907done
26908PS1='$ '
26909PS2='> '
26910PS4='+ '
26911
26912# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026913for as_var in \
26914 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26915 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26916 LC_TELEPHONE LC_TIME
26917do
26918 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26919 eval $as_var=C; export $as_var
26920 else
26921 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26922 fi
26923done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026924
26925# Required to use basename.
26926if expr a : '\(a\)' >/dev/null 2>&1 &&
26927 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26928 as_expr=expr
26929else
26930 as_expr=false
26931fi
26932
26933if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26934 as_basename=basename
26935else
26936 as_basename=false
26937fi
26938
26939
26940# Name of the executable.
26941as_me=`$as_basename -- "$0" ||
26942$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26943 X"$0" : 'X\(//\)$' \| \
26944 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026945echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026946 sed '/^.*\/\([^/][^/]*\)\/*$/{
26947 s//\1/
26948 q
26949 }
26950 /^X\/\(\/\/\)$/{
26951 s//\1/
26952 q
26953 }
26954 /^X\/\(\/\).*/{
26955 s//\1/
26956 q
26957 }
26958 s/.*/./; q'`
26959
26960# CDPATH.
26961$as_unset CDPATH
26962
26963
26964
Martin v. Löwis11437992002-04-12 09:54:03 +000026965 as_lineno_1=$LINENO
26966 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026967 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026968 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026969
Martin v. Löwis11437992002-04-12 09:54:03 +000026970 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26971 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000026972 # line-number line after each line using $LINENO; the second 'sed'
26973 # does the real work. The second script uses 'N' to pair each
26974 # line-number line with the line containing $LINENO, and appends
26975 # trailing '-' during substitution so that $LINENO is not a special
26976 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026977 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000026978 # scripts with optimization help from Paolo Bonzini. Blame Lee
26979 # E. McMahon (1931-1989) for sed's syntax. :-)
26980 sed -n '
26981 p
26982 /[$]LINENO/=
26983 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026984 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026985 s/[$]LINENO.*/&-/
26986 t lineno
26987 b
26988 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026989 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000026990 :loop
26991 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026992 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000026993 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026994 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026995 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026996 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026997 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026998
Martin v. Löwis11437992002-04-12 09:54:03 +000026999 # Don't try to exec as it changes $[0], causing all sort of problems
27000 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027001 # original and so on. Autoconf is especially sensitive to this).
27002 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027003 # Exit status is that of the last command.
27004 exit
27005}
27006
27007
Martin v. Löwiseba40652007-08-30 20:10:57 +000027008if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27009 as_dirname=dirname
27010else
27011 as_dirname=false
27012fi
27013
27014ECHO_C= ECHO_N= ECHO_T=
27015case `echo -n x` in
27016-n*)
27017 case `echo 'x\c'` in
27018 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27019 *) ECHO_C='\c';;
27020 esac;;
27021*)
27022 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027024
Martin v. Löwiseba40652007-08-30 20:10:57 +000027025if expr a : '\(a\)' >/dev/null 2>&1 &&
27026 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027027 as_expr=expr
27028else
27029 as_expr=false
27030fi
27031
27032rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027033if test -d conf$$.dir; then
27034 rm -f conf$$.dir/conf$$.file
27035else
27036 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027037 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027038fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027039echo >conf$$.file
27040if ln -s conf$$.file conf$$ 2>/dev/null; then
27041 as_ln_s='ln -s'
27042 # ... but there are two gotchas:
27043 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27044 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27045 # In both cases, we have to default to `cp -p'.
27046 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027047 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027048elif ln conf$$.file conf$$ 2>/dev/null; then
27049 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027050else
27051 as_ln_s='cp -p'
27052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027053rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27054rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027055
Skip Montanaro6dead952003-09-25 14:50:04 +000027056if mkdir -p . 2>/dev/null; then
27057 as_mkdir_p=:
27058else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027059 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027060 as_mkdir_p=false
27061fi
27062
Martin v. Löwiseba40652007-08-30 20:10:57 +000027063if test -x / >/dev/null 2>&1; then
27064 as_test_x='test -x'
27065else
27066 if ls -dL / >/dev/null 2>&1; then
27067 as_ls_L_option=L
27068 else
27069 as_ls_L_option=
27070 fi
27071 as_test_x='
27072 eval sh -c '\''
27073 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027074 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027075 else
27076 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027077 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027078 esac;
27079 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27080 ???[sx]*):;;*)false;;esac;fi
27081 '\'' sh
27082 '
27083fi
27084as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027085
27086# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027087as_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 +000027088
27089# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027090as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027091
27092
Martin v. Löwis11437992002-04-12 09:54:03 +000027093exec 6>&1
27094
Martin v. Löwiseba40652007-08-30 20:10:57 +000027095# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027096# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027097# values after options handling.
27098ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027099This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027100generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027101
27102 CONFIG_FILES = $CONFIG_FILES
27103 CONFIG_HEADERS = $CONFIG_HEADERS
27104 CONFIG_LINKS = $CONFIG_LINKS
27105 CONFIG_COMMANDS = $CONFIG_COMMANDS
27106 $ $0 $@
27107
Martin v. Löwiseba40652007-08-30 20:10:57 +000027108on `(hostname || uname -n) 2>/dev/null | sed 1q`
27109"
27110
Martin v. Löwis11437992002-04-12 09:54:03 +000027111_ACEOF
27112
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027113cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027114# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000027115config_files="$ac_config_files"
27116config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027117
Martin v. Löwiseba40652007-08-30 20:10:57 +000027118_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027119
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027120cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027121ac_cs_usage="\
27122\`$as_me' instantiates files from templates according to the
27123current configuration.
27124
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027125Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027126
27127 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000027128 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027129 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027130 -d, --debug don't remove temporary files
27131 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027132 --file=FILE[:TEMPLATE]
27133 instantiate the configuration file FILE
27134 --header=FILE[:TEMPLATE]
27135 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027136
27137Configuration files:
27138$config_files
27139
27140Configuration headers:
27141$config_headers
27142
27143Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000027144
Martin v. Löwiseba40652007-08-30 20:10:57 +000027145_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027146cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027147ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000027148python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027149configured by $0, generated by GNU Autoconf 2.61,
27150 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027151
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027152Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027153This config.status script is free software; the Free Software Foundation
27154gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027155
27156ac_pwd='$ac_pwd'
27157srcdir='$srcdir'
27158INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027159_ACEOF
27160
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027161cat >>$CONFIG_STATUS <<\_ACEOF
27162# If no file are specified by the user, then we need to provide default
27163# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027164ac_need_defaults=:
27165while test $# != 0
27166do
27167 case $1 in
27168 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000027169 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27170 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027171 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027172 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027173 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027174 ac_option=$1
27175 ac_optarg=$2
27176 ac_shift=shift
27177 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027178 esac
27179
Skip Montanaro6dead952003-09-25 14:50:04 +000027180 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027181 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027182 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27183 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027184 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027185 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027186 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027187 debug=: ;;
27188 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027189 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027190 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027191 ac_need_defaults=false;;
27192 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027193 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027194 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027195 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027196 --he | --h)
27197 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027198 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027199Try \`$0 --help' for more information." >&2
27200 { (exit 1); exit 1; }; };;
27201 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027202 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027203 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27204 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27205 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027206
27207 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027208 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027209Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027210 { (exit 1); exit 1; }; } ;;
27211
Martin v. Löwiseba40652007-08-30 20:10:57 +000027212 *) ac_config_targets="$ac_config_targets $1"
27213 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027214
27215 esac
27216 shift
27217done
27218
Skip Montanaro6dead952003-09-25 14:50:04 +000027219ac_configure_extra_args=
27220
27221if $ac_cs_silent; then
27222 exec 6>/dev/null
27223 ac_configure_extra_args="$ac_configure_extra_args --silent"
27224fi
27225
27226_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027227cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027228if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027229 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27230 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000027231 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027232 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027233fi
27234
Martin v. Löwis11437992002-04-12 09:54:03 +000027235_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027236cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027237exec 5>>config.log
27238{
27239 echo
27240 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27241## Running $as_me. ##
27242_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027243 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027244} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027245
Martin v. Löwiseba40652007-08-30 20:10:57 +000027246_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027247cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027248_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027250cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027251
27252# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027253for ac_config_target in $ac_config_targets
27254do
Martin v. Löwiseba40652007-08-30 20:10:57 +000027255 case $ac_config_target in
27256 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27257 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27258 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
27259 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000027260 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27261 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027262 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27263 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027264 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027265
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027266 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27267echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027268 { (exit 1); exit 1; }; };;
27269 esac
27270done
27271
Martin v. Löwiseba40652007-08-30 20:10:57 +000027272
Martin v. Löwis11437992002-04-12 09:54:03 +000027273# If the user did not use the arguments to specify the items to instantiate,
27274# then the envvar interface is used. Set only those that are not.
27275# We use the long form for the default assignment because of an extremely
27276# bizarre bug on SunOS 4.1.3.
27277if $ac_need_defaults; then
27278 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27279 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27280fi
27281
Skip Montanaro6dead952003-09-25 14:50:04 +000027282# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000027283# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027284# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027285# Hook for its removal unless debugging.
27286# Note that there is a small window in which the directory will not be cleaned:
27287# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027288$debug ||
27289{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027290 tmp=
27291 trap 'exit_status=$?
27292 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27293' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027294 trap '{ (exit 1); exit 1; }' 1 2 13 15
27295}
Martin v. Löwis11437992002-04-12 09:54:03 +000027296# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027297
Martin v. Löwis11437992002-04-12 09:54:03 +000027298{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027299 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027300 test -n "$tmp" && test -d "$tmp"
27301} ||
27302{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027303 tmp=./conf$$-$RANDOM
27304 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027305} ||
27306{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027307 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027308 { (exit 1); exit 1; }
27309}
27310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027311#
27312# Set up the sed scripts for CONFIG_FILES section.
27313#
27314
27315# No need to generate the scripts if there are no CONFIG_FILES.
27316# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000027317if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027318
27319_ACEOF
27320
Martin v. Löwiseba40652007-08-30 20:10:57 +000027321
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027322
Martin v. Löwiseba40652007-08-30 20:10:57 +000027323ac_delim='%!_!# '
27324for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027325 cat >conf$$subs.sed <<_ACEOF
27326SHELL!$SHELL$ac_delim
27327PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27328PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27329PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27330PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27331PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27332PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27333exec_prefix!$exec_prefix$ac_delim
27334prefix!$prefix$ac_delim
27335program_transform_name!$program_transform_name$ac_delim
27336bindir!$bindir$ac_delim
27337sbindir!$sbindir$ac_delim
27338libexecdir!$libexecdir$ac_delim
27339datarootdir!$datarootdir$ac_delim
27340datadir!$datadir$ac_delim
27341sysconfdir!$sysconfdir$ac_delim
27342sharedstatedir!$sharedstatedir$ac_delim
27343localstatedir!$localstatedir$ac_delim
27344includedir!$includedir$ac_delim
27345oldincludedir!$oldincludedir$ac_delim
27346docdir!$docdir$ac_delim
27347infodir!$infodir$ac_delim
27348htmldir!$htmldir$ac_delim
27349dvidir!$dvidir$ac_delim
27350pdfdir!$pdfdir$ac_delim
27351psdir!$psdir$ac_delim
27352libdir!$libdir$ac_delim
27353localedir!$localedir$ac_delim
27354mandir!$mandir$ac_delim
27355DEFS!$DEFS$ac_delim
27356ECHO_C!$ECHO_C$ac_delim
27357ECHO_N!$ECHO_N$ac_delim
27358ECHO_T!$ECHO_T$ac_delim
27359LIBS!$LIBS$ac_delim
27360build_alias!$build_alias$ac_delim
27361host_alias!$host_alias$ac_delim
27362target_alias!$target_alias$ac_delim
27363VERSION!$VERSION$ac_delim
27364SOVERSION!$SOVERSION$ac_delim
27365CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27366UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27367ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27368PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27369PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27370PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27371PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27372PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27373FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27374FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27375FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27376FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27377FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27378MACHDEP!$MACHDEP$ac_delim
27379SGI_ABI!$SGI_ABI$ac_delim
27380EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
27381EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
27382CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27383EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27384CC!$CC$ac_delim
27385CFLAGS!$CFLAGS$ac_delim
27386LDFLAGS!$LDFLAGS$ac_delim
27387CPPFLAGS!$CPPFLAGS$ac_delim
27388ac_ct_CC!$ac_ct_CC$ac_delim
27389EXEEXT!$EXEEXT$ac_delim
27390OBJEXT!$OBJEXT$ac_delim
27391CXX!$CXX$ac_delim
27392MAINCC!$MAINCC$ac_delim
27393CPP!$CPP$ac_delim
27394GREP!$GREP$ac_delim
27395EGREP!$EGREP$ac_delim
27396BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27397LIBRARY!$LIBRARY$ac_delim
27398LDLIBRARY!$LDLIBRARY$ac_delim
27399DLLLIBRARY!$DLLLIBRARY$ac_delim
27400BLDLIBRARY!$BLDLIBRARY$ac_delim
27401LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27402INSTSONAME!$INSTSONAME$ac_delim
27403RUNSHARED!$RUNSHARED$ac_delim
27404LINKCC!$LINKCC$ac_delim
27405GNULD!$GNULD$ac_delim
27406RANLIB!$RANLIB$ac_delim
27407AR!$AR$ac_delim
27408ARFLAGS!$ARFLAGS$ac_delim
27409SVNVERSION!$SVNVERSION$ac_delim
27410INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27411INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27412INSTALL_DATA!$INSTALL_DATA$ac_delim
27413LN!$LN$ac_delim
27414OPT!$OPT$ac_delim
27415BASECFLAGS!$BASECFLAGS$ac_delim
27416UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27417OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27418LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27419SO!$SO$ac_delim
27420LDSHARED!$LDSHARED$ac_delim
27421BLDSHARED!$BLDSHARED$ac_delim
27422CCSHARED!$CCSHARED$ac_delim
27423_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027424
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027425 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 +000027426 break
27427 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027428 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27429echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027430 { (exit 1); exit 1; }; }
27431 else
27432 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027433 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027434done
27435
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027436ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27437if test -n "$ac_eof"; then
27438 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27439 ac_eof=`expr $ac_eof + 1`
27440fi
27441
27442cat >>$CONFIG_STATUS <<_ACEOF
27443cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27444/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000027445_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027446sed '
27447s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27448s/^/s,@/; s/!/@,|#_!!_#|/
27449:n
27450t n
27451s/'"$ac_delim"'$/,g/; t
27452s/$/\\/; p
27453N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27454' >>$CONFIG_STATUS <conf$$subs.sed
27455rm -f conf$$subs.sed
27456cat >>$CONFIG_STATUS <<_ACEOF
27457CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000027458_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027459
27460
27461ac_delim='%!_!# '
27462for ac_last_try in false false false false false :; do
27463 cat >conf$$subs.sed <<_ACEOF
27464LINKFORSHARED!$LINKFORSHARED$ac_delim
27465CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27466SHLIBS!$SHLIBS$ac_delim
27467USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27468SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27469USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27470LDLAST!$LDLAST$ac_delim
27471THREADOBJ!$THREADOBJ$ac_delim
27472DLINCLDIR!$DLINCLDIR$ac_delim
27473DYNLOADFILE!$DYNLOADFILE$ac_delim
27474MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27475TRUE!$TRUE$ac_delim
27476LIBOBJS!$LIBOBJS$ac_delim
27477HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27478HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27479HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27480HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27481HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27482LIBM!$LIBM$ac_delim
27483LIBC!$LIBC$ac_delim
27484UNICODE_OBJS!$UNICODE_OBJS$ac_delim
27485THREADHEADERS!$THREADHEADERS$ac_delim
27486SRCDIRS!$SRCDIRS$ac_delim
27487LTLIBOBJS!$LTLIBOBJS$ac_delim
27488_ACEOF
27489
27490 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
27491 break
27492 elif $ac_last_try; then
27493 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27494echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027495 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027496 else
27497 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27498 fi
27499done
27500
27501ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27502if test -n "$ac_eof"; then
27503 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27504 ac_eof=`expr $ac_eof + 1`
27505fi
27506
27507cat >>$CONFIG_STATUS <<_ACEOF
27508cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27509/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027510_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027511sed '
27512s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27513s/^/s,@/; s/!/@,|#_!!_#|/
27514:n
27515t n
27516s/'"$ac_delim"'$/,g/; t
27517s/$/\\/; p
27518N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27519' >>$CONFIG_STATUS <conf$$subs.sed
27520rm -f conf$$subs.sed
27521cat >>$CONFIG_STATUS <<_ACEOF
27522:end
27523s/|#_!!_#|//g
27524CEOF$ac_eof
27525_ACEOF
27526
Martin v. Löwiseba40652007-08-30 20:10:57 +000027527
27528# VPATH may cause trouble with some makes, so we remove $(srcdir),
27529# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27530# trailing colons and then remove the whole line if VPATH becomes empty
27531# (actually we leave an empty line to preserve line numbers).
27532if test "x$srcdir" = x.; then
27533 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27534s/:*\$(srcdir):*/:/
27535s/:*\${srcdir}:*/:/
27536s/:*@srcdir@:*/:/
27537s/^\([^=]*=[ ]*\):*/\1/
27538s/:*$//
27539s/^[^=]*=[ ]*$//
27540}'
27541fi
27542
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027543cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027544fi # test -n "$CONFIG_FILES"
27545
Martin v. Löwiseba40652007-08-30 20:10:57 +000027546
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027547for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000027548do
27549 case $ac_tag in
27550 :[FHLC]) ac_mode=$ac_tag; continue;;
27551 esac
27552 case $ac_mode$ac_tag in
27553 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027554 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27555echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027556 { (exit 1); exit 1; }; };;
27557 :[FH]-) ac_tag=-:-;;
27558 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27559 esac
27560 ac_save_IFS=$IFS
27561 IFS=:
27562 set x $ac_tag
27563 IFS=$ac_save_IFS
27564 shift
27565 ac_file=$1
27566 shift
27567
27568 case $ac_mode in
27569 :L) ac_source=$1;;
27570 :[FH])
27571 ac_file_inputs=
27572 for ac_f
27573 do
27574 case $ac_f in
27575 -) ac_f="$tmp/stdin";;
27576 *) # Look for the file first in the build tree, then in the source tree
27577 # (if the path is not absolute). The absolute path cannot be DOS-style,
27578 # because $ac_f cannot contain `:'.
27579 test -f "$ac_f" ||
27580 case $ac_f in
27581 [\\/$]*) false;;
27582 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27583 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027584 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27585echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027586 { (exit 1); exit 1; }; };;
27587 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027588 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027589 done
27590
27591 # Let's still pretend it is `configure' which instantiates (i.e., don't
27592 # use $as_me), people would be surprised to read:
27593 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027594 configure_input="Generated from "`IFS=:
27595 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027596 if test x"$ac_file" != x-; then
27597 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027598 { echo "$as_me:$LINENO: creating $ac_file" >&5
27599echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027600 fi
27601
27602 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027603 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027604 esac
27605 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027606 esac
27607
Martin v. Löwiseba40652007-08-30 20:10:57 +000027608 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027609$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027610 X"$ac_file" : 'X\(//\)[^/]' \| \
27611 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027612 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027613echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027614 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27615 s//\1/
27616 q
27617 }
27618 /^X\(\/\/\)[^/].*/{
27619 s//\1/
27620 q
27621 }
27622 /^X\(\/\/\)$/{
27623 s//\1/
27624 q
27625 }
27626 /^X\(\/\).*/{
27627 s//\1/
27628 q
27629 }
27630 s/.*/./; q'`
27631 { as_dir="$ac_dir"
27632 case $as_dir in #(
27633 -*) as_dir=./$as_dir;;
27634 esac
27635 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027636 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000027637 while :; do
27638 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027639 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000027640 *) as_qdir=$as_dir;;
27641 esac
27642 as_dirs="'$as_qdir' $as_dirs"
27643 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027644$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027645 X"$as_dir" : 'X\(//\)[^/]' \| \
27646 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027647 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027648echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027649 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27650 s//\1/
27651 q
27652 }
27653 /^X\(\/\/\)[^/].*/{
27654 s//\1/
27655 q
27656 }
27657 /^X\(\/\/\)$/{
27658 s//\1/
27659 q
27660 }
27661 /^X\(\/\).*/{
27662 s//\1/
27663 q
27664 }
27665 s/.*/./; q'`
27666 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027667 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027668 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027669 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27670echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027671 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027672 ac_builddir=.
27673
Martin v. Löwiseba40652007-08-30 20:10:57 +000027674case "$ac_dir" in
27675.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27676*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027677 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027678 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027679 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027680 case $ac_top_builddir_sub in
27681 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27682 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27683 esac ;;
27684esac
27685ac_abs_top_builddir=$ac_pwd
27686ac_abs_builddir=$ac_pwd$ac_dir_suffix
27687# for backward compatibility:
27688ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027689
27690case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027691 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027692 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027693 ac_top_srcdir=$ac_top_builddir_sub
27694 ac_abs_top_srcdir=$ac_pwd ;;
27695 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027696 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027697 ac_top_srcdir=$srcdir
27698 ac_abs_top_srcdir=$srcdir ;;
27699 *) # Relative name.
27700 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27701 ac_top_srcdir=$ac_top_build_prefix$srcdir
27702 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027703esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027704ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027705
Martin v. Löwis11437992002-04-12 09:54:03 +000027706
Martin v. Löwiseba40652007-08-30 20:10:57 +000027707 case $ac_mode in
27708 :F)
27709 #
27710 # CONFIG_FILE
27711 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027712
27713 case $INSTALL in
27714 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027715 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027716 esac
Brett Cannon19fab762007-06-02 03:02:29 +000027717_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027718
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027719cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027720# If the template does not know about datarootdir, expand it.
27721# FIXME: This hack should be removed a few years after 2.60.
27722ac_datarootdir_hack=; ac_datarootdir_seen=
27723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027724case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000027725 p
27726 q
27727}
27728/@datadir@/p
27729/@docdir@/p
27730/@infodir@/p
27731/@localedir@/p
27732/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027733' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027734*datarootdir*) ac_datarootdir_seen=yes;;
27735*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027736 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27737echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027738_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027739cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027740 ac_datarootdir_hack='
27741 s&@datadir@&$datadir&g
27742 s&@docdir@&$docdir&g
27743 s&@infodir@&$infodir&g
27744 s&@localedir@&$localedir&g
27745 s&@mandir@&$mandir&g
27746 s&\\\${datarootdir}&$datarootdir&g' ;;
27747esac
27748_ACEOF
27749
27750# Neutralize VPATH when `$srcdir' = `.'.
27751# Shell code in configure.ac might set extrasub.
27752# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027753cat >>$CONFIG_STATUS <<_ACEOF
27754 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027755$extrasub
27756_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027757cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027758:t
27759/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027760s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000027761s&@top_builddir@&$ac_top_builddir_sub&;t t
27762s&@srcdir@&$ac_srcdir&;t t
27763s&@abs_srcdir@&$ac_abs_srcdir&;t t
27764s&@top_srcdir@&$ac_top_srcdir&;t t
27765s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27766s&@builddir@&$ac_builddir&;t t
27767s&@abs_builddir@&$ac_abs_builddir&;t t
27768s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27769s&@INSTALL@&$ac_INSTALL&;t t
27770$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027771" $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 +000027772
Martin v. Löwiseba40652007-08-30 20:10:57 +000027773test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27774 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27775 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027776 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027777which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027778echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027779which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027780
Martin v. Löwiseba40652007-08-30 20:10:57 +000027781 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027782 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027783 -) cat "$tmp/out"; rm -f "$tmp/out";;
27784 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27785 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027786 ;;
27787 :H)
27788 #
27789 # CONFIG_HEADER
27790 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027791_ACEOF
27792
27793# Transform confdefs.h into a sed script `conftest.defines', that
27794# substitutes the proper values into config.h.in to produce config.h.
27795rm -f conftest.defines conftest.tail
27796# First, append a space to every undef/define line, to ease matching.
27797echo 's/$/ /' >conftest.defines
27798# Then, protect against being on the right side of a sed subst, or in
27799# an unquoted here document, in config.status. If some macros were
27800# called several times there might be several #defines for the same
27801# symbol, which is useless. But do not sort them, since the last
27802# AC_DEFINE must be honored.
27803ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27804# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27805# NAME is the cpp macro being defined, VALUE is the value it is being given.
27806# PARAMS is the parameter list in the macro definition--in most cases, it's
27807# just an empty string.
27808ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27809ac_dB='\\)[ (].*,\\1define\\2'
27810ac_dC=' '
27811ac_dD=' ,'
27812
27813uniq confdefs.h |
27814 sed -n '
27815 t rset
27816 :rset
27817 s/^[ ]*#[ ]*define[ ][ ]*//
27818 t ok
27819 d
27820 :ok
27821 s/[\\&,]/\\&/g
27822 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27823 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27824 ' >>conftest.defines
27825
27826# Remove the space that was appended to ease matching.
27827# Then replace #undef with comments. This is necessary, for
27828# example, in the case of _POSIX_SOURCE, which is predefined and required
27829# on some systems where configure will not decide to define it.
27830# (The regexp can be short, since the line contains either #define or #undef.)
27831echo 's/ $//
27832s,^[ #]*u.*,/* & */,' >>conftest.defines
27833
27834# Break up conftest.defines:
27835ac_max_sed_lines=50
27836
27837# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27838# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27839# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27840# et cetera.
27841ac_in='$ac_file_inputs'
27842ac_out='"$tmp/out1"'
27843ac_nxt='"$tmp/out2"'
27844
27845while :
27846do
27847 # Write a here document:
27848 cat >>$CONFIG_STATUS <<_ACEOF
27849 # First, check the format of the line:
27850 cat >"\$tmp/defines.sed" <<\\CEOF
27851/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27852/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27853b
27854:def
27855_ACEOF
27856 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27857 echo 'CEOF
27858 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27859 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27860 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27861 grep . conftest.tail >/dev/null || break
27862 rm -f conftest.defines
27863 mv conftest.tail conftest.defines
27864done
27865rm -f conftest.defines conftest.tail
27866
27867echo "ac_result=$ac_in" >>$CONFIG_STATUS
27868cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027869 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027870 echo "/* $configure_input */" >"$tmp/config.h"
27871 cat "$ac_result" >>"$tmp/config.h"
27872 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27873 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27874echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027875 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027876 rm -f $ac_file
27877 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027878 fi
27879 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027880 echo "/* $configure_input */"
27881 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027882 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027883 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027884 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027885
Martin v. Löwiseba40652007-08-30 20:10:57 +000027886
27887 esac
27888
27889done # for ac_tag
27890
Guido van Rossum627b2d71993-12-24 10:39:16 +000027891
Martin v. Löwis11437992002-04-12 09:54:03 +000027892{ (exit 0); exit 0; }
27893_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027894chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027895ac_clean_files=$ac_clean_files_save
27896
27897
27898# configure is writing to config.log, and then calls config.status.
27899# config.status does its own redirection, appending to config.log.
27900# Unfortunately, on DOS this fails, as config.log is still kept open
27901# by configure, so config.status won't be able to write to it; its
27902# output is simply discarded. So we exec the FD to /dev/null,
27903# effectively closing config.log, so it can be properly (re)opened and
27904# appended to by config.status. When coming back to configure, we
27905# need to make the FD available again.
27906if test "$no_create" != yes; then
27907 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027908 ac_config_status_args=
27909 test "$silent" = yes &&
27910 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027911 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027912 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027913 exec 5>>config.log
27914 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27915 # would make configure fail if this is the last instruction.
27916 $ac_cs_success || { (exit 1); exit 1; }
27917fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027918
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027919
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027920echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027921if test ! -f Modules/Setup
27922then
27923 cp $srcdir/Modules/Setup.dist Modules/Setup
27924fi
27925
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027926echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027927if test ! -f Modules/Setup.local
27928then
27929 echo "# Edit this file for local setup changes" >Modules/Setup.local
27930fi
27931
27932echo "creating Makefile"
27933$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27934 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027935 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000027936
27937case $ac_sys_system in
27938BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027939 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027940
27941 Support for BeOS is deprecated as of Python 2.6.
27942 See PEP 11 for the gory details.
27943 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027944echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027945
27946 Support for BeOS is deprecated as of Python 2.6.
27947 See PEP 11 for the gory details.
27948 " >&2;}
27949 ;;
27950*) ;;
27951esac
27952
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027953mv config.c Modules