blob: 7b9da8771083db294577a65e568852ea25c4c571 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson1c335e62010-01-01 15:16:29 +00002# From configure.in Revision: 77193 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren92919a62009-12-24 13:30:58 +0000661LIPO_32BIT_FLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674EXTRAPLATDIR
675EXTRAMACHDEPPATH
676CONFIGURE_MACOSX_DEPLOYMENT_TARGET
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CC
679CFLAGS
680LDFLAGS
681CPPFLAGS
682ac_ct_CC
683EXEEXT
684OBJEXT
685CXX
686MAINCC
687CPP
688GREP
689EGREP
690BUILDEXEEXT
691LIBRARY
692LDLIBRARY
693DLLLIBRARY
694BLDLIBRARY
695LDLIBRARYDIR
696INSTSONAME
697RUNSHARED
698LINKCC
699GNULD
700RANLIB
701AR
702ARFLAGS
703SVNVERSION
704INSTALL_PROGRAM
705INSTALL_SCRIPT
706INSTALL_DATA
707LN
708OPT
709BASECFLAGS
710UNIVERSAL_ARCH_FLAGS
711OTHER_LIBTOOL_OPT
712LIBTOOL_CRUFT
713SO
714LDSHARED
715BLDSHARED
716CCSHARED
717LINKFORSHARED
718CFLAGSFORSHARED
719SHLIBS
Benjamin Peterson1c335e62010-01-01 15:16:29 +0000720PKG_CONFIG
721LIBFFI_INCLUDEDIR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000722USE_SIGNAL_MODULE
723SIGNAL_OBJS
724USE_THREAD_MODULE
725LDLAST
726THREADOBJ
727DLINCLDIR
728DYNLOADFILE
729MACHDEP_OBJS
730TRUE
731LIBOBJS
732HAVE_GETHOSTBYNAME_R_6_ARG
733HAVE_GETHOSTBYNAME_R_5_ARG
734HAVE_GETHOSTBYNAME_R_3_ARG
735HAVE_GETHOSTBYNAME_R
736HAVE_GETHOSTBYNAME
737LIBM
738LIBC
739UNICODE_OBJS
740THREADHEADERS
741SRCDIRS
742LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000743ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000744 ac_precious_vars='build_alias
745host_alias
746target_alias
747CC
748CFLAGS
749LDFLAGS
750LIBS
751CPPFLAGS
752CPP'
753
Guido van Rossum627b2d71993-12-24 10:39:16 +0000754
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000756ac_init_help=
757ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000758# The variables have the same names as the options, with
759# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000760cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763no_recursion=
764prefix=NONE
765program_prefix=NONE
766program_suffix=NONE
767program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000770srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000772x_includes=NONE
773x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000774
775# Installation directory options.
776# These are left unexpanded so users can "make install exec_prefix=/foo"
777# and all the variables that are supposed to be based on exec_prefix
778# by default will actually change.
779# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000780# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781bindir='${exec_prefix}/bin'
782sbindir='${exec_prefix}/sbin'
783libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000784datarootdir='${prefix}/share'
785datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786sysconfdir='${prefix}/etc'
787sharedstatedir='${prefix}/com'
788localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000789includedir='${prefix}/include'
790oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000791docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
792infodir='${datarootdir}/info'
793htmldir='${docdir}'
794dvidir='${docdir}'
795pdfdir='${docdir}'
796psdir='${docdir}'
797libdir='${exec_prefix}/lib'
798localedir='${datarootdir}/locale'
799mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 # If the previous option needs an argument, assign it.
806 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808 ac_prev=
809 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000810 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Martin v. Löwiseba40652007-08-30 20:10:57 +0000812 case $ac_option in
813 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
814 *) ac_optarg=yes ;;
815 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817 # Accept the important Cygnus configure options, so we can diagnose typos.
818
Martin v. Löwiseba40652007-08-30 20:10:57 +0000819 case $ac_dashdash$ac_option in
820 --)
821 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823 -bindir | --bindir | --bindi | --bind | --bin | --bi)
824 ac_prev=bindir ;;
825 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827
828 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000829 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000830 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000831 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833 -cache-file | --cache-file | --cache-fil | --cache-fi \
834 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
835 ac_prev=cache_file ;;
836 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
837 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000838 cache_file=$ac_optarg ;;
839
840 --config-cache | -C)
841 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000846 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847
Martin v. Löwiseba40652007-08-30 20:10:57 +0000848 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
849 | --dataroo | --dataro | --datar)
850 ac_prev=datarootdir ;;
851 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
852 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
853 datarootdir=$ac_optarg ;;
854
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000856 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000858 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
859 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000861 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
862 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000863
864 -docdir | --docdir | --docdi | --doc | --do)
865 ac_prev=docdir ;;
866 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
867 docdir=$ac_optarg ;;
868
869 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
870 ac_prev=dvidir ;;
871 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
872 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873
874 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000875 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000877 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
878 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000880 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
881 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
884 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
885 | --exec | --exe | --ex)
886 ac_prev=exec_prefix ;;
887 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
888 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
889 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
892 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893 # Obsolete; use --with-gas.
894 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 -help | --help | --hel | --he | -h)
897 ac_init_help=long ;;
898 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
899 ac_init_help=recursive ;;
900 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
901 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
903 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Martin v. Löwiseba40652007-08-30 20:10:57 +0000908 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
909 ac_prev=htmldir ;;
910 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
911 | --ht=*)
912 htmldir=$ac_optarg ;;
913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 -includedir | --includedir | --includedi | --included | --include \
915 | --includ | --inclu | --incl | --inc)
916 ac_prev=includedir ;;
917 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
918 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -infodir | --infodir | --infodi | --infod | --info | --inf)
922 ac_prev=infodir ;;
923 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libdir | --libdir | --libdi | --libd)
927 ac_prev=libdir ;;
928 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
931 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
932 | --libexe | --libex | --libe)
933 ac_prev=libexecdir ;;
934 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
935 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
Martin v. Löwiseba40652007-08-30 20:10:57 +0000938 -localedir | --localedir | --localedi | --localed | --locale)
939 ac_prev=localedir ;;
940 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
941 localedir=$ac_optarg ;;
942
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 ac_prev=localstatedir ;;
946 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000947 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
950 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
951 ac_prev=mandir ;;
952 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 # Obsolete; use --without-fp.
957 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
959 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961 no_create=yes ;;
962
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
964 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
965 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
968 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
969 | --oldin | --oldi | --old | --ol | --o)
970 ac_prev=oldincludedir ;;
971 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
972 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
973 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
977 ac_prev=prefix ;;
978 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -program-prefix | --program-prefix | --program-prefi | --program-pref \
982 | --program-pre | --program-pr | --program-p)
983 ac_prev=program_prefix ;;
984 -program-prefix=* | --program-prefix=* | --program-prefi=* \
985 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -program-suffix | --program-suffix | --program-suffi | --program-suff \
989 | --program-suf | --program-su | --program-s)
990 ac_prev=program_suffix ;;
991 -program-suffix=* | --program-suffix=* | --program-suffi=* \
992 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -program-transform-name | --program-transform-name \
996 | --program-transform-nam | --program-transform-na \
997 | --program-transform-n | --program-transform- \
998 | --program-transform | --program-transfor \
999 | --program-transfo | --program-transf \
1000 | --program-trans | --program-tran \
1001 | --progr-tra | --program-tr | --program-t)
1002 ac_prev=program_transform_name ;;
1003 -program-transform-name=* | --program-transform-name=* \
1004 | --program-transform-nam=* | --program-transform-na=* \
1005 | --program-transform-n=* | --program-transform-=* \
1006 | --program-transform=* | --program-transfor=* \
1007 | --program-transfo=* | --program-transf=* \
1008 | --program-trans=* | --program-tran=* \
1009 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Martin v. Löwiseba40652007-08-30 20:10:57 +00001012 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1013 ac_prev=pdfdir ;;
1014 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1015 pdfdir=$ac_optarg ;;
1016
1017 -psdir | --psdir | --psdi | --psd | --ps)
1018 ac_prev=psdir ;;
1019 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1020 psdir=$ac_optarg ;;
1021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1023 | -silent | --silent | --silen | --sile | --sil)
1024 silent=yes ;;
1025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1027 ac_prev=sbindir ;;
1028 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1029 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1033 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1034 | --sharedst | --shareds | --shared | --share | --shar \
1035 | --sha | --sh)
1036 ac_prev=sharedstatedir ;;
1037 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1038 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1039 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1040 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043 -site | --site | --sit)
1044 ac_prev=site ;;
1045 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1049 ac_prev=srcdir ;;
1050 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1054 | --syscon | --sysco | --sysc | --sys | --sy)
1055 ac_prev=sysconfdir ;;
1056 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1057 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1066 verbose=yes ;;
1067
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 -version | --version | --versio | --versi | --vers | -V)
1069 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070
1071 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001072 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001073 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001074 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1075 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001077 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1078 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001081 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001083 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1084 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001086 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1087 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 --x)
1090 # Obsolete; use --with-x.
1091 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1094 | --x-incl | --x-inc | --x-in | --x-i)
1095 ac_prev=x_includes ;;
1096 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1097 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1101 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1102 ac_prev=x_libraries ;;
1103 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1104 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001107 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001108Try \`$0 --help' for more information." >&2
1109 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 ;;
1111
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 *=*)
1113 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1114 # Reject names that are not valid shell variable names.
1115 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001116 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001118 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 export $ac_envvar ;;
1120
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001123 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001125 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127 ;;
1128
1129 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001130done
1131
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001134 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136fi
1137
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001138# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1140 datadir sysconfdir sharedstatedir localstatedir includedir \
1141 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1142 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001143do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001146 [\\/$]* | ?:[\\/]* ) continue;;
1147 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001149 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001150 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001151done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153# There might be people who depend on the old broken behavior: `$host'
1154# used to hold the argument of --host etc.
1155# FIXME: To remove some day.
1156build=$build_alias
1157host=$host_alias
1158target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001159
Martin v. Löwis11437992002-04-12 09:54:03 +00001160# FIXME: To remove some day.
1161if test "x$host_alias" != x; then
1162 if test "x$build_alias" = x; then
1163 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001164 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 +00001165 If a cross compiler is detected then cross compile mode will be used." >&2
1166 elif test "x$build_alias" != "x$host_alias"; then
1167 cross_compiling=yes
1168 fi
1169fi
1170
1171ac_tool_prefix=
1172test -n "$host_alias" && ac_tool_prefix=$host_alias-
1173
1174test "$silent" = yes && exec 6>/dev/null
1175
Guido van Rossum627b2d71993-12-24 10:39:16 +00001176
Martin v. Löwiseba40652007-08-30 20:10:57 +00001177ac_pwd=`pwd` && test -n "$ac_pwd" &&
1178ac_ls_di=`ls -di .` &&
1179ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001180 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001181 { (exit 1); exit 1; }; }
1182test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001183 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001184 { (exit 1); exit 1; }; }
1185
1186
Guido van Rossum627b2d71993-12-24 10:39:16 +00001187# Find the source files, if location was not specified.
1188if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001191 ac_confdir=`$as_dirname -- "$0" ||
1192$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1193 X"$0" : 'X\(//\)[^/]' \| \
1194 X"$0" : 'X\(//\)$' \| \
1195 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1196echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001197 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\/\)[^/].*/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\/\)$/{
1206 s//\1/
1207 q
1208 }
1209 /^X\(\/\).*/{
1210 s//\1/
1211 q
1212 }
1213 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001215 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216 srcdir=..
1217 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218else
1219 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001221if test ! -r "$srcdir/$ac_unique_file"; then
1222 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001223 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001226ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1227ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001228 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001229 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001230 pwd)`
1231# When building in place, set srcdir=.
1232if test "$ac_abs_confdir" = "$ac_pwd"; then
1233 srcdir=.
1234fi
1235# Remove unnecessary trailing slashes from srcdir.
1236# Double slashes in file names in object file debugging info
1237# mess up M-x gdb in Emacs.
1238case $srcdir in
1239*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1240esac
1241for ac_var in $ac_precious_vars; do
1242 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1243 eval ac_env_${ac_var}_value=\$${ac_var}
1244 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1245 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1246done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248#
1249# Report the --help message.
1250#
1251if test "$ac_init_help" = "long"; then
1252 # Omit some internal or obsolete options to make the list less imposing.
1253 # This message is too long to be a string in the A/UX 3.1 sh.
1254 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001255\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001256
1257Usage: $0 [OPTION]... [VAR=VALUE]...
1258
1259To assign environment variables (e.g., CC, CFLAGS...), specify them as
1260VAR=VALUE. See below for descriptions of some of the useful variables.
1261
1262Defaults for the options are specified in brackets.
1263
1264Configuration:
1265 -h, --help display this help and exit
1266 --help=short display options specific to this package
1267 --help=recursive display the short help of all the included packages
1268 -V, --version display version information and exit
1269 -q, --quiet, --silent do not print \`checking...' messages
1270 --cache-file=FILE cache test results in FILE [disabled]
1271 -C, --config-cache alias for \`--cache-file=config.cache'
1272 -n, --no-create do not create output files
1273 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1274
Martin v. Löwis11437992002-04-12 09:54:03 +00001275Installation directories:
1276 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001277 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001279 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001280
1281By default, \`make install' will install all the files in
1282\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1283an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1284for instance \`--prefix=\$HOME'.
1285
1286For better control, use the options below.
1287
1288Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001289 --bindir=DIR user executables [EPREFIX/bin]
1290 --sbindir=DIR system admin executables [EPREFIX/sbin]
1291 --libexecdir=DIR program executables [EPREFIX/libexec]
1292 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1293 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1294 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1295 --libdir=DIR object code libraries [EPREFIX/lib]
1296 --includedir=DIR C header files [PREFIX/include]
1297 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1298 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1299 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1300 --infodir=DIR info documentation [DATAROOTDIR/info]
1301 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1302 --mandir=DIR man documentation [DATAROOTDIR/man]
1303 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1304 --htmldir=DIR html documentation [DOCDIR]
1305 --dvidir=DIR dvi documentation [DOCDIR]
1306 --pdfdir=DIR pdf documentation [DOCDIR]
1307 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001308_ACEOF
1309
1310 cat <<\_ACEOF
1311_ACEOF
1312fi
1313
1314if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001315 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001316 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001317 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 cat <<\_ACEOF
1319
1320Optional Features:
1321 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1322 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001323 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001324 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001325 --enable-framework[=INSTALLDIR]
1326 Build (MacOSX|Darwin) framework
1327 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001328 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001329 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1330 --enable-ipv6 Enable ipv6 (with ipv4) support
1331 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001332 --enable-big-digits[=BITS]
1333 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --enable-unicode[=ucs[24]]
1335 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
1337Optional Packages:
1338 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1339 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001340 --with-universal-archs=ARCH
1341 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001342 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001343 --with-framework-name=FRAMEWORK
1344 specify an alternate name of the framework built
1345 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001346 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001347 --with-cxx-main=<compiler>
1348 compile main() and link python executable with C++
1349 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001350 --with-suffix=.exe set executable suffix
1351 --with-pydebug build with Py_DEBUG defined
1352 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001353 --with-system-expat build pyexpat module using an installed expat
1354 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001355 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001356 --with-dbmliborder=db1:db2:...
1357 order to check db backends for dbm. Valid value is a
1358 colon separated string with the backend names
1359 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-signal-module disable/enable signal module
1361 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1362 --with(out)-threads[=DIRECTORY]
1363 disable/enable thread support
1364 --with(out)-thread[=DIRECTORY]
1365 deprecated; use --with(out)-threads
1366 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001367 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001368 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001369 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001370 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001371 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001372 --with-fpectl enable SIGFPE catching
1373 --with-libm=STRING math library
1374 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001375
1376Some influential environment variables:
1377 CC C compiler command
1378 CFLAGS C compiler flags
1379 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1380 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381 LIBS libraries to pass to the linker, e.g. -l<library>
1382 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1383 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 CPP C preprocessor
1385
1386Use these variables to override the choices made by `configure' or to help
1387it to find libraries and programs with nonstandard names/locations.
1388
Georg Brandl464432d2009-05-20 18:24:08 +00001389Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001391ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001392fi
1393
1394if test "$ac_init_help" = "recursive"; then
1395 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001397 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001398 ac_builddir=.
1399
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400case "$ac_dir" in
1401.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001403 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001404 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001405 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001406 case $ac_top_builddir_sub in
1407 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1408 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1409 esac ;;
1410esac
1411ac_abs_top_builddir=$ac_pwd
1412ac_abs_builddir=$ac_pwd$ac_dir_suffix
1413# for backward compatibility:
1414ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001415
1416case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001419 ac_top_srcdir=$ac_top_builddir_sub
1420 ac_abs_top_srcdir=$ac_pwd ;;
1421 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001423 ac_top_srcdir=$srcdir
1424 ac_abs_top_srcdir=$srcdir ;;
1425 *) # Relative name.
1426 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1427 ac_top_srcdir=$ac_top_build_prefix$srcdir
1428 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001429esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001431
Martin v. Löwiseba40652007-08-30 20:10:57 +00001432 cd "$ac_dir" || { ac_status=$?; continue; }
1433 # Check for guested configure.
1434 if test -f "$ac_srcdir/configure.gnu"; then
1435 echo &&
1436 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1437 elif test -f "$ac_srcdir/configure"; then
1438 echo &&
1439 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001441 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442 fi || ac_status=$?
1443 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 done
1445fi
1446
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001448if $ac_init_version; then
1449 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001450python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001451generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
Martin v. Löwiseba40652007-08-30 20:10:57 +00001453Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014542002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This configure script is free software; the Free Software Foundation
1456gives unlimited permission to copy, distribute and modify it.
1457_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001458 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001460cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001461This file contains any messages produced by compilers while
1462running configure, to aid debugging if configure makes a mistake.
1463
Martin v. Löwis174440b2008-10-03 08:59:41 +00001464It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001465generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
1467 $ $0 $@
1468
1469_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001470exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001471{
1472cat <<_ASUNAME
1473## --------- ##
1474## Platform. ##
1475## --------- ##
1476
1477hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1478uname -m = `(uname -m) 2>/dev/null || echo unknown`
1479uname -r = `(uname -r) 2>/dev/null || echo unknown`
1480uname -s = `(uname -s) 2>/dev/null || echo unknown`
1481uname -v = `(uname -v) 2>/dev/null || echo unknown`
1482
1483/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1484/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1485
1486/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1487/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1488/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001489/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001490/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1491/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1492/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1493
1494_ASUNAME
1495
1496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1497for as_dir in $PATH
1498do
1499 IFS=$as_save_IFS
1500 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001501 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001502done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001503IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001504
1505} >&5
1506
1507cat >&5 <<_ACEOF
1508
1509
1510## ----------- ##
1511## Core tests. ##
1512## ----------- ##
1513
1514_ACEOF
1515
1516
1517# Keep a trace of the command line.
1518# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001519# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001520# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001521# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001523ac_configure_args0=
1524ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001525ac_must_keep_next=false
1526for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001527do
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 for ac_arg
1529 do
1530 case $ac_arg in
1531 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1532 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1533 | -silent | --silent | --silen | --sile | --sil)
1534 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001536 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001537 esac
1538 case $ac_pass in
1539 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1540 2)
1541 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1542 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001543 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001544 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001545 case $ac_arg in
1546 *=* | --config-cache | -C | -disable-* | --disable-* \
1547 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1548 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1549 | -with-* | --with-* | -without-* | --without-* | --x)
1550 case "$ac_configure_args0 " in
1551 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1552 esac
1553 ;;
1554 -* ) ac_must_keep_next=true ;;
1555 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001556 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001557 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001558 ;;
1559 esac
1560 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001561done
Skip Montanaro6dead952003-09-25 14:50:04 +00001562$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1563$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 +00001564
1565# When interrupted or exit'd, cleanup temporary files, and complete
1566# config.log. We remove comments because anyway the quotes in there
1567# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568# WARNING: Use '\'' to represent an apostrophe within the trap.
1569# 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 +00001570trap 'exit_status=$?
1571 # Save into config.log some information that might help in debugging.
1572 {
1573 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001574
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 cat <<\_ASBOX
1576## ---------------- ##
1577## Cache variables. ##
1578## ---------------- ##
1579_ASBOX
1580 echo
1581 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582(
1583 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1584 eval ac_val=\$$ac_var
1585 case $ac_val in #(
1586 *${as_nl}*)
1587 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001588 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1589echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 esac
1591 case $ac_var in #(
1592 _ | IFS | as_nl) ;; #(
1593 *) $as_unset $ac_var ;;
1594 esac ;;
1595 esac
1596 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001598 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1599 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 "s/'\''/'\''\\\\'\'''\''/g;
1602 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1603 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001604 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001605 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001606 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001607 esac |
1608 sort
1609)
Martin v. Löwis11437992002-04-12 09:54:03 +00001610 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001611
1612 cat <<\_ASBOX
1613## ----------------- ##
1614## Output variables. ##
1615## ----------------- ##
1616_ASBOX
1617 echo
1618 for ac_var in $ac_subst_vars
1619 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001620 eval ac_val=\$$ac_var
1621 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001622 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001623 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001624 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001625 done | sort
1626 echo
1627
1628 if test -n "$ac_subst_files"; then
1629 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001630## ------------------- ##
1631## File substitutions. ##
1632## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001633_ASBOX
1634 echo
1635 for ac_var in $ac_subst_files
1636 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001637 eval ac_val=\$$ac_var
1638 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001639 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001640 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001641 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001642 done | sort
1643 echo
1644 fi
1645
Martin v. Löwis11437992002-04-12 09:54:03 +00001646 if test -s confdefs.h; then
1647 cat <<\_ASBOX
1648## ----------- ##
1649## confdefs.h. ##
1650## ----------- ##
1651_ASBOX
1652 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001653 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 echo
1655 fi
1656 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001657 echo "$as_me: caught signal $ac_signal"
1658 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001659 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001660 rm -f core *.core core.conftest.* &&
1661 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001662 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001663' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001664for ac_signal in 1 2 13 15; do
1665 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1666done
1667ac_signal=0
1668
1669# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001670rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001671
1672# Predefined preprocessor variables.
1673
1674cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_NAME "$PACKAGE_NAME"
1676_ACEOF
1677
1678
1679cat >>confdefs.h <<_ACEOF
1680#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1681_ACEOF
1682
1683
1684cat >>confdefs.h <<_ACEOF
1685#define PACKAGE_VERSION "$PACKAGE_VERSION"
1686_ACEOF
1687
1688
1689cat >>confdefs.h <<_ACEOF
1690#define PACKAGE_STRING "$PACKAGE_STRING"
1691_ACEOF
1692
1693
1694cat >>confdefs.h <<_ACEOF
1695#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1696_ACEOF
1697
1698
1699# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001701if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001702 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001703elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001704 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001705else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001706 set x "$ac_default_prefix/share/config.site" \
1707 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001709shift
1710for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001711do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001713 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1714echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716 . "$ac_site_file"
1717 fi
1718done
1719
1720if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 # Some versions of bash will fail to source /dev/null (special
1722 # files actually), so we avoid doing that.
1723 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001724 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1725echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001727 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1728 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001729 esac
1730 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001731else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001732 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1733echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001734 >$cache_file
1735fi
1736
1737# Check that the precious variables saved in the cache have kept the same
1738# value.
1739ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001740for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1742 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001743 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1744 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 case $ac_old_set,$ac_new_set in
1746 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1748echo "$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 +00001749 ac_cache_corrupted=: ;;
1750 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1752echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001753 ac_cache_corrupted=: ;;
1754 ,);;
1755 *)
1756 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001757 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1758echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1759 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1760echo "$as_me: former value: $ac_old_val" >&2;}
1761 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1762echo "$as_me: current value: $ac_new_val" >&2;}
1763 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 fi;;
1765 esac
1766 # Pass precious variables to config.status.
1767 if test "$ac_new_set" = set; then
1768 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001769 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001770 *) ac_arg=$ac_var=$ac_new_val ;;
1771 esac
1772 case " $ac_configure_args " in
1773 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1774 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1775 esac
1776 fi
1777done
1778if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001779 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1780echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1781 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1782echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001783 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001784fi
1785
Martin v. Löwiseba40652007-08-30 20:10:57 +00001786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
Guido van Rossum7f43da71994-08-01 12:15:30 +00001810ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1814ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001815
Guido van Rossum627b2d71993-12-24 10:39:16 +00001816
Michael W. Hudson54241132001-12-07 15:38:26 +00001817
Martin v. Löwiseba40652007-08-30 20:10:57 +00001818ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
Georg Brandlbcd64a32009-03-31 21:45:18 +00001822if test "$prefix" != "/"; then
1823 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1824fi
1825
1826
Martin v. Löwis11437992002-04-12 09:54:03 +00001827
1828
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001829
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001830
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001831# We don't use PACKAGE_ variables, and they cause conflicts
1832# with other autoconf-based packages that include Python.h
1833grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1834rm confdefs.h
1835mv confdefs.h.new confdefs.h
1836
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001837
Martin v. Löwis174440b2008-10-03 08:59:41 +00001838VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001839
Martin v. Löwis1142de32002-03-29 16:28:31 +00001840
1841SOVERSION=1.0
1842
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001843# The later defininition of _XOPEN_SOURCE disables certain features
1844# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _GNU_SOURCE 1
1848_ACEOF
1849
1850
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define _NETBSD_SOURCE 1
1857_ACEOF
1858
1859
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1862# them.
1863
1864cat >>confdefs.h <<\_ACEOF
1865#define __BSD_VISIBLE 1
1866_ACEOF
1867
1868
Martin v. Löwisd6320502004-08-12 13:45:08 +00001869# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1870# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _BSD_TYPES 1
1874_ACEOF
1875
1876
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001877# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1878# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1879# them.
1880
1881cat >>confdefs.h <<\_ACEOF
1882#define _DARWIN_C_SOURCE 1
1883_ACEOF
1884
1885
1886
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001887define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001888
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001889# Arguments passed to configure.
1890
1891CONFIG_ARGS="$ac_configure_args"
1892
Martin v. Löwiseba40652007-08-30 20:10:57 +00001893# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001894if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001895 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001896 case $enableval in
1897 yes)
1898 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1899 ;;
1900 esac
1901 case $enableval in
1902 no)
1903 UNIVERSALSDK=
1904 enable_universalsdk=
1905 ;;
1906 *)
1907 UNIVERSALSDK=$enableval
1908 ;;
1909 esac
1910
1911else
1912
1913 UNIVERSALSDK=
1914 enable_universalsdk=
1915
Martin v. Löwiseba40652007-08-30 20:10:57 +00001916fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001917
1918
Martin v. Löwiseba40652007-08-30 20:10:57 +00001919
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001920
1921
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001922UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00001923
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001924{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1925echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001926
1927# Check whether --with-universal-archs was given.
1928if test "${with_universal_archs+set}" = set; then
1929 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001930 { echo "$as_me:$LINENO: result: $withval" >&5
1931echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001932 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001933 if test "${enable_universalsdk}" ; then
1934 :
1935 else
1936 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1937echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1938 { (exit 1); exit 1; }; }
1939 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001940
1941else
1942
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001943 { echo "$as_me:$LINENO: result: 32-bit" >&5
1944echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001945
1946fi
1947
1948
1949
1950
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001951
1952# Check whether --with-framework-name was given.
1953if test "${with_framework_name+set}" = set; then
1954 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001955 if test "${enable_framework}"; then
1956 :
1957 else
1958 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1959echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1960 { (exit 1); exit 1; }; }
1961 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001962 PYTHONFRAMEWORK=${withval}
1963 PYTHONFRAMEWORKDIR=${withval}.framework
1964 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1965
1966else
1967
1968 PYTHONFRAMEWORK=Python
1969 PYTHONFRAMEWORKDIR=Python.framework
1970 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1971
1972fi
1973
Martin v. Löwiseba40652007-08-30 20:10:57 +00001974# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001975if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001976 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001977 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001978 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001979 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001980 esac
1981 case $enableval in
1982 no)
1983 PYTHONFRAMEWORK=
1984 PYTHONFRAMEWORKDIR=no-framework
1985 PYTHONFRAMEWORKPREFIX=
1986 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001987 FRAMEWORKINSTALLFIRST=
1988 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001989 FRAMEWORKALTINSTALLFIRST=
1990 FRAMEWORKALTINSTALLLAST=
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 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001997 ;;
1998 *)
1999 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002000 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002001 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002002 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002003 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2004 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002005
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002006 if test "x${prefix}" = "xNONE" ; then
2007 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2008 else
2009 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2010 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002011 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002012
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002013 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002014 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002015 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002016
Martin v. Löwiseba40652007-08-30 20:10:57 +00002017 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002018
Martin v. Löwiseba40652007-08-30 20:10:57 +00002019 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002020
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002021 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2022
2023 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2024
Jack Jansene578a632001-08-15 01:27:14 +00002025 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002026
Guido van Rossum563e7081996-09-10 18:20:48 +00002027else
Martin v. Löwis11437992002-04-12 09:54:03 +00002028
Jack Jansene578a632001-08-15 01:27:14 +00002029 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002030 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002031 PYTHONFRAMEWORKPREFIX=
2032 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002033 FRAMEWORKINSTALLFIRST=
2034 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002035 FRAMEWORKALTINSTALLFIRST=
2036 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002037 if test "x${prefix}" = "xNONE" ; then
2038 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2039 else
2040 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2041 fi
Jack Jansene578a632001-08-15 01:27:14 +00002042 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002043
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002044
Martin v. Löwiseba40652007-08-30 20:10:57 +00002045fi
2046
Michael W. Hudson54241132001-12-07 15:38:26 +00002047
2048
2049
2050
Jack Jansene578a632001-08-15 01:27:14 +00002051
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002052
2053
Ronald Oussoren5b787322006-06-06 19:50:24 +00002054
2055
2056
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002057
Jack Jansene578a632001-08-15 01:27:14 +00002058##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002059## AC_HELP_STRING(--with-dyld,
2060## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002061##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002062# Set name for machine-dependent library files
2063
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002064{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2065echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002066if test -z "$MACHDEP"
2067then
Guido van Rossum563e7081996-09-10 18:20:48 +00002068 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002069 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002070 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002071 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002073 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002074 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002075 ac_md_system=`echo $ac_sys_system |
2076 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2077 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002078 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002079 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002080
Guido van Rossum07397971997-04-29 21:49:50 +00002081 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002082 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002083 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002084 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002085 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002086 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002087 esac
2088fi
Guido van Rossum91922671997-10-09 20:24:13 +00002089
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002090# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2091# disable features if it is defined, without any means to access these
2092# features as extensions. For these systems, we skip the definition of
2093# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2094# some feature, make sure there is no alternative way to access this
2095# feature. Also, when using wildcards, make sure you have verified the
2096# need for not defining _XOPEN_SOURCE on all systems matching the
2097# wildcard, and that the wildcard does not include future systems
2098# (which may remove their limitations).
2099case $ac_sys_system/$ac_sys_release in
2100 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2101 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002102 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002103 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002104 define_xopen_source=no
2105 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2106 # also defined. This can be overridden by defining _BSD_SOURCE
2107 # As this has a different meaning on Linux, only define it on OpenBSD
2108
2109cat >>confdefs.h <<\_ACEOF
2110#define _BSD_SOURCE 1
2111_ACEOF
2112
2113 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002114 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2115 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2116 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002117 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 +00002118 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002119 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2120 # of union __?sigval. Reported by Stuart Bishop.
2121 SunOS/5.6)
2122 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002123 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2124 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002125 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002126 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002127 define_xopen_source=no;;
2128 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002129 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002130 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002131 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002132 # On FreeBSD 4, the math functions C89 does not cover are never defined
2133 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2134 FreeBSD/4.*)
2135 define_xopen_source=no;;
2136 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2137 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2138 # identifies itself as Darwin/7.*
2139 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2140 # disables platform specific features beyond repair.
2141 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2142 # has no effect, don't bother defining them
2143 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002144 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002145 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2146 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2147 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002148 AIX/4)
2149 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002150 AIX/5)
2151 if test `uname -r` -eq 1; then
2152 define_xopen_source=no
2153 fi
2154 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002155 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2156 # defining NI_NUMERICHOST.
2157 QNX/6.3.2)
2158 define_xopen_source=no
2159 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002160
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002161esac
2162
2163if test $define_xopen_source = yes
2164then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002165 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2166 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002167 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2168 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002170 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002171
2172cat >>confdefs.h <<\_ACEOF
2173#define _XOPEN_SOURCE 500
2174_ACEOF
2175
2176 ;;
2177 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002178
2179cat >>confdefs.h <<\_ACEOF
2180#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002181_ACEOF
2182
Skip Montanarof0d5f792004-08-15 14:08:23 +00002183 ;;
2184 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002185
2186 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2187 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2188 # several APIs are not declared. Since this is also needed in some
2189 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002190 # except for Solaris 10, where it must not be defined,
2191 # as it implies XPG4.2
2192 case $ac_sys_system/$ac_sys_release in
2193 SunOS/5.10)
2194 ;;
2195 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002196
2197cat >>confdefs.h <<\_ACEOF
2198#define _XOPEN_SOURCE_EXTENDED 1
2199_ACEOF
2200
Martin v. Löwis7dece662005-11-26 11:38:24 +00002201 ;;
2202 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002203
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002204
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002205cat >>confdefs.h <<\_ACEOF
2206#define _POSIX_C_SOURCE 200112L
2207_ACEOF
2208
2209
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002210fi
2211
Guido van Rossum91922671997-10-09 20:24:13 +00002212#
2213# SGI compilers allow the specification of the both the ABI and the
2214# ISA on the command line. Depending on the values of these switches,
2215# different and often incompatable code will be generated.
2216#
2217# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2218# thus supply support for various ABI/ISA combinations. The MACHDEP
2219# variable is also adjusted.
2220#
2221
2222if test ! -z "$SGI_ABI"
2223then
2224 CC="cc $SGI_ABI"
2225 LDFLAGS="$SGI_ABI $LDFLAGS"
2226 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2227fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002228{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2229echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002230
Jack Jansen83f898c2002-12-30 22:23:40 +00002231# And add extra plat-mac for darwin
2232
Jack Jansen7b59b422003-03-17 15:44:10 +00002233
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002234{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2235echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002236if test -z "$EXTRAPLATDIR"
2237then
2238 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002239 darwin)
2240 EXTRAPLATDIR="\$(PLATMACDIRS)"
2241 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2242 ;;
2243 *)
2244 EXTRAPLATDIR=""
2245 EXTRAMACHDEPPATH=""
2246 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002247 esac
2248fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002249{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2250echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002251
Jack Jansen6b08a402004-06-03 12:41:45 +00002252# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2253# it may influence the way we can build extensions, so distutils
2254# needs to check it
2255
Ronald Oussoren988117f2006-04-29 11:31:35 +00002256
Jack Jansen6b08a402004-06-03 12:41:45 +00002257CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002258EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002259
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002260{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2261echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002262ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002263{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2264echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002265
Guido van Rossum627b2d71993-12-24 10:39:16 +00002266# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002267
2268# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2269# for debug/optimization stuff. BASECFLAGS is for flags that are required
2270# just to get things to compile and link. Users are free to override OPT
2271# when running configure or make. The build should not break if they do.
2272# BASECFLAGS should generally not be messed with, however.
2273
2274# XXX shouldn't some/most/all of this code be merged with the stuff later
2275# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002276{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2277echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002278
Martin v. Löwiseba40652007-08-30 20:10:57 +00002279# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002280if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002281 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002282 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002283 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002284 without_gcc=yes;;
2285 yes) CC=gcc
2286 without_gcc=no;;
2287 *) CC=$withval
2288 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002289 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002290else
Martin v. Löwis11437992002-04-12 09:54:03 +00002291
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002292 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002293 AIX*) CC=cc_r
2294 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002295 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002296 case $BE_HOST_CPU in
2297 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002298 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002299 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002300 BASECFLAGS="$BASECFLAGS -export pragma"
2301 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002302 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002303 ;;
2304 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002305 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002306 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002307 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002308 ;;
2309 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002310 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2311echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002312 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002313 ;;
2314 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002315 AR="\$(srcdir)/Modules/ar_beos"
2316 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002317 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002318 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002319 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002320fi
2321
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002322{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2323echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002324
Guido van Rossum8b131c51995-03-09 14:10:13 +00002325# If the user switches compilers, we can't believe the cache
2326if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2327then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002328 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002329(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002330echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002331(it is also a good idea to do 'make clean' before compiling)" >&2;}
2332 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002333fi
2334
Martin v. Löwis11437992002-04-12 09:54:03 +00002335ac_ext=c
2336ac_cpp='$CPP $CPPFLAGS'
2337ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2338ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2339ac_compiler_gnu=$ac_cv_c_compiler_gnu
2340if test -n "$ac_tool_prefix"; then
2341 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2342set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002343{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2344echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002345if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002346 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002347else
2348 if test -n "$CC"; then
2349 ac_cv_prog_CC="$CC" # Let the user override the test.
2350else
Martin v. Löwis11437992002-04-12 09:54:03 +00002351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2352for as_dir in $PATH
2353do
2354 IFS=$as_save_IFS
2355 test -z "$as_dir" && as_dir=.
2356 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002357 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 +00002358 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002359 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002360 break 2
2361 fi
2362done
2363done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002364IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002365
Jack Jansendd19cf82001-12-06 22:36:17 +00002366fi
2367fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002368CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002369if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002370 { echo "$as_me:$LINENO: result: $CC" >&5
2371echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002372else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002373 { echo "$as_me:$LINENO: result: no" >&5
2374echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002375fi
2376
Martin v. Löwiseba40652007-08-30 20:10:57 +00002377
Martin v. Löwis11437992002-04-12 09:54:03 +00002378fi
2379if test -z "$ac_cv_prog_CC"; then
2380 ac_ct_CC=$CC
2381 # Extract the first word of "gcc", so it can be a program name with args.
2382set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002383{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2384echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002385if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002386 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002387else
2388 if test -n "$ac_ct_CC"; then
2389 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2390else
2391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2392for as_dir in $PATH
2393do
2394 IFS=$as_save_IFS
2395 test -z "$as_dir" && as_dir=.
2396 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002397 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 +00002398 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002399 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002400 break 2
2401 fi
2402done
2403done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002404IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002405
2406fi
2407fi
2408ac_ct_CC=$ac_cv_prog_ac_ct_CC
2409if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002410 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2411echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002413 { echo "$as_me:$LINENO: result: no" >&5
2414echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002415fi
2416
Martin v. Löwiseba40652007-08-30 20:10:57 +00002417 if test "x$ac_ct_CC" = x; then
2418 CC=""
2419 else
2420 case $cross_compiling:$ac_tool_warned in
2421yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002422{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2423whose name does not start with the host triplet. If you think this
2424configuration is useful to you, please write to autoconf@gnu.org." >&5
2425echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2426whose name does not start with the host triplet. If you think this
2427configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002428ac_tool_warned=yes ;;
2429esac
2430 CC=$ac_ct_CC
2431 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002432else
2433 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002434fi
2435
Jack Jansendd19cf82001-12-06 22:36:17 +00002436if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002437 if test -n "$ac_tool_prefix"; then
2438 # 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 +00002439set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002440{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2441echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002442if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002443 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002444else
2445 if test -n "$CC"; then
2446 ac_cv_prog_CC="$CC" # Let the user override the test.
2447else
Martin v. Löwis11437992002-04-12 09:54:03 +00002448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2449for as_dir in $PATH
2450do
2451 IFS=$as_save_IFS
2452 test -z "$as_dir" && as_dir=.
2453 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454 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 +00002455 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002456 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 break 2
2458 fi
2459done
2460done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002462
2463fi
2464fi
2465CC=$ac_cv_prog_CC
2466if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002467 { echo "$as_me:$LINENO: result: $CC" >&5
2468echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002469else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002470 { echo "$as_me:$LINENO: result: no" >&5
2471echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002472fi
2473
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002476fi
2477if test -z "$CC"; then
2478 # Extract the first word of "cc", so it can be a program name with args.
2479set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002480{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2481echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002482if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002483 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002484else
2485 if test -n "$CC"; then
2486 ac_cv_prog_CC="$CC" # Let the user override the test.
2487else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002488 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2490for as_dir in $PATH
2491do
2492 IFS=$as_save_IFS
2493 test -z "$as_dir" && as_dir=.
2494 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002495 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 +00002496 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2497 ac_prog_rejected=yes
2498 continue
2499 fi
2500 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002501 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 break 2
2503 fi
2504done
2505done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002506IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002507
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002508if test $ac_prog_rejected = yes; then
2509 # We found a bogon in the path, so make sure we never use it.
2510 set dummy $ac_cv_prog_CC
2511 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002513 # We chose a different compiler from the bogus one.
2514 # However, it has the same basename, so the bogon will be chosen
2515 # first if we set CC to just the basename; use the full file name.
2516 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002518 fi
2519fi
2520fi
2521fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002522CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002523if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002524 { echo "$as_me:$LINENO: result: $CC" >&5
2525echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002526else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002527 { echo "$as_me:$LINENO: result: no" >&5
2528echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002529fi
2530
Martin v. Löwiseba40652007-08-30 20:10:57 +00002531
Martin v. Löwis11437992002-04-12 09:54:03 +00002532fi
2533if test -z "$CC"; then
2534 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002535 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 do
2537 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2538set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002539{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2540echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002541if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002542 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002543else
2544 if test -n "$CC"; then
2545 ac_cv_prog_CC="$CC" # Let the user override the test.
2546else
Martin v. Löwis11437992002-04-12 09:54:03 +00002547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2548for as_dir in $PATH
2549do
2550 IFS=$as_save_IFS
2551 test -z "$as_dir" && as_dir=.
2552 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002553 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 +00002554 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002555 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002557 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002558done
2559done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002560IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002561
2562fi
2563fi
2564CC=$ac_cv_prog_CC
2565if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002566 { echo "$as_me:$LINENO: result: $CC" >&5
2567echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002568else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002569 { echo "$as_me:$LINENO: result: no" >&5
2570echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002571fi
2572
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 test -n "$CC" && break
2575 done
2576fi
2577if test -z "$CC"; then
2578 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002579 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002580do
2581 # Extract the first word of "$ac_prog", so it can be a program name with args.
2582set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002583{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2584echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002585if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002586 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002587else
2588 if test -n "$ac_ct_CC"; then
2589 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2590else
2591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2592for as_dir in $PATH
2593do
2594 IFS=$as_save_IFS
2595 test -z "$as_dir" && as_dir=.
2596 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597 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 +00002598 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002599 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 break 2
2601 fi
2602done
2603done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002604IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606fi
2607fi
2608ac_ct_CC=$ac_cv_prog_ac_ct_CC
2609if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002610 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2611echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002612else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002613 { echo "$as_me:$LINENO: result: no" >&5
2614echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002615fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002616
Martin v. Löwiseba40652007-08-30 20:10:57 +00002617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 test -n "$ac_ct_CC" && break
2619done
Michael W. Hudson54241132001-12-07 15:38:26 +00002620
Martin v. Löwiseba40652007-08-30 20:10:57 +00002621 if test "x$ac_ct_CC" = x; then
2622 CC=""
2623 else
2624 case $cross_compiling:$ac_tool_warned in
2625yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002626{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2627whose name does not start with the host triplet. If you think this
2628configuration is useful to you, please write to autoconf@gnu.org." >&5
2629echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2630whose name does not start with the host triplet. If you think this
2631configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002632ac_tool_warned=yes ;;
2633esac
2634 CC=$ac_ct_CC
2635 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002636fi
2637
2638fi
2639
2640
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002641test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002642See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002643echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002644See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002646
2647# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002648echo "$as_me:$LINENO: checking for C compiler version" >&5
2649ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650{ (ac_try="$ac_compiler --version >&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 --version >&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); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002670{ (ac_try="$ac_compiler -V >&5"
2671case "(($ac_try" in
2672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2673 *) ac_try_echo=$ac_try;;
2674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002676 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 (exit $ac_status); }
2680
2681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002682/* confdefs.h. */
2683_ACEOF
2684cat confdefs.h >>conftest.$ac_ext
2685cat >>conftest.$ac_ext <<_ACEOF
2686/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002687
Martin v. Löwis11437992002-04-12 09:54:03 +00002688int
2689main ()
2690{
2691
2692 ;
2693 return 0;
2694}
2695_ACEOF
2696ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002697ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002698# Try to create an executable without -o first, disregard a.out.
2699# It will help us diagnose broken compilers, and finding out an intuition
2700# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002701{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2702echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2703ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2704#
2705# List of possible output files, starting from the most likely.
2706# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2707# only as a last resort. b.out is created by i960 compilers.
2708ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2709#
2710# The IRIX 6 linker writes into existing files which may not be
2711# executable, retaining their permissions. Remove them first so a
2712# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002713ac_rmfiles=
2714for ac_file in $ac_files
2715do
2716 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002717 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002718 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2719 esac
2720done
2721rm -f $ac_rmfiles
2722
2723if { (ac_try="$ac_link_default"
2724case "(($ac_try" in
2725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2726 *) ac_try_echo=$ac_try;;
2727esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002729 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002733 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2734# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2735# in a Makefile. We should not override ac_cv_exeext if it was cached,
2736# so that the user can short-circuit this test for compilers unknown to
2737# Autoconf.
2738for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002739do
2740 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002742 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002743 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002744 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002745 # We found the default executable, but exeext='' is most
2746 # certainly right.
2747 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002748 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002749 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2750 then :; else
2751 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2752 fi
2753 # We set ac_cv_exeext here because the later test for it is not
2754 # safe: cross compilers may not add the suffix if given an `-o'
2755 # argument, so we may need to know it at that point already.
2756 # Even if this section looks crufty: it has the advantage of
2757 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002758 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002759 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002760 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 esac
2762done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763test "$ac_cv_exeext" = no && ac_cv_exeext=
2764
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002765else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002766 ac_file=''
2767fi
2768
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002769{ echo "$as_me:$LINENO: result: $ac_file" >&5
2770echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002771if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002773sed 's/^/| /' conftest.$ac_ext >&5
2774
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002775{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002776See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002777echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002778See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002779 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002780fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002781
Martin v. Löwis11437992002-04-12 09:54:03 +00002782ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002783
Martin v. Löwiseba40652007-08-30 20:10:57 +00002784# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002785# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002786{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2787echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002788# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2789# If not cross compiling, check that we can run a simple program.
2790if test "$cross_compiling" != yes; then
2791 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002792 { (case "(($ac_try" in
2793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2794 *) ac_try_echo=$ac_try;;
2795esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002800 (exit $ac_status); }; }; then
2801 cross_compiling=no
2802 else
2803 if test "$cross_compiling" = maybe; then
2804 cross_compiling=yes
2805 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002806 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002807If you meant to cross compile, use \`--host'.
2808See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002809echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002810If you meant to cross compile, use \`--host'.
2811See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002812 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002813 fi
2814 fi
2815fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002816{ echo "$as_me:$LINENO: result: yes" >&5
2817echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002818
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002819rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002820ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002821# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002822# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002823{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2824echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2825{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2826echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002828{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2829echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002830if { (ac_try="$ac_link"
2831case "(($ac_try" in
2832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2833 *) ac_try_echo=$ac_try;;
2834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002836 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 (exit $ac_status); }; then
2840 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2841# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2842# work properly (i.e., refer to `conftest.exe'), while it won't with
2843# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002844for ac_file in conftest.exe conftest conftest.*; do
2845 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002846 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002847 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002848 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002849 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 * ) break;;
2851 esac
2852done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002853else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002854 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002855See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002856echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002857See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002859fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002860
Martin v. Löwis11437992002-04-12 09:54:03 +00002861rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002862{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2863echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
2865rm -f conftest.$ac_ext
2866EXEEXT=$ac_cv_exeext
2867ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002868{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2869echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002870if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002871 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002872else
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002874/* confdefs.h. */
2875_ACEOF
2876cat confdefs.h >>conftest.$ac_ext
2877cat >>conftest.$ac_ext <<_ACEOF
2878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002879
Martin v. Löwis11437992002-04-12 09:54:03 +00002880int
2881main ()
2882{
2883
2884 ;
2885 return 0;
2886}
2887_ACEOF
2888rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002889if { (ac_try="$ac_compile"
2890case "(($ac_try" in
2891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2892 *) ac_try_echo=$ac_try;;
2893esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002895 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002898 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002899 for ac_file in conftest.o conftest.obj conftest.*; do
2900 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002901 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002902 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2904 break;;
2905 esac
2906done
2907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002909sed 's/^/| /' conftest.$ac_ext >&5
2910
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002911{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002912See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002913echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002914See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002915 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002916fi
2917
2918rm -f conftest.$ac_cv_objext conftest.$ac_ext
2919fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002920{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2921echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002922OBJEXT=$ac_cv_objext
2923ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002924{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2925echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002926if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002927 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002928else
2929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002930/* confdefs.h. */
2931_ACEOF
2932cat confdefs.h >>conftest.$ac_ext
2933cat >>conftest.$ac_ext <<_ACEOF
2934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002935
Martin v. Löwis11437992002-04-12 09:54:03 +00002936int
2937main ()
2938{
2939#ifndef __GNUC__
2940 choke me
2941#endif
2942
2943 ;
2944 return 0;
2945}
2946_ACEOF
2947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002948if { (ac_try="$ac_compile"
2949case "(($ac_try" in
2950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2951 *) ac_try_echo=$ac_try;;
2952esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002956 grep -v '^ *+' conftest.er1 >conftest.err
2957 rm -f conftest.er1
2958 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002960 (exit $ac_status); } && {
2961 test -z "$ac_c_werror_flag" ||
2962 test ! -s conftest.err
2963 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002964 ac_compiler_gnu=yes
2965else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002967sed 's/^/| /' conftest.$ac_ext >&5
2968
Martin v. Löwiseba40652007-08-30 20:10:57 +00002969 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002971
2972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002973ac_cv_c_compiler_gnu=$ac_compiler_gnu
2974
2975fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002976{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2977echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2978GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002979ac_test_CFLAGS=${CFLAGS+set}
2980ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002981{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2982echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002983if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002984 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002985else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002986 ac_save_c_werror_flag=$ac_c_werror_flag
2987 ac_c_werror_flag=yes
2988 ac_cv_prog_cc_g=no
2989 CFLAGS="-g"
2990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002991/* confdefs.h. */
2992_ACEOF
2993cat confdefs.h >>conftest.$ac_ext
2994cat >>conftest.$ac_ext <<_ACEOF
2995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997int
2998main ()
2999{
3000
3001 ;
3002 return 0;
3003}
3004_ACEOF
3005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006if { (ac_try="$ac_compile"
3007case "(($ac_try" in
3008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3009 *) ac_try_echo=$ac_try;;
3010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003014 grep -v '^ *+' conftest.er1 >conftest.err
3015 rm -f conftest.er1
3016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003018 (exit $ac_status); } && {
3019 test -z "$ac_c_werror_flag" ||
3020 test ! -s conftest.err
3021 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003022 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003023else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003025sed 's/^/| /' conftest.$ac_ext >&5
3026
Martin v. Löwiseba40652007-08-30 20:10:57 +00003027 CFLAGS=""
3028 cat >conftest.$ac_ext <<_ACEOF
3029/* confdefs.h. */
3030_ACEOF
3031cat confdefs.h >>conftest.$ac_ext
3032cat >>conftest.$ac_ext <<_ACEOF
3033/* end confdefs.h. */
3034
3035int
3036main ()
3037{
3038
3039 ;
3040 return 0;
3041}
3042_ACEOF
3043rm -f conftest.$ac_objext
3044if { (ac_try="$ac_compile"
3045case "(($ac_try" in
3046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3047 *) ac_try_echo=$ac_try;;
3048esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003050 (eval "$ac_compile") 2>conftest.er1
3051 ac_status=$?
3052 grep -v '^ *+' conftest.er1 >conftest.err
3053 rm -f conftest.er1
3054 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003056 (exit $ac_status); } && {
3057 test -z "$ac_c_werror_flag" ||
3058 test ! -s conftest.err
3059 } && test -s conftest.$ac_objext; then
3060 :
3061else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003062 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003063sed 's/^/| /' conftest.$ac_ext >&5
3064
3065 ac_c_werror_flag=$ac_save_c_werror_flag
3066 CFLAGS="-g"
3067 cat >conftest.$ac_ext <<_ACEOF
3068/* confdefs.h. */
3069_ACEOF
3070cat confdefs.h >>conftest.$ac_ext
3071cat >>conftest.$ac_ext <<_ACEOF
3072/* end confdefs.h. */
3073
3074int
3075main ()
3076{
3077
3078 ;
3079 return 0;
3080}
3081_ACEOF
3082rm -f conftest.$ac_objext
3083if { (ac_try="$ac_compile"
3084case "(($ac_try" in
3085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3086 *) ac_try_echo=$ac_try;;
3087esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003089 (eval "$ac_compile") 2>conftest.er1
3090 ac_status=$?
3091 grep -v '^ *+' conftest.er1 >conftest.err
3092 rm -f conftest.er1
3093 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003095 (exit $ac_status); } && {
3096 test -z "$ac_c_werror_flag" ||
3097 test ! -s conftest.err
3098 } && test -s conftest.$ac_objext; then
3099 ac_cv_prog_cc_g=yes
3100else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003101 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003102sed 's/^/| /' conftest.$ac_ext >&5
3103
3104
Guido van Rossum627b2d71993-12-24 10:39:16 +00003105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003106
3107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003108fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003109
3110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3111fi
3112
3113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3114 ac_c_werror_flag=$ac_save_c_werror_flag
3115fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003116{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3117echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003118if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003119 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003120elif test $ac_cv_prog_cc_g = yes; then
3121 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003122 CFLAGS="-g -O2"
3123 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003124 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003125 fi
3126else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003127 if test "$GCC" = yes; then
3128 CFLAGS="-O2"
3129 else
3130 CFLAGS=
3131 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003132fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003133{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3134echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003135if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003136 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003137else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003138 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003139ac_save_CC=$CC
3140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003141/* confdefs.h. */
3142_ACEOF
3143cat confdefs.h >>conftest.$ac_ext
3144cat >>conftest.$ac_ext <<_ACEOF
3145/* end confdefs.h. */
3146#include <stdarg.h>
3147#include <stdio.h>
3148#include <sys/types.h>
3149#include <sys/stat.h>
3150/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3151struct buf { int x; };
3152FILE * (*rcsopen) (struct buf *, struct stat *, int);
3153static char *e (p, i)
3154 char **p;
3155 int i;
3156{
3157 return p[i];
3158}
3159static char *f (char * (*g) (char **, int), char **p, ...)
3160{
3161 char *s;
3162 va_list v;
3163 va_start (v,p);
3164 s = g (p, va_arg (v,int));
3165 va_end (v);
3166 return s;
3167}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003168
3169/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3170 function prototypes and stuff, but not '\xHH' hex character constants.
3171 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003173 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3174 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003175 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003176int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3177
Martin v. Löwiseba40652007-08-30 20:10:57 +00003178/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3179 inside strings and character constants. */
3180#define FOO(x) 'x'
3181int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3182
Skip Montanaro6dead952003-09-25 14:50:04 +00003183int test (int i, double x);
3184struct s1 {int (*f) (int a);};
3185struct s2 {int (*f) (double a);};
3186int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3187int argc;
3188char **argv;
3189int
3190main ()
3191{
3192return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3193 ;
3194 return 0;
3195}
3196_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003197for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3198 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003199do
3200 CC="$ac_save_CC $ac_arg"
3201 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003202if { (ac_try="$ac_compile"
3203case "(($ac_try" in
3204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3205 *) ac_try_echo=$ac_try;;
3206esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003208 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003210 grep -v '^ *+' conftest.er1 >conftest.err
3211 rm -f conftest.er1
3212 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003214 (exit $ac_status); } && {
3215 test -z "$ac_c_werror_flag" ||
3216 test ! -s conftest.err
3217 } && test -s conftest.$ac_objext; then
3218 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003221sed 's/^/| /' conftest.$ac_ext >&5
3222
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223
Skip Montanaro6dead952003-09-25 14:50:04 +00003224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003225
3226rm -f core conftest.err conftest.$ac_objext
3227 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003228done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003229rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003230CC=$ac_save_CC
3231
3232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003233# AC_CACHE_VAL
3234case "x$ac_cv_prog_cc_c89" in
3235 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003236 { echo "$as_me:$LINENO: result: none needed" >&5
3237echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003238 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003239 { echo "$as_me:$LINENO: result: unsupported" >&5
3240echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003241 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003242 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003243 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3244echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003245esac
3246
Skip Montanaro6dead952003-09-25 14:50:04 +00003247
Martin v. Löwis11437992002-04-12 09:54:03 +00003248ac_ext=c
3249ac_cpp='$CPP $CPPFLAGS'
3250ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3251ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3252ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003253
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003254
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003255
3256
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003257{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3258echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003259
Martin v. Löwiseba40652007-08-30 20:10:57 +00003260# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003261if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003263
3264 case $withval in
3265 no) with_cxx_main=no
3266 MAINCC='$(CC)';;
3267 yes) with_cxx_main=yes
3268 MAINCC='$(CXX)';;
3269 *) with_cxx_main=yes
3270 MAINCC=$withval
3271 if test -z "$CXX"
3272 then
3273 CXX=$withval
3274 fi;;
3275 esac
3276else
3277
3278 with_cxx_main=no
3279 MAINCC='$(CC)'
3280
Martin v. Löwiseba40652007-08-30 20:10:57 +00003281fi
3282
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003283{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3284echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003285
3286preset_cxx="$CXX"
3287if test -z "$CXX"
3288then
3289 case "$CC" in
3290 gcc) # Extract the first word of "g++", so it can be a program name with args.
3291set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003292{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3293echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003294if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003295 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003296else
3297 case $CXX in
3298 [\\/]* | ?:[\\/]*)
3299 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3300 ;;
3301 *)
3302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3303for as_dir in notfound
3304do
3305 IFS=$as_save_IFS
3306 test -z "$as_dir" && as_dir=.
3307 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003308 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 +00003309 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003310 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003311 break 2
3312 fi
3313done
3314done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003315IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003316
3317 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3318 ;;
3319esac
3320fi
3321CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003322if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003323 { echo "$as_me:$LINENO: result: $CXX" >&5
3324echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003325else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003326 { echo "$as_me:$LINENO: result: no" >&5
3327echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003329
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003330 ;;
3331 cc) # Extract the first word of "c++", so it can be a program name with args.
3332set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003333{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003335if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003336 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003337else
3338 case $CXX in
3339 [\\/]* | ?:[\\/]*)
3340 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3341 ;;
3342 *)
3343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3344for as_dir in notfound
3345do
3346 IFS=$as_save_IFS
3347 test -z "$as_dir" && as_dir=.
3348 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003349 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 +00003350 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003352 break 2
3353 fi
3354done
3355done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003356IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003357
3358 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3359 ;;
3360esac
3361fi
3362CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003363if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003364 { echo "$as_me:$LINENO: result: $CXX" >&5
3365echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003367 { echo "$as_me:$LINENO: result: no" >&5
3368echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003370
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003371 ;;
3372 esac
3373 if test "$CXX" = "notfound"
3374 then
3375 CXX=""
3376 fi
3377fi
3378if test -z "$CXX"
3379then
3380 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3381do
3382 # Extract the first word of "$ac_prog", so it can be a program name with args.
3383set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003384{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3385echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003386if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003387 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003388else
3389 if test -n "$CXX"; then
3390 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3391else
3392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3393for as_dir in $PATH
3394do
3395 IFS=$as_save_IFS
3396 test -z "$as_dir" && as_dir=.
3397 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003398 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 +00003399 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003400 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003401 break 2
3402 fi
3403done
3404done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003405IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003406
3407fi
3408fi
3409CXX=$ac_cv_prog_CXX
3410if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003411 { echo "$as_me:$LINENO: result: $CXX" >&5
3412echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003413else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003414 { echo "$as_me:$LINENO: result: no" >&5
3415echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003416fi
3417
Martin v. Löwiseba40652007-08-30 20:10:57 +00003418
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003419 test -n "$CXX" && break
3420done
3421test -n "$CXX" || CXX="notfound"
3422
3423 if test "$CXX" = "notfound"
3424 then
3425 CXX=""
3426 fi
3427fi
3428if test "$preset_cxx" != "$CXX"
3429then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003430 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003431
3432 By default, distutils will build C++ extension modules with \"$CXX\".
3433 If this is not intended, then set CXX on the configure command line.
3434 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003435echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003436
3437 By default, distutils will build C++ extension modules with \"$CXX\".
3438 If this is not intended, then set CXX on the configure command line.
3439 " >&2;}
3440fi
3441
3442
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003443# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003444
3445ac_ext=c
3446ac_cpp='$CPP $CPPFLAGS'
3447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3449ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003450{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3451echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003452# On Suns, sometimes $CPP names a directory.
3453if test -n "$CPP" && test -d "$CPP"; then
3454 CPP=
3455fi
3456if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003458 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003459else
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 # Double quotes because CPP needs to be expanded
3461 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3462 do
3463 ac_preproc_ok=false
3464for ac_c_preproc_warn_flag in '' yes
3465do
3466 # Use a header file that comes with gcc, so configuring glibc
3467 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003468 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3469 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003470 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 # not just through cpp. "Syntax error" is here to catch this case.
3472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003473/* confdefs.h. */
3474_ACEOF
3475cat confdefs.h >>conftest.$ac_ext
3476cat >>conftest.$ac_ext <<_ACEOF
3477/* end confdefs.h. */
3478#ifdef __STDC__
3479# include <limits.h>
3480#else
3481# include <assert.h>
3482#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003483 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003484_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485if { (ac_try="$ac_cpp conftest.$ac_ext"
3486case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003491 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003493 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 rm -f conftest.er1
3495 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497 (exit $ac_status); } >/dev/null && {
3498 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3499 test ! -s conftest.err
3500 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003501 :
3502else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003504sed 's/^/| /' conftest.$ac_ext >&5
3505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # Broken: fails on valid input.
3507continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003511
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 # can be detected and how.
3514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003515/* confdefs.h. */
3516_ACEOF
3517cat confdefs.h >>conftest.$ac_ext
3518cat >>conftest.$ac_ext <<_ACEOF
3519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003520#include <ac_nonexistent.h>
3521_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522if { (ac_try="$ac_cpp conftest.$ac_ext"
3523case "(($ac_try" in
3524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3525 *) ac_try_echo=$ac_try;;
3526esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003528 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003530 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 rm -f conftest.er1
3532 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003534 (exit $ac_status); } >/dev/null && {
3535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3536 test ! -s conftest.err
3537 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Broken: success on invalid input.
3539continue
3540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Passes both tests.
3545ac_preproc_ok=:
3546break
3547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003548
Martin v. Löwis11437992002-04-12 09:54:03 +00003549rm -f conftest.err conftest.$ac_ext
3550
3551done
3552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553rm -f conftest.err conftest.$ac_ext
3554if $ac_preproc_ok; then
3555 break
3556fi
3557
3558 done
3559 ac_cv_prog_CPP=$CPP
3560
3561fi
3562 CPP=$ac_cv_prog_CPP
3563else
3564 ac_cv_prog_CPP=$CPP
3565fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003566{ echo "$as_me:$LINENO: result: $CPP" >&5
3567echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003568ac_preproc_ok=false
3569for ac_c_preproc_warn_flag in '' yes
3570do
3571 # Use a header file that comes with gcc, so configuring glibc
3572 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003573 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3574 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 # On the NeXT, cc -E runs the code through the compiler's parser,
3576 # not just through cpp. "Syntax error" is here to catch this case.
3577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003578/* confdefs.h. */
3579_ACEOF
3580cat confdefs.h >>conftest.$ac_ext
3581cat >>conftest.$ac_ext <<_ACEOF
3582/* end confdefs.h. */
3583#ifdef __STDC__
3584# include <limits.h>
3585#else
3586# include <assert.h>
3587#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003588 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003589_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003590if { (ac_try="$ac_cpp conftest.$ac_ext"
3591case "(($ac_try" in
3592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3593 *) ac_try_echo=$ac_try;;
3594esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003596 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003598 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 rm -f conftest.er1
3600 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003602 (exit $ac_status); } >/dev/null && {
3603 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3604 test ! -s conftest.err
3605 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 :
3607else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003609sed 's/^/| /' conftest.$ac_ext >&5
3610
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 # Broken: fails on valid input.
3612continue
3613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615rm -f conftest.err conftest.$ac_ext
3616
Martin v. Löwiseba40652007-08-30 20:10:57 +00003617 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 # can be detected and how.
3619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003620/* confdefs.h. */
3621_ACEOF
3622cat confdefs.h >>conftest.$ac_ext
3623cat >>conftest.$ac_ext <<_ACEOF
3624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003625#include <ac_nonexistent.h>
3626_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003627if { (ac_try="$ac_cpp conftest.$ac_ext"
3628case "(($ac_try" in
3629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3630 *) ac_try_echo=$ac_try;;
3631esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003633 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003635 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 rm -f conftest.er1
3637 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003639 (exit $ac_status); } >/dev/null && {
3640 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3641 test ! -s conftest.err
3642 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 # Broken: success on invalid input.
3644continue
3645else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003647sed 's/^/| /' conftest.$ac_ext >&5
3648
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 # Passes both tests.
3650ac_preproc_ok=:
3651break
3652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003653
Martin v. Löwis11437992002-04-12 09:54:03 +00003654rm -f conftest.err conftest.$ac_ext
3655
3656done
3657# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3658rm -f conftest.err conftest.$ac_ext
3659if $ac_preproc_ok; then
3660 :
3661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003662 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003663See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003664echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003665See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003666 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003667fi
3668
3669ac_ext=c
3670ac_cpp='$CPP $CPPFLAGS'
3671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3673ac_compiler_gnu=$ac_cv_c_compiler_gnu
3674
3675
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003676{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3677echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003678if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003679 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003680else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003681 # Extract the first word of "grep ggrep" to use in msg output
3682if test -z "$GREP"; then
3683set dummy grep ggrep; ac_prog_name=$2
3684if test "${ac_cv_path_GREP+set}" = set; then
3685 echo $ECHO_N "(cached) $ECHO_C" >&6
3686else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003687 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003688# Loop through the user's path and test for each of PROGNAME-LIST
3689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003690for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3691do
3692 IFS=$as_save_IFS
3693 test -z "$as_dir" && as_dir=.
3694 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003695 for ac_exec_ext in '' $ac_executable_extensions; do
3696 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3697 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3698 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003699 # Check for GNU $ac_path_GREP
3700case `"$ac_path_GREP" --version 2>&1` in
3701*GNU*)
3702 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3703*)
3704 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003705 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003706 while :
3707 do
3708 cat "conftest.in" "conftest.in" >"conftest.tmp"
3709 mv "conftest.tmp" "conftest.in"
3710 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003711 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003712 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3713 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3714 ac_count=`expr $ac_count + 1`
3715 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3716 # Best one so far, save it but keep looking for a better one
3717 ac_cv_path_GREP="$ac_path_GREP"
3718 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003719 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003720 # 10*(2^10) chars as input seems more than enough
3721 test $ac_count -gt 10 && break
3722 done
3723 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3724esac
3725
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003726
3727 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003728 done
3729done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003730
3731done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003732IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003733
3734
3735fi
3736
3737GREP="$ac_cv_path_GREP"
3738if test -z "$GREP"; then
3739 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3740echo "$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 +00003741 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003742fi
3743
Martin v. Löwiseba40652007-08-30 20:10:57 +00003744else
3745 ac_cv_path_GREP=$GREP
3746fi
3747
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003748
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003750{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3751echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003752 GREP="$ac_cv_path_GREP"
3753
3754
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003755{ echo "$as_me:$LINENO: checking for egrep" >&5
3756echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003757if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003758 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003759else
3760 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3761 then ac_cv_path_EGREP="$GREP -E"
3762 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003763 # Extract the first word of "egrep" to use in msg output
3764if test -z "$EGREP"; then
3765set dummy egrep; ac_prog_name=$2
3766if test "${ac_cv_path_EGREP+set}" = set; then
3767 echo $ECHO_N "(cached) $ECHO_C" >&6
3768else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003769 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003770# Loop through the user's path and test for each of PROGNAME-LIST
3771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3773do
3774 IFS=$as_save_IFS
3775 test -z "$as_dir" && as_dir=.
3776 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003777 for ac_exec_ext in '' $ac_executable_extensions; do
3778 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3779 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3780 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003781 # Check for GNU $ac_path_EGREP
3782case `"$ac_path_EGREP" --version 2>&1` in
3783*GNU*)
3784 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3785*)
3786 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003787 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003788 while :
3789 do
3790 cat "conftest.in" "conftest.in" >"conftest.tmp"
3791 mv "conftest.tmp" "conftest.in"
3792 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003793 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3795 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3796 ac_count=`expr $ac_count + 1`
3797 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3798 # Best one so far, save it but keep looking for a better one
3799 ac_cv_path_EGREP="$ac_path_EGREP"
3800 ac_path_EGREP_max=$ac_count
3801 fi
3802 # 10*(2^10) chars as input seems more than enough
3803 test $ac_count -gt 10 && break
3804 done
3805 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3806esac
3807
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003808
3809 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003810 done
3811done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003812
3813done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003814IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003815
3816
3817fi
3818
3819EGREP="$ac_cv_path_EGREP"
3820if test -z "$EGREP"; then
3821 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3822echo "$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 +00003823 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003824fi
3825
Martin v. Löwiseba40652007-08-30 20:10:57 +00003826else
3827 ac_cv_path_EGREP=$EGREP
3828fi
3829
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003830
Martin v. Löwiseba40652007-08-30 20:10:57 +00003831 fi
3832fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003833{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3834echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003835 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003836
3837
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003838
3839{ echo "$as_me:$LINENO: checking for AIX" >&5
3840echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3841cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003842/* confdefs.h. */
3843_ACEOF
3844cat confdefs.h >>conftest.$ac_ext
3845cat >>conftest.$ac_ext <<_ACEOF
3846/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003847#ifdef _AIX
3848 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003849#endif
3850
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003851_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3853 $EGREP "yes" >/dev/null 2>&1; then
3854 { echo "$as_me:$LINENO: result: yes" >&5
3855echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003856cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003857#define _ALL_SOURCE 1
3858_ACEOF
3859
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003860else
3861 { echo "$as_me:$LINENO: result: no" >&5
3862echo "${ECHO_T}no" >&6; }
3863fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00003864rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003865
3866
3867
3868# Check for unsupported systems
3869case $ac_sys_system/$ac_sys_release in
3870atheos*|Linux*/1*)
3871 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3872 echo See README for details.
3873 exit 1;;
3874esac
3875
3876
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003877{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3878echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003879
3880# Check whether --with-suffix was given.
3881if test "${with_suffix+set}" = set; then
3882 withval=$with_suffix;
3883 case $withval in
3884 no) EXEEXT=;;
3885 yes) EXEEXT=.exe;;
3886 *) EXEEXT=$withval;;
3887 esac
3888fi
3889
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003890{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3891echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003892
3893# Test whether we're running on a non-case-sensitive system, in which
3894# case we give a warning if no ext is given
3895
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003896{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3897echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003898if test ! -d CaseSensitiveTestDir; then
3899mkdir CaseSensitiveTestDir
3900fi
3901
3902if test -d casesensitivetestdir
3903then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003904 { echo "$as_me:$LINENO: result: yes" >&5
3905echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003906 BUILDEXEEXT=.exe
3907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003908 { echo "$as_me:$LINENO: result: no" >&5
3909echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003910 BUILDEXEEXT=$EXEEXT
3911fi
3912rmdir CaseSensitiveTestDir
3913
3914case $MACHDEP in
3915bsdos*)
3916 case $CC in
3917 gcc) CC="$CC -D_HAVE_BSDI";;
3918 esac;;
3919esac
3920
3921case $ac_sys_system in
3922hp*|HP*)
3923 case $CC in
3924 cc|*/cc) CC="$CC -Ae";;
3925 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003926SunOS*)
3927 # Some functions have a prototype only with that define, e.g. confstr
3928
3929cat >>confdefs.h <<\_ACEOF
3930#define __EXTENSIONS__ 1
3931_ACEOF
3932
3933 ;;
3934esac
3935
3936
3937
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003938{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3939echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003940if test -z "$LIBRARY"
3941then
3942 LIBRARY='libpython$(VERSION).a'
3943fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003944{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3945echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003946
3947# LDLIBRARY is the name of the library to link against (as opposed to the
3948# name of the library into which to insert object files). BLDLIBRARY is also
3949# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3950# is blank as the main program is not linked directly against LDLIBRARY.
3951# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3952# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3953# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3954# DLLLIBRARY is the shared (i.e., DLL) library.
3955#
3956# RUNSHARED is used to run shared python without installed libraries
3957#
3958# INSTSONAME is the name of the shared library that will be use to install
3959# on the system - some systems like version suffix, others don't
3960
3961
3962
3963
3964
3965
3966LDLIBRARY="$LIBRARY"
3967BLDLIBRARY='$(LDLIBRARY)'
3968INSTSONAME='$(LDLIBRARY)'
3969DLLLIBRARY=''
3970LDLIBRARYDIR=''
3971RUNSHARED=''
3972
3973# LINKCC is the command that links the python executable -- default is $(CC).
3974# If CXX is set, and if it is needed to link a main function that was
3975# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3976# python might then depend on the C++ runtime
3977# This is altered for AIX in order to build the export list before
3978# linking.
3979
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003980{ echo "$as_me:$LINENO: checking LINKCC" >&5
3981echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003982if test -z "$LINKCC"
3983then
3984 LINKCC='$(PURIFY) $(MAINCC)'
3985 case $ac_sys_system in
3986 AIX*)
3987 exp_extra="\"\""
3988 if test $ac_sys_release -ge 5 -o \
3989 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3990 exp_extra="."
3991 fi
3992 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003993 QNX*)
3994 # qcc must be used because the other compilers do not
3995 # support -N.
3996 LINKCC=qcc;;
3997 esac
3998fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003999{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4000echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004001
4002# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4003# make sure we default having it set to "no": this is used by
4004# distutils.unixccompiler to know if it should add --enable-new-dtags
4005# to linker command lines, and failing to detect GNU ld simply results
4006# in the same bahaviour as before.
4007
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004008{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4009echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004010ac_prog=ld
4011if test "$GCC" = yes; then
4012 ac_prog=`$CC -print-prog-name=ld`
4013fi
4014case `"$ac_prog" -V 2>&1 < /dev/null` in
4015 *GNU*)
4016 GNULD=yes;;
4017 *)
4018 GNULD=no;;
4019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004020{ echo "$as_me:$LINENO: result: $GNULD" >&5
4021echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004023{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4024echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004025# Check whether --enable-shared was given.
4026if test "${enable_shared+set}" = set; then
4027 enableval=$enable_shared;
4028fi
4029
4030
4031if test -z "$enable_shared"
4032then
4033 case $ac_sys_system in
4034 CYGWIN* | atheos*)
4035 enable_shared="yes";;
4036 *)
4037 enable_shared="no";;
4038 esac
4039fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004040{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4041echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004042
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004043{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4044echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004045# Check whether --enable-profiling was given.
4046if test "${enable_profiling+set}" = set; then
4047 enableval=$enable_profiling; ac_save_cc="$CC"
4048 CC="$CC -pg"
4049 if test "$cross_compiling" = yes; then
4050 ac_enable_profiling="no"
4051else
4052 cat >conftest.$ac_ext <<_ACEOF
4053/* confdefs.h. */
4054_ACEOF
4055cat confdefs.h >>conftest.$ac_ext
4056cat >>conftest.$ac_ext <<_ACEOF
4057/* end confdefs.h. */
4058int main() { return 0; }
4059_ACEOF
4060rm -f conftest$ac_exeext
4061if { (ac_try="$ac_link"
4062case "(($ac_try" in
4063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4064 *) ac_try_echo=$ac_try;;
4065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004067 (eval "$ac_link") 2>&5
4068 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4071 { (case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004076 (eval "$ac_try") 2>&5
4077 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004079 (exit $ac_status); }; }; then
4080 ac_enable_profiling="yes"
4081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004082 echo "$as_me: program exited with status $ac_status" >&5
4083echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004084sed 's/^/| /' conftest.$ac_ext >&5
4085
4086( exit $ac_status )
4087ac_enable_profiling="no"
4088fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4090fi
4091
4092
4093 CC="$ac_save_cc"
4094fi
4095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004096{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4097echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004098
4099case "$ac_enable_profiling" in
4100 "yes")
4101 BASECFLAGS="-pg $BASECFLAGS"
4102 LDFLAGS="-pg $LDFLAGS"
4103 ;;
4104esac
4105
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004106{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4107echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004108
4109# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4110# library that we build, but we do not want to link against it (we
4111# will find it with a -framework option). For this reason there is an
4112# extra variable BLDLIBRARY against which Python and the extension
4113# modules are linked, BLDLIBRARY. This is normally the same as
4114# LDLIBRARY, but empty for MacOSX framework builds.
4115if test "$enable_framework"
4116then
4117 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4118 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4119 BLDLIBRARY=''
4120else
4121 BLDLIBRARY='$(LDLIBRARY)'
4122fi
4123
4124# Other platforms follow
4125if test $enable_shared = "yes"; then
4126
4127cat >>confdefs.h <<\_ACEOF
4128#define Py_ENABLE_SHARED 1
4129_ACEOF
4130
4131 case $ac_sys_system in
4132 BeOS*)
4133 LDLIBRARY='libpython$(VERSION).so'
4134 ;;
4135 CYGWIN*)
4136 LDLIBRARY='libpython$(VERSION).dll.a'
4137 DLLLIBRARY='libpython$(VERSION).dll'
4138 ;;
4139 SunOS*)
4140 LDLIBRARY='libpython$(VERSION).so'
4141 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4142 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4143 INSTSONAME="$LDLIBRARY".$SOVERSION
4144 ;;
4145 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4146 LDLIBRARY='libpython$(VERSION).so'
4147 BLDLIBRARY='-L. -lpython$(VERSION)'
4148 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4149 case $ac_sys_system in
4150 FreeBSD*)
4151 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4152 ;;
4153 esac
4154 INSTSONAME="$LDLIBRARY".$SOVERSION
4155 ;;
4156 hp*|HP*)
4157 case `uname -m` in
4158 ia64)
4159 LDLIBRARY='libpython$(VERSION).so'
4160 ;;
4161 *)
4162 LDLIBRARY='libpython$(VERSION).sl'
4163 ;;
4164 esac
4165 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4166 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4167 ;;
4168 OSF*)
4169 LDLIBRARY='libpython$(VERSION).so'
4170 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4171 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4172 ;;
4173 atheos*)
4174 LDLIBRARY='libpython$(VERSION).so'
4175 BLDLIBRARY='-L. -lpython$(VERSION)'
4176 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4177 ;;
4178 Darwin*)
4179 LDLIBRARY='libpython$(VERSION).dylib'
4180 BLDLIBRARY='-L. -lpython$(VERSION)'
4181 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4182 ;;
4183
4184 esac
4185else # shared is disabled
4186 case $ac_sys_system in
4187 CYGWIN*)
4188 BLDLIBRARY='$(LIBRARY)'
4189 LDLIBRARY='libpython$(VERSION).dll.a'
4190 ;;
4191 esac
4192fi
4193
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004194{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4195echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004196
4197if test -n "$ac_tool_prefix"; then
4198 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4199set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004200{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4201echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004202if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004203 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004204else
4205 if test -n "$RANLIB"; then
4206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4207else
4208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4209for as_dir in $PATH
4210do
4211 IFS=$as_save_IFS
4212 test -z "$as_dir" && as_dir=.
4213 for ac_exec_ext in '' $ac_executable_extensions; do
4214 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4215 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004216 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004217 break 2
4218 fi
4219done
4220done
4221IFS=$as_save_IFS
4222
4223fi
4224fi
4225RANLIB=$ac_cv_prog_RANLIB
4226if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004227 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4228echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004230 { echo "$as_me:$LINENO: result: no" >&5
4231echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004232fi
4233
4234
4235fi
4236if test -z "$ac_cv_prog_RANLIB"; then
4237 ac_ct_RANLIB=$RANLIB
4238 # Extract the first word of "ranlib", so it can be a program name with args.
4239set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004240{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4241echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004242if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004243 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004244else
4245 if test -n "$ac_ct_RANLIB"; then
4246 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4247else
4248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4249for as_dir in $PATH
4250do
4251 IFS=$as_save_IFS
4252 test -z "$as_dir" && as_dir=.
4253 for ac_exec_ext in '' $ac_executable_extensions; do
4254 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4255 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004256 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004257 break 2
4258 fi
4259done
4260done
4261IFS=$as_save_IFS
4262
4263fi
4264fi
4265ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4266if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004267 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4268echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004269else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004270 { echo "$as_me:$LINENO: result: no" >&5
4271echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004272fi
4273
4274 if test "x$ac_ct_RANLIB" = x; then
4275 RANLIB=":"
4276 else
4277 case $cross_compiling:$ac_tool_warned in
4278yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004279{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4280whose name does not start with the host triplet. If you think this
4281configuration is useful to you, please write to autoconf@gnu.org." >&5
4282echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4283whose name does not start with the host triplet. If you think this
4284configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004285ac_tool_warned=yes ;;
4286esac
4287 RANLIB=$ac_ct_RANLIB
4288 fi
4289else
4290 RANLIB="$ac_cv_prog_RANLIB"
4291fi
4292
4293
4294for ac_prog in ar aal
4295do
4296 # Extract the first word of "$ac_prog", so it can be a program name with args.
4297set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004298{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4299echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004300if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004301 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004302else
4303 if test -n "$AR"; then
4304 ac_cv_prog_AR="$AR" # Let the user override the test.
4305else
4306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4307for as_dir in $PATH
4308do
4309 IFS=$as_save_IFS
4310 test -z "$as_dir" && as_dir=.
4311 for ac_exec_ext in '' $ac_executable_extensions; do
4312 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4313 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004314 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004315 break 2
4316 fi
4317done
4318done
4319IFS=$as_save_IFS
4320
4321fi
4322fi
4323AR=$ac_cv_prog_AR
4324if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004325 { echo "$as_me:$LINENO: result: $AR" >&5
4326echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004328 { echo "$as_me:$LINENO: result: no" >&5
4329echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004330fi
4331
4332
4333 test -n "$AR" && break
4334done
4335test -n "$AR" || AR="ar"
4336
4337
4338# tweak ARFLAGS only if the user didn't set it on the command line
4339
4340if test -z "$ARFLAGS"
4341then
4342 ARFLAGS="rc"
4343fi
4344
4345
4346# Extract the first word of "svnversion", so it can be a program name with args.
4347set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004348{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4349echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004350if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004351 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004352else
4353 if test -n "$SVNVERSION"; then
4354 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4355else
4356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4357for as_dir in $PATH
4358do
4359 IFS=$as_save_IFS
4360 test -z "$as_dir" && as_dir=.
4361 for ac_exec_ext in '' $ac_executable_extensions; do
4362 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4363 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004364 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004365 break 2
4366 fi
4367done
4368done
4369IFS=$as_save_IFS
4370
4371 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4372fi
4373fi
4374SVNVERSION=$ac_cv_prog_SVNVERSION
4375if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004376 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4377echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004379 { echo "$as_me:$LINENO: result: no" >&5
4380echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004381fi
4382
4383
4384if test $SVNVERSION = found
4385then
4386 SVNVERSION="svnversion \$(srcdir)"
4387else
4388 SVNVERSION="echo Unversioned directory"
4389fi
4390
4391case $MACHDEP in
4392bsdos*|hp*|HP*)
4393 # install -d does not work on BSDI or HP-UX
4394 if test -z "$INSTALL"
4395 then
4396 INSTALL="${srcdir}/install-sh -c"
4397 fi
4398esac
4399ac_aux_dir=
4400for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4401 if test -f "$ac_dir/install-sh"; then
4402 ac_aux_dir=$ac_dir
4403 ac_install_sh="$ac_aux_dir/install-sh -c"
4404 break
4405 elif test -f "$ac_dir/install.sh"; then
4406 ac_aux_dir=$ac_dir
4407 ac_install_sh="$ac_aux_dir/install.sh -c"
4408 break
4409 elif test -f "$ac_dir/shtool"; then
4410 ac_aux_dir=$ac_dir
4411 ac_install_sh="$ac_aux_dir/shtool install -c"
4412 break
4413 fi
4414done
4415if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004416 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4417echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004418 { (exit 1); exit 1; }; }
4419fi
4420
4421# These three variables are undocumented and unsupported,
4422# and are intended to be withdrawn in a future Autoconf release.
4423# They can cause serious problems if a builder's source tree is in a directory
4424# whose full name contains unusual characters.
4425ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4426ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4427ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4428
4429
4430# Find a good install program. We prefer a C program (faster),
4431# so one script is as good as another. But avoid the broken or
4432# incompatible versions:
4433# SysV /etc/install, /usr/sbin/install
4434# SunOS /usr/etc/install
4435# IRIX /sbin/install
4436# AIX /bin/install
4437# AmigaOS /C/install, which installs bootblocks on floppy discs
4438# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4439# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4440# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4441# OS/2's system install, which has a completely different semantic
4442# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004443{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4444echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004445if test -z "$INSTALL"; then
4446if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004447 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004448else
4449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4450for as_dir in $PATH
4451do
4452 IFS=$as_save_IFS
4453 test -z "$as_dir" && as_dir=.
4454 # Account for people who put trailing slashes in PATH elements.
4455case $as_dir/ in
4456 ./ | .// | /cC/* | \
4457 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4458 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4459 /usr/ucb/* ) ;;
4460 *)
4461 # OSF1 and SCO ODT 3.0 have their own names for install.
4462 # Don't use installbsd from OSF since it installs stuff as root
4463 # by default.
4464 for ac_prog in ginstall scoinst install; do
4465 for ac_exec_ext in '' $ac_executable_extensions; do
4466 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4467 if test $ac_prog = install &&
4468 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4469 # AIX install. It has an incompatible calling convention.
4470 :
4471 elif test $ac_prog = install &&
4472 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4473 # program-specific install script used by HP pwplus--don't use.
4474 :
4475 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004476 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4477 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004478 fi
4479 fi
4480 done
4481 done
4482 ;;
4483esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004484done
4485IFS=$as_save_IFS
4486
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004487
4488fi
4489 if test "${ac_cv_path_install+set}" = set; then
4490 INSTALL=$ac_cv_path_install
4491 else
4492 # As a last resort, use the slow shell script. Don't cache a
4493 # value for INSTALL within a source directory, because that will
4494 # break other packages using the cache if that directory is
4495 # removed, or if the value is a relative name.
4496 INSTALL=$ac_install_sh
4497 fi
4498fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004499{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4500echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004501
4502# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4503# It thinks the first close brace ends the variable substitution.
4504test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4505
4506test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4507
4508test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4509
4510
4511# Not every filesystem supports hard links
4512
4513if test -z "$LN" ; then
4514 case $ac_sys_system in
4515 BeOS*) LN="ln -s";;
4516 CYGWIN*) LN="ln -s";;
4517 atheos*) LN="ln -s";;
4518 *) LN=ln;;
4519 esac
4520fi
4521
4522# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004523{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4524echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004525
4526# Check whether --with-pydebug was given.
4527if test "${with_pydebug+set}" = set; then
4528 withval=$with_pydebug;
4529if test "$withval" != no
4530then
4531
4532cat >>confdefs.h <<\_ACEOF
4533#define Py_DEBUG 1
4534_ACEOF
4535
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004536 { echo "$as_me:$LINENO: result: yes" >&5
4537echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004538 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004539else { echo "$as_me:$LINENO: result: no" >&5
4540echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004541fi
4542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004543 { echo "$as_me:$LINENO: result: no" >&5
4544echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004545fi
4546
4547
4548# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4549# merged with this chunk of code?
4550
4551# Optimizer/debugger flags
4552# ------------------------
4553# (The following bit of code is complicated enough - please keep things
4554# indented properly. Just pretend you're editing Python code. ;-)
4555
4556# There are two parallel sets of case statements below, one that checks to
4557# see if OPT was set and one that does BASECFLAGS setting based upon
4558# compiler and platform. BASECFLAGS tweaks need to be made even if the
4559# user set OPT.
4560
4561# tweak OPT based on compiler and platform, only if the user didn't set
4562# it on the command line
4563
4564if test -z "$OPT"
4565then
4566 case $GCC in
4567 yes)
4568 if test "$CC" != 'g++' ; then
4569 STRICT_PROTO="-Wstrict-prototypes"
4570 fi
4571 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4572 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4573 WRAP="-fwrapv"
4574 fi
4575 case $ac_cv_prog_cc_g in
4576 yes)
4577 if test "$Py_DEBUG" = 'true' ; then
4578 # Optimization messes up debuggers, so turn it off for
4579 # debug builds.
4580 OPT="-g -Wall $STRICT_PROTO"
4581 else
4582 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4583 fi
4584 ;;
4585 *)
4586 OPT="-O3 -Wall $STRICT_PROTO"
4587 ;;
4588 esac
4589 case $ac_sys_system in
4590 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4591 ;;
4592 esac
4593 ;;
4594
4595 *)
4596 OPT="-O"
4597 ;;
4598 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004599fi
4600
4601
4602
4603# The -arch flags for universal builds on OSX
4604UNIVERSAL_ARCH_FLAGS=
4605
4606
4607# tweak BASECFLAGS based on compiler and platform
4608case $GCC in
4609yes)
4610 # Python violates C99 rules, by casting between incompatible
4611 # pointer types. GCC may generate bad code as a result of that,
4612 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004613 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4614echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004615 ac_save_cc="$CC"
4616 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004617 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4618 echo $ECHO_N "(cached) $ECHO_C" >&6
4619else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004620 cat >conftest.$ac_ext <<_ACEOF
4621/* confdefs.h. */
4622_ACEOF
4623cat confdefs.h >>conftest.$ac_ext
4624cat >>conftest.$ac_ext <<_ACEOF
4625/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004626
4627int
4628main ()
4629{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004630int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004631 ;
4632 return 0;
4633}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004634_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004635rm -f conftest.$ac_objext
4636if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004637case "(($ac_try" in
4638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4639 *) ac_try_echo=$ac_try;;
4640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004642 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004643 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004644 grep -v '^ *+' conftest.er1 >conftest.err
4645 rm -f conftest.er1
4646 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004648 (exit $ac_status); } && {
4649 test -z "$ac_c_werror_flag" ||
4650 test ! -s conftest.err
4651 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004652 ac_cv_no_strict_aliasing_ok=yes
4653else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004654 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004655sed 's/^/| /' conftest.$ac_ext >&5
4656
Gregory P. Smith373469a2009-11-01 21:03:38 +00004657 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004658fi
4659
Gregory P. Smith373469a2009-11-01 21:03:38 +00004660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004661fi
4662
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004663 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004664 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4665echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004666 if test $ac_cv_no_strict_aliasing_ok = yes
4667 then
4668 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4669 fi
4670
4671 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4672 # support. Without this, treatment of subnormals doesn't follow
4673 # the standard.
4674 case $ac_sys_machine in
4675 alpha*)
4676 BASECFLAGS="$BASECFLAGS -mieee"
4677 ;;
4678 esac
4679
4680 case $ac_sys_system in
4681 SCO_SV*)
4682 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4683 ;;
4684 # is there any other compiler on Darwin besides gcc?
4685 Darwin*)
4686 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4687 # used to be here, but non-Apple gcc doesn't accept them.
4688
4689
4690 if test "${enable_universalsdk}"; then
4691 UNIVERSAL_ARCH_FLAGS=""
4692 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4693 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4694 ARCH_RUN_32BIT=""
Ronald Oussoren92919a62009-12-24 13:30:58 +00004695 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004696
4697 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4698 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004699 LIPO_32BIT_FLAGS=""
Ronald Oussoren25967582009-09-06 10:00:26 +00004700 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004701
4702 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4703 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004704 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004705 ARCH_RUN_32BIT="arch -i386 -ppc"
4706
Ronald Oussoren23d92532009-09-07 06:12:00 +00004707 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4708 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004709 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren23d92532009-09-07 06:12:00 +00004710 ARCH_RUN_32BIT="arch -i386"
4711
4712 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4713 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004714 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4715 ARCH_RUN_32BIT="arch -i386 -ppc7400"
Ronald Oussoren23d92532009-09-07 06:12:00 +00004716
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004717 else
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00004718 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4719echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004720 { (exit 1); exit 1; }; }
4721
4722 fi
4723
4724
4725 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4726 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4727 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4728 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4729 fi
4730 fi
4731
4732 # Calculate the right deployment target for this build.
4733 #
4734 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4735 if test ${cur_target} '>' 10.2; then
4736 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004737 if test ${enable_universalsdk}; then
4738 if test "${UNIVERSAL_ARCHS}" = "all"; then
4739 # Ensure that the default platform for a
4740 # 4-way universal build is OSX 10.5,
4741 # that's the first OS release where
4742 # 4-way builds make sense.
4743 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004744
4745 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4746 cur_target='10.5'
4747
4748 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4749 cur_target='10.5'
4750
4751 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4752 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004753 fi
4754 else
4755 if test `arch` = "i386"; then
4756 # On Intel macs default to a deployment
4757 # target of 10.4, that's the first OSX
4758 # release with Intel support.
4759 cur_target="10.4"
4760 fi
4761 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004762 fi
4763 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4764
4765 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4766 # environment with a value that is the same as what we'll use
4767 # in the Makefile to ensure that we'll get the same compiler
4768 # environment during configure and build time.
4769 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4770 export MACOSX_DEPLOYMENT_TARGET
4771 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4772
4773 ;;
4774 OSF*)
4775 BASECFLAGS="$BASECFLAGS -mieee"
4776 ;;
4777 esac
4778 ;;
4779
4780*)
4781 case $ac_sys_system in
4782 OpenUNIX*|UnixWare*)
4783 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4784 ;;
4785 OSF*)
4786 BASECFLAGS="$BASECFLAGS -ieee -std"
4787 ;;
4788 SCO_SV*)
4789 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4790 ;;
4791 esac
4792 ;;
4793esac
4794
4795if test "$Py_DEBUG" = 'true'; then
4796 :
4797else
4798 OPT="-DNDEBUG $OPT"
4799fi
4800
4801if test "$ac_arch_flags"
4802then
4803 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4804fi
4805
4806# disable check for icc since it seems to pass, but generates a warning
4807if test "$CC" = icc
4808then
4809 ac_cv_opt_olimit_ok=no
4810fi
4811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004812{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4813echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004814if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004815 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004816else
4817 ac_save_cc="$CC"
4818CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004819cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004820/* confdefs.h. */
4821_ACEOF
4822cat confdefs.h >>conftest.$ac_ext
4823cat >>conftest.$ac_ext <<_ACEOF
4824/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004825
4826int
4827main ()
4828{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004829int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004830 ;
4831 return 0;
4832}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004833_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004834rm -f conftest.$ac_objext
4835if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004836case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4839esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004841 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004842 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004843 grep -v '^ *+' conftest.er1 >conftest.err
4844 rm -f conftest.er1
4845 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004847 (exit $ac_status); } && {
4848 test -z "$ac_c_werror_flag" ||
4849 test ! -s conftest.err
4850 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004851 ac_cv_opt_olimit_ok=yes
4852else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004853 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004854sed 's/^/| /' conftest.$ac_ext >&5
4855
Gregory P. Smith373469a2009-11-01 21:03:38 +00004856 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004857fi
4858
Gregory P. Smith373469a2009-11-01 21:03:38 +00004859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004860CC="$ac_save_cc"
4861fi
4862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004863{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4864echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004865if test $ac_cv_opt_olimit_ok = yes; then
4866 case $ac_sys_system in
4867 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4868 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4869 # environment?
4870 Darwin*)
4871 ;;
4872 *)
4873 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4874 ;;
4875 esac
4876else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004877 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4878echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004879 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004880 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004881else
4882 ac_save_cc="$CC"
4883 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004884 cat >conftest.$ac_ext <<_ACEOF
4885/* confdefs.h. */
4886_ACEOF
4887cat confdefs.h >>conftest.$ac_ext
4888cat >>conftest.$ac_ext <<_ACEOF
4889/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004890
4891int
4892main ()
4893{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004894int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004895 ;
4896 return 0;
4897}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004898_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004899rm -f conftest.$ac_objext
4900if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004901case "(($ac_try" in
4902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4903 *) ac_try_echo=$ac_try;;
4904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004906 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004907 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004908 grep -v '^ *+' conftest.er1 >conftest.err
4909 rm -f conftest.er1
4910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004912 (exit $ac_status); } && {
4913 test -z "$ac_c_werror_flag" ||
4914 test ! -s conftest.err
4915 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004916 ac_cv_olimit_ok=yes
4917else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004918 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004919sed 's/^/| /' conftest.$ac_ext >&5
4920
Gregory P. Smith373469a2009-11-01 21:03:38 +00004921 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004922fi
4923
Gregory P. Smith373469a2009-11-01 21:03:38 +00004924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004925 CC="$ac_save_cc"
4926fi
4927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004928 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4929echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004930 if test $ac_cv_olimit_ok = yes; then
4931 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4932 fi
4933fi
4934
4935# Check whether GCC supports PyArg_ParseTuple format
4936if test "$GCC" = "yes"
4937then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004938 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4939echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004940 save_CFLAGS=$CFLAGS
4941 CFLAGS="$CFLAGS -Werror"
4942 cat >conftest.$ac_ext <<_ACEOF
4943/* confdefs.h. */
4944_ACEOF
4945cat confdefs.h >>conftest.$ac_ext
4946cat >>conftest.$ac_ext <<_ACEOF
4947/* end confdefs.h. */
4948
4949 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4950
4951int
4952main ()
4953{
4954
4955 ;
4956 return 0;
4957}
4958_ACEOF
4959rm -f conftest.$ac_objext
4960if { (ac_try="$ac_compile"
4961case "(($ac_try" in
4962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4963 *) ac_try_echo=$ac_try;;
4964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004966 (eval "$ac_compile") 2>conftest.er1
4967 ac_status=$?
4968 grep -v '^ *+' conftest.er1 >conftest.err
4969 rm -f conftest.er1
4970 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004972 (exit $ac_status); } && {
4973 test -z "$ac_c_werror_flag" ||
4974 test ! -s conftest.err
4975 } && test -s conftest.$ac_objext; then
4976
4977cat >>confdefs.h <<\_ACEOF
4978#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4979_ACEOF
4980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004981 { echo "$as_me:$LINENO: result: yes" >&5
4982echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004983else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004984 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004985sed 's/^/| /' conftest.$ac_ext >&5
4986
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004987 { echo "$as_me:$LINENO: result: no" >&5
4988echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004989
4990fi
4991
4992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4993 CFLAGS=$save_CFLAGS
4994fi
4995
4996# On some compilers, pthreads are available without further options
4997# (e.g. MacOS X). On some of these systems, the compiler will not
4998# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4999# So we have to see first whether pthreads are available without
5000# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005001{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5002echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005004 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005005else
5006 if test "$cross_compiling" = yes; then
5007 ac_cv_pthread_is_default=no
5008else
5009 cat >conftest.$ac_ext <<_ACEOF
5010/* confdefs.h. */
5011_ACEOF
5012cat confdefs.h >>conftest.$ac_ext
5013cat >>conftest.$ac_ext <<_ACEOF
5014/* end confdefs.h. */
5015
5016#include <pthread.h>
5017
5018void* routine(void* p){return NULL;}
5019
5020int main(){
5021 pthread_t p;
5022 if(pthread_create(&p,NULL,routine,NULL)!=0)
5023 return 1;
5024 (void)pthread_detach(p);
5025 return 0;
5026}
5027
5028_ACEOF
5029rm -f conftest$ac_exeext
5030if { (ac_try="$ac_link"
5031case "(($ac_try" in
5032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5033 *) ac_try_echo=$ac_try;;
5034esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005036 (eval "$ac_link") 2>&5
5037 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5040 { (case "(($ac_try" in
5041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5042 *) ac_try_echo=$ac_try;;
5043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005045 (eval "$ac_try") 2>&5
5046 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005048 (exit $ac_status); }; }; then
5049
5050 ac_cv_pthread_is_default=yes
5051 ac_cv_kthread=no
5052 ac_cv_pthread=no
5053
5054else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005055 echo "$as_me: program exited with status $ac_status" >&5
5056echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005057sed 's/^/| /' conftest.$ac_ext >&5
5058
5059( exit $ac_status )
5060ac_cv_pthread_is_default=no
5061fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5063fi
5064
5065
5066
5067fi
5068
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005069{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5070echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005071
5072
5073if test $ac_cv_pthread_is_default = yes
5074then
5075 ac_cv_kpthread=no
5076else
5077# -Kpthread, if available, provides the right #defines
5078# and linker options to make pthread_create available
5079# Some compilers won't report that they do not support -Kpthread,
5080# so we need to run a program to see whether it really made the
5081# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005082{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5083echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005084if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005085 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005086else
5087 ac_save_cc="$CC"
5088CC="$CC -Kpthread"
5089if test "$cross_compiling" = yes; then
5090 ac_cv_kpthread=no
5091else
5092 cat >conftest.$ac_ext <<_ACEOF
5093/* confdefs.h. */
5094_ACEOF
5095cat confdefs.h >>conftest.$ac_ext
5096cat >>conftest.$ac_ext <<_ACEOF
5097/* end confdefs.h. */
5098
5099#include <pthread.h>
5100
5101void* routine(void* p){return NULL;}
5102
5103int main(){
5104 pthread_t p;
5105 if(pthread_create(&p,NULL,routine,NULL)!=0)
5106 return 1;
5107 (void)pthread_detach(p);
5108 return 0;
5109}
5110
5111_ACEOF
5112rm -f conftest$ac_exeext
5113if { (ac_try="$ac_link"
5114case "(($ac_try" in
5115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5116 *) ac_try_echo=$ac_try;;
5117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005119 (eval "$ac_link") 2>&5
5120 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5123 { (case "(($ac_try" in
5124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5125 *) ac_try_echo=$ac_try;;
5126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005128 (eval "$ac_try") 2>&5
5129 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005131 (exit $ac_status); }; }; then
5132 ac_cv_kpthread=yes
5133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005134 echo "$as_me: program exited with status $ac_status" >&5
5135echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005136sed 's/^/| /' conftest.$ac_ext >&5
5137
5138( exit $ac_status )
5139ac_cv_kpthread=no
5140fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5142fi
5143
5144
5145CC="$ac_save_cc"
5146fi
5147
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005148{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5149echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005150fi
5151
5152if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5153then
5154# -Kthread, if available, provides the right #defines
5155# and linker options to make pthread_create available
5156# Some compilers won't report that they do not support -Kthread,
5157# so we need to run a program to see whether it really made the
5158# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005159{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5160echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005161if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005162 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005163else
5164 ac_save_cc="$CC"
5165CC="$CC -Kthread"
5166if test "$cross_compiling" = yes; then
5167 ac_cv_kthread=no
5168else
5169 cat >conftest.$ac_ext <<_ACEOF
5170/* confdefs.h. */
5171_ACEOF
5172cat confdefs.h >>conftest.$ac_ext
5173cat >>conftest.$ac_ext <<_ACEOF
5174/* end confdefs.h. */
5175
5176#include <pthread.h>
5177
5178void* routine(void* p){return NULL;}
5179
5180int main(){
5181 pthread_t p;
5182 if(pthread_create(&p,NULL,routine,NULL)!=0)
5183 return 1;
5184 (void)pthread_detach(p);
5185 return 0;
5186}
5187
5188_ACEOF
5189rm -f conftest$ac_exeext
5190if { (ac_try="$ac_link"
5191case "(($ac_try" in
5192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5193 *) ac_try_echo=$ac_try;;
5194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005196 (eval "$ac_link") 2>&5
5197 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5200 { (case "(($ac_try" in
5201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5202 *) ac_try_echo=$ac_try;;
5203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005205 (eval "$ac_try") 2>&5
5206 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005208 (exit $ac_status); }; }; then
5209 ac_cv_kthread=yes
5210else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005211 echo "$as_me: program exited with status $ac_status" >&5
5212echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005213sed 's/^/| /' conftest.$ac_ext >&5
5214
5215( exit $ac_status )
5216ac_cv_kthread=no
5217fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5219fi
5220
5221
5222CC="$ac_save_cc"
5223fi
5224
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005225{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5226echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005227fi
5228
5229if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5230then
5231# -pthread, if available, provides the right #defines
5232# and linker options to make pthread_create available
5233# Some compilers won't report that they do not support -pthread,
5234# so we need to run a program to see whether it really made the
5235# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005236{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5237echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005238if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005239 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005240else
5241 ac_save_cc="$CC"
5242CC="$CC -pthread"
5243if test "$cross_compiling" = yes; then
5244 ac_cv_pthread=no
5245else
5246 cat >conftest.$ac_ext <<_ACEOF
5247/* confdefs.h. */
5248_ACEOF
5249cat confdefs.h >>conftest.$ac_ext
5250cat >>conftest.$ac_ext <<_ACEOF
5251/* end confdefs.h. */
5252
5253#include <pthread.h>
5254
5255void* routine(void* p){return NULL;}
5256
5257int main(){
5258 pthread_t p;
5259 if(pthread_create(&p,NULL,routine,NULL)!=0)
5260 return 1;
5261 (void)pthread_detach(p);
5262 return 0;
5263}
5264
5265_ACEOF
5266rm -f conftest$ac_exeext
5267if { (ac_try="$ac_link"
5268case "(($ac_try" in
5269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5270 *) ac_try_echo=$ac_try;;
5271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005273 (eval "$ac_link") 2>&5
5274 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5277 { (case "(($ac_try" in
5278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5279 *) ac_try_echo=$ac_try;;
5280esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005282 (eval "$ac_try") 2>&5
5283 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005285 (exit $ac_status); }; }; then
5286 ac_cv_pthread=yes
5287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005288 echo "$as_me: program exited with status $ac_status" >&5
5289echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005290sed 's/^/| /' conftest.$ac_ext >&5
5291
5292( exit $ac_status )
5293ac_cv_pthread=no
5294fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5296fi
5297
5298
5299CC="$ac_save_cc"
5300fi
5301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005302{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5303echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005304fi
5305
5306# If we have set a CC compiler flag for thread support then
5307# check if it works for CXX, too.
5308ac_cv_cxx_thread=no
5309if test ! -z "$CXX"
5310then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005311{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5312echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005313ac_save_cxx="$CXX"
5314
5315if test "$ac_cv_kpthread" = "yes"
5316then
5317 CXX="$CXX -Kpthread"
5318 ac_cv_cxx_thread=yes
5319elif test "$ac_cv_kthread" = "yes"
5320then
5321 CXX="$CXX -Kthread"
5322 ac_cv_cxx_thread=yes
5323elif test "$ac_cv_pthread" = "yes"
5324then
5325 CXX="$CXX -pthread"
5326 ac_cv_cxx_thread=yes
5327fi
5328
5329if test $ac_cv_cxx_thread = yes
5330then
5331 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5332 $CXX -c conftest.$ac_ext 2>&5
5333 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5334 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5335 then
5336 ac_cv_cxx_thread=yes
5337 else
5338 ac_cv_cxx_thread=no
5339 fi
5340 rm -fr conftest*
5341fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005342{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5343echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005344fi
5345CXX="$ac_save_cxx"
5346
5347
5348# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005349{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5350echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005351if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005352 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005353else
5354 cat >conftest.$ac_ext <<_ACEOF
5355/* confdefs.h. */
5356_ACEOF
5357cat confdefs.h >>conftest.$ac_ext
5358cat >>conftest.$ac_ext <<_ACEOF
5359/* end confdefs.h. */
5360#include <stdlib.h>
5361#include <stdarg.h>
5362#include <string.h>
5363#include <float.h>
5364
5365int
5366main ()
5367{
5368
5369 ;
5370 return 0;
5371}
5372_ACEOF
5373rm -f conftest.$ac_objext
5374if { (ac_try="$ac_compile"
5375case "(($ac_try" in
5376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5377 *) ac_try_echo=$ac_try;;
5378esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005380 (eval "$ac_compile") 2>conftest.er1
5381 ac_status=$?
5382 grep -v '^ *+' conftest.er1 >conftest.err
5383 rm -f conftest.er1
5384 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005386 (exit $ac_status); } && {
5387 test -z "$ac_c_werror_flag" ||
5388 test ! -s conftest.err
5389 } && test -s conftest.$ac_objext; then
5390 ac_cv_header_stdc=yes
5391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005392 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005393sed 's/^/| /' conftest.$ac_ext >&5
5394
5395 ac_cv_header_stdc=no
5396fi
5397
5398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5399
5400if test $ac_cv_header_stdc = yes; then
5401 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5402 cat >conftest.$ac_ext <<_ACEOF
5403/* confdefs.h. */
5404_ACEOF
5405cat confdefs.h >>conftest.$ac_ext
5406cat >>conftest.$ac_ext <<_ACEOF
5407/* end confdefs.h. */
5408#include <string.h>
5409
5410_ACEOF
5411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5412 $EGREP "memchr" >/dev/null 2>&1; then
5413 :
5414else
5415 ac_cv_header_stdc=no
5416fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00005417rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005418
5419fi
5420
5421if test $ac_cv_header_stdc = yes; then
5422 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5423 cat >conftest.$ac_ext <<_ACEOF
5424/* confdefs.h. */
5425_ACEOF
5426cat confdefs.h >>conftest.$ac_ext
5427cat >>conftest.$ac_ext <<_ACEOF
5428/* end confdefs.h. */
5429#include <stdlib.h>
5430
5431_ACEOF
5432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5433 $EGREP "free" >/dev/null 2>&1; then
5434 :
5435else
5436 ac_cv_header_stdc=no
5437fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00005438rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005439
5440fi
5441
5442if test $ac_cv_header_stdc = yes; then
5443 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5444 if test "$cross_compiling" = yes; then
5445 :
5446else
5447 cat >conftest.$ac_ext <<_ACEOF
5448/* confdefs.h. */
5449_ACEOF
5450cat confdefs.h >>conftest.$ac_ext
5451cat >>conftest.$ac_ext <<_ACEOF
5452/* end confdefs.h. */
5453#include <ctype.h>
5454#include <stdlib.h>
5455#if ((' ' & 0x0FF) == 0x020)
5456# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5457# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5458#else
5459# define ISLOWER(c) \
5460 (('a' <= (c) && (c) <= 'i') \
5461 || ('j' <= (c) && (c) <= 'r') \
5462 || ('s' <= (c) && (c) <= 'z'))
5463# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5464#endif
5465
5466#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5467int
5468main ()
5469{
5470 int i;
5471 for (i = 0; i < 256; i++)
5472 if (XOR (islower (i), ISLOWER (i))
5473 || toupper (i) != TOUPPER (i))
5474 return 2;
5475 return 0;
5476}
5477_ACEOF
5478rm -f conftest$ac_exeext
5479if { (ac_try="$ac_link"
5480case "(($ac_try" in
5481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5482 *) ac_try_echo=$ac_try;;
5483esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005485 (eval "$ac_link") 2>&5
5486 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005488 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5489 { (case "(($ac_try" in
5490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5491 *) ac_try_echo=$ac_try;;
5492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005494 (eval "$ac_try") 2>&5
5495 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005497 (exit $ac_status); }; }; then
5498 :
5499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005500 echo "$as_me: program exited with status $ac_status" >&5
5501echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005502sed 's/^/| /' conftest.$ac_ext >&5
5503
5504( exit $ac_status )
5505ac_cv_header_stdc=no
5506fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5508fi
5509
5510
5511fi
5512fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005513{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5514echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005515if test $ac_cv_header_stdc = yes; then
5516
5517cat >>confdefs.h <<\_ACEOF
5518#define STDC_HEADERS 1
5519_ACEOF
5520
5521fi
5522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005523# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5534 inttypes.h stdint.h unistd.h
5535do
5536as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5537{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5538echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5539if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5540 echo $ECHO_N "(cached) $ECHO_C" >&6
5541else
5542 cat >conftest.$ac_ext <<_ACEOF
5543/* confdefs.h. */
5544_ACEOF
5545cat confdefs.h >>conftest.$ac_ext
5546cat >>conftest.$ac_ext <<_ACEOF
5547/* end confdefs.h. */
5548$ac_includes_default
5549
5550#include <$ac_header>
5551_ACEOF
5552rm -f conftest.$ac_objext
5553if { (ac_try="$ac_compile"
5554case "(($ac_try" in
5555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5556 *) ac_try_echo=$ac_try;;
5557esac
5558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5559 (eval "$ac_compile") 2>conftest.er1
5560 ac_status=$?
5561 grep -v '^ *+' conftest.er1 >conftest.err
5562 rm -f conftest.er1
5563 cat conftest.err >&5
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); } && {
5566 test -z "$ac_c_werror_flag" ||
5567 test ! -s conftest.err
5568 } && test -s conftest.$ac_objext; then
5569 eval "$as_ac_Header=yes"
5570else
5571 echo "$as_me: failed program was:" >&5
5572sed 's/^/| /' conftest.$ac_ext >&5
5573
5574 eval "$as_ac_Header=no"
5575fi
5576
5577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5578fi
5579ac_res=`eval echo '${'$as_ac_Header'}'`
5580 { echo "$as_me:$LINENO: result: $ac_res" >&5
5581echo "${ECHO_T}$ac_res" >&6; }
5582if test `eval echo '${'$as_ac_Header'}'` = yes; then
5583 cat >>confdefs.h <<_ACEOF
5584#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5585_ACEOF
5586
5587fi
5588
5589done
5590
5591
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005592
Martin v. Löwis11437992002-04-12 09:54:03 +00005593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
Anthony Baxter8a560de2004-10-13 15:30:56 +00005628
Martin v. Löwisc3001752005-01-23 09:27:24 +00005629
Martin v. Löwis11017b12006-01-14 18:12:57 +00005630
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005631
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005632
5633
5634
5635
5636
5637
5638
5639
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005640
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005641
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005642
5643
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005644
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005645
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005646for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5647fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005648ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005649shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005650unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005651sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5652sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005653sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005654sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005655sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00005656sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005657bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005658do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005659as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005660if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005661 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5662echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005663if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005665fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005666ac_res=`eval echo '${'$as_ac_Header'}'`
5667 { echo "$as_me:$LINENO: result: $ac_res" >&5
5668echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005669else
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005671{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5672echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005674/* confdefs.h. */
5675_ACEOF
5676cat confdefs.h >>conftest.$ac_ext
5677cat >>conftest.$ac_ext <<_ACEOF
5678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005679$ac_includes_default
5680#include <$ac_header>
5681_ACEOF
5682rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005683if { (ac_try="$ac_compile"
5684case "(($ac_try" in
5685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5686 *) ac_try_echo=$ac_try;;
5687esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005691 grep -v '^ *+' conftest.er1 >conftest.err
5692 rm -f conftest.er1
5693 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005695 (exit $ac_status); } && {
5696 test -z "$ac_c_werror_flag" ||
5697 test ! -s conftest.err
5698 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005699 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005700else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005702sed 's/^/| /' conftest.$ac_ext >&5
5703
Martin v. Löwiseba40652007-08-30 20:10:57 +00005704 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005706
5707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005708{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5709echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005710
5711# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005712{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5713echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005714cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005715/* confdefs.h. */
5716_ACEOF
5717cat confdefs.h >>conftest.$ac_ext
5718cat >>conftest.$ac_ext <<_ACEOF
5719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005720#include <$ac_header>
5721_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005722if { (ac_try="$ac_cpp conftest.$ac_ext"
5723case "(($ac_try" in
5724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5725 *) ac_try_echo=$ac_try;;
5726esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005728 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005730 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005731 rm -f conftest.er1
5732 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005734 (exit $ac_status); } >/dev/null && {
5735 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5736 test ! -s conftest.err
5737 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005738 ac_header_preproc=yes
5739else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005741sed 's/^/| /' conftest.$ac_ext >&5
5742
Martin v. Löwis11437992002-04-12 09:54:03 +00005743 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005745
Martin v. Löwis11437992002-04-12 09:54:03 +00005746rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005747{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5748echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005749
5750# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005751case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5752 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005753 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5754echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5755 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5756echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005757 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005758 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005759 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005760 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5761echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5763echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5765echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5766 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5767echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5768 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5769echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5770 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5771echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005772 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005773## -------------------------------------- ##
5774## Report this to http://bugs.python.org/ ##
5775## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005776_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005777 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005778 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005779esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005780{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5781echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005782if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005783 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005784else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005785 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005786fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005787ac_res=`eval echo '${'$as_ac_Header'}'`
5788 { echo "$as_me:$LINENO: result: $ac_res" >&5
5789echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005790
5791fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005792if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005793 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005794#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005795_ACEOF
5796
5797fi
5798
Guido van Rossum627b2d71993-12-24 10:39:16 +00005799done
5800
Martin v. Löwis11437992002-04-12 09:54:03 +00005801
5802
5803
5804
5805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005806ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005807for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005808 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5809{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5810echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005811if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005812 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005813else
Martin v. Löwis11437992002-04-12 09:54:03 +00005814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005815/* confdefs.h. */
5816_ACEOF
5817cat confdefs.h >>conftest.$ac_ext
5818cat >>conftest.$ac_ext <<_ACEOF
5819/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005820#include <sys/types.h>
5821#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005822
Martin v. Löwis11437992002-04-12 09:54:03 +00005823int
5824main ()
5825{
5826if ((DIR *) 0)
5827return 0;
5828 ;
5829 return 0;
5830}
5831_ACEOF
5832rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005833if { (ac_try="$ac_compile"
5834case "(($ac_try" in
5835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5836 *) ac_try_echo=$ac_try;;
5837esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005839 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005841 grep -v '^ *+' conftest.er1 >conftest.err
5842 rm -f conftest.er1
5843 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005845 (exit $ac_status); } && {
5846 test -z "$ac_c_werror_flag" ||
5847 test ! -s conftest.err
5848 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005849 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005850else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005852sed 's/^/| /' conftest.$ac_ext >&5
5853
Martin v. Löwiseba40652007-08-30 20:10:57 +00005854 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005856
5857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005858fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005859ac_res=`eval echo '${'$as_ac_Header'}'`
5860 { echo "$as_me:$LINENO: result: $ac_res" >&5
5861echo "${ECHO_T}$ac_res" >&6; }
5862if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005863 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005864#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005865_ACEOF
5866
5867ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005868fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005869
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005870done
5871# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5872if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005873 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5874echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005875if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005877else
Martin v. Löwis11437992002-04-12 09:54:03 +00005878 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005880/* confdefs.h. */
5881_ACEOF
5882cat confdefs.h >>conftest.$ac_ext
5883cat >>conftest.$ac_ext <<_ACEOF
5884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005885
Martin v. Löwiseba40652007-08-30 20:10:57 +00005886/* Override any GCC internal prototype to avoid an error.
5887 Use char because int might match the return type of a GCC
5888 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005889#ifdef __cplusplus
5890extern "C"
5891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005892char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005893int
5894main ()
5895{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005896return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005897 ;
5898 return 0;
5899}
5900_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005901for ac_lib in '' dir; do
5902 if test -z "$ac_lib"; then
5903 ac_res="none required"
5904 else
5905 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005907 fi
5908 rm -f conftest.$ac_objext conftest$ac_exeext
5909if { (ac_try="$ac_link"
5910case "(($ac_try" in
5911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5912 *) ac_try_echo=$ac_try;;
5913esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005916 ac_status=$?
5917 grep -v '^ *+' conftest.er1 >conftest.err
5918 rm -f conftest.er1
5919 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005921 (exit $ac_status); } && {
5922 test -z "$ac_c_werror_flag" ||
5923 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005924 } && test -s conftest$ac_exeext &&
5925 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005926 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005927else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005928 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005929sed 's/^/| /' conftest.$ac_ext >&5
5930
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931
Brett Cannon19fab762007-06-02 03:02:29 +00005932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005933
5934rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5935 conftest$ac_exeext
5936 if test "${ac_cv_search_opendir+set}" = set; then
5937 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005939done
5940if test "${ac_cv_search_opendir+set}" = set; then
5941 :
5942else
5943 ac_cv_search_opendir=no
5944fi
5945rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005946LIBS=$ac_func_search_save_LIBS
5947fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005948{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5949echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005950ac_res=$ac_cv_search_opendir
5951if test "$ac_res" != no; then
5952 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005953
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005954fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005955
Michael W. Hudson54241132001-12-07 15:38:26 +00005956else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005957 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5958echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005959if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005960 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005961else
5962 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005964/* confdefs.h. */
5965_ACEOF
5966cat confdefs.h >>conftest.$ac_ext
5967cat >>conftest.$ac_ext <<_ACEOF
5968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005969
Martin v. Löwiseba40652007-08-30 20:10:57 +00005970/* Override any GCC internal prototype to avoid an error.
5971 Use char because int might match the return type of a GCC
5972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005973#ifdef __cplusplus
5974extern "C"
5975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005976char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005977int
5978main ()
5979{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005980return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005981 ;
5982 return 0;
5983}
5984_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985for ac_lib in '' x; do
5986 if test -z "$ac_lib"; then
5987 ac_res="none required"
5988 else
5989 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005990 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005991 fi
5992 rm -f conftest.$ac_objext conftest$ac_exeext
5993if { (ac_try="$ac_link"
5994case "(($ac_try" in
5995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5996 *) ac_try_echo=$ac_try;;
5997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005999 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006000 ac_status=$?
6001 grep -v '^ *+' conftest.er1 >conftest.err
6002 rm -f conftest.er1
6003 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006005 (exit $ac_status); } && {
6006 test -z "$ac_c_werror_flag" ||
6007 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006008 } && test -s conftest$ac_exeext &&
6009 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006010 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006011else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006012 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006013sed 's/^/| /' conftest.$ac_ext >&5
6014
Martin v. Löwiseba40652007-08-30 20:10:57 +00006015
Brett Cannon19fab762007-06-02 03:02:29 +00006016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006017
6018rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6019 conftest$ac_exeext
6020 if test "${ac_cv_search_opendir+set}" = set; then
6021 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006023done
6024if test "${ac_cv_search_opendir+set}" = set; then
6025 :
6026else
6027 ac_cv_search_opendir=no
6028fi
6029rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006030LIBS=$ac_func_search_save_LIBS
6031fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006032{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6033echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006034ac_res=$ac_cv_search_opendir
6035if test "$ac_res" != no; then
6036 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006038fi
6039
6040fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006041
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006042{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6043echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006045 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006046else
6047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006048/* confdefs.h. */
6049_ACEOF
6050cat confdefs.h >>conftest.$ac_ext
6051cat >>conftest.$ac_ext <<_ACEOF
6052/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054int
6055main ()
6056{
6057return makedev(0, 0);
6058 ;
6059 return 0;
6060}
6061_ACEOF
6062rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006063if { (ac_try="$ac_link"
6064case "(($ac_try" in
6065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6066 *) ac_try_echo=$ac_try;;
6067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006069 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006071 grep -v '^ *+' conftest.er1 >conftest.err
6072 rm -f conftest.er1
6073 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006075 (exit $ac_status); } && {
6076 test -z "$ac_c_werror_flag" ||
6077 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006078 } && test -s conftest$ac_exeext &&
6079 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080 ac_cv_header_sys_types_h_makedev=yes
6081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006083sed 's/^/| /' conftest.$ac_ext >&5
6084
Martin v. Löwiseba40652007-08-30 20:10:57 +00006085 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006087
6088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090
6091fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006092{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6093echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094
6095if test $ac_cv_header_sys_types_h_makedev = no; then
6096if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006097 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6098echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006100 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006102{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6103echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104else
6105 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006106{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6107echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006109/* confdefs.h. */
6110_ACEOF
6111cat confdefs.h >>conftest.$ac_ext
6112cat >>conftest.$ac_ext <<_ACEOF
6113/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114$ac_includes_default
6115#include <sys/mkdev.h>
6116_ACEOF
6117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006118if { (ac_try="$ac_compile"
6119case "(($ac_try" in
6120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6121 *) ac_try_echo=$ac_try;;
6122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006126 grep -v '^ *+' conftest.er1 >conftest.err
6127 rm -f conftest.er1
6128 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006130 (exit $ac_status); } && {
6131 test -z "$ac_c_werror_flag" ||
6132 test ! -s conftest.err
6133 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134 ac_header_compiler=yes
6135else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006137sed 's/^/| /' conftest.$ac_ext >&5
6138
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006141
6142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006143{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6144echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145
6146# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006147{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6148echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006150/* confdefs.h. */
6151_ACEOF
6152cat confdefs.h >>conftest.$ac_ext
6153cat >>conftest.$ac_ext <<_ACEOF
6154/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155#include <sys/mkdev.h>
6156_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006157if { (ac_try="$ac_cpp conftest.$ac_ext"
6158case "(($ac_try" in
6159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6160 *) ac_try_echo=$ac_try;;
6161esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006165 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166 rm -f conftest.er1
6167 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006169 (exit $ac_status); } >/dev/null && {
6170 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6171 test ! -s conftest.err
6172 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173 ac_header_preproc=yes
6174else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006176sed 's/^/| /' conftest.$ac_ext >&5
6177
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178 ac_header_preproc=no
6179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006182{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6183echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184
6185# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006186case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6187 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006188 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6189echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6190 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6191echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006192 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006193 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006194 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6201 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6202echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6203 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6204echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6205 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6206echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006207 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006208## -------------------------------------- ##
6209## Report this to http://bugs.python.org/ ##
6210## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006211_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006212 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006213 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006215{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6216echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006218 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219else
6220 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6221fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006222{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6223echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006224
6225fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006226if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227
6228cat >>confdefs.h <<\_ACEOF
6229#define MAJOR_IN_MKDEV 1
6230_ACEOF
6231
6232fi
6233
6234
6235
6236 if test $ac_cv_header_sys_mkdev_h = no; then
6237 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006238 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6239echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006241 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006243{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6244echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245else
6246 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006247{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6248echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006250/* confdefs.h. */
6251_ACEOF
6252cat confdefs.h >>conftest.$ac_ext
6253cat >>conftest.$ac_ext <<_ACEOF
6254/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255$ac_includes_default
6256#include <sys/sysmacros.h>
6257_ACEOF
6258rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006259if { (ac_try="$ac_compile"
6260case "(($ac_try" in
6261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6262 *) ac_try_echo=$ac_try;;
6263esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006267 grep -v '^ *+' conftest.er1 >conftest.err
6268 rm -f conftest.er1
6269 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006271 (exit $ac_status); } && {
6272 test -z "$ac_c_werror_flag" ||
6273 test ! -s conftest.err
6274 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275 ac_header_compiler=yes
6276else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006278sed 's/^/| /' conftest.$ac_ext >&5
6279
Martin v. Löwiseba40652007-08-30 20:10:57 +00006280 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006282
6283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006284{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6285echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286
6287# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006288{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6289echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006291/* confdefs.h. */
6292_ACEOF
6293cat confdefs.h >>conftest.$ac_ext
6294cat >>conftest.$ac_ext <<_ACEOF
6295/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296#include <sys/sysmacros.h>
6297_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006298if { (ac_try="$ac_cpp conftest.$ac_ext"
6299case "(($ac_try" in
6300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6301 *) ac_try_echo=$ac_try;;
6302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006304 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006306 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307 rm -f conftest.er1
6308 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006310 (exit $ac_status); } >/dev/null && {
6311 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6312 test ! -s conftest.err
6313 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314 ac_header_preproc=yes
6315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006317sed 's/^/| /' conftest.$ac_ext >&5
6318
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006319 ac_header_preproc=no
6320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006321
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006323{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6324echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006325
6326# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006327case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6328 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006329 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6330echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6331 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6332echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006333 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006334 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006335 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6342 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6343echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6344 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6345echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6346 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6347echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006348 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006349## -------------------------------------- ##
6350## Report this to http://bugs.python.org/ ##
6351## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006352_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006353 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006354 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006355esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006356{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6357echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006358if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006359 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006360else
6361 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6362fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006363{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6364echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006365
6366fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006367if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006368
6369cat >>confdefs.h <<\_ACEOF
6370#define MAJOR_IN_SYSMACROS 1
6371_ACEOF
6372
6373fi
6374
6375
6376 fi
6377fi
6378
Michael W. Hudson54241132001-12-07 15:38:26 +00006379
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006380# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006381
6382for ac_header in term.h
6383do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006384as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6385{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006387if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006389else
6390 cat >conftest.$ac_ext <<_ACEOF
6391/* confdefs.h. */
6392_ACEOF
6393cat confdefs.h >>conftest.$ac_ext
6394cat >>conftest.$ac_ext <<_ACEOF
6395/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006396
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006397#ifdef HAVE_CURSES_H
6398#include <curses.h>
6399#endif
6400
6401
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006402#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006403_ACEOF
6404rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006405if { (ac_try="$ac_compile"
6406case "(($ac_try" in
6407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6408 *) ac_try_echo=$ac_try;;
6409esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006412 ac_status=$?
6413 grep -v '^ *+' conftest.er1 >conftest.err
6414 rm -f conftest.er1
6415 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006417 (exit $ac_status); } && {
6418 test -z "$ac_c_werror_flag" ||
6419 test ! -s conftest.err
6420 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006421 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006422else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006423 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006424sed 's/^/| /' conftest.$ac_ext >&5
6425
Martin v. Löwiseba40652007-08-30 20:10:57 +00006426 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006428
6429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006430fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006431ac_res=`eval echo '${'$as_ac_Header'}'`
6432 { echo "$as_me:$LINENO: result: $ac_res" >&5
6433echo "${ECHO_T}$ac_res" >&6; }
6434if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006435 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006436#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006437_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006438
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006439fi
6440
6441done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006442
6443
Martin v. Löwis11017b12006-01-14 18:12:57 +00006444# On Linux, netlink.h requires asm/types.h
6445
6446for ac_header in linux/netlink.h
6447do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006448as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6449{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6450echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006451if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006452 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006453else
6454 cat >conftest.$ac_ext <<_ACEOF
6455/* confdefs.h. */
6456_ACEOF
6457cat confdefs.h >>conftest.$ac_ext
6458cat >>conftest.$ac_ext <<_ACEOF
6459/* end confdefs.h. */
6460
6461#ifdef HAVE_ASM_TYPES_H
6462#include <asm/types.h>
6463#endif
6464#ifdef HAVE_SYS_SOCKET_H
6465#include <sys/socket.h>
6466#endif
6467
6468
6469#include <$ac_header>
6470_ACEOF
6471rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006472if { (ac_try="$ac_compile"
6473case "(($ac_try" in
6474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6475 *) ac_try_echo=$ac_try;;
6476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006479 ac_status=$?
6480 grep -v '^ *+' conftest.er1 >conftest.err
6481 rm -f conftest.er1
6482 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006484 (exit $ac_status); } && {
6485 test -z "$ac_c_werror_flag" ||
6486 test ! -s conftest.err
6487 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006488 eval "$as_ac_Header=yes"
6489else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006490 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006491sed 's/^/| /' conftest.$ac_ext >&5
6492
Martin v. Löwiseba40652007-08-30 20:10:57 +00006493 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006495
6496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006497fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006498ac_res=`eval echo '${'$as_ac_Header'}'`
6499 { echo "$as_me:$LINENO: result: $ac_res" >&5
6500echo "${ECHO_T}$ac_res" >&6; }
6501if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006502 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006503#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006504_ACEOF
6505
6506fi
6507
6508done
6509
6510
Guido van Rossum627b2d71993-12-24 10:39:16 +00006511# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006512was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006513{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6514echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006515cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006516/* confdefs.h. */
6517_ACEOF
6518cat confdefs.h >>conftest.$ac_ext
6519cat >>conftest.$ac_ext <<_ACEOF
6520/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006521#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006525 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006526 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006527else
Martin v. Löwis11437992002-04-12 09:54:03 +00006528
6529
6530cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006531#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006532_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006533
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006534
Guido van Rossum627b2d71993-12-24 10:39:16 +00006535fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00006536rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006537
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006538{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6539echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006540
Neal Norwitz11690112002-07-30 01:08:28 +00006541# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006542{ echo "$as_me:$LINENO: checking for makedev" >&5
6543echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006544cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006545/* confdefs.h. */
6546_ACEOF
6547cat confdefs.h >>conftest.$ac_ext
6548cat >>conftest.$ac_ext <<_ACEOF
6549/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006550#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006551int
6552main ()
6553{
6554 makedev(0, 0)
6555 ;
6556 return 0;
6557}
6558_ACEOF
6559rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006560if { (ac_try="$ac_link"
6561case "(($ac_try" in
6562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6563 *) ac_try_echo=$ac_try;;
6564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006568 grep -v '^ *+' conftest.er1 >conftest.err
6569 rm -f conftest.er1
6570 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006572 (exit $ac_status); } && {
6573 test -z "$ac_c_werror_flag" ||
6574 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006575 } && test -s conftest$ac_exeext &&
6576 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006577 ac_cv_has_makedev=yes
6578else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006580sed 's/^/| /' conftest.$ac_ext >&5
6581
Martin v. Löwiseba40652007-08-30 20:10:57 +00006582 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006584
6585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006586 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006587if test "$ac_cv_has_makedev" = "no"; then
6588 # we didn't link, try if _OSF_SOURCE will allow us to link
6589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006590/* confdefs.h. */
6591_ACEOF
6592cat confdefs.h >>conftest.$ac_ext
6593cat >>conftest.$ac_ext <<_ACEOF
6594/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006595
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006596#define _OSF_SOURCE 1
6597#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006598
Neal Norwitz11690112002-07-30 01:08:28 +00006599int
6600main ()
6601{
6602 makedev(0, 0)
6603 ;
6604 return 0;
6605}
6606_ACEOF
6607rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006608if { (ac_try="$ac_link"
6609case "(($ac_try" in
6610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6611 *) ac_try_echo=$ac_try;;
6612esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006614 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006616 grep -v '^ *+' conftest.er1 >conftest.err
6617 rm -f conftest.er1
6618 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006620 (exit $ac_status); } && {
6621 test -z "$ac_c_werror_flag" ||
6622 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006623 } && test -s conftest$ac_exeext &&
6624 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006625 ac_cv_has_makedev=yes
6626else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006628sed 's/^/| /' conftest.$ac_ext >&5
6629
Martin v. Löwiseba40652007-08-30 20:10:57 +00006630 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006632
6633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006634 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006635 if test "$ac_cv_has_makedev" = "yes"; then
6636
6637cat >>confdefs.h <<\_ACEOF
6638#define _OSF_SOURCE 1
6639_ACEOF
6640
6641 fi
6642fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006643{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6644echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006645if test "$ac_cv_has_makedev" = "yes"; then
6646
6647cat >>confdefs.h <<\_ACEOF
6648#define HAVE_MAKEDEV 1
6649_ACEOF
6650
6651fi
6652
Martin v. Löwis399a6892002-10-04 10:22:02 +00006653# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6654# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6655# defined, but the compiler does not support pragma redefine_extname,
6656# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6657# structures (such as rlimit64) without declaring them. As a
6658# work-around, disable LFS on such configurations
6659
6660use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006661{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6662echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006663cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006664/* confdefs.h. */
6665_ACEOF
6666cat confdefs.h >>conftest.$ac_ext
6667cat >>conftest.$ac_ext <<_ACEOF
6668/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006669
6670#define _LARGEFILE_SOURCE 1
6671#define _FILE_OFFSET_BITS 64
6672#include <sys/resource.h>
6673
Martin v. Löwis399a6892002-10-04 10:22:02 +00006674int
6675main ()
6676{
6677struct rlimit foo;
6678 ;
6679 return 0;
6680}
6681_ACEOF
6682rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683if { (ac_try="$ac_compile"
6684case "(($ac_try" in
6685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6686 *) ac_try_echo=$ac_try;;
6687esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006691 grep -v '^ *+' conftest.er1 >conftest.err
6692 rm -f conftest.er1
6693 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006695 (exit $ac_status); } && {
6696 test -z "$ac_c_werror_flag" ||
6697 test ! -s conftest.err
6698 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006699 sol_lfs_bug=no
6700else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006702sed 's/^/| /' conftest.$ac_ext >&5
6703
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006706
6707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006708{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6709echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006710if test "$sol_lfs_bug" = "yes"; then
6711 use_lfs=no
6712fi
6713
6714if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006715# Two defines needed to enable largefile support on various platforms
6716# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006717
Martin v. Löwis11437992002-04-12 09:54:03 +00006718cat >>confdefs.h <<\_ACEOF
6719#define _LARGEFILE_SOURCE 1
6720_ACEOF
6721
6722
6723cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006724#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006725_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006726
Martin v. Löwis399a6892002-10-04 10:22:02 +00006727fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006728
Guido van Rossum84e7b241996-08-19 21:59:00 +00006729# Add some code to confdefs.h so that the test for off_t works on SCO
6730cat >> confdefs.h <<\EOF
6731#if defined(SCO_DS)
6732#undef _OFF_T
6733#endif
6734EOF
6735
Guido van Rossumef2255b2000-03-10 22:30:29 +00006736# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006737{ echo "$as_me:$LINENO: checking for mode_t" >&5
6738echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006739if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006740 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006741else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006742 cat >conftest.$ac_ext <<_ACEOF
6743/* confdefs.h. */
6744_ACEOF
6745cat confdefs.h >>conftest.$ac_ext
6746cat >>conftest.$ac_ext <<_ACEOF
6747/* end confdefs.h. */
6748$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006749typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006750int
6751main ()
6752{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006753if ((ac__type_new_ *) 0)
6754 return 0;
6755if (sizeof (ac__type_new_))
6756 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006757 ;
6758 return 0;
6759}
6760_ACEOF
6761rm -f conftest.$ac_objext
6762if { (ac_try="$ac_compile"
6763case "(($ac_try" in
6764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6765 *) ac_try_echo=$ac_try;;
6766esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006768 (eval "$ac_compile") 2>conftest.er1
6769 ac_status=$?
6770 grep -v '^ *+' conftest.er1 >conftest.err
6771 rm -f conftest.er1
6772 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006774 (exit $ac_status); } && {
6775 test -z "$ac_c_werror_flag" ||
6776 test ! -s conftest.err
6777 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006778 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006779else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006781sed 's/^/| /' conftest.$ac_ext >&5
6782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006783 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785
6786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006788{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6789echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6790if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006791 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006792else
Martin v. Löwis11437992002-04-12 09:54:03 +00006793
6794cat >>confdefs.h <<_ACEOF
6795#define mode_t int
6796_ACEOF
6797
6798fi
6799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006800{ echo "$as_me:$LINENO: checking for off_t" >&5
6801echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006802if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006803 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006804else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006805 cat >conftest.$ac_ext <<_ACEOF
6806/* confdefs.h. */
6807_ACEOF
6808cat confdefs.h >>conftest.$ac_ext
6809cat >>conftest.$ac_ext <<_ACEOF
6810/* end confdefs.h. */
6811$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006812typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006813int
6814main ()
6815{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006816if ((ac__type_new_ *) 0)
6817 return 0;
6818if (sizeof (ac__type_new_))
6819 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006820 ;
6821 return 0;
6822}
6823_ACEOF
6824rm -f conftest.$ac_objext
6825if { (ac_try="$ac_compile"
6826case "(($ac_try" in
6827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6828 *) ac_try_echo=$ac_try;;
6829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831 (eval "$ac_compile") 2>conftest.er1
6832 ac_status=$?
6833 grep -v '^ *+' conftest.er1 >conftest.err
6834 rm -f conftest.er1
6835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006837 (exit $ac_status); } && {
6838 test -z "$ac_c_werror_flag" ||
6839 test ! -s conftest.err
6840 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006841 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006844sed 's/^/| /' conftest.$ac_ext >&5
6845
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006846 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006848
6849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006850fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006851{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6852echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6853if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006854 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006855else
Martin v. Löwis11437992002-04-12 09:54:03 +00006856
6857cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006858#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006859_ACEOF
6860
6861fi
6862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006863{ echo "$as_me:$LINENO: checking for pid_t" >&5
6864echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006865if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006866 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006867else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006868 cat >conftest.$ac_ext <<_ACEOF
6869/* confdefs.h. */
6870_ACEOF
6871cat confdefs.h >>conftest.$ac_ext
6872cat >>conftest.$ac_ext <<_ACEOF
6873/* end confdefs.h. */
6874$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006875typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006876int
6877main ()
6878{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006879if ((ac__type_new_ *) 0)
6880 return 0;
6881if (sizeof (ac__type_new_))
6882 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006883 ;
6884 return 0;
6885}
6886_ACEOF
6887rm -f conftest.$ac_objext
6888if { (ac_try="$ac_compile"
6889case "(($ac_try" in
6890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6891 *) ac_try_echo=$ac_try;;
6892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006894 (eval "$ac_compile") 2>conftest.er1
6895 ac_status=$?
6896 grep -v '^ *+' conftest.er1 >conftest.err
6897 rm -f conftest.er1
6898 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006900 (exit $ac_status); } && {
6901 test -z "$ac_c_werror_flag" ||
6902 test ! -s conftest.err
6903 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006904 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006907sed 's/^/| /' conftest.$ac_ext >&5
6908
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006909 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911
6912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006913fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006914{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6915echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6916if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006917 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006918else
Martin v. Löwis11437992002-04-12 09:54:03 +00006919
6920cat >>confdefs.h <<_ACEOF
6921#define pid_t int
6922_ACEOF
6923
6924fi
6925
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006926{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6927echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006928if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006929 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006930else
6931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006932/* confdefs.h. */
6933_ACEOF
6934cat confdefs.h >>conftest.$ac_ext
6935cat >>conftest.$ac_ext <<_ACEOF
6936/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006937#include <sys/types.h>
6938#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940int
6941main ()
6942{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006943return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006944 ;
6945 return 0;
6946}
6947_ACEOF
6948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949if { (ac_try="$ac_compile"
6950case "(($ac_try" in
6951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6952 *) ac_try_echo=$ac_try;;
6953esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006957 grep -v '^ *+' conftest.er1 >conftest.err
6958 rm -f conftest.er1
6959 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006961 (exit $ac_status); } && {
6962 test -z "$ac_c_werror_flag" ||
6963 test ! -s conftest.err
6964 } && test -s conftest.$ac_objext; then
6965 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006966else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006968sed 's/^/| /' conftest.$ac_ext >&5
6969
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006972
6973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006974fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006975{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6976echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006977
Martin v. Löwis11437992002-04-12 09:54:03 +00006978cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006979#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006980_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006981
Michael W. Hudson54241132001-12-07 15:38:26 +00006982
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006983{ echo "$as_me:$LINENO: checking for size_t" >&5
6984echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006985if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006988 cat >conftest.$ac_ext <<_ACEOF
6989/* confdefs.h. */
6990_ACEOF
6991cat confdefs.h >>conftest.$ac_ext
6992cat >>conftest.$ac_ext <<_ACEOF
6993/* end confdefs.h. */
6994$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006995typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006996int
6997main ()
6998{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006999if ((ac__type_new_ *) 0)
7000 return 0;
7001if (sizeof (ac__type_new_))
7002 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007003 ;
7004 return 0;
7005}
7006_ACEOF
7007rm -f conftest.$ac_objext
7008if { (ac_try="$ac_compile"
7009case "(($ac_try" in
7010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7011 *) ac_try_echo=$ac_try;;
7012esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007014 (eval "$ac_compile") 2>conftest.er1
7015 ac_status=$?
7016 grep -v '^ *+' conftest.er1 >conftest.err
7017 rm -f conftest.er1
7018 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007020 (exit $ac_status); } && {
7021 test -z "$ac_c_werror_flag" ||
7022 test ! -s conftest.err
7023 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007024 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007025else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007027sed 's/^/| /' conftest.$ac_ext >&5
7028
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007029 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007031
7032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007033fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007034{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7035echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7036if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007037 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007038else
Martin v. Löwis11437992002-04-12 09:54:03 +00007039
7040cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007041#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007042_ACEOF
7043
7044fi
7045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007046{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7047echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007048if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007049 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007050else
7051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007052/* confdefs.h. */
7053_ACEOF
7054cat confdefs.h >>conftest.$ac_ext
7055cat >>conftest.$ac_ext <<_ACEOF
7056/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007057#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007058
7059_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007061 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062 ac_cv_type_uid_t=yes
7063else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007064 ac_cv_type_uid_t=no
7065fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00007066rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007068fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007069{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7070echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007071if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007072
Martin v. Löwis11437992002-04-12 09:54:03 +00007073cat >>confdefs.h <<\_ACEOF
7074#define uid_t int
7075_ACEOF
7076
7077
7078cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007080_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007081
7082fi
7083
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007084
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007085 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7086echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007087if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007088 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007089else
7090 ac_cv_c_uint32_t=no
7091 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7092 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7093 cat >conftest.$ac_ext <<_ACEOF
7094/* confdefs.h. */
7095_ACEOF
7096cat confdefs.h >>conftest.$ac_ext
7097cat >>conftest.$ac_ext <<_ACEOF
7098/* end confdefs.h. */
7099$ac_includes_default
7100int
7101main ()
7102{
7103static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7104test_array [0] = 0
7105
7106 ;
7107 return 0;
7108}
7109_ACEOF
7110rm -f conftest.$ac_objext
7111if { (ac_try="$ac_compile"
7112case "(($ac_try" in
7113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7114 *) ac_try_echo=$ac_try;;
7115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007117 (eval "$ac_compile") 2>conftest.er1
7118 ac_status=$?
7119 grep -v '^ *+' conftest.er1 >conftest.err
7120 rm -f conftest.er1
7121 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007123 (exit $ac_status); } && {
7124 test -z "$ac_c_werror_flag" ||
7125 test ! -s conftest.err
7126 } && test -s conftest.$ac_objext; then
7127 case $ac_type in
7128 uint32_t) ac_cv_c_uint32_t=yes ;;
7129 *) ac_cv_c_uint32_t=$ac_type ;;
7130esac
7131
7132else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007133 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007134sed 's/^/| /' conftest.$ac_ext >&5
7135
7136
7137fi
7138
7139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7140 test "$ac_cv_c_uint32_t" != no && break
7141 done
7142fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007143{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7144echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007145 case $ac_cv_c_uint32_t in #(
7146 no|yes) ;; #(
7147 *)
7148
7149cat >>confdefs.h <<\_ACEOF
7150#define _UINT32_T 1
7151_ACEOF
7152
7153
7154cat >>confdefs.h <<_ACEOF
7155#define uint32_t $ac_cv_c_uint32_t
7156_ACEOF
7157;;
7158 esac
7159
7160
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007161 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7162echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007163if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007164 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007165else
7166 ac_cv_c_uint64_t=no
7167 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7168 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7169 cat >conftest.$ac_ext <<_ACEOF
7170/* confdefs.h. */
7171_ACEOF
7172cat confdefs.h >>conftest.$ac_ext
7173cat >>conftest.$ac_ext <<_ACEOF
7174/* end confdefs.h. */
7175$ac_includes_default
7176int
7177main ()
7178{
7179static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7180test_array [0] = 0
7181
7182 ;
7183 return 0;
7184}
7185_ACEOF
7186rm -f conftest.$ac_objext
7187if { (ac_try="$ac_compile"
7188case "(($ac_try" in
7189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7190 *) ac_try_echo=$ac_try;;
7191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007193 (eval "$ac_compile") 2>conftest.er1
7194 ac_status=$?
7195 grep -v '^ *+' conftest.er1 >conftest.err
7196 rm -f conftest.er1
7197 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007199 (exit $ac_status); } && {
7200 test -z "$ac_c_werror_flag" ||
7201 test ! -s conftest.err
7202 } && test -s conftest.$ac_objext; then
7203 case $ac_type in
7204 uint64_t) ac_cv_c_uint64_t=yes ;;
7205 *) ac_cv_c_uint64_t=$ac_type ;;
7206esac
7207
7208else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007209 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007210sed 's/^/| /' conftest.$ac_ext >&5
7211
7212
7213fi
7214
7215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7216 test "$ac_cv_c_uint64_t" != no && break
7217 done
7218fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007219{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7220echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007221 case $ac_cv_c_uint64_t in #(
7222 no|yes) ;; #(
7223 *)
7224
7225cat >>confdefs.h <<\_ACEOF
7226#define _UINT64_T 1
7227_ACEOF
7228
7229
7230cat >>confdefs.h <<_ACEOF
7231#define uint64_t $ac_cv_c_uint64_t
7232_ACEOF
7233;;
7234 esac
7235
7236
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007237 { echo "$as_me:$LINENO: checking for int32_t" >&5
7238echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007239if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007240 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007241else
7242 ac_cv_c_int32_t=no
7243 for ac_type in 'int32_t' 'int' 'long int' \
7244 'long long int' 'short int' 'signed char'; do
7245 cat >conftest.$ac_ext <<_ACEOF
7246/* confdefs.h. */
7247_ACEOF
7248cat confdefs.h >>conftest.$ac_ext
7249cat >>conftest.$ac_ext <<_ACEOF
7250/* end confdefs.h. */
7251$ac_includes_default
7252int
7253main ()
7254{
7255static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7256test_array [0] = 0
7257
7258 ;
7259 return 0;
7260}
7261_ACEOF
7262rm -f conftest.$ac_objext
7263if { (ac_try="$ac_compile"
7264case "(($ac_try" in
7265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7266 *) ac_try_echo=$ac_try;;
7267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007269 (eval "$ac_compile") 2>conftest.er1
7270 ac_status=$?
7271 grep -v '^ *+' conftest.er1 >conftest.err
7272 rm -f conftest.er1
7273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007275 (exit $ac_status); } && {
7276 test -z "$ac_c_werror_flag" ||
7277 test ! -s conftest.err
7278 } && test -s conftest.$ac_objext; then
7279 cat >conftest.$ac_ext <<_ACEOF
7280/* confdefs.h. */
7281_ACEOF
7282cat confdefs.h >>conftest.$ac_ext
7283cat >>conftest.$ac_ext <<_ACEOF
7284/* end confdefs.h. */
7285$ac_includes_default
7286int
7287main ()
7288{
7289static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007290 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007291test_array [0] = 0
7292
7293 ;
7294 return 0;
7295}
7296_ACEOF
7297rm -f conftest.$ac_objext
7298if { (ac_try="$ac_compile"
7299case "(($ac_try" in
7300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7301 *) ac_try_echo=$ac_try;;
7302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007304 (eval "$ac_compile") 2>conftest.er1
7305 ac_status=$?
7306 grep -v '^ *+' conftest.er1 >conftest.err
7307 rm -f conftest.er1
7308 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007310 (exit $ac_status); } && {
7311 test -z "$ac_c_werror_flag" ||
7312 test ! -s conftest.err
7313 } && test -s conftest.$ac_objext; then
7314 :
7315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007316 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007317sed 's/^/| /' conftest.$ac_ext >&5
7318
7319 case $ac_type in
7320 int32_t) ac_cv_c_int32_t=yes ;;
7321 *) ac_cv_c_int32_t=$ac_type ;;
7322esac
7323
7324fi
7325
7326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007328 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007329sed 's/^/| /' conftest.$ac_ext >&5
7330
7331
7332fi
7333
7334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7335 test "$ac_cv_c_int32_t" != no && break
7336 done
7337fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007338{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7339echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007340 case $ac_cv_c_int32_t in #(
7341 no|yes) ;; #(
7342 *)
7343
7344cat >>confdefs.h <<_ACEOF
7345#define int32_t $ac_cv_c_int32_t
7346_ACEOF
7347;;
7348 esac
7349
7350
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007351 { echo "$as_me:$LINENO: checking for int64_t" >&5
7352echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007353if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007354 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007355else
7356 ac_cv_c_int64_t=no
7357 for ac_type in 'int64_t' 'int' 'long int' \
7358 'long long int' 'short int' 'signed char'; do
7359 cat >conftest.$ac_ext <<_ACEOF
7360/* confdefs.h. */
7361_ACEOF
7362cat confdefs.h >>conftest.$ac_ext
7363cat >>conftest.$ac_ext <<_ACEOF
7364/* end confdefs.h. */
7365$ac_includes_default
7366int
7367main ()
7368{
7369static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7370test_array [0] = 0
7371
7372 ;
7373 return 0;
7374}
7375_ACEOF
7376rm -f conftest.$ac_objext
7377if { (ac_try="$ac_compile"
7378case "(($ac_try" in
7379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7380 *) ac_try_echo=$ac_try;;
7381esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007383 (eval "$ac_compile") 2>conftest.er1
7384 ac_status=$?
7385 grep -v '^ *+' conftest.er1 >conftest.err
7386 rm -f conftest.er1
7387 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007389 (exit $ac_status); } && {
7390 test -z "$ac_c_werror_flag" ||
7391 test ! -s conftest.err
7392 } && test -s conftest.$ac_objext; then
7393 cat >conftest.$ac_ext <<_ACEOF
7394/* confdefs.h. */
7395_ACEOF
7396cat confdefs.h >>conftest.$ac_ext
7397cat >>conftest.$ac_ext <<_ACEOF
7398/* end confdefs.h. */
7399$ac_includes_default
7400int
7401main ()
7402{
7403static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007404 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007405test_array [0] = 0
7406
7407 ;
7408 return 0;
7409}
7410_ACEOF
7411rm -f conftest.$ac_objext
7412if { (ac_try="$ac_compile"
7413case "(($ac_try" in
7414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7415 *) ac_try_echo=$ac_try;;
7416esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007418 (eval "$ac_compile") 2>conftest.er1
7419 ac_status=$?
7420 grep -v '^ *+' conftest.er1 >conftest.err
7421 rm -f conftest.er1
7422 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007424 (exit $ac_status); } && {
7425 test -z "$ac_c_werror_flag" ||
7426 test ! -s conftest.err
7427 } && test -s conftest.$ac_objext; then
7428 :
7429else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007430 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007431sed 's/^/| /' conftest.$ac_ext >&5
7432
7433 case $ac_type in
7434 int64_t) ac_cv_c_int64_t=yes ;;
7435 *) ac_cv_c_int64_t=$ac_type ;;
7436esac
7437
7438fi
7439
7440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7441else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007442 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007443sed 's/^/| /' conftest.$ac_ext >&5
7444
7445
7446fi
7447
7448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7449 test "$ac_cv_c_int64_t" != no && break
7450 done
7451fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007452{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7453echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007454 case $ac_cv_c_int64_t in #(
7455 no|yes) ;; #(
7456 *)
7457
7458cat >>confdefs.h <<_ACEOF
7459#define int64_t $ac_cv_c_int64_t
7460_ACEOF
7461;;
7462 esac
7463
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007464{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7465echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007466if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007467 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007468else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007469 cat >conftest.$ac_ext <<_ACEOF
7470/* confdefs.h. */
7471_ACEOF
7472cat confdefs.h >>conftest.$ac_ext
7473cat >>conftest.$ac_ext <<_ACEOF
7474/* end confdefs.h. */
7475$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007476typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007477int
7478main ()
7479{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007480if ((ac__type_new_ *) 0)
7481 return 0;
7482if (sizeof (ac__type_new_))
7483 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007484 ;
7485 return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext
7489if { (ac_try="$ac_compile"
7490case "(($ac_try" in
7491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7492 *) ac_try_echo=$ac_try;;
7493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007495 (eval "$ac_compile") 2>conftest.er1
7496 ac_status=$?
7497 grep -v '^ *+' conftest.er1 >conftest.err
7498 rm -f conftest.er1
7499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007501 (exit $ac_status); } && {
7502 test -z "$ac_c_werror_flag" ||
7503 test ! -s conftest.err
7504 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007505 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007507 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007508sed 's/^/| /' conftest.$ac_ext >&5
7509
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007510 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007512
7513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007514fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007515{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7516echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7517if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007518
7519cat >>confdefs.h <<\_ACEOF
7520#define HAVE_SSIZE_T 1
7521_ACEOF
7522
7523fi
7524
Jack Jansendd19cf82001-12-06 22:36:17 +00007525
Michael W. Hudson54241132001-12-07 15:38:26 +00007526# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007527# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007528{ echo "$as_me:$LINENO: checking for int" >&5
7529echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7530if test "${ac_cv_type_int+set}" = set; then
7531 echo $ECHO_N "(cached) $ECHO_C" >&6
7532else
7533 cat >conftest.$ac_ext <<_ACEOF
7534/* confdefs.h. */
7535_ACEOF
7536cat confdefs.h >>conftest.$ac_ext
7537cat >>conftest.$ac_ext <<_ACEOF
7538/* end confdefs.h. */
7539$ac_includes_default
7540typedef int ac__type_new_;
7541int
7542main ()
7543{
7544if ((ac__type_new_ *) 0)
7545 return 0;
7546if (sizeof (ac__type_new_))
7547 return 0;
7548 ;
7549 return 0;
7550}
7551_ACEOF
7552rm -f conftest.$ac_objext
7553if { (ac_try="$ac_compile"
7554case "(($ac_try" in
7555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7556 *) ac_try_echo=$ac_try;;
7557esac
7558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7559 (eval "$ac_compile") 2>conftest.er1
7560 ac_status=$?
7561 grep -v '^ *+' conftest.er1 >conftest.err
7562 rm -f conftest.er1
7563 cat conftest.err >&5
7564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7565 (exit $ac_status); } && {
7566 test -z "$ac_c_werror_flag" ||
7567 test ! -s conftest.err
7568 } && test -s conftest.$ac_objext; then
7569 ac_cv_type_int=yes
7570else
7571 echo "$as_me: failed program was:" >&5
7572sed 's/^/| /' conftest.$ac_ext >&5
7573
7574 ac_cv_type_int=no
7575fi
7576
7577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7578fi
7579{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7580echo "${ECHO_T}$ac_cv_type_int" >&6; }
7581
Martin v. Löwiseba40652007-08-30 20:10:57 +00007582# The cast to long int works around a bug in the HP C Compiler
7583# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7584# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7585# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007586{ echo "$as_me:$LINENO: checking size of int" >&5
7587echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007588if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007589 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007590else
Martin v. Löwis11437992002-04-12 09:54:03 +00007591 if test "$cross_compiling" = yes; then
7592 # Depending upon the size, compute the lo and hi bounds.
7593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007594/* confdefs.h. */
7595_ACEOF
7596cat confdefs.h >>conftest.$ac_ext
7597cat >>conftest.$ac_ext <<_ACEOF
7598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007599$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007600 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007601int
7602main ()
7603{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007604static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007605test_array [0] = 0
7606
7607 ;
7608 return 0;
7609}
7610_ACEOF
7611rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007612if { (ac_try="$ac_compile"
7613case "(($ac_try" in
7614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7615 *) ac_try_echo=$ac_try;;
7616esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007620 grep -v '^ *+' conftest.er1 >conftest.err
7621 rm -f conftest.er1
7622 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007624 (exit $ac_status); } && {
7625 test -z "$ac_c_werror_flag" ||
7626 test ! -s conftest.err
7627 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007628 ac_lo=0 ac_mid=0
7629 while :; do
7630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007631/* confdefs.h. */
7632_ACEOF
7633cat confdefs.h >>conftest.$ac_ext
7634cat >>conftest.$ac_ext <<_ACEOF
7635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007636$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007637 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007638int
7639main ()
7640{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007641static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007642test_array [0] = 0
7643
7644 ;
7645 return 0;
7646}
7647_ACEOF
7648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649if { (ac_try="$ac_compile"
7650case "(($ac_try" in
7651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7652 *) ac_try_echo=$ac_try;;
7653esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007657 grep -v '^ *+' conftest.er1 >conftest.err
7658 rm -f conftest.er1
7659 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661 (exit $ac_status); } && {
7662 test -z "$ac_c_werror_flag" ||
7663 test ! -s conftest.err
7664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 ac_hi=$ac_mid; break
7666else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007668sed 's/^/| /' conftest.$ac_ext >&5
7669
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670 ac_lo=`expr $ac_mid + 1`
7671 if test $ac_lo -le $ac_mid; then
7672 ac_lo= ac_hi=
7673 break
7674 fi
7675 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007677
7678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 done
7680else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007682sed 's/^/| /' conftest.$ac_ext >&5
7683
Martin v. Löwiseba40652007-08-30 20:10:57 +00007684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007685/* confdefs.h. */
7686_ACEOF
7687cat confdefs.h >>conftest.$ac_ext
7688cat >>conftest.$ac_ext <<_ACEOF
7689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007690$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007691 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007692int
7693main ()
7694{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007695static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007696test_array [0] = 0
7697
7698 ;
7699 return 0;
7700}
7701_ACEOF
7702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703if { (ac_try="$ac_compile"
7704case "(($ac_try" in
7705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7706 *) ac_try_echo=$ac_try;;
7707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007711 grep -v '^ *+' conftest.er1 >conftest.err
7712 rm -f conftest.er1
7713 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715 (exit $ac_status); } && {
7716 test -z "$ac_c_werror_flag" ||
7717 test ! -s conftest.err
7718 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007719 ac_hi=-1 ac_mid=-1
7720 while :; do
7721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007722/* confdefs.h. */
7723_ACEOF
7724cat confdefs.h >>conftest.$ac_ext
7725cat >>conftest.$ac_ext <<_ACEOF
7726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007727$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007728 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007729int
7730main ()
7731{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007733test_array [0] = 0
7734
7735 ;
7736 return 0;
7737}
7738_ACEOF
7739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740if { (ac_try="$ac_compile"
7741case "(($ac_try" in
7742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7743 *) ac_try_echo=$ac_try;;
7744esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007748 grep -v '^ *+' conftest.er1 >conftest.err
7749 rm -f conftest.er1
7750 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752 (exit $ac_status); } && {
7753 test -z "$ac_c_werror_flag" ||
7754 test ! -s conftest.err
7755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_lo=$ac_mid; break
7757else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007759sed 's/^/| /' conftest.$ac_ext >&5
7760
Martin v. Löwiseba40652007-08-30 20:10:57 +00007761 ac_hi=`expr '(' $ac_mid ')' - 1`
7762 if test $ac_mid -le $ac_hi; then
7763 ac_lo= ac_hi=
7764 break
7765 fi
7766 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007768
7769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 done
7771else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007773sed 's/^/| /' conftest.$ac_ext >&5
7774
Martin v. Löwiseba40652007-08-30 20:10:57 +00007775 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007777
7778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007780
7781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007782# Binary search between lo and hi bounds.
7783while test "x$ac_lo" != "x$ac_hi"; do
7784 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007786/* confdefs.h. */
7787_ACEOF
7788cat confdefs.h >>conftest.$ac_ext
7789cat >>conftest.$ac_ext <<_ACEOF
7790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007791$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007792 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007793int
7794main ()
7795{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007796static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007797test_array [0] = 0
7798
7799 ;
7800 return 0;
7801}
7802_ACEOF
7803rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007804if { (ac_try="$ac_compile"
7805case "(($ac_try" in
7806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7807 *) ac_try_echo=$ac_try;;
7808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007812 grep -v '^ *+' conftest.er1 >conftest.err
7813 rm -f conftest.er1
7814 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007816 (exit $ac_status); } && {
7817 test -z "$ac_c_werror_flag" ||
7818 test ! -s conftest.err
7819 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 ac_hi=$ac_mid
7821else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007823sed 's/^/| /' conftest.$ac_ext >&5
7824
Martin v. Löwiseba40652007-08-30 20:10:57 +00007825 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007827
7828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007829done
7830case $ac_lo in
7831?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007833 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007834See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007835echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007836See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007837 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007838 else
7839 ac_cv_sizeof_int=0
7840 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007841esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007842else
Martin v. Löwis11437992002-04-12 09:54:03 +00007843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007844/* confdefs.h. */
7845_ACEOF
7846cat confdefs.h >>conftest.$ac_ext
7847cat >>conftest.$ac_ext <<_ACEOF
7848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007849$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007850 typedef int ac__type_sizeof_;
7851static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7852static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007853#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007854#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007855int
7856main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007857{
Martin v. Löwis11437992002-04-12 09:54:03 +00007858
7859 FILE *f = fopen ("conftest.val", "w");
7860 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007861 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007862 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007864 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007865 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007866 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007867 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 }
7869 else
7870 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007871 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007872 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007873 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007874 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007876 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007877
7878 ;
7879 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007880}
Martin v. Löwis11437992002-04-12 09:54:03 +00007881_ACEOF
7882rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883if { (ac_try="$ac_link"
7884case "(($ac_try" in
7885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7886 *) ac_try_echo=$ac_try;;
7887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007889 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007893 { (case "(($ac_try" in
7894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7895 *) ac_try_echo=$ac_try;;
7896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007898 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 (exit $ac_status); }; }; then
7902 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007904 echo "$as_me: program exited with status $ac_status" >&5
7905echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007906sed 's/^/| /' conftest.$ac_ext >&5
7907
Martin v. Löwis11437992002-04-12 09:54:03 +00007908( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007910 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007911See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007912echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007913See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007914 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007915 else
7916 ac_cv_sizeof_int=0
7917 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007920fi
7921rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007922fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007923{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7924echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007925
7926
7927
Martin v. Löwis11437992002-04-12 09:54:03 +00007928cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007929#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007930_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007931
7932
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007933{ echo "$as_me:$LINENO: checking for long" >&5
7934echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7935if test "${ac_cv_type_long+set}" = set; then
7936 echo $ECHO_N "(cached) $ECHO_C" >&6
7937else
7938 cat >conftest.$ac_ext <<_ACEOF
7939/* confdefs.h. */
7940_ACEOF
7941cat confdefs.h >>conftest.$ac_ext
7942cat >>conftest.$ac_ext <<_ACEOF
7943/* end confdefs.h. */
7944$ac_includes_default
7945typedef long ac__type_new_;
7946int
7947main ()
7948{
7949if ((ac__type_new_ *) 0)
7950 return 0;
7951if (sizeof (ac__type_new_))
7952 return 0;
7953 ;
7954 return 0;
7955}
7956_ACEOF
7957rm -f conftest.$ac_objext
7958if { (ac_try="$ac_compile"
7959case "(($ac_try" in
7960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7961 *) ac_try_echo=$ac_try;;
7962esac
7963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7964 (eval "$ac_compile") 2>conftest.er1
7965 ac_status=$?
7966 grep -v '^ *+' conftest.er1 >conftest.err
7967 rm -f conftest.er1
7968 cat conftest.err >&5
7969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970 (exit $ac_status); } && {
7971 test -z "$ac_c_werror_flag" ||
7972 test ! -s conftest.err
7973 } && test -s conftest.$ac_objext; then
7974 ac_cv_type_long=yes
7975else
7976 echo "$as_me: failed program was:" >&5
7977sed 's/^/| /' conftest.$ac_ext >&5
7978
7979 ac_cv_type_long=no
7980fi
7981
7982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7983fi
7984{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7985echo "${ECHO_T}$ac_cv_type_long" >&6; }
7986
Martin v. Löwiseba40652007-08-30 20:10:57 +00007987# The cast to long int works around a bug in the HP C Compiler
7988# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7989# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7990# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007991{ echo "$as_me:$LINENO: checking size of long" >&5
7992echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007993if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007994 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007995else
Martin v. Löwis11437992002-04-12 09:54:03 +00007996 if test "$cross_compiling" = yes; then
7997 # Depending upon the size, compute the lo and hi bounds.
7998cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007999/* confdefs.h. */
8000_ACEOF
8001cat confdefs.h >>conftest.$ac_ext
8002cat >>conftest.$ac_ext <<_ACEOF
8003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008004$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008005 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008006int
8007main ()
8008{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008009static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008010test_array [0] = 0
8011
8012 ;
8013 return 0;
8014}
8015_ACEOF
8016rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008017if { (ac_try="$ac_compile"
8018case "(($ac_try" in
8019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8020 *) ac_try_echo=$ac_try;;
8021esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008025 grep -v '^ *+' conftest.er1 >conftest.err
8026 rm -f conftest.er1
8027 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008029 (exit $ac_status); } && {
8030 test -z "$ac_c_werror_flag" ||
8031 test ! -s conftest.err
8032 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008033 ac_lo=0 ac_mid=0
8034 while :; do
8035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008036/* confdefs.h. */
8037_ACEOF
8038cat confdefs.h >>conftest.$ac_ext
8039cat >>conftest.$ac_ext <<_ACEOF
8040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008041$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008042 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008043int
8044main ()
8045{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008046static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008047test_array [0] = 0
8048
8049 ;
8050 return 0;
8051}
8052_ACEOF
8053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054if { (ac_try="$ac_compile"
8055case "(($ac_try" in
8056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8057 *) ac_try_echo=$ac_try;;
8058esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008062 grep -v '^ *+' conftest.er1 >conftest.err
8063 rm -f conftest.er1
8064 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066 (exit $ac_status); } && {
8067 test -z "$ac_c_werror_flag" ||
8068 test ! -s conftest.err
8069 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 ac_hi=$ac_mid; break
8071else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008073sed 's/^/| /' conftest.$ac_ext >&5
8074
Martin v. Löwiseba40652007-08-30 20:10:57 +00008075 ac_lo=`expr $ac_mid + 1`
8076 if test $ac_lo -le $ac_mid; then
8077 ac_lo= ac_hi=
8078 break
8079 fi
8080 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008082
8083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 done
8085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008087sed 's/^/| /' conftest.$ac_ext >&5
8088
Martin v. Löwiseba40652007-08-30 20:10:57 +00008089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008090/* confdefs.h. */
8091_ACEOF
8092cat confdefs.h >>conftest.$ac_ext
8093cat >>conftest.$ac_ext <<_ACEOF
8094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008095$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008096 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008097int
8098main ()
8099{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008100static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008101test_array [0] = 0
8102
8103 ;
8104 return 0;
8105}
8106_ACEOF
8107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108if { (ac_try="$ac_compile"
8109case "(($ac_try" in
8110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8111 *) ac_try_echo=$ac_try;;
8112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008116 grep -v '^ *+' conftest.er1 >conftest.err
8117 rm -f conftest.er1
8118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008120 (exit $ac_status); } && {
8121 test -z "$ac_c_werror_flag" ||
8122 test ! -s conftest.err
8123 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008124 ac_hi=-1 ac_mid=-1
8125 while :; do
8126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008127/* confdefs.h. */
8128_ACEOF
8129cat confdefs.h >>conftest.$ac_ext
8130cat >>conftest.$ac_ext <<_ACEOF
8131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008132$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008133 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008134int
8135main ()
8136{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008137static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008138test_array [0] = 0
8139
8140 ;
8141 return 0;
8142}
8143_ACEOF
8144rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008145if { (ac_try="$ac_compile"
8146case "(($ac_try" in
8147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8148 *) ac_try_echo=$ac_try;;
8149esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008153 grep -v '^ *+' conftest.er1 >conftest.err
8154 rm -f conftest.er1
8155 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008157 (exit $ac_status); } && {
8158 test -z "$ac_c_werror_flag" ||
8159 test ! -s conftest.err
8160 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 ac_lo=$ac_mid; break
8162else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008164sed 's/^/| /' conftest.$ac_ext >&5
8165
Martin v. Löwiseba40652007-08-30 20:10:57 +00008166 ac_hi=`expr '(' $ac_mid ')' - 1`
8167 if test $ac_mid -le $ac_hi; then
8168 ac_lo= ac_hi=
8169 break
8170 fi
8171 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173
8174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008175 done
8176else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008178sed 's/^/| /' conftest.$ac_ext >&5
8179
Martin v. Löwiseba40652007-08-30 20:10:57 +00008180 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008182
8183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008185
8186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008187# Binary search between lo and hi bounds.
8188while test "x$ac_lo" != "x$ac_hi"; do
8189 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8190 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008191/* confdefs.h. */
8192_ACEOF
8193cat confdefs.h >>conftest.$ac_ext
8194cat >>conftest.$ac_ext <<_ACEOF
8195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008196$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008197 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008198int
8199main ()
8200{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008201static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008202test_array [0] = 0
8203
8204 ;
8205 return 0;
8206}
8207_ACEOF
8208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008209if { (ac_try="$ac_compile"
8210case "(($ac_try" in
8211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8212 *) ac_try_echo=$ac_try;;
8213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008217 grep -v '^ *+' conftest.er1 >conftest.err
8218 rm -f conftest.er1
8219 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008221 (exit $ac_status); } && {
8222 test -z "$ac_c_werror_flag" ||
8223 test ! -s conftest.err
8224 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 ac_hi=$ac_mid
8226else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008228sed 's/^/| /' conftest.$ac_ext >&5
8229
Martin v. Löwiseba40652007-08-30 20:10:57 +00008230 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008232
8233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008234done
8235case $ac_lo in
8236?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008238 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008239See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008240echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008241See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008242 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008243 else
8244 ac_cv_sizeof_long=0
8245 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008246esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008247else
Martin v. Löwis11437992002-04-12 09:54:03 +00008248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008249/* confdefs.h. */
8250_ACEOF
8251cat confdefs.h >>conftest.$ac_ext
8252cat >>conftest.$ac_ext <<_ACEOF
8253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008254$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008255 typedef long ac__type_sizeof_;
8256static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8257static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008258#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008259#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008260int
8261main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008262{
Martin v. Löwis11437992002-04-12 09:54:03 +00008263
8264 FILE *f = fopen ("conftest.val", "w");
8265 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008266 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008267 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008268 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008269 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008270 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008271 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008272 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 }
8274 else
8275 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008276 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008277 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008278 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008279 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008281 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008282
8283 ;
8284 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008285}
Martin v. Löwis11437992002-04-12 09:54:03 +00008286_ACEOF
8287rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008288if { (ac_try="$ac_link"
8289case "(($ac_try" in
8290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8291 *) ac_try_echo=$ac_try;;
8292esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008294 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008297 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008298 { (case "(($ac_try" in
8299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8300 *) ac_try_echo=$ac_try;;
8301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008303 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008304 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008306 (exit $ac_status); }; }; then
8307 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008308else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008309 echo "$as_me: program exited with status $ac_status" >&5
8310echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008311sed 's/^/| /' conftest.$ac_ext >&5
8312
Martin v. Löwis11437992002-04-12 09:54:03 +00008313( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008315 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008316See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008317echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008318See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008319 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008320 else
8321 ac_cv_sizeof_long=0
8322 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008325fi
8326rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008327fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008328{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8329echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008330
8331
8332
Martin v. Löwis11437992002-04-12 09:54:03 +00008333cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008334#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008335_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008336
8337
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008338{ echo "$as_me:$LINENO: checking for void *" >&5
8339echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8340if test "${ac_cv_type_void_p+set}" = set; then
8341 echo $ECHO_N "(cached) $ECHO_C" >&6
8342else
8343 cat >conftest.$ac_ext <<_ACEOF
8344/* confdefs.h. */
8345_ACEOF
8346cat confdefs.h >>conftest.$ac_ext
8347cat >>conftest.$ac_ext <<_ACEOF
8348/* end confdefs.h. */
8349$ac_includes_default
8350typedef void * ac__type_new_;
8351int
8352main ()
8353{
8354if ((ac__type_new_ *) 0)
8355 return 0;
8356if (sizeof (ac__type_new_))
8357 return 0;
8358 ;
8359 return 0;
8360}
8361_ACEOF
8362rm -f conftest.$ac_objext
8363if { (ac_try="$ac_compile"
8364case "(($ac_try" in
8365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8366 *) ac_try_echo=$ac_try;;
8367esac
8368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8369 (eval "$ac_compile") 2>conftest.er1
8370 ac_status=$?
8371 grep -v '^ *+' conftest.er1 >conftest.err
8372 rm -f conftest.er1
8373 cat conftest.err >&5
8374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8375 (exit $ac_status); } && {
8376 test -z "$ac_c_werror_flag" ||
8377 test ! -s conftest.err
8378 } && test -s conftest.$ac_objext; then
8379 ac_cv_type_void_p=yes
8380else
8381 echo "$as_me: failed program was:" >&5
8382sed 's/^/| /' conftest.$ac_ext >&5
8383
8384 ac_cv_type_void_p=no
8385fi
8386
8387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8388fi
8389{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8390echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8391
Martin v. Löwiseba40652007-08-30 20:10:57 +00008392# The cast to long int works around a bug in the HP C Compiler
8393# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8394# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8395# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008396{ echo "$as_me:$LINENO: checking size of void *" >&5
8397echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008398if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008399 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008400else
Martin v. Löwis11437992002-04-12 09:54:03 +00008401 if test "$cross_compiling" = yes; then
8402 # Depending upon the size, compute the lo and hi bounds.
8403cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008404/* confdefs.h. */
8405_ACEOF
8406cat confdefs.h >>conftest.$ac_ext
8407cat >>conftest.$ac_ext <<_ACEOF
8408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008409$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008410 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008411int
8412main ()
8413{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008414static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008415test_array [0] = 0
8416
8417 ;
8418 return 0;
8419}
8420_ACEOF
8421rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008422if { (ac_try="$ac_compile"
8423case "(($ac_try" in
8424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8425 *) ac_try_echo=$ac_try;;
8426esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008430 grep -v '^ *+' conftest.er1 >conftest.err
8431 rm -f conftest.er1
8432 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008434 (exit $ac_status); } && {
8435 test -z "$ac_c_werror_flag" ||
8436 test ! -s conftest.err
8437 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 ac_lo=0 ac_mid=0
8439 while :; do
8440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* confdefs.h. */
8442_ACEOF
8443cat confdefs.h >>conftest.$ac_ext
8444cat >>conftest.$ac_ext <<_ACEOF
8445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008446$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008447 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008448int
8449main ()
8450{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008451static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008452test_array [0] = 0
8453
8454 ;
8455 return 0;
8456}
8457_ACEOF
8458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459if { (ac_try="$ac_compile"
8460case "(($ac_try" in
8461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8462 *) ac_try_echo=$ac_try;;
8463esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008467 grep -v '^ *+' conftest.er1 >conftest.err
8468 rm -f conftest.er1
8469 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471 (exit $ac_status); } && {
8472 test -z "$ac_c_werror_flag" ||
8473 test ! -s conftest.err
8474 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_hi=$ac_mid; break
8476else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008478sed 's/^/| /' conftest.$ac_ext >&5
8479
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480 ac_lo=`expr $ac_mid + 1`
8481 if test $ac_lo -le $ac_mid; then
8482 ac_lo= ac_hi=
8483 break
8484 fi
8485 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008487
8488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 done
8490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008492sed 's/^/| /' conftest.$ac_ext >&5
8493
Martin v. Löwiseba40652007-08-30 20:10:57 +00008494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008495/* confdefs.h. */
8496_ACEOF
8497cat confdefs.h >>conftest.$ac_ext
8498cat >>conftest.$ac_ext <<_ACEOF
8499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008500$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008501 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008502int
8503main ()
8504{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008505static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008506test_array [0] = 0
8507
8508 ;
8509 return 0;
8510}
8511_ACEOF
8512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008513if { (ac_try="$ac_compile"
8514case "(($ac_try" in
8515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8516 *) ac_try_echo=$ac_try;;
8517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008521 grep -v '^ *+' conftest.er1 >conftest.err
8522 rm -f conftest.er1
8523 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008525 (exit $ac_status); } && {
8526 test -z "$ac_c_werror_flag" ||
8527 test ! -s conftest.err
8528 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 ac_hi=-1 ac_mid=-1
8530 while :; do
8531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008532/* confdefs.h. */
8533_ACEOF
8534cat confdefs.h >>conftest.$ac_ext
8535cat >>conftest.$ac_ext <<_ACEOF
8536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008537$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008538 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008539int
8540main ()
8541{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008542static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008543test_array [0] = 0
8544
8545 ;
8546 return 0;
8547}
8548_ACEOF
8549rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008550if { (ac_try="$ac_compile"
8551case "(($ac_try" in
8552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8553 *) ac_try_echo=$ac_try;;
8554esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008558 grep -v '^ *+' conftest.er1 >conftest.err
8559 rm -f conftest.er1
8560 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008562 (exit $ac_status); } && {
8563 test -z "$ac_c_werror_flag" ||
8564 test ! -s conftest.err
8565 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ac_lo=$ac_mid; break
8567else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008569sed 's/^/| /' conftest.$ac_ext >&5
8570
Martin v. Löwiseba40652007-08-30 20:10:57 +00008571 ac_hi=`expr '(' $ac_mid ')' - 1`
8572 if test $ac_mid -le $ac_hi; then
8573 ac_lo= ac_hi=
8574 break
8575 fi
8576 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008578
8579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 done
8581else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008583sed 's/^/| /' conftest.$ac_ext >&5
8584
Martin v. Löwiseba40652007-08-30 20:10:57 +00008585 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008587
8588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008590
8591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008592# Binary search between lo and hi bounds.
8593while test "x$ac_lo" != "x$ac_hi"; do
8594 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008596/* confdefs.h. */
8597_ACEOF
8598cat confdefs.h >>conftest.$ac_ext
8599cat >>conftest.$ac_ext <<_ACEOF
8600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008601$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008602 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008603int
8604main ()
8605{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008606static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008607test_array [0] = 0
8608
8609 ;
8610 return 0;
8611}
8612_ACEOF
8613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008614if { (ac_try="$ac_compile"
8615case "(($ac_try" in
8616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8617 *) ac_try_echo=$ac_try;;
8618esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008622 grep -v '^ *+' conftest.er1 >conftest.err
8623 rm -f conftest.er1
8624 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008626 (exit $ac_status); } && {
8627 test -z "$ac_c_werror_flag" ||
8628 test ! -s conftest.err
8629 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ac_hi=$ac_mid
8631else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008633sed 's/^/| /' conftest.$ac_ext >&5
8634
Martin v. Löwiseba40652007-08-30 20:10:57 +00008635 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008637
8638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008639done
8640case $ac_lo in
8641?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008643 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008644See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008645echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008646See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008647 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008648 else
8649 ac_cv_sizeof_void_p=0
8650 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008651esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008652else
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008654/* confdefs.h. */
8655_ACEOF
8656cat confdefs.h >>conftest.$ac_ext
8657cat >>conftest.$ac_ext <<_ACEOF
8658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008659$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008660 typedef void * ac__type_sizeof_;
8661static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8662static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008663#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008664#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008665int
8666main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008667{
Martin v. Löwis11437992002-04-12 09:54:03 +00008668
8669 FILE *f = fopen ("conftest.val", "w");
8670 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008671 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008672 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008674 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008675 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008676 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008677 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 }
8679 else
8680 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008681 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008682 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008683 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008684 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008686 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008687
8688 ;
8689 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008690}
Martin v. Löwis11437992002-04-12 09:54:03 +00008691_ACEOF
8692rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693if { (ac_try="$ac_link"
8694case "(($ac_try" in
8695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8696 *) ac_try_echo=$ac_try;;
8697esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008699 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008703 { (case "(($ac_try" in
8704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8705 *) ac_try_echo=$ac_try;;
8706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008708 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 (exit $ac_status); }; }; then
8712 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008713else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008714 echo "$as_me: program exited with status $ac_status" >&5
8715echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008716sed 's/^/| /' conftest.$ac_ext >&5
8717
Martin v. Löwis11437992002-04-12 09:54:03 +00008718( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008720 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008721See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008722echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008723See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008724 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008725 else
8726 ac_cv_sizeof_void_p=0
8727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008730fi
8731rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008732fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008733{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8734echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008735
8736
8737
Martin v. Löwis11437992002-04-12 09:54:03 +00008738cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008739#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008740_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008741
8742
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008743{ echo "$as_me:$LINENO: checking for short" >&5
8744echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8745if test "${ac_cv_type_short+set}" = set; then
8746 echo $ECHO_N "(cached) $ECHO_C" >&6
8747else
8748 cat >conftest.$ac_ext <<_ACEOF
8749/* confdefs.h. */
8750_ACEOF
8751cat confdefs.h >>conftest.$ac_ext
8752cat >>conftest.$ac_ext <<_ACEOF
8753/* end confdefs.h. */
8754$ac_includes_default
8755typedef short ac__type_new_;
8756int
8757main ()
8758{
8759if ((ac__type_new_ *) 0)
8760 return 0;
8761if (sizeof (ac__type_new_))
8762 return 0;
8763 ;
8764 return 0;
8765}
8766_ACEOF
8767rm -f conftest.$ac_objext
8768if { (ac_try="$ac_compile"
8769case "(($ac_try" in
8770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8771 *) ac_try_echo=$ac_try;;
8772esac
8773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8774 (eval "$ac_compile") 2>conftest.er1
8775 ac_status=$?
8776 grep -v '^ *+' conftest.er1 >conftest.err
8777 rm -f conftest.er1
8778 cat conftest.err >&5
8779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8780 (exit $ac_status); } && {
8781 test -z "$ac_c_werror_flag" ||
8782 test ! -s conftest.err
8783 } && test -s conftest.$ac_objext; then
8784 ac_cv_type_short=yes
8785else
8786 echo "$as_me: failed program was:" >&5
8787sed 's/^/| /' conftest.$ac_ext >&5
8788
8789 ac_cv_type_short=no
8790fi
8791
8792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8793fi
8794{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8795echo "${ECHO_T}$ac_cv_type_short" >&6; }
8796
Martin v. Löwiseba40652007-08-30 20:10:57 +00008797# The cast to long int works around a bug in the HP C Compiler
8798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8800# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008801{ echo "$as_me:$LINENO: checking size of short" >&5
8802echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008803if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008804 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008805else
Martin v. Löwis11437992002-04-12 09:54:03 +00008806 if test "$cross_compiling" = yes; then
8807 # Depending upon the size, compute the lo and hi bounds.
8808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008809/* confdefs.h. */
8810_ACEOF
8811cat confdefs.h >>conftest.$ac_ext
8812cat >>conftest.$ac_ext <<_ACEOF
8813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008814$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008815 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008816int
8817main ()
8818{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008819static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008820test_array [0] = 0
8821
8822 ;
8823 return 0;
8824}
8825_ACEOF
8826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008827if { (ac_try="$ac_compile"
8828case "(($ac_try" in
8829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8830 *) ac_try_echo=$ac_try;;
8831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008835 grep -v '^ *+' conftest.er1 >conftest.err
8836 rm -f conftest.er1
8837 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008839 (exit $ac_status); } && {
8840 test -z "$ac_c_werror_flag" ||
8841 test ! -s conftest.err
8842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 ac_lo=0 ac_mid=0
8844 while :; do
8845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008846/* confdefs.h. */
8847_ACEOF
8848cat confdefs.h >>conftest.$ac_ext
8849cat >>conftest.$ac_ext <<_ACEOF
8850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008851$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008852 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008853int
8854main ()
8855{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008856static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008857test_array [0] = 0
8858
8859 ;
8860 return 0;
8861}
8862_ACEOF
8863rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864if { (ac_try="$ac_compile"
8865case "(($ac_try" in
8866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8867 *) ac_try_echo=$ac_try;;
8868esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008872 grep -v '^ *+' conftest.er1 >conftest.err
8873 rm -f conftest.er1
8874 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876 (exit $ac_status); } && {
8877 test -z "$ac_c_werror_flag" ||
8878 test ! -s conftest.err
8879 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_hi=$ac_mid; break
8881else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008883sed 's/^/| /' conftest.$ac_ext >&5
8884
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885 ac_lo=`expr $ac_mid + 1`
8886 if test $ac_lo -le $ac_mid; then
8887 ac_lo= ac_hi=
8888 break
8889 fi
8890 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008892
8893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 done
8895else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008897sed 's/^/| /' conftest.$ac_ext >&5
8898
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008900/* confdefs.h. */
8901_ACEOF
8902cat confdefs.h >>conftest.$ac_ext
8903cat >>conftest.$ac_ext <<_ACEOF
8904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008905$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008906 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008907int
8908main ()
8909{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008910static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008911test_array [0] = 0
8912
8913 ;
8914 return 0;
8915}
8916_ACEOF
8917rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918if { (ac_try="$ac_compile"
8919case "(($ac_try" in
8920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8921 *) ac_try_echo=$ac_try;;
8922esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008926 grep -v '^ *+' conftest.er1 >conftest.err
8927 rm -f conftest.er1
8928 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008930 (exit $ac_status); } && {
8931 test -z "$ac_c_werror_flag" ||
8932 test ! -s conftest.err
8933 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 ac_hi=-1 ac_mid=-1
8935 while :; do
8936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* confdefs.h. */
8938_ACEOF
8939cat confdefs.h >>conftest.$ac_ext
8940cat >>conftest.$ac_ext <<_ACEOF
8941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008943 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008944int
8945main ()
8946{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008947static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008948test_array [0] = 0
8949
8950 ;
8951 return 0;
8952}
8953_ACEOF
8954rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008955if { (ac_try="$ac_compile"
8956case "(($ac_try" in
8957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8958 *) ac_try_echo=$ac_try;;
8959esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008963 grep -v '^ *+' conftest.er1 >conftest.err
8964 rm -f conftest.er1
8965 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967 (exit $ac_status); } && {
8968 test -z "$ac_c_werror_flag" ||
8969 test ! -s conftest.err
8970 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 ac_lo=$ac_mid; break
8972else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008974sed 's/^/| /' conftest.$ac_ext >&5
8975
Martin v. Löwiseba40652007-08-30 20:10:57 +00008976 ac_hi=`expr '(' $ac_mid ')' - 1`
8977 if test $ac_mid -le $ac_hi; then
8978 ac_lo= ac_hi=
8979 break
8980 fi
8981 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008983
8984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 done
8986else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008988sed 's/^/| /' conftest.$ac_ext >&5
8989
Martin v. Löwiseba40652007-08-30 20:10:57 +00008990 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008992
8993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008995
8996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008997# Binary search between lo and hi bounds.
8998while test "x$ac_lo" != "x$ac_hi"; do
8999 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009001/* confdefs.h. */
9002_ACEOF
9003cat confdefs.h >>conftest.$ac_ext
9004cat >>conftest.$ac_ext <<_ACEOF
9005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009006$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009007 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009008int
9009main ()
9010{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009011static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009012test_array [0] = 0
9013
9014 ;
9015 return 0;
9016}
9017_ACEOF
9018rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009019if { (ac_try="$ac_compile"
9020case "(($ac_try" in
9021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9022 *) ac_try_echo=$ac_try;;
9023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009027 grep -v '^ *+' conftest.er1 >conftest.err
9028 rm -f conftest.er1
9029 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009031 (exit $ac_status); } && {
9032 test -z "$ac_c_werror_flag" ||
9033 test ! -s conftest.err
9034 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 ac_hi=$ac_mid
9036else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009037 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009038sed 's/^/| /' conftest.$ac_ext >&5
9039
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009042
9043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009044done
9045case $ac_lo in
9046?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009048 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009049See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009050echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009051See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009052 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009053 else
9054 ac_cv_sizeof_short=0
9055 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009056esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009057else
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009059/* confdefs.h. */
9060_ACEOF
9061cat confdefs.h >>conftest.$ac_ext
9062cat >>conftest.$ac_ext <<_ACEOF
9063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009064$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009065 typedef short ac__type_sizeof_;
9066static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9067static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009068#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009069#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009070int
9071main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009072{
Martin v. Löwis11437992002-04-12 09:54:03 +00009073
9074 FILE *f = fopen ("conftest.val", "w");
9075 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009076 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009077 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009079 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009080 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009082 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 }
9084 else
9085 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009086 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009087 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009088 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009089 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009090 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009091 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009092
9093 ;
9094 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009095}
Martin v. Löwis11437992002-04-12 09:54:03 +00009096_ACEOF
9097rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098if { (ac_try="$ac_link"
9099case "(($ac_try" in
9100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9101 *) ac_try_echo=$ac_try;;
9102esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009104 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009105 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009108 { (case "(($ac_try" in
9109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9110 *) ac_try_echo=$ac_try;;
9111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009113 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 (exit $ac_status); }; }; then
9117 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009119 echo "$as_me: program exited with status $ac_status" >&5
9120echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009121sed 's/^/| /' conftest.$ac_ext >&5
9122
Martin v. Löwis11437992002-04-12 09:54:03 +00009123( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009125 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009126See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009127echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009128See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009129 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009130 else
9131 ac_cv_sizeof_short=0
9132 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009135fi
9136rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009137fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009138{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9139echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009140
9141
9142
Martin v. Löwis11437992002-04-12 09:54:03 +00009143cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009144#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009145_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009146
9147
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009148{ echo "$as_me:$LINENO: checking for float" >&5
9149echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9150if test "${ac_cv_type_float+set}" = set; then
9151 echo $ECHO_N "(cached) $ECHO_C" >&6
9152else
9153 cat >conftest.$ac_ext <<_ACEOF
9154/* confdefs.h. */
9155_ACEOF
9156cat confdefs.h >>conftest.$ac_ext
9157cat >>conftest.$ac_ext <<_ACEOF
9158/* end confdefs.h. */
9159$ac_includes_default
9160typedef float ac__type_new_;
9161int
9162main ()
9163{
9164if ((ac__type_new_ *) 0)
9165 return 0;
9166if (sizeof (ac__type_new_))
9167 return 0;
9168 ;
9169 return 0;
9170}
9171_ACEOF
9172rm -f conftest.$ac_objext
9173if { (ac_try="$ac_compile"
9174case "(($ac_try" in
9175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9176 *) ac_try_echo=$ac_try;;
9177esac
9178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9179 (eval "$ac_compile") 2>conftest.er1
9180 ac_status=$?
9181 grep -v '^ *+' conftest.er1 >conftest.err
9182 rm -f conftest.er1
9183 cat conftest.err >&5
9184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9185 (exit $ac_status); } && {
9186 test -z "$ac_c_werror_flag" ||
9187 test ! -s conftest.err
9188 } && test -s conftest.$ac_objext; then
9189 ac_cv_type_float=yes
9190else
9191 echo "$as_me: failed program was:" >&5
9192sed 's/^/| /' conftest.$ac_ext >&5
9193
9194 ac_cv_type_float=no
9195fi
9196
9197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9198fi
9199{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9200echo "${ECHO_T}$ac_cv_type_float" >&6; }
9201
Martin v. Löwiseba40652007-08-30 20:10:57 +00009202# The cast to long int works around a bug in the HP C Compiler
9203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9205# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009206{ echo "$as_me:$LINENO: checking size of float" >&5
9207echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009208if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009209 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009210else
Martin v. Löwis11437992002-04-12 09:54:03 +00009211 if test "$cross_compiling" = yes; then
9212 # Depending upon the size, compute the lo and hi bounds.
9213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009214/* confdefs.h. */
9215_ACEOF
9216cat confdefs.h >>conftest.$ac_ext
9217cat >>conftest.$ac_ext <<_ACEOF
9218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009219$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009220 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009221int
9222main ()
9223{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009225test_array [0] = 0
9226
9227 ;
9228 return 0;
9229}
9230_ACEOF
9231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009232if { (ac_try="$ac_compile"
9233case "(($ac_try" in
9234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9235 *) ac_try_echo=$ac_try;;
9236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009240 grep -v '^ *+' conftest.er1 >conftest.err
9241 rm -f conftest.er1
9242 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009244 (exit $ac_status); } && {
9245 test -z "$ac_c_werror_flag" ||
9246 test ! -s conftest.err
9247 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009248 ac_lo=0 ac_mid=0
9249 while :; do
9250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009251/* confdefs.h. */
9252_ACEOF
9253cat confdefs.h >>conftest.$ac_ext
9254cat >>conftest.$ac_ext <<_ACEOF
9255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009256$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009257 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009258int
9259main ()
9260{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009262test_array [0] = 0
9263
9264 ;
9265 return 0;
9266}
9267_ACEOF
9268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269if { (ac_try="$ac_compile"
9270case "(($ac_try" in
9271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9272 *) ac_try_echo=$ac_try;;
9273esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009277 grep -v '^ *+' conftest.er1 >conftest.err
9278 rm -f conftest.er1
9279 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281 (exit $ac_status); } && {
9282 test -z "$ac_c_werror_flag" ||
9283 test ! -s conftest.err
9284 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 ac_hi=$ac_mid; break
9286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009288sed 's/^/| /' conftest.$ac_ext >&5
9289
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290 ac_lo=`expr $ac_mid + 1`
9291 if test $ac_lo -le $ac_mid; then
9292 ac_lo= ac_hi=
9293 break
9294 fi
9295 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009297
9298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 done
9300else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009302sed 's/^/| /' conftest.$ac_ext >&5
9303
Martin v. Löwiseba40652007-08-30 20:10:57 +00009304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009305/* confdefs.h. */
9306_ACEOF
9307cat confdefs.h >>conftest.$ac_ext
9308cat >>conftest.$ac_ext <<_ACEOF
9309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009310$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009311 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009312int
9313main ()
9314{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009315static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009316test_array [0] = 0
9317
9318 ;
9319 return 0;
9320}
9321_ACEOF
9322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009323if { (ac_try="$ac_compile"
9324case "(($ac_try" in
9325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9326 *) ac_try_echo=$ac_try;;
9327esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009331 grep -v '^ *+' conftest.er1 >conftest.err
9332 rm -f conftest.er1
9333 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009335 (exit $ac_status); } && {
9336 test -z "$ac_c_werror_flag" ||
9337 test ! -s conftest.err
9338 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009339 ac_hi=-1 ac_mid=-1
9340 while :; do
9341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009342/* confdefs.h. */
9343_ACEOF
9344cat confdefs.h >>conftest.$ac_ext
9345cat >>conftest.$ac_ext <<_ACEOF
9346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009347$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009348 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009349int
9350main ()
9351{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009353test_array [0] = 0
9354
9355 ;
9356 return 0;
9357}
9358_ACEOF
9359rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009360if { (ac_try="$ac_compile"
9361case "(($ac_try" in
9362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9363 *) ac_try_echo=$ac_try;;
9364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009368 grep -v '^ *+' conftest.er1 >conftest.err
9369 rm -f conftest.er1
9370 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372 (exit $ac_status); } && {
9373 test -z "$ac_c_werror_flag" ||
9374 test ! -s conftest.err
9375 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ac_lo=$ac_mid; break
9377else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009379sed 's/^/| /' conftest.$ac_ext >&5
9380
Martin v. Löwiseba40652007-08-30 20:10:57 +00009381 ac_hi=`expr '(' $ac_mid ')' - 1`
9382 if test $ac_mid -le $ac_hi; then
9383 ac_lo= ac_hi=
9384 break
9385 fi
9386 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009388
9389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 done
9391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009393sed 's/^/| /' conftest.$ac_ext >&5
9394
Martin v. Löwiseba40652007-08-30 20:10:57 +00009395 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009397
9398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009400
9401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009402# Binary search between lo and hi bounds.
9403while test "x$ac_lo" != "x$ac_hi"; do
9404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009406/* confdefs.h. */
9407_ACEOF
9408cat confdefs.h >>conftest.$ac_ext
9409cat >>conftest.$ac_ext <<_ACEOF
9410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009411$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009412 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009413int
9414main ()
9415{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009416static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009417test_array [0] = 0
9418
9419 ;
9420 return 0;
9421}
9422_ACEOF
9423rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009424if { (ac_try="$ac_compile"
9425case "(($ac_try" in
9426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9427 *) ac_try_echo=$ac_try;;
9428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009432 grep -v '^ *+' conftest.er1 >conftest.err
9433 rm -f conftest.er1
9434 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009436 (exit $ac_status); } && {
9437 test -z "$ac_c_werror_flag" ||
9438 test ! -s conftest.err
9439 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 ac_hi=$ac_mid
9441else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009443sed 's/^/| /' conftest.$ac_ext >&5
9444
Martin v. Löwiseba40652007-08-30 20:10:57 +00009445 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009447
9448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009449done
9450case $ac_lo in
9451?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009454See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009455echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009456See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009457 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458 else
9459 ac_cv_sizeof_float=0
9460 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009461esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009462else
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009464/* confdefs.h. */
9465_ACEOF
9466cat confdefs.h >>conftest.$ac_ext
9467cat >>conftest.$ac_ext <<_ACEOF
9468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009469$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009470 typedef float ac__type_sizeof_;
9471static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9472static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009473#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009474#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009475int
9476main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009477{
Martin v. Löwis11437992002-04-12 09:54:03 +00009478
9479 FILE *f = fopen ("conftest.val", "w");
9480 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009481 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009482 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009484 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009487 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 }
9489 else
9490 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009491 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009492 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009493 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009494 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009496 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009497
9498 ;
9499 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009500}
Martin v. Löwis11437992002-04-12 09:54:03 +00009501_ACEOF
9502rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503if { (ac_try="$ac_link"
9504case "(($ac_try" in
9505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9506 *) ac_try_echo=$ac_try;;
9507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009513 { (case "(($ac_try" in
9514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9515 *) ac_try_echo=$ac_try;;
9516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009518 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 (exit $ac_status); }; }; then
9522 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009524 echo "$as_me: program exited with status $ac_status" >&5
9525echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009526sed 's/^/| /' conftest.$ac_ext >&5
9527
Martin v. Löwis11437992002-04-12 09:54:03 +00009528( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009530 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009531See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009532echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009533See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009534 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009535 else
9536 ac_cv_sizeof_float=0
9537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009540fi
9541rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009542fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009543{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9544echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009545
9546
9547
Martin v. Löwis11437992002-04-12 09:54:03 +00009548cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009549#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009550_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009551
9552
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009553{ echo "$as_me:$LINENO: checking for double" >&5
9554echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9555if test "${ac_cv_type_double+set}" = set; then
9556 echo $ECHO_N "(cached) $ECHO_C" >&6
9557else
9558 cat >conftest.$ac_ext <<_ACEOF
9559/* confdefs.h. */
9560_ACEOF
9561cat confdefs.h >>conftest.$ac_ext
9562cat >>conftest.$ac_ext <<_ACEOF
9563/* end confdefs.h. */
9564$ac_includes_default
9565typedef double ac__type_new_;
9566int
9567main ()
9568{
9569if ((ac__type_new_ *) 0)
9570 return 0;
9571if (sizeof (ac__type_new_))
9572 return 0;
9573 ;
9574 return 0;
9575}
9576_ACEOF
9577rm -f conftest.$ac_objext
9578if { (ac_try="$ac_compile"
9579case "(($ac_try" in
9580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9581 *) ac_try_echo=$ac_try;;
9582esac
9583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9584 (eval "$ac_compile") 2>conftest.er1
9585 ac_status=$?
9586 grep -v '^ *+' conftest.er1 >conftest.err
9587 rm -f conftest.er1
9588 cat conftest.err >&5
9589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9590 (exit $ac_status); } && {
9591 test -z "$ac_c_werror_flag" ||
9592 test ! -s conftest.err
9593 } && test -s conftest.$ac_objext; then
9594 ac_cv_type_double=yes
9595else
9596 echo "$as_me: failed program was:" >&5
9597sed 's/^/| /' conftest.$ac_ext >&5
9598
9599 ac_cv_type_double=no
9600fi
9601
9602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9603fi
9604{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9605echo "${ECHO_T}$ac_cv_type_double" >&6; }
9606
Martin v. Löwiseba40652007-08-30 20:10:57 +00009607# The cast to long int works around a bug in the HP C Compiler
9608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9610# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009611{ echo "$as_me:$LINENO: checking size of double" >&5
9612echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009613if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009614 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009615else
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 if test "$cross_compiling" = yes; then
9617 # Depending upon the size, compute the lo and hi bounds.
9618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009619/* confdefs.h. */
9620_ACEOF
9621cat confdefs.h >>conftest.$ac_ext
9622cat >>conftest.$ac_ext <<_ACEOF
9623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009624$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009625 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009626int
9627main ()
9628{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009630test_array [0] = 0
9631
9632 ;
9633 return 0;
9634}
9635_ACEOF
9636rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009637if { (ac_try="$ac_compile"
9638case "(($ac_try" in
9639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9640 *) ac_try_echo=$ac_try;;
9641esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009645 grep -v '^ *+' conftest.er1 >conftest.err
9646 rm -f conftest.er1
9647 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009649 (exit $ac_status); } && {
9650 test -z "$ac_c_werror_flag" ||
9651 test ! -s conftest.err
9652 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009653 ac_lo=0 ac_mid=0
9654 while :; do
9655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009656/* confdefs.h. */
9657_ACEOF
9658cat confdefs.h >>conftest.$ac_ext
9659cat >>conftest.$ac_ext <<_ACEOF
9660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009661$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009662 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009663int
9664main ()
9665{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009666static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009667test_array [0] = 0
9668
9669 ;
9670 return 0;
9671}
9672_ACEOF
9673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674if { (ac_try="$ac_compile"
9675case "(($ac_try" in
9676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9677 *) ac_try_echo=$ac_try;;
9678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009682 grep -v '^ *+' conftest.er1 >conftest.err
9683 rm -f conftest.er1
9684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686 (exit $ac_status); } && {
9687 test -z "$ac_c_werror_flag" ||
9688 test ! -s conftest.err
9689 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ac_hi=$ac_mid; break
9691else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009693sed 's/^/| /' conftest.$ac_ext >&5
9694
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695 ac_lo=`expr $ac_mid + 1`
9696 if test $ac_lo -le $ac_mid; then
9697 ac_lo= ac_hi=
9698 break
9699 fi
9700 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009702
9703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 done
9705else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009707sed 's/^/| /' conftest.$ac_ext >&5
9708
Martin v. Löwiseba40652007-08-30 20:10:57 +00009709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009710/* confdefs.h. */
9711_ACEOF
9712cat confdefs.h >>conftest.$ac_ext
9713cat >>conftest.$ac_ext <<_ACEOF
9714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009715$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009716 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009717int
9718main ()
9719{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009721test_array [0] = 0
9722
9723 ;
9724 return 0;
9725}
9726_ACEOF
9727rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009728if { (ac_try="$ac_compile"
9729case "(($ac_try" in
9730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9731 *) ac_try_echo=$ac_try;;
9732esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009736 grep -v '^ *+' conftest.er1 >conftest.err
9737 rm -f conftest.er1
9738 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740 (exit $ac_status); } && {
9741 test -z "$ac_c_werror_flag" ||
9742 test ! -s conftest.err
9743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_hi=-1 ac_mid=-1
9745 while :; do
9746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009747/* confdefs.h. */
9748_ACEOF
9749cat confdefs.h >>conftest.$ac_ext
9750cat >>conftest.$ac_ext <<_ACEOF
9751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009753 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009754int
9755main ()
9756{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009757static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009758test_array [0] = 0
9759
9760 ;
9761 return 0;
9762}
9763_ACEOF
9764rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009765if { (ac_try="$ac_compile"
9766case "(($ac_try" in
9767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9768 *) ac_try_echo=$ac_try;;
9769esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009773 grep -v '^ *+' conftest.er1 >conftest.err
9774 rm -f conftest.er1
9775 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777 (exit $ac_status); } && {
9778 test -z "$ac_c_werror_flag" ||
9779 test ! -s conftest.err
9780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ac_lo=$ac_mid; break
9782else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009784sed 's/^/| /' conftest.$ac_ext >&5
9785
Martin v. Löwiseba40652007-08-30 20:10:57 +00009786 ac_hi=`expr '(' $ac_mid ')' - 1`
9787 if test $ac_mid -le $ac_hi; then
9788 ac_lo= ac_hi=
9789 break
9790 fi
9791 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793
9794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 done
9796else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009798sed 's/^/| /' conftest.$ac_ext >&5
9799
Martin v. Löwiseba40652007-08-30 20:10:57 +00009800 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009802
9803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009805
9806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009807# Binary search between lo and hi bounds.
9808while test "x$ac_lo" != "x$ac_hi"; do
9809 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009811/* confdefs.h. */
9812_ACEOF
9813cat confdefs.h >>conftest.$ac_ext
9814cat >>conftest.$ac_ext <<_ACEOF
9815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009816$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009817 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009818int
9819main ()
9820{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009821static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009822test_array [0] = 0
9823
9824 ;
9825 return 0;
9826}
9827_ACEOF
9828rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009829if { (ac_try="$ac_compile"
9830case "(($ac_try" in
9831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9832 *) ac_try_echo=$ac_try;;
9833esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009837 grep -v '^ *+' conftest.er1 >conftest.err
9838 rm -f conftest.er1
9839 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009841 (exit $ac_status); } && {
9842 test -z "$ac_c_werror_flag" ||
9843 test ! -s conftest.err
9844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 ac_hi=$ac_mid
9846else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009848sed 's/^/| /' conftest.$ac_ext >&5
9849
Martin v. Löwiseba40652007-08-30 20:10:57 +00009850 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009852
9853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009854done
9855case $ac_lo in
9856?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009858 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009859See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009860echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009861See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009862 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009863 else
9864 ac_cv_sizeof_double=0
9865 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009866esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009867else
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009869/* confdefs.h. */
9870_ACEOF
9871cat confdefs.h >>conftest.$ac_ext
9872cat >>conftest.$ac_ext <<_ACEOF
9873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009874$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009875 typedef double ac__type_sizeof_;
9876static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9877static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009878#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009879#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009880int
9881main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009882{
Martin v. Löwis11437992002-04-12 09:54:03 +00009883
9884 FILE *f = fopen ("conftest.val", "w");
9885 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009886 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009887 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009889 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009890 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009891 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009892 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 }
9894 else
9895 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009896 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009897 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009898 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009899 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009901 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009902
9903 ;
9904 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009905}
Martin v. Löwis11437992002-04-12 09:54:03 +00009906_ACEOF
9907rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908if { (ac_try="$ac_link"
9909case "(($ac_try" in
9910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9911 *) ac_try_echo=$ac_try;;
9912esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009918 { (case "(($ac_try" in
9919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9920 *) ac_try_echo=$ac_try;;
9921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009923 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 (exit $ac_status); }; }; then
9927 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009928else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009929 echo "$as_me: program exited with status $ac_status" >&5
9930echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009931sed 's/^/| /' conftest.$ac_ext >&5
9932
Martin v. Löwis11437992002-04-12 09:54:03 +00009933( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009935 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009936See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009937echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009938See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009939 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009940 else
9941 ac_cv_sizeof_double=0
9942 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009945fi
9946rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009947fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009948{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9949echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009950
9951
9952
Martin v. Löwis11437992002-04-12 09:54:03 +00009953cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009954#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009955_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009956
9957
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009958{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9959echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9960if test "${ac_cv_type_fpos_t+set}" = set; then
9961 echo $ECHO_N "(cached) $ECHO_C" >&6
9962else
9963 cat >conftest.$ac_ext <<_ACEOF
9964/* confdefs.h. */
9965_ACEOF
9966cat confdefs.h >>conftest.$ac_ext
9967cat >>conftest.$ac_ext <<_ACEOF
9968/* end confdefs.h. */
9969$ac_includes_default
9970typedef fpos_t ac__type_new_;
9971int
9972main ()
9973{
9974if ((ac__type_new_ *) 0)
9975 return 0;
9976if (sizeof (ac__type_new_))
9977 return 0;
9978 ;
9979 return 0;
9980}
9981_ACEOF
9982rm -f conftest.$ac_objext
9983if { (ac_try="$ac_compile"
9984case "(($ac_try" in
9985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9986 *) ac_try_echo=$ac_try;;
9987esac
9988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9989 (eval "$ac_compile") 2>conftest.er1
9990 ac_status=$?
9991 grep -v '^ *+' conftest.er1 >conftest.err
9992 rm -f conftest.er1
9993 cat conftest.err >&5
9994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9995 (exit $ac_status); } && {
9996 test -z "$ac_c_werror_flag" ||
9997 test ! -s conftest.err
9998 } && test -s conftest.$ac_objext; then
9999 ac_cv_type_fpos_t=yes
10000else
10001 echo "$as_me: failed program was:" >&5
10002sed 's/^/| /' conftest.$ac_ext >&5
10003
10004 ac_cv_type_fpos_t=no
10005fi
10006
10007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10008fi
10009{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10010echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10011
Martin v. Löwiseba40652007-08-30 20:10:57 +000010012# The cast to long int works around a bug in the HP C Compiler
10013# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10014# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10015# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010016{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10017echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010018if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010019 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010020else
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 if test "$cross_compiling" = yes; then
10022 # Depending upon the size, compute the lo and hi bounds.
10023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010024/* confdefs.h. */
10025_ACEOF
10026cat confdefs.h >>conftest.$ac_ext
10027cat >>conftest.$ac_ext <<_ACEOF
10028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010029$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010030 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010031int
10032main ()
10033{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010034static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010035test_array [0] = 0
10036
10037 ;
10038 return 0;
10039}
10040_ACEOF
10041rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010042if { (ac_try="$ac_compile"
10043case "(($ac_try" in
10044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10045 *) ac_try_echo=$ac_try;;
10046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010050 grep -v '^ *+' conftest.er1 >conftest.err
10051 rm -f conftest.er1
10052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010054 (exit $ac_status); } && {
10055 test -z "$ac_c_werror_flag" ||
10056 test ! -s conftest.err
10057 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010058 ac_lo=0 ac_mid=0
10059 while :; do
10060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010061/* confdefs.h. */
10062_ACEOF
10063cat confdefs.h >>conftest.$ac_ext
10064cat >>conftest.$ac_ext <<_ACEOF
10065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010066$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010067 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010068int
10069main ()
10070{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010071static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010072test_array [0] = 0
10073
10074 ;
10075 return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079if { (ac_try="$ac_compile"
10080case "(($ac_try" in
10081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10082 *) ac_try_echo=$ac_try;;
10083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010087 grep -v '^ *+' conftest.er1 >conftest.err
10088 rm -f conftest.er1
10089 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091 (exit $ac_status); } && {
10092 test -z "$ac_c_werror_flag" ||
10093 test ! -s conftest.err
10094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_hi=$ac_mid; break
10096else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010098sed 's/^/| /' conftest.$ac_ext >&5
10099
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100 ac_lo=`expr $ac_mid + 1`
10101 if test $ac_lo -le $ac_mid; then
10102 ac_lo= ac_hi=
10103 break
10104 fi
10105 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010107
10108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 done
10110else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010112sed 's/^/| /' conftest.$ac_ext >&5
10113
Martin v. Löwiseba40652007-08-30 20:10:57 +000010114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010115/* confdefs.h. */
10116_ACEOF
10117cat confdefs.h >>conftest.$ac_ext
10118cat >>conftest.$ac_ext <<_ACEOF
10119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010120$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010121 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010122int
10123main ()
10124{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010126test_array [0] = 0
10127
10128 ;
10129 return 0;
10130}
10131_ACEOF
10132rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010133if { (ac_try="$ac_compile"
10134case "(($ac_try" in
10135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10136 *) ac_try_echo=$ac_try;;
10137esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010141 grep -v '^ *+' conftest.er1 >conftest.err
10142 rm -f conftest.er1
10143 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010145 (exit $ac_status); } && {
10146 test -z "$ac_c_werror_flag" ||
10147 test ! -s conftest.err
10148 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 ac_hi=-1 ac_mid=-1
10150 while :; do
10151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010152/* confdefs.h. */
10153_ACEOF
10154cat confdefs.h >>conftest.$ac_ext
10155cat >>conftest.$ac_ext <<_ACEOF
10156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010157$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010158 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010159int
10160main ()
10161{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010162static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010163test_array [0] = 0
10164
10165 ;
10166 return 0;
10167}
10168_ACEOF
10169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010170if { (ac_try="$ac_compile"
10171case "(($ac_try" in
10172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10173 *) ac_try_echo=$ac_try;;
10174esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010178 grep -v '^ *+' conftest.er1 >conftest.err
10179 rm -f conftest.er1
10180 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182 (exit $ac_status); } && {
10183 test -z "$ac_c_werror_flag" ||
10184 test ! -s conftest.err
10185 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_lo=$ac_mid; break
10187else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010189sed 's/^/| /' conftest.$ac_ext >&5
10190
Martin v. Löwiseba40652007-08-30 20:10:57 +000010191 ac_hi=`expr '(' $ac_mid ')' - 1`
10192 if test $ac_mid -le $ac_hi; then
10193 ac_lo= ac_hi=
10194 break
10195 fi
10196 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010198
10199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 done
10201else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010203sed 's/^/| /' conftest.$ac_ext >&5
10204
Martin v. Löwiseba40652007-08-30 20:10:57 +000010205 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010207
10208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010210
10211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010212# Binary search between lo and hi bounds.
10213while test "x$ac_lo" != "x$ac_hi"; do
10214 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10215 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010216/* confdefs.h. */
10217_ACEOF
10218cat confdefs.h >>conftest.$ac_ext
10219cat >>conftest.$ac_ext <<_ACEOF
10220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010221$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010222 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010223int
10224main ()
10225{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010226static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010227test_array [0] = 0
10228
10229 ;
10230 return 0;
10231}
10232_ACEOF
10233rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010234if { (ac_try="$ac_compile"
10235case "(($ac_try" in
10236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10237 *) ac_try_echo=$ac_try;;
10238esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010240 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010242 grep -v '^ *+' conftest.er1 >conftest.err
10243 rm -f conftest.er1
10244 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010246 (exit $ac_status); } && {
10247 test -z "$ac_c_werror_flag" ||
10248 test ! -s conftest.err
10249 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ac_hi=$ac_mid
10251else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010253sed 's/^/| /' conftest.$ac_ext >&5
10254
Martin v. Löwiseba40652007-08-30 20:10:57 +000010255 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010257
10258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010259done
10260case $ac_lo in
10261?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010263 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010264See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010265echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010266See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010267 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010268 else
10269 ac_cv_sizeof_fpos_t=0
10270 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010271esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010272else
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010274/* confdefs.h. */
10275_ACEOF
10276cat confdefs.h >>conftest.$ac_ext
10277cat >>conftest.$ac_ext <<_ACEOF
10278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010279$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010280 typedef fpos_t ac__type_sizeof_;
10281static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10282static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010283#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010284#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010285int
10286main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010287{
Martin v. Löwis11437992002-04-12 09:54:03 +000010288
10289 FILE *f = fopen ("conftest.val", "w");
10290 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010291 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010292 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010294 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010295 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010296 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010297 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 }
10299 else
10300 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010301 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010302 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010303 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010304 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010306 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010307
10308 ;
10309 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010310}
Martin v. Löwis11437992002-04-12 09:54:03 +000010311_ACEOF
10312rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010313if { (ac_try="$ac_link"
10314case "(($ac_try" in
10315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10316 *) ac_try_echo=$ac_try;;
10317esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010319 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010323 { (case "(($ac_try" in
10324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10325 *) ac_try_echo=$ac_try;;
10326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010328 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 (exit $ac_status); }; }; then
10332 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010333else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010334 echo "$as_me: program exited with status $ac_status" >&5
10335echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010336sed 's/^/| /' conftest.$ac_ext >&5
10337
Martin v. Löwis11437992002-04-12 09:54:03 +000010338( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010339if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010340 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010341See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010342echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010343See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010344 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010345 else
10346 ac_cv_sizeof_fpos_t=0
10347 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010350fi
10351rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010352fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010353{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10354echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010355
10356
10357
Martin v. Löwis11437992002-04-12 09:54:03 +000010358cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010359#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010360_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010361
Michael W. Hudson54241132001-12-07 15:38:26 +000010362
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010363{ echo "$as_me:$LINENO: checking for size_t" >&5
10364echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10365if test "${ac_cv_type_size_t+set}" = set; then
10366 echo $ECHO_N "(cached) $ECHO_C" >&6
10367else
10368 cat >conftest.$ac_ext <<_ACEOF
10369/* confdefs.h. */
10370_ACEOF
10371cat confdefs.h >>conftest.$ac_ext
10372cat >>conftest.$ac_ext <<_ACEOF
10373/* end confdefs.h. */
10374$ac_includes_default
10375typedef size_t ac__type_new_;
10376int
10377main ()
10378{
10379if ((ac__type_new_ *) 0)
10380 return 0;
10381if (sizeof (ac__type_new_))
10382 return 0;
10383 ;
10384 return 0;
10385}
10386_ACEOF
10387rm -f conftest.$ac_objext
10388if { (ac_try="$ac_compile"
10389case "(($ac_try" in
10390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10391 *) ac_try_echo=$ac_try;;
10392esac
10393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10394 (eval "$ac_compile") 2>conftest.er1
10395 ac_status=$?
10396 grep -v '^ *+' conftest.er1 >conftest.err
10397 rm -f conftest.er1
10398 cat conftest.err >&5
10399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10400 (exit $ac_status); } && {
10401 test -z "$ac_c_werror_flag" ||
10402 test ! -s conftest.err
10403 } && test -s conftest.$ac_objext; then
10404 ac_cv_type_size_t=yes
10405else
10406 echo "$as_me: failed program was:" >&5
10407sed 's/^/| /' conftest.$ac_ext >&5
10408
10409 ac_cv_type_size_t=no
10410fi
10411
10412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10413fi
10414{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10415echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10416
Martin v. Löwiseba40652007-08-30 20:10:57 +000010417# The cast to long int works around a bug in the HP C Compiler
10418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10420# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010421{ echo "$as_me:$LINENO: checking size of size_t" >&5
10422echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010424 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010426 if test "$cross_compiling" = yes; then
10427 # Depending upon the size, compute the lo and hi bounds.
10428cat >conftest.$ac_ext <<_ACEOF
10429/* confdefs.h. */
10430_ACEOF
10431cat confdefs.h >>conftest.$ac_ext
10432cat >>conftest.$ac_ext <<_ACEOF
10433/* end confdefs.h. */
10434$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010435 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436int
10437main ()
10438{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010439static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010440test_array [0] = 0
10441
10442 ;
10443 return 0;
10444}
10445_ACEOF
10446rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010447if { (ac_try="$ac_compile"
10448case "(($ac_try" in
10449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10450 *) ac_try_echo=$ac_try;;
10451esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010454 ac_status=$?
10455 grep -v '^ *+' conftest.er1 >conftest.err
10456 rm -f conftest.er1
10457 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010459 (exit $ac_status); } && {
10460 test -z "$ac_c_werror_flag" ||
10461 test ! -s conftest.err
10462 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010463 ac_lo=0 ac_mid=0
10464 while :; do
10465 cat >conftest.$ac_ext <<_ACEOF
10466/* confdefs.h. */
10467_ACEOF
10468cat confdefs.h >>conftest.$ac_ext
10469cat >>conftest.$ac_ext <<_ACEOF
10470/* end confdefs.h. */
10471$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010472 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010473int
10474main ()
10475{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010476static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477test_array [0] = 0
10478
10479 ;
10480 return 0;
10481}
10482_ACEOF
10483rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010484if { (ac_try="$ac_compile"
10485case "(($ac_try" in
10486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10487 *) ac_try_echo=$ac_try;;
10488esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491 ac_status=$?
10492 grep -v '^ *+' conftest.er1 >conftest.err
10493 rm -f conftest.er1
10494 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010496 (exit $ac_status); } && {
10497 test -z "$ac_c_werror_flag" ||
10498 test ! -s conftest.err
10499 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500 ac_hi=$ac_mid; break
10501else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010502 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010503sed 's/^/| /' conftest.$ac_ext >&5
10504
Martin v. Löwiseba40652007-08-30 20:10:57 +000010505 ac_lo=`expr $ac_mid + 1`
10506 if test $ac_lo -le $ac_mid; then
10507 ac_lo= ac_hi=
10508 break
10509 fi
10510 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010512
10513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514 done
10515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010516 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010517sed 's/^/| /' conftest.$ac_ext >&5
10518
Martin v. Löwiseba40652007-08-30 20:10:57 +000010519 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010520/* confdefs.h. */
10521_ACEOF
10522cat confdefs.h >>conftest.$ac_ext
10523cat >>conftest.$ac_ext <<_ACEOF
10524/* end confdefs.h. */
10525$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010526 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527int
10528main ()
10529{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010530static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010531test_array [0] = 0
10532
10533 ;
10534 return 0;
10535}
10536_ACEOF
10537rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010538if { (ac_try="$ac_compile"
10539case "(($ac_try" in
10540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10541 *) ac_try_echo=$ac_try;;
10542esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010545 ac_status=$?
10546 grep -v '^ *+' conftest.er1 >conftest.err
10547 rm -f conftest.er1
10548 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010550 (exit $ac_status); } && {
10551 test -z "$ac_c_werror_flag" ||
10552 test ! -s conftest.err
10553 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010554 ac_hi=-1 ac_mid=-1
10555 while :; do
10556 cat >conftest.$ac_ext <<_ACEOF
10557/* confdefs.h. */
10558_ACEOF
10559cat confdefs.h >>conftest.$ac_ext
10560cat >>conftest.$ac_ext <<_ACEOF
10561/* end confdefs.h. */
10562$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010563 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564int
10565main ()
10566{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010567static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010568test_array [0] = 0
10569
10570 ;
10571 return 0;
10572}
10573_ACEOF
10574rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010575if { (ac_try="$ac_compile"
10576case "(($ac_try" in
10577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10578 *) ac_try_echo=$ac_try;;
10579esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582 ac_status=$?
10583 grep -v '^ *+' conftest.er1 >conftest.err
10584 rm -f conftest.er1
10585 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010587 (exit $ac_status); } && {
10588 test -z "$ac_c_werror_flag" ||
10589 test ! -s conftest.err
10590 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591 ac_lo=$ac_mid; break
10592else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010593 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594sed 's/^/| /' conftest.$ac_ext >&5
10595
Martin v. Löwiseba40652007-08-30 20:10:57 +000010596 ac_hi=`expr '(' $ac_mid ')' - 1`
10597 if test $ac_mid -le $ac_hi; then
10598 ac_lo= ac_hi=
10599 break
10600 fi
10601 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010603
10604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605 done
10606else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010607 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608sed 's/^/| /' conftest.$ac_ext >&5
10609
Martin v. Löwiseba40652007-08-30 20:10:57 +000010610 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010612
10613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010615
10616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617# Binary search between lo and hi bounds.
10618while test "x$ac_lo" != "x$ac_hi"; do
10619 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10620 cat >conftest.$ac_ext <<_ACEOF
10621/* confdefs.h. */
10622_ACEOF
10623cat confdefs.h >>conftest.$ac_ext
10624cat >>conftest.$ac_ext <<_ACEOF
10625/* end confdefs.h. */
10626$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010627 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628int
10629main ()
10630{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010631static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010632test_array [0] = 0
10633
10634 ;
10635 return 0;
10636}
10637_ACEOF
10638rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010639if { (ac_try="$ac_compile"
10640case "(($ac_try" in
10641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10642 *) ac_try_echo=$ac_try;;
10643esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646 ac_status=$?
10647 grep -v '^ *+' conftest.er1 >conftest.err
10648 rm -f conftest.er1
10649 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010651 (exit $ac_status); } && {
10652 test -z "$ac_c_werror_flag" ||
10653 test ! -s conftest.err
10654 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655 ac_hi=$ac_mid
10656else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010657 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658sed 's/^/| /' conftest.$ac_ext >&5
10659
Martin v. Löwiseba40652007-08-30 20:10:57 +000010660 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010662
10663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010664done
10665case $ac_lo in
10666?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010667'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010668 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010670echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010672 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673 else
10674 ac_cv_sizeof_size_t=0
10675 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010676esac
10677else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678 cat >conftest.$ac_ext <<_ACEOF
10679/* confdefs.h. */
10680_ACEOF
10681cat confdefs.h >>conftest.$ac_ext
10682cat >>conftest.$ac_ext <<_ACEOF
10683/* end confdefs.h. */
10684$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010685 typedef size_t ac__type_sizeof_;
10686static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10687static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010688#include <stdio.h>
10689#include <stdlib.h>
10690int
10691main ()
10692{
10693
10694 FILE *f = fopen ("conftest.val", "w");
10695 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010696 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010697 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010698 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010699 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010700 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010701 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010702 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703 }
10704 else
10705 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010706 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010707 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010708 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010709 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010712
10713 ;
10714 return 0;
10715}
10716_ACEOF
10717rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010718if { (ac_try="$ac_link"
10719case "(($ac_try" in
10720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10721 *) ac_try_echo=$ac_try;;
10722esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010724 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010725 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010727 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010728 { (case "(($ac_try" in
10729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10730 *) ac_try_echo=$ac_try;;
10731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010733 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010734 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010736 (exit $ac_status); }; }; then
10737 ac_cv_sizeof_size_t=`cat conftest.val`
10738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010739 echo "$as_me: program exited with status $ac_status" >&5
10740echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010741sed 's/^/| /' conftest.$ac_ext >&5
10742
10743( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010744if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010745 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010746See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010747echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010748See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010749 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010750 else
10751 ac_cv_sizeof_size_t=0
10752 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010755fi
10756rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010757fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010758{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10759echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010760
10761
10762
Martin v. Löwis18e16552006-02-15 17:27:45 +000010763cat >>confdefs.h <<_ACEOF
10764#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10765_ACEOF
10766
10767
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010768{ echo "$as_me:$LINENO: checking for pid_t" >&5
10769echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10770if test "${ac_cv_type_pid_t+set}" = set; then
10771 echo $ECHO_N "(cached) $ECHO_C" >&6
10772else
10773 cat >conftest.$ac_ext <<_ACEOF
10774/* confdefs.h. */
10775_ACEOF
10776cat confdefs.h >>conftest.$ac_ext
10777cat >>conftest.$ac_ext <<_ACEOF
10778/* end confdefs.h. */
10779$ac_includes_default
10780typedef pid_t ac__type_new_;
10781int
10782main ()
10783{
10784if ((ac__type_new_ *) 0)
10785 return 0;
10786if (sizeof (ac__type_new_))
10787 return 0;
10788 ;
10789 return 0;
10790}
10791_ACEOF
10792rm -f conftest.$ac_objext
10793if { (ac_try="$ac_compile"
10794case "(($ac_try" in
10795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10796 *) ac_try_echo=$ac_try;;
10797esac
10798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10799 (eval "$ac_compile") 2>conftest.er1
10800 ac_status=$?
10801 grep -v '^ *+' conftest.er1 >conftest.err
10802 rm -f conftest.er1
10803 cat conftest.err >&5
10804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10805 (exit $ac_status); } && {
10806 test -z "$ac_c_werror_flag" ||
10807 test ! -s conftest.err
10808 } && test -s conftest.$ac_objext; then
10809 ac_cv_type_pid_t=yes
10810else
10811 echo "$as_me: failed program was:" >&5
10812sed 's/^/| /' conftest.$ac_ext >&5
10813
10814 ac_cv_type_pid_t=no
10815fi
10816
10817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10818fi
10819{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10820echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10821
Christian Heimes951cc0f2008-01-31 23:08:23 +000010822# The cast to long int works around a bug in the HP C Compiler
10823# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10824# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10825# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010826{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10827echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010828if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010829 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010830else
10831 if test "$cross_compiling" = yes; then
10832 # Depending upon the size, compute the lo and hi bounds.
10833cat >conftest.$ac_ext <<_ACEOF
10834/* confdefs.h. */
10835_ACEOF
10836cat confdefs.h >>conftest.$ac_ext
10837cat >>conftest.$ac_ext <<_ACEOF
10838/* end confdefs.h. */
10839$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010840 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010841int
10842main ()
10843{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010844static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010845test_array [0] = 0
10846
10847 ;
10848 return 0;
10849}
10850_ACEOF
10851rm -f conftest.$ac_objext
10852if { (ac_try="$ac_compile"
10853case "(($ac_try" in
10854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10855 *) ac_try_echo=$ac_try;;
10856esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010858 (eval "$ac_compile") 2>conftest.er1
10859 ac_status=$?
10860 grep -v '^ *+' conftest.er1 >conftest.err
10861 rm -f conftest.er1
10862 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010864 (exit $ac_status); } && {
10865 test -z "$ac_c_werror_flag" ||
10866 test ! -s conftest.err
10867 } && test -s conftest.$ac_objext; then
10868 ac_lo=0 ac_mid=0
10869 while :; do
10870 cat >conftest.$ac_ext <<_ACEOF
10871/* confdefs.h. */
10872_ACEOF
10873cat confdefs.h >>conftest.$ac_ext
10874cat >>conftest.$ac_ext <<_ACEOF
10875/* end confdefs.h. */
10876$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010877 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010878int
10879main ()
10880{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010882test_array [0] = 0
10883
10884 ;
10885 return 0;
10886}
10887_ACEOF
10888rm -f conftest.$ac_objext
10889if { (ac_try="$ac_compile"
10890case "(($ac_try" in
10891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10892 *) ac_try_echo=$ac_try;;
10893esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010895 (eval "$ac_compile") 2>conftest.er1
10896 ac_status=$?
10897 grep -v '^ *+' conftest.er1 >conftest.err
10898 rm -f conftest.er1
10899 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010901 (exit $ac_status); } && {
10902 test -z "$ac_c_werror_flag" ||
10903 test ! -s conftest.err
10904 } && test -s conftest.$ac_objext; then
10905 ac_hi=$ac_mid; break
10906else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010907 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010908sed 's/^/| /' conftest.$ac_ext >&5
10909
10910 ac_lo=`expr $ac_mid + 1`
10911 if test $ac_lo -le $ac_mid; then
10912 ac_lo= ac_hi=
10913 break
10914 fi
10915 ac_mid=`expr 2 '*' $ac_mid + 1`
10916fi
10917
10918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10919 done
10920else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010921 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010922sed 's/^/| /' conftest.$ac_ext >&5
10923
10924 cat >conftest.$ac_ext <<_ACEOF
10925/* confdefs.h. */
10926_ACEOF
10927cat confdefs.h >>conftest.$ac_ext
10928cat >>conftest.$ac_ext <<_ACEOF
10929/* end confdefs.h. */
10930$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010931 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010932int
10933main ()
10934{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010935static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010936test_array [0] = 0
10937
10938 ;
10939 return 0;
10940}
10941_ACEOF
10942rm -f conftest.$ac_objext
10943if { (ac_try="$ac_compile"
10944case "(($ac_try" in
10945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10946 *) ac_try_echo=$ac_try;;
10947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010949 (eval "$ac_compile") 2>conftest.er1
10950 ac_status=$?
10951 grep -v '^ *+' conftest.er1 >conftest.err
10952 rm -f conftest.er1
10953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010955 (exit $ac_status); } && {
10956 test -z "$ac_c_werror_flag" ||
10957 test ! -s conftest.err
10958 } && test -s conftest.$ac_objext; then
10959 ac_hi=-1 ac_mid=-1
10960 while :; do
10961 cat >conftest.$ac_ext <<_ACEOF
10962/* confdefs.h. */
10963_ACEOF
10964cat confdefs.h >>conftest.$ac_ext
10965cat >>conftest.$ac_ext <<_ACEOF
10966/* end confdefs.h. */
10967$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010968 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010969int
10970main ()
10971{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010972static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010973test_array [0] = 0
10974
10975 ;
10976 return 0;
10977}
10978_ACEOF
10979rm -f conftest.$ac_objext
10980if { (ac_try="$ac_compile"
10981case "(($ac_try" in
10982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10983 *) ac_try_echo=$ac_try;;
10984esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010986 (eval "$ac_compile") 2>conftest.er1
10987 ac_status=$?
10988 grep -v '^ *+' conftest.er1 >conftest.err
10989 rm -f conftest.er1
10990 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010992 (exit $ac_status); } && {
10993 test -z "$ac_c_werror_flag" ||
10994 test ! -s conftest.err
10995 } && test -s conftest.$ac_objext; then
10996 ac_lo=$ac_mid; break
10997else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010998 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010999sed 's/^/| /' conftest.$ac_ext >&5
11000
11001 ac_hi=`expr '(' $ac_mid ')' - 1`
11002 if test $ac_mid -le $ac_hi; then
11003 ac_lo= ac_hi=
11004 break
11005 fi
11006 ac_mid=`expr 2 '*' $ac_mid`
11007fi
11008
11009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11010 done
11011else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011012 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011013sed 's/^/| /' conftest.$ac_ext >&5
11014
11015 ac_lo= ac_hi=
11016fi
11017
11018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11019fi
11020
11021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11022# Binary search between lo and hi bounds.
11023while test "x$ac_lo" != "x$ac_hi"; do
11024 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11025 cat >conftest.$ac_ext <<_ACEOF
11026/* confdefs.h. */
11027_ACEOF
11028cat confdefs.h >>conftest.$ac_ext
11029cat >>conftest.$ac_ext <<_ACEOF
11030/* end confdefs.h. */
11031$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011032 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011033int
11034main ()
11035{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011036static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011037test_array [0] = 0
11038
11039 ;
11040 return 0;
11041}
11042_ACEOF
11043rm -f conftest.$ac_objext
11044if { (ac_try="$ac_compile"
11045case "(($ac_try" in
11046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11047 *) ac_try_echo=$ac_try;;
11048esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011050 (eval "$ac_compile") 2>conftest.er1
11051 ac_status=$?
11052 grep -v '^ *+' conftest.er1 >conftest.err
11053 rm -f conftest.er1
11054 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011056 (exit $ac_status); } && {
11057 test -z "$ac_c_werror_flag" ||
11058 test ! -s conftest.err
11059 } && test -s conftest.$ac_objext; then
11060 ac_hi=$ac_mid
11061else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011062 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011063sed 's/^/| /' conftest.$ac_ext >&5
11064
11065 ac_lo=`expr '(' $ac_mid ')' + 1`
11066fi
11067
11068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11069done
11070case $ac_lo in
11071?*) ac_cv_sizeof_pid_t=$ac_lo;;
11072'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011073 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011074See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011075echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011076See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011077 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011078 else
11079 ac_cv_sizeof_pid_t=0
11080 fi ;;
11081esac
11082else
11083 cat >conftest.$ac_ext <<_ACEOF
11084/* confdefs.h. */
11085_ACEOF
11086cat confdefs.h >>conftest.$ac_ext
11087cat >>conftest.$ac_ext <<_ACEOF
11088/* end confdefs.h. */
11089$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011090 typedef pid_t ac__type_sizeof_;
11091static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11092static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011093#include <stdio.h>
11094#include <stdlib.h>
11095int
11096main ()
11097{
11098
11099 FILE *f = fopen ("conftest.val", "w");
11100 if (! f)
11101 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011102 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011103 {
11104 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011105 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011106 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011107 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011108 }
11109 else
11110 {
11111 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011112 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011113 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011114 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011115 }
11116 return ferror (f) || fclose (f) != 0;
11117
11118 ;
11119 return 0;
11120}
11121_ACEOF
11122rm -f conftest$ac_exeext
11123if { (ac_try="$ac_link"
11124case "(($ac_try" in
11125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11126 *) ac_try_echo=$ac_try;;
11127esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011129 (eval "$ac_link") 2>&5
11130 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11133 { (case "(($ac_try" in
11134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11135 *) ac_try_echo=$ac_try;;
11136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011138 (eval "$ac_try") 2>&5
11139 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011141 (exit $ac_status); }; }; then
11142 ac_cv_sizeof_pid_t=`cat conftest.val`
11143else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011144 echo "$as_me: program exited with status $ac_status" >&5
11145echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011146sed 's/^/| /' conftest.$ac_ext >&5
11147
11148( exit $ac_status )
11149if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011150 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011151See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011152echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011153See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011154 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011155 else
11156 ac_cv_sizeof_pid_t=0
11157 fi
11158fi
11159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11160fi
11161rm -f conftest.val
11162fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011163{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11164echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011165
11166
11167
11168cat >>confdefs.h <<_ACEOF
11169#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11170_ACEOF
11171
11172
Michael W. Hudson54241132001-12-07 15:38:26 +000011173
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011174{ echo "$as_me:$LINENO: checking for long long support" >&5
11175echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011176have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011178/* confdefs.h. */
11179_ACEOF
11180cat confdefs.h >>conftest.$ac_ext
11181cat >>conftest.$ac_ext <<_ACEOF
11182/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011183
Martin v. Löwis11437992002-04-12 09:54:03 +000011184int
11185main ()
11186{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011187long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 ;
11189 return 0;
11190}
11191_ACEOF
11192rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011193if { (ac_try="$ac_compile"
11194case "(($ac_try" in
11195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11196 *) ac_try_echo=$ac_try;;
11197esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011201 grep -v '^ *+' conftest.er1 >conftest.err
11202 rm -f conftest.er1
11203 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011205 (exit $ac_status); } && {
11206 test -z "$ac_c_werror_flag" ||
11207 test ! -s conftest.err
11208 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011209
11210
11211cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011212#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011213_ACEOF
11214
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011215 have_long_long=yes
11216
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011219sed 's/^/| /' conftest.$ac_ext >&5
11220
Martin v. Löwiseba40652007-08-30 20:10:57 +000011221
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011223
11224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011225{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11226echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011227if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011228{ echo "$as_me:$LINENO: checking for long long" >&5
11229echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11230if test "${ac_cv_type_long_long+set}" = set; then
11231 echo $ECHO_N "(cached) $ECHO_C" >&6
11232else
11233 cat >conftest.$ac_ext <<_ACEOF
11234/* confdefs.h. */
11235_ACEOF
11236cat confdefs.h >>conftest.$ac_ext
11237cat >>conftest.$ac_ext <<_ACEOF
11238/* end confdefs.h. */
11239$ac_includes_default
11240typedef long long ac__type_new_;
11241int
11242main ()
11243{
11244if ((ac__type_new_ *) 0)
11245 return 0;
11246if (sizeof (ac__type_new_))
11247 return 0;
11248 ;
11249 return 0;
11250}
11251_ACEOF
11252rm -f conftest.$ac_objext
11253if { (ac_try="$ac_compile"
11254case "(($ac_try" in
11255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11256 *) ac_try_echo=$ac_try;;
11257esac
11258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11259 (eval "$ac_compile") 2>conftest.er1
11260 ac_status=$?
11261 grep -v '^ *+' conftest.er1 >conftest.err
11262 rm -f conftest.er1
11263 cat conftest.err >&5
11264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11265 (exit $ac_status); } && {
11266 test -z "$ac_c_werror_flag" ||
11267 test ! -s conftest.err
11268 } && test -s conftest.$ac_objext; then
11269 ac_cv_type_long_long=yes
11270else
11271 echo "$as_me: failed program was:" >&5
11272sed 's/^/| /' conftest.$ac_ext >&5
11273
11274 ac_cv_type_long_long=no
11275fi
11276
11277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11278fi
11279{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11280echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11281
Martin v. Löwiseba40652007-08-30 20:10:57 +000011282# The cast to long int works around a bug in the HP C Compiler
11283# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11284# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11285# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011286{ echo "$as_me:$LINENO: checking size of long long" >&5
11287echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011288if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011289 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011290else
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 if test "$cross_compiling" = yes; then
11292 # Depending upon the size, compute the lo and hi bounds.
11293cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011294/* confdefs.h. */
11295_ACEOF
11296cat confdefs.h >>conftest.$ac_ext
11297cat >>conftest.$ac_ext <<_ACEOF
11298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011299$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011300 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011301int
11302main ()
11303{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011304static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011305test_array [0] = 0
11306
11307 ;
11308 return 0;
11309}
11310_ACEOF
11311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011312if { (ac_try="$ac_compile"
11313case "(($ac_try" in
11314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11315 *) ac_try_echo=$ac_try;;
11316esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011320 grep -v '^ *+' conftest.er1 >conftest.err
11321 rm -f conftest.er1
11322 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011324 (exit $ac_status); } && {
11325 test -z "$ac_c_werror_flag" ||
11326 test ! -s conftest.err
11327 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 ac_lo=0 ac_mid=0
11329 while :; do
11330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011331/* confdefs.h. */
11332_ACEOF
11333cat confdefs.h >>conftest.$ac_ext
11334cat >>conftest.$ac_ext <<_ACEOF
11335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011336$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011337 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011338int
11339main ()
11340{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011342test_array [0] = 0
11343
11344 ;
11345 return 0;
11346}
11347_ACEOF
11348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349if { (ac_try="$ac_compile"
11350case "(($ac_try" in
11351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11352 *) ac_try_echo=$ac_try;;
11353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011357 grep -v '^ *+' conftest.er1 >conftest.err
11358 rm -f conftest.er1
11359 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011361 (exit $ac_status); } && {
11362 test -z "$ac_c_werror_flag" ||
11363 test ! -s conftest.err
11364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ac_hi=$ac_mid; break
11366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011368sed 's/^/| /' conftest.$ac_ext >&5
11369
Martin v. Löwiseba40652007-08-30 20:10:57 +000011370 ac_lo=`expr $ac_mid + 1`
11371 if test $ac_lo -le $ac_mid; then
11372 ac_lo= ac_hi=
11373 break
11374 fi
11375 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011377
11378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 done
11380else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011382sed 's/^/| /' conftest.$ac_ext >&5
11383
Martin v. Löwiseba40652007-08-30 20:10:57 +000011384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011385/* confdefs.h. */
11386_ACEOF
11387cat confdefs.h >>conftest.$ac_ext
11388cat >>conftest.$ac_ext <<_ACEOF
11389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011390$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011391 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011392int
11393main ()
11394{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011395static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011396test_array [0] = 0
11397
11398 ;
11399 return 0;
11400}
11401_ACEOF
11402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011403if { (ac_try="$ac_compile"
11404case "(($ac_try" in
11405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11406 *) ac_try_echo=$ac_try;;
11407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011411 grep -v '^ *+' conftest.er1 >conftest.err
11412 rm -f conftest.er1
11413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011415 (exit $ac_status); } && {
11416 test -z "$ac_c_werror_flag" ||
11417 test ! -s conftest.err
11418 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011419 ac_hi=-1 ac_mid=-1
11420 while :; do
11421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011422/* confdefs.h. */
11423_ACEOF
11424cat confdefs.h >>conftest.$ac_ext
11425cat >>conftest.$ac_ext <<_ACEOF
11426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011427$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011428 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011429int
11430main ()
11431{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011433test_array [0] = 0
11434
11435 ;
11436 return 0;
11437}
11438_ACEOF
11439rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011440if { (ac_try="$ac_compile"
11441case "(($ac_try" in
11442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11443 *) ac_try_echo=$ac_try;;
11444esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011448 grep -v '^ *+' conftest.er1 >conftest.err
11449 rm -f conftest.er1
11450 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011452 (exit $ac_status); } && {
11453 test -z "$ac_c_werror_flag" ||
11454 test ! -s conftest.err
11455 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ac_lo=$ac_mid; break
11457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011459sed 's/^/| /' conftest.$ac_ext >&5
11460
Martin v. Löwiseba40652007-08-30 20:10:57 +000011461 ac_hi=`expr '(' $ac_mid ')' - 1`
11462 if test $ac_mid -le $ac_hi; then
11463 ac_lo= ac_hi=
11464 break
11465 fi
11466 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468
11469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 done
11471else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011473sed 's/^/| /' conftest.$ac_ext >&5
11474
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011477
11478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011480
11481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011482# Binary search between lo and hi bounds.
11483while test "x$ac_lo" != "x$ac_hi"; do
11484 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011486/* confdefs.h. */
11487_ACEOF
11488cat confdefs.h >>conftest.$ac_ext
11489cat >>conftest.$ac_ext <<_ACEOF
11490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011491$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011492 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011493int
11494main ()
11495{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011496static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011497test_array [0] = 0
11498
11499 ;
11500 return 0;
11501}
11502_ACEOF
11503rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011504if { (ac_try="$ac_compile"
11505case "(($ac_try" in
11506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11507 *) ac_try_echo=$ac_try;;
11508esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011512 grep -v '^ *+' conftest.er1 >conftest.err
11513 rm -f conftest.er1
11514 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011516 (exit $ac_status); } && {
11517 test -z "$ac_c_werror_flag" ||
11518 test ! -s conftest.err
11519 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 ac_hi=$ac_mid
11521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011523sed 's/^/| /' conftest.$ac_ext >&5
11524
Martin v. Löwiseba40652007-08-30 20:10:57 +000011525 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011527
11528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011529done
11530case $ac_lo in
11531?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011533 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011534See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011535echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011536See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011537 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011538 else
11539 ac_cv_sizeof_long_long=0
11540 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011541esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011542else
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011544/* confdefs.h. */
11545_ACEOF
11546cat confdefs.h >>conftest.$ac_ext
11547cat >>conftest.$ac_ext <<_ACEOF
11548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011549$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011550 typedef long long ac__type_sizeof_;
11551static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11552static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011553#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011554#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011555int
11556main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011557{
Martin v. Löwis11437992002-04-12 09:54:03 +000011558
11559 FILE *f = fopen ("conftest.val", "w");
11560 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011561 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011562 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011564 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011565 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011566 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011567 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 }
11569 else
11570 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011571 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011572 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011573 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011574 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011576 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011577
11578 ;
11579 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011580}
Martin v. Löwis11437992002-04-12 09:54:03 +000011581_ACEOF
11582rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011583if { (ac_try="$ac_link"
11584case "(($ac_try" in
11585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11586 *) ac_try_echo=$ac_try;;
11587esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011589 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011593 { (case "(($ac_try" in
11594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11595 *) ac_try_echo=$ac_try;;
11596esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011598 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011601 (exit $ac_status); }; }; then
11602 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011604 echo "$as_me: program exited with status $ac_status" >&5
11605echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011606sed 's/^/| /' conftest.$ac_ext >&5
11607
Martin v. Löwis11437992002-04-12 09:54:03 +000011608( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011610 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011611See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011612echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011613See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011614 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011615 else
11616 ac_cv_sizeof_long_long=0
11617 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011620fi
11621rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011622fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011623{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11624echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011625
11626
11627
Martin v. Löwis11437992002-04-12 09:54:03 +000011628cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011629#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011630_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011631
Michael W. Hudson54241132001-12-07 15:38:26 +000011632
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011633fi
11634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011635{ echo "$as_me:$LINENO: checking for long double support" >&5
11636echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011637have_long_double=no
11638cat >conftest.$ac_ext <<_ACEOF
11639/* confdefs.h. */
11640_ACEOF
11641cat confdefs.h >>conftest.$ac_ext
11642cat >>conftest.$ac_ext <<_ACEOF
11643/* end confdefs.h. */
11644
11645int
11646main ()
11647{
11648long double x; x = (long double)0.;
11649 ;
11650 return 0;
11651}
11652_ACEOF
11653rm -f conftest.$ac_objext
11654if { (ac_try="$ac_compile"
11655case "(($ac_try" in
11656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11657 *) ac_try_echo=$ac_try;;
11658esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011660 (eval "$ac_compile") 2>conftest.er1
11661 ac_status=$?
11662 grep -v '^ *+' conftest.er1 >conftest.err
11663 rm -f conftest.er1
11664 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011666 (exit $ac_status); } && {
11667 test -z "$ac_c_werror_flag" ||
11668 test ! -s conftest.err
11669 } && test -s conftest.$ac_objext; then
11670
11671
11672cat >>confdefs.h <<\_ACEOF
11673#define HAVE_LONG_DOUBLE 1
11674_ACEOF
11675
11676 have_long_double=yes
11677
11678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011679 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011680sed 's/^/| /' conftest.$ac_ext >&5
11681
11682
11683fi
11684
11685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011686{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11687echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011688if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011689{ echo "$as_me:$LINENO: checking for long double" >&5
11690echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11691if test "${ac_cv_type_long_double+set}" = set; then
11692 echo $ECHO_N "(cached) $ECHO_C" >&6
11693else
11694 cat >conftest.$ac_ext <<_ACEOF
11695/* confdefs.h. */
11696_ACEOF
11697cat confdefs.h >>conftest.$ac_ext
11698cat >>conftest.$ac_ext <<_ACEOF
11699/* end confdefs.h. */
11700$ac_includes_default
11701typedef long double ac__type_new_;
11702int
11703main ()
11704{
11705if ((ac__type_new_ *) 0)
11706 return 0;
11707if (sizeof (ac__type_new_))
11708 return 0;
11709 ;
11710 return 0;
11711}
11712_ACEOF
11713rm -f conftest.$ac_objext
11714if { (ac_try="$ac_compile"
11715case "(($ac_try" in
11716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11717 *) ac_try_echo=$ac_try;;
11718esac
11719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11720 (eval "$ac_compile") 2>conftest.er1
11721 ac_status=$?
11722 grep -v '^ *+' conftest.er1 >conftest.err
11723 rm -f conftest.er1
11724 cat conftest.err >&5
11725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11726 (exit $ac_status); } && {
11727 test -z "$ac_c_werror_flag" ||
11728 test ! -s conftest.err
11729 } && test -s conftest.$ac_objext; then
11730 ac_cv_type_long_double=yes
11731else
11732 echo "$as_me: failed program was:" >&5
11733sed 's/^/| /' conftest.$ac_ext >&5
11734
11735 ac_cv_type_long_double=no
11736fi
11737
11738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11739fi
11740{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11741echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11742
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011743# The cast to long int works around a bug in the HP C Compiler
11744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11746# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011747{ echo "$as_me:$LINENO: checking size of long double" >&5
11748echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011749if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011750 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011751else
11752 if test "$cross_compiling" = yes; then
11753 # Depending upon the size, compute the lo and hi bounds.
11754cat >conftest.$ac_ext <<_ACEOF
11755/* confdefs.h. */
11756_ACEOF
11757cat confdefs.h >>conftest.$ac_ext
11758cat >>conftest.$ac_ext <<_ACEOF
11759/* end confdefs.h. */
11760$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011761 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011762int
11763main ()
11764{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011766test_array [0] = 0
11767
11768 ;
11769 return 0;
11770}
11771_ACEOF
11772rm -f conftest.$ac_objext
11773if { (ac_try="$ac_compile"
11774case "(($ac_try" in
11775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11776 *) ac_try_echo=$ac_try;;
11777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011779 (eval "$ac_compile") 2>conftest.er1
11780 ac_status=$?
11781 grep -v '^ *+' conftest.er1 >conftest.err
11782 rm -f conftest.er1
11783 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011785 (exit $ac_status); } && {
11786 test -z "$ac_c_werror_flag" ||
11787 test ! -s conftest.err
11788 } && test -s conftest.$ac_objext; then
11789 ac_lo=0 ac_mid=0
11790 while :; do
11791 cat >conftest.$ac_ext <<_ACEOF
11792/* confdefs.h. */
11793_ACEOF
11794cat confdefs.h >>conftest.$ac_ext
11795cat >>conftest.$ac_ext <<_ACEOF
11796/* end confdefs.h. */
11797$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011798 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011799int
11800main ()
11801{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011803test_array [0] = 0
11804
11805 ;
11806 return 0;
11807}
11808_ACEOF
11809rm -f conftest.$ac_objext
11810if { (ac_try="$ac_compile"
11811case "(($ac_try" in
11812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11813 *) ac_try_echo=$ac_try;;
11814esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011816 (eval "$ac_compile") 2>conftest.er1
11817 ac_status=$?
11818 grep -v '^ *+' conftest.er1 >conftest.err
11819 rm -f conftest.er1
11820 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011822 (exit $ac_status); } && {
11823 test -z "$ac_c_werror_flag" ||
11824 test ! -s conftest.err
11825 } && test -s conftest.$ac_objext; then
11826 ac_hi=$ac_mid; break
11827else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011828 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011829sed 's/^/| /' conftest.$ac_ext >&5
11830
11831 ac_lo=`expr $ac_mid + 1`
11832 if test $ac_lo -le $ac_mid; then
11833 ac_lo= ac_hi=
11834 break
11835 fi
11836 ac_mid=`expr 2 '*' $ac_mid + 1`
11837fi
11838
11839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11840 done
11841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011842 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011843sed 's/^/| /' conftest.$ac_ext >&5
11844
11845 cat >conftest.$ac_ext <<_ACEOF
11846/* confdefs.h. */
11847_ACEOF
11848cat confdefs.h >>conftest.$ac_ext
11849cat >>conftest.$ac_ext <<_ACEOF
11850/* end confdefs.h. */
11851$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011852 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011853int
11854main ()
11855{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011856static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011857test_array [0] = 0
11858
11859 ;
11860 return 0;
11861}
11862_ACEOF
11863rm -f conftest.$ac_objext
11864if { (ac_try="$ac_compile"
11865case "(($ac_try" in
11866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11867 *) ac_try_echo=$ac_try;;
11868esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011870 (eval "$ac_compile") 2>conftest.er1
11871 ac_status=$?
11872 grep -v '^ *+' conftest.er1 >conftest.err
11873 rm -f conftest.er1
11874 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011876 (exit $ac_status); } && {
11877 test -z "$ac_c_werror_flag" ||
11878 test ! -s conftest.err
11879 } && test -s conftest.$ac_objext; then
11880 ac_hi=-1 ac_mid=-1
11881 while :; do
11882 cat >conftest.$ac_ext <<_ACEOF
11883/* confdefs.h. */
11884_ACEOF
11885cat confdefs.h >>conftest.$ac_ext
11886cat >>conftest.$ac_ext <<_ACEOF
11887/* end confdefs.h. */
11888$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011889 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011890int
11891main ()
11892{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011894test_array [0] = 0
11895
11896 ;
11897 return 0;
11898}
11899_ACEOF
11900rm -f conftest.$ac_objext
11901if { (ac_try="$ac_compile"
11902case "(($ac_try" in
11903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11904 *) ac_try_echo=$ac_try;;
11905esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011907 (eval "$ac_compile") 2>conftest.er1
11908 ac_status=$?
11909 grep -v '^ *+' conftest.er1 >conftest.err
11910 rm -f conftest.er1
11911 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011913 (exit $ac_status); } && {
11914 test -z "$ac_c_werror_flag" ||
11915 test ! -s conftest.err
11916 } && test -s conftest.$ac_objext; then
11917 ac_lo=$ac_mid; break
11918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011919 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011920sed 's/^/| /' conftest.$ac_ext >&5
11921
11922 ac_hi=`expr '(' $ac_mid ')' - 1`
11923 if test $ac_mid -le $ac_hi; then
11924 ac_lo= ac_hi=
11925 break
11926 fi
11927 ac_mid=`expr 2 '*' $ac_mid`
11928fi
11929
11930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11931 done
11932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011933 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011934sed 's/^/| /' conftest.$ac_ext >&5
11935
11936 ac_lo= ac_hi=
11937fi
11938
11939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11940fi
11941
11942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11943# Binary search between lo and hi bounds.
11944while test "x$ac_lo" != "x$ac_hi"; do
11945 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11946 cat >conftest.$ac_ext <<_ACEOF
11947/* confdefs.h. */
11948_ACEOF
11949cat confdefs.h >>conftest.$ac_ext
11950cat >>conftest.$ac_ext <<_ACEOF
11951/* end confdefs.h. */
11952$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011953 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011954int
11955main ()
11956{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011958test_array [0] = 0
11959
11960 ;
11961 return 0;
11962}
11963_ACEOF
11964rm -f conftest.$ac_objext
11965if { (ac_try="$ac_compile"
11966case "(($ac_try" in
11967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11968 *) ac_try_echo=$ac_try;;
11969esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011971 (eval "$ac_compile") 2>conftest.er1
11972 ac_status=$?
11973 grep -v '^ *+' conftest.er1 >conftest.err
11974 rm -f conftest.er1
11975 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011977 (exit $ac_status); } && {
11978 test -z "$ac_c_werror_flag" ||
11979 test ! -s conftest.err
11980 } && test -s conftest.$ac_objext; then
11981 ac_hi=$ac_mid
11982else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011983 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011984sed 's/^/| /' conftest.$ac_ext >&5
11985
11986 ac_lo=`expr '(' $ac_mid ')' + 1`
11987fi
11988
11989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11990done
11991case $ac_lo in
11992?*) ac_cv_sizeof_long_double=$ac_lo;;
11993'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011995See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011996echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011997See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011998 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011999 else
12000 ac_cv_sizeof_long_double=0
12001 fi ;;
12002esac
12003else
12004 cat >conftest.$ac_ext <<_ACEOF
12005/* confdefs.h. */
12006_ACEOF
12007cat confdefs.h >>conftest.$ac_ext
12008cat >>conftest.$ac_ext <<_ACEOF
12009/* end confdefs.h. */
12010$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012011 typedef long double ac__type_sizeof_;
12012static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12013static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012014#include <stdio.h>
12015#include <stdlib.h>
12016int
12017main ()
12018{
12019
12020 FILE *f = fopen ("conftest.val", "w");
12021 if (! f)
12022 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012023 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012024 {
12025 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012026 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012027 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012028 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012029 }
12030 else
12031 {
12032 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012033 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012034 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012035 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012036 }
12037 return ferror (f) || fclose (f) != 0;
12038
12039 ;
12040 return 0;
12041}
12042_ACEOF
12043rm -f conftest$ac_exeext
12044if { (ac_try="$ac_link"
12045case "(($ac_try" in
12046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12047 *) ac_try_echo=$ac_try;;
12048esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012050 (eval "$ac_link") 2>&5
12051 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12054 { (case "(($ac_try" in
12055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12056 *) ac_try_echo=$ac_try;;
12057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012059 (eval "$ac_try") 2>&5
12060 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012062 (exit $ac_status); }; }; then
12063 ac_cv_sizeof_long_double=`cat conftest.val`
12064else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012065 echo "$as_me: program exited with status $ac_status" >&5
12066echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012067sed 's/^/| /' conftest.$ac_ext >&5
12068
12069( exit $ac_status )
12070if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012071 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012072See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012073echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012074See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012075 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012076 else
12077 ac_cv_sizeof_long_double=0
12078 fi
12079fi
12080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12081fi
12082rm -f conftest.val
12083fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012084{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12085echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012086
12087
12088
12089cat >>confdefs.h <<_ACEOF
12090#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12091_ACEOF
12092
12093
12094fi
12095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012096{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12097echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012098have_c99_bool=no
12099cat >conftest.$ac_ext <<_ACEOF
12100/* confdefs.h. */
12101_ACEOF
12102cat confdefs.h >>conftest.$ac_ext
12103cat >>conftest.$ac_ext <<_ACEOF
12104/* end confdefs.h. */
12105
12106int
12107main ()
12108{
12109_Bool x; x = (_Bool)0;
12110 ;
12111 return 0;
12112}
12113_ACEOF
12114rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012115if { (ac_try="$ac_compile"
12116case "(($ac_try" in
12117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12118 *) ac_try_echo=$ac_try;;
12119esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012122 ac_status=$?
12123 grep -v '^ *+' conftest.er1 >conftest.err
12124 rm -f conftest.er1
12125 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012127 (exit $ac_status); } && {
12128 test -z "$ac_c_werror_flag" ||
12129 test ! -s conftest.err
12130 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012131
12132
12133cat >>confdefs.h <<\_ACEOF
12134#define HAVE_C99_BOOL 1
12135_ACEOF
12136
12137 have_c99_bool=yes
12138
12139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012140 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012141sed 's/^/| /' conftest.$ac_ext >&5
12142
Martin v. Löwiseba40652007-08-30 20:10:57 +000012143
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012145
12146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012147{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12148echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012149if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012150{ echo "$as_me:$LINENO: checking for _Bool" >&5
12151echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12152if test "${ac_cv_type__Bool+set}" = set; then
12153 echo $ECHO_N "(cached) $ECHO_C" >&6
12154else
12155 cat >conftest.$ac_ext <<_ACEOF
12156/* confdefs.h. */
12157_ACEOF
12158cat confdefs.h >>conftest.$ac_ext
12159cat >>conftest.$ac_ext <<_ACEOF
12160/* end confdefs.h. */
12161$ac_includes_default
12162typedef _Bool ac__type_new_;
12163int
12164main ()
12165{
12166if ((ac__type_new_ *) 0)
12167 return 0;
12168if (sizeof (ac__type_new_))
12169 return 0;
12170 ;
12171 return 0;
12172}
12173_ACEOF
12174rm -f conftest.$ac_objext
12175if { (ac_try="$ac_compile"
12176case "(($ac_try" in
12177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12178 *) ac_try_echo=$ac_try;;
12179esac
12180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12181 (eval "$ac_compile") 2>conftest.er1
12182 ac_status=$?
12183 grep -v '^ *+' conftest.er1 >conftest.err
12184 rm -f conftest.er1
12185 cat conftest.err >&5
12186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12187 (exit $ac_status); } && {
12188 test -z "$ac_c_werror_flag" ||
12189 test ! -s conftest.err
12190 } && test -s conftest.$ac_objext; then
12191 ac_cv_type__Bool=yes
12192else
12193 echo "$as_me: failed program was:" >&5
12194sed 's/^/| /' conftest.$ac_ext >&5
12195
12196 ac_cv_type__Bool=no
12197fi
12198
12199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12200fi
12201{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12202echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12203
Martin v. Löwiseba40652007-08-30 20:10:57 +000012204# The cast to long int works around a bug in the HP C Compiler
12205# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12206# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12207# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012208{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12209echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012210if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012211 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012212else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012213 if test "$cross_compiling" = yes; then
12214 # Depending upon the size, compute the lo and hi bounds.
12215cat >conftest.$ac_ext <<_ACEOF
12216/* confdefs.h. */
12217_ACEOF
12218cat confdefs.h >>conftest.$ac_ext
12219cat >>conftest.$ac_ext <<_ACEOF
12220/* end confdefs.h. */
12221$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012222 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012223int
12224main ()
12225{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012226static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012227test_array [0] = 0
12228
12229 ;
12230 return 0;
12231}
12232_ACEOF
12233rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012234if { (ac_try="$ac_compile"
12235case "(($ac_try" in
12236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12237 *) ac_try_echo=$ac_try;;
12238esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012240 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012241 ac_status=$?
12242 grep -v '^ *+' conftest.er1 >conftest.err
12243 rm -f conftest.er1
12244 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012246 (exit $ac_status); } && {
12247 test -z "$ac_c_werror_flag" ||
12248 test ! -s conftest.err
12249 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012250 ac_lo=0 ac_mid=0
12251 while :; do
12252 cat >conftest.$ac_ext <<_ACEOF
12253/* confdefs.h. */
12254_ACEOF
12255cat confdefs.h >>conftest.$ac_ext
12256cat >>conftest.$ac_ext <<_ACEOF
12257/* end confdefs.h. */
12258$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012259 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012260int
12261main ()
12262{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012263static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012264test_array [0] = 0
12265
12266 ;
12267 return 0;
12268}
12269_ACEOF
12270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012271if { (ac_try="$ac_compile"
12272case "(($ac_try" in
12273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12274 *) ac_try_echo=$ac_try;;
12275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012278 ac_status=$?
12279 grep -v '^ *+' conftest.er1 >conftest.err
12280 rm -f conftest.er1
12281 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012283 (exit $ac_status); } && {
12284 test -z "$ac_c_werror_flag" ||
12285 test ! -s conftest.err
12286 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012287 ac_hi=$ac_mid; break
12288else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012289 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012290sed 's/^/| /' conftest.$ac_ext >&5
12291
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292 ac_lo=`expr $ac_mid + 1`
12293 if test $ac_lo -le $ac_mid; then
12294 ac_lo= ac_hi=
12295 break
12296 fi
12297 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012299
12300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012301 done
12302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012303 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012304sed 's/^/| /' conftest.$ac_ext >&5
12305
Martin v. Löwiseba40652007-08-30 20:10:57 +000012306 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012307/* confdefs.h. */
12308_ACEOF
12309cat confdefs.h >>conftest.$ac_ext
12310cat >>conftest.$ac_ext <<_ACEOF
12311/* end confdefs.h. */
12312$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012313 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012314int
12315main ()
12316{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012317static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012318test_array [0] = 0
12319
12320 ;
12321 return 0;
12322}
12323_ACEOF
12324rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012325if { (ac_try="$ac_compile"
12326case "(($ac_try" in
12327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12328 *) ac_try_echo=$ac_try;;
12329esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012331 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012332 ac_status=$?
12333 grep -v '^ *+' conftest.er1 >conftest.err
12334 rm -f conftest.er1
12335 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337 (exit $ac_status); } && {
12338 test -z "$ac_c_werror_flag" ||
12339 test ! -s conftest.err
12340 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012341 ac_hi=-1 ac_mid=-1
12342 while :; do
12343 cat >conftest.$ac_ext <<_ACEOF
12344/* confdefs.h. */
12345_ACEOF
12346cat confdefs.h >>conftest.$ac_ext
12347cat >>conftest.$ac_ext <<_ACEOF
12348/* end confdefs.h. */
12349$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012350 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012351int
12352main ()
12353{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012354static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012355test_array [0] = 0
12356
12357 ;
12358 return 0;
12359}
12360_ACEOF
12361rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012362if { (ac_try="$ac_compile"
12363case "(($ac_try" in
12364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12365 *) ac_try_echo=$ac_try;;
12366esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012369 ac_status=$?
12370 grep -v '^ *+' conftest.er1 >conftest.err
12371 rm -f conftest.er1
12372 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012374 (exit $ac_status); } && {
12375 test -z "$ac_c_werror_flag" ||
12376 test ! -s conftest.err
12377 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012378 ac_lo=$ac_mid; break
12379else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012380 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012381sed 's/^/| /' conftest.$ac_ext >&5
12382
Martin v. Löwiseba40652007-08-30 20:10:57 +000012383 ac_hi=`expr '(' $ac_mid ')' - 1`
12384 if test $ac_mid -le $ac_hi; then
12385 ac_lo= ac_hi=
12386 break
12387 fi
12388 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390
12391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012392 done
12393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012394 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012395sed 's/^/| /' conftest.$ac_ext >&5
12396
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399
12400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012402
12403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012404# Binary search between lo and hi bounds.
12405while test "x$ac_lo" != "x$ac_hi"; do
12406 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12407 cat >conftest.$ac_ext <<_ACEOF
12408/* confdefs.h. */
12409_ACEOF
12410cat confdefs.h >>conftest.$ac_ext
12411cat >>conftest.$ac_ext <<_ACEOF
12412/* end confdefs.h. */
12413$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012414 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012415int
12416main ()
12417{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012418static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012419test_array [0] = 0
12420
12421 ;
12422 return 0;
12423}
12424_ACEOF
12425rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012426if { (ac_try="$ac_compile"
12427case "(($ac_try" in
12428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12429 *) ac_try_echo=$ac_try;;
12430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012433 ac_status=$?
12434 grep -v '^ *+' conftest.er1 >conftest.err
12435 rm -f conftest.er1
12436 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012438 (exit $ac_status); } && {
12439 test -z "$ac_c_werror_flag" ||
12440 test ! -s conftest.err
12441 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012442 ac_hi=$ac_mid
12443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012444 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012445sed 's/^/| /' conftest.$ac_ext >&5
12446
Martin v. Löwiseba40652007-08-30 20:10:57 +000012447 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012449
12450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012451done
12452case $ac_lo in
12453?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012455 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012456See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012457echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012458See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012459 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460 else
12461 ac_cv_sizeof__Bool=0
12462 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012463esac
12464else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012465 cat >conftest.$ac_ext <<_ACEOF
12466/* confdefs.h. */
12467_ACEOF
12468cat confdefs.h >>conftest.$ac_ext
12469cat >>conftest.$ac_ext <<_ACEOF
12470/* end confdefs.h. */
12471$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012472 typedef _Bool ac__type_sizeof_;
12473static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12474static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012475#include <stdio.h>
12476#include <stdlib.h>
12477int
12478main ()
12479{
12480
12481 FILE *f = fopen ("conftest.val", "w");
12482 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012483 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012484 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012485 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012486 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012487 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012488 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012489 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012490 }
12491 else
12492 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012493 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012494 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012495 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012496 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012497 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012499
12500 ;
12501 return 0;
12502}
12503_ACEOF
12504rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012505if { (ac_try="$ac_link"
12506case "(($ac_try" in
12507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12508 *) ac_try_echo=$ac_try;;
12509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012511 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012512 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012514 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515 { (case "(($ac_try" in
12516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12517 *) ac_try_echo=$ac_try;;
12518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012521 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012523 (exit $ac_status); }; }; then
12524 ac_cv_sizeof__Bool=`cat conftest.val`
12525else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012526 echo "$as_me: program exited with status $ac_status" >&5
12527echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012528sed 's/^/| /' conftest.$ac_ext >&5
12529
12530( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012531if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012532 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012533See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012534echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012535See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012536 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012537 else
12538 ac_cv_sizeof__Bool=0
12539 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012542fi
12543rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012544fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012545{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12546echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012547
12548
12549
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012550cat >>confdefs.h <<_ACEOF
12551#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12552_ACEOF
12553
12554
12555fi
12556
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012557{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12558echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012559if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012560 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012561else
12562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012563/* confdefs.h. */
12564_ACEOF
12565cat confdefs.h >>conftest.$ac_ext
12566cat >>conftest.$ac_ext <<_ACEOF
12567/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012568#ifdef HAVE_STDINT_H
12569 #include <stdint.h>
12570 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012571
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012572typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012573int
12574main ()
12575{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012576if ((ac__type_new_ *) 0)
12577 return 0;
12578if (sizeof (ac__type_new_))
12579 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012580 ;
12581 return 0;
12582}
12583_ACEOF
12584rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012585if { (ac_try="$ac_compile"
12586case "(($ac_try" in
12587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12588 *) ac_try_echo=$ac_try;;
12589esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012593 grep -v '^ *+' conftest.er1 >conftest.err
12594 rm -f conftest.er1
12595 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012597 (exit $ac_status); } && {
12598 test -z "$ac_c_werror_flag" ||
12599 test ! -s conftest.err
12600 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012601 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012604sed 's/^/| /' conftest.$ac_ext >&5
12605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012606 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012608
12609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012610fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012611{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12612echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12613if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012614
12615cat >>confdefs.h <<_ACEOF
12616#define HAVE_UINTPTR_T 1
12617_ACEOF
12618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012619{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12620echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12621if test "${ac_cv_type_uintptr_t+set}" = set; then
12622 echo $ECHO_N "(cached) $ECHO_C" >&6
12623else
12624 cat >conftest.$ac_ext <<_ACEOF
12625/* confdefs.h. */
12626_ACEOF
12627cat confdefs.h >>conftest.$ac_ext
12628cat >>conftest.$ac_ext <<_ACEOF
12629/* end confdefs.h. */
12630$ac_includes_default
12631typedef uintptr_t ac__type_new_;
12632int
12633main ()
12634{
12635if ((ac__type_new_ *) 0)
12636 return 0;
12637if (sizeof (ac__type_new_))
12638 return 0;
12639 ;
12640 return 0;
12641}
12642_ACEOF
12643rm -f conftest.$ac_objext
12644if { (ac_try="$ac_compile"
12645case "(($ac_try" in
12646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12647 *) ac_try_echo=$ac_try;;
12648esac
12649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12650 (eval "$ac_compile") 2>conftest.er1
12651 ac_status=$?
12652 grep -v '^ *+' conftest.er1 >conftest.err
12653 rm -f conftest.er1
12654 cat conftest.err >&5
12655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12656 (exit $ac_status); } && {
12657 test -z "$ac_c_werror_flag" ||
12658 test ! -s conftest.err
12659 } && test -s conftest.$ac_objext; then
12660 ac_cv_type_uintptr_t=yes
12661else
12662 echo "$as_me: failed program was:" >&5
12663sed 's/^/| /' conftest.$ac_ext >&5
12664
12665 ac_cv_type_uintptr_t=no
12666fi
12667
12668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12669fi
12670{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12671echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12672
Martin v. Löwiseba40652007-08-30 20:10:57 +000012673# The cast to long int works around a bug in the HP C Compiler
12674# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12675# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12676# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012677{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12678echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012679if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012680 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012681else
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 if test "$cross_compiling" = yes; then
12683 # Depending upon the size, compute the lo and hi bounds.
12684cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012685/* confdefs.h. */
12686_ACEOF
12687cat confdefs.h >>conftest.$ac_ext
12688cat >>conftest.$ac_ext <<_ACEOF
12689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012690$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012691 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012692int
12693main ()
12694{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012695static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012696test_array [0] = 0
12697
12698 ;
12699 return 0;
12700}
12701_ACEOF
12702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012703if { (ac_try="$ac_compile"
12704case "(($ac_try" in
12705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12706 *) ac_try_echo=$ac_try;;
12707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012711 grep -v '^ *+' conftest.er1 >conftest.err
12712 rm -f conftest.er1
12713 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012715 (exit $ac_status); } && {
12716 test -z "$ac_c_werror_flag" ||
12717 test ! -s conftest.err
12718 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 ac_lo=0 ac_mid=0
12720 while :; do
12721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012722/* confdefs.h. */
12723_ACEOF
12724cat confdefs.h >>conftest.$ac_ext
12725cat >>conftest.$ac_ext <<_ACEOF
12726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012727$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012728 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012729int
12730main ()
12731{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012733test_array [0] = 0
12734
12735 ;
12736 return 0;
12737}
12738_ACEOF
12739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012740if { (ac_try="$ac_compile"
12741case "(($ac_try" in
12742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12743 *) ac_try_echo=$ac_try;;
12744esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012748 grep -v '^ *+' conftest.er1 >conftest.err
12749 rm -f conftest.er1
12750 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752 (exit $ac_status); } && {
12753 test -z "$ac_c_werror_flag" ||
12754 test ! -s conftest.err
12755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ac_hi=$ac_mid; break
12757else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012759sed 's/^/| /' conftest.$ac_ext >&5
12760
Martin v. Löwiseba40652007-08-30 20:10:57 +000012761 ac_lo=`expr $ac_mid + 1`
12762 if test $ac_lo -le $ac_mid; then
12763 ac_lo= ac_hi=
12764 break
12765 fi
12766 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012768
12769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 done
12771else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012773sed 's/^/| /' conftest.$ac_ext >&5
12774
Martin v. Löwiseba40652007-08-30 20:10:57 +000012775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012776/* confdefs.h. */
12777_ACEOF
12778cat confdefs.h >>conftest.$ac_ext
12779cat >>conftest.$ac_ext <<_ACEOF
12780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012781$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012782 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012783int
12784main ()
12785{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012786static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012787test_array [0] = 0
12788
12789 ;
12790 return 0;
12791}
12792_ACEOF
12793rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794if { (ac_try="$ac_compile"
12795case "(($ac_try" in
12796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12797 *) ac_try_echo=$ac_try;;
12798esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012802 grep -v '^ *+' conftest.er1 >conftest.err
12803 rm -f conftest.er1
12804 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012806 (exit $ac_status); } && {
12807 test -z "$ac_c_werror_flag" ||
12808 test ! -s conftest.err
12809 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 ac_hi=-1 ac_mid=-1
12811 while :; do
12812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012813/* confdefs.h. */
12814_ACEOF
12815cat confdefs.h >>conftest.$ac_ext
12816cat >>conftest.$ac_ext <<_ACEOF
12817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012818$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012819 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012820int
12821main ()
12822{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012824test_array [0] = 0
12825
12826 ;
12827 return 0;
12828}
12829_ACEOF
12830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012831if { (ac_try="$ac_compile"
12832case "(($ac_try" in
12833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12834 *) ac_try_echo=$ac_try;;
12835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012839 grep -v '^ *+' conftest.er1 >conftest.err
12840 rm -f conftest.er1
12841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012843 (exit $ac_status); } && {
12844 test -z "$ac_c_werror_flag" ||
12845 test ! -s conftest.err
12846 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 ac_lo=$ac_mid; break
12848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012850sed 's/^/| /' conftest.$ac_ext >&5
12851
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852 ac_hi=`expr '(' $ac_mid ')' - 1`
12853 if test $ac_mid -le $ac_hi; then
12854 ac_lo= ac_hi=
12855 break
12856 fi
12857 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012859
12860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 done
12862else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012864sed 's/^/| /' conftest.$ac_ext >&5
12865
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012868
12869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012871
12872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012873# Binary search between lo and hi bounds.
12874while test "x$ac_lo" != "x$ac_hi"; do
12875 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012877/* confdefs.h. */
12878_ACEOF
12879cat confdefs.h >>conftest.$ac_ext
12880cat >>conftest.$ac_ext <<_ACEOF
12881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012882$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012883 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012884int
12885main ()
12886{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012887static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012888test_array [0] = 0
12889
12890 ;
12891 return 0;
12892}
12893_ACEOF
12894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012895if { (ac_try="$ac_compile"
12896case "(($ac_try" in
12897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12898 *) ac_try_echo=$ac_try;;
12899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012903 grep -v '^ *+' conftest.er1 >conftest.err
12904 rm -f conftest.er1
12905 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012907 (exit $ac_status); } && {
12908 test -z "$ac_c_werror_flag" ||
12909 test ! -s conftest.err
12910 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 ac_hi=$ac_mid
12912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012914sed 's/^/| /' conftest.$ac_ext >&5
12915
Martin v. Löwiseba40652007-08-30 20:10:57 +000012916 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012918
12919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012920done
12921case $ac_lo in
12922?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012923'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012924 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012925See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012926echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012927See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012928 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012929 else
12930 ac_cv_sizeof_uintptr_t=0
12931 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012932esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012933else
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012935/* confdefs.h. */
12936_ACEOF
12937cat confdefs.h >>conftest.$ac_ext
12938cat >>conftest.$ac_ext <<_ACEOF
12939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012940$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012941 typedef uintptr_t ac__type_sizeof_;
12942static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12943static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012944#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012945#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012946int
12947main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012948{
Martin v. Löwis11437992002-04-12 09:54:03 +000012949
12950 FILE *f = fopen ("conftest.val", "w");
12951 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012952 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012953 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012955 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012956 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012957 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012958 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 }
12960 else
12961 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012962 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012963 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012964 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012965 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012967 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
12969 ;
12970 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012971}
Martin v. Löwis11437992002-04-12 09:54:03 +000012972_ACEOF
12973rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012974if { (ac_try="$ac_link"
12975case "(($ac_try" in
12976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12977 *) ac_try_echo=$ac_try;;
12978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012980 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012984 { (case "(($ac_try" in
12985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12986 *) ac_try_echo=$ac_try;;
12987esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012989 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 (exit $ac_status); }; }; then
12993 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012995 echo "$as_me: program exited with status $ac_status" >&5
12996echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012997sed 's/^/| /' conftest.$ac_ext >&5
12998
Martin v. Löwis11437992002-04-12 09:54:03 +000012999( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013000if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013001 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013002See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013003echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013004See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013005 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013006 else
13007 ac_cv_sizeof_uintptr_t=0
13008 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013011fi
13012rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013013fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013014{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13015echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013016
13017
13018
Martin v. Löwis11437992002-04-12 09:54:03 +000013019cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013020#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013021_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013022
Michael W. Hudson54241132001-12-07 15:38:26 +000013023
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013024fi
13025
Martin v. Löwisebe26702006-10-02 14:55:51 +000013026
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013027{ echo "$as_me:$LINENO: checking for off_t" >&5
13028echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13029if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013030 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013031else
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013033/* confdefs.h. */
13034_ACEOF
13035cat confdefs.h >>conftest.$ac_ext
13036cat >>conftest.$ac_ext <<_ACEOF
13037/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013038
13039#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013040#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013041#endif
13042
13043
13044typedef off_t ac__type_new_;
13045int
13046main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013047{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013048if ((ac__type_new_ *) 0)
13049 return 0;
13050if (sizeof (ac__type_new_))
13051 return 0;
13052 ;
13053 return 0;
13054}
13055_ACEOF
13056rm -f conftest.$ac_objext
13057if { (ac_try="$ac_compile"
13058case "(($ac_try" in
13059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13060 *) ac_try_echo=$ac_try;;
13061esac
13062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13063 (eval "$ac_compile") 2>conftest.er1
13064 ac_status=$?
13065 grep -v '^ *+' conftest.er1 >conftest.err
13066 rm -f conftest.er1
13067 cat conftest.err >&5
13068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13069 (exit $ac_status); } && {
13070 test -z "$ac_c_werror_flag" ||
13071 test ! -s conftest.err
13072 } && test -s conftest.$ac_objext; then
13073 ac_cv_type_off_t=yes
13074else
13075 echo "$as_me: failed program was:" >&5
13076sed 's/^/| /' conftest.$ac_ext >&5
13077
13078 ac_cv_type_off_t=no
13079fi
13080
13081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13082fi
13083{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13084echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13085
13086# The cast to long int works around a bug in the HP C Compiler
13087# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13088# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13089# This bug is HP SR number 8606223364.
13090{ echo "$as_me:$LINENO: checking size of off_t" >&5
13091echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13092if test "${ac_cv_sizeof_off_t+set}" = set; then
13093 echo $ECHO_N "(cached) $ECHO_C" >&6
13094else
13095 if test "$cross_compiling" = yes; then
13096 # Depending upon the size, compute the lo and hi bounds.
13097cat >conftest.$ac_ext <<_ACEOF
13098/* confdefs.h. */
13099_ACEOF
13100cat confdefs.h >>conftest.$ac_ext
13101cat >>conftest.$ac_ext <<_ACEOF
13102/* end confdefs.h. */
13103
13104#ifdef HAVE_SYS_TYPES_H
13105#include <sys/types.h>
13106#endif
13107
13108
13109 typedef off_t ac__type_sizeof_;
13110int
13111main ()
13112{
13113static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13114test_array [0] = 0
13115
13116 ;
13117 return 0;
13118}
13119_ACEOF
13120rm -f conftest.$ac_objext
13121if { (ac_try="$ac_compile"
13122case "(($ac_try" in
13123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13124 *) ac_try_echo=$ac_try;;
13125esac
13126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13127 (eval "$ac_compile") 2>conftest.er1
13128 ac_status=$?
13129 grep -v '^ *+' conftest.er1 >conftest.err
13130 rm -f conftest.er1
13131 cat conftest.err >&5
13132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13133 (exit $ac_status); } && {
13134 test -z "$ac_c_werror_flag" ||
13135 test ! -s conftest.err
13136 } && test -s conftest.$ac_objext; then
13137 ac_lo=0 ac_mid=0
13138 while :; do
13139 cat >conftest.$ac_ext <<_ACEOF
13140/* confdefs.h. */
13141_ACEOF
13142cat confdefs.h >>conftest.$ac_ext
13143cat >>conftest.$ac_ext <<_ACEOF
13144/* end confdefs.h. */
13145
13146#ifdef HAVE_SYS_TYPES_H
13147#include <sys/types.h>
13148#endif
13149
13150
13151 typedef off_t ac__type_sizeof_;
13152int
13153main ()
13154{
13155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13156test_array [0] = 0
13157
13158 ;
13159 return 0;
13160}
13161_ACEOF
13162rm -f conftest.$ac_objext
13163if { (ac_try="$ac_compile"
13164case "(($ac_try" in
13165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13166 *) ac_try_echo=$ac_try;;
13167esac
13168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13169 (eval "$ac_compile") 2>conftest.er1
13170 ac_status=$?
13171 grep -v '^ *+' conftest.er1 >conftest.err
13172 rm -f conftest.er1
13173 cat conftest.err >&5
13174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13175 (exit $ac_status); } && {
13176 test -z "$ac_c_werror_flag" ||
13177 test ! -s conftest.err
13178 } && test -s conftest.$ac_objext; then
13179 ac_hi=$ac_mid; break
13180else
13181 echo "$as_me: failed program was:" >&5
13182sed 's/^/| /' conftest.$ac_ext >&5
13183
13184 ac_lo=`expr $ac_mid + 1`
13185 if test $ac_lo -le $ac_mid; then
13186 ac_lo= ac_hi=
13187 break
13188 fi
13189 ac_mid=`expr 2 '*' $ac_mid + 1`
13190fi
13191
13192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13193 done
13194else
13195 echo "$as_me: failed program was:" >&5
13196sed 's/^/| /' conftest.$ac_ext >&5
13197
13198 cat >conftest.$ac_ext <<_ACEOF
13199/* confdefs.h. */
13200_ACEOF
13201cat confdefs.h >>conftest.$ac_ext
13202cat >>conftest.$ac_ext <<_ACEOF
13203/* end confdefs.h. */
13204
13205#ifdef HAVE_SYS_TYPES_H
13206#include <sys/types.h>
13207#endif
13208
13209
13210 typedef off_t ac__type_sizeof_;
13211int
13212main ()
13213{
13214static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13215test_array [0] = 0
13216
13217 ;
13218 return 0;
13219}
13220_ACEOF
13221rm -f conftest.$ac_objext
13222if { (ac_try="$ac_compile"
13223case "(($ac_try" in
13224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13225 *) ac_try_echo=$ac_try;;
13226esac
13227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13228 (eval "$ac_compile") 2>conftest.er1
13229 ac_status=$?
13230 grep -v '^ *+' conftest.er1 >conftest.err
13231 rm -f conftest.er1
13232 cat conftest.err >&5
13233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13234 (exit $ac_status); } && {
13235 test -z "$ac_c_werror_flag" ||
13236 test ! -s conftest.err
13237 } && test -s conftest.$ac_objext; then
13238 ac_hi=-1 ac_mid=-1
13239 while :; do
13240 cat >conftest.$ac_ext <<_ACEOF
13241/* confdefs.h. */
13242_ACEOF
13243cat confdefs.h >>conftest.$ac_ext
13244cat >>conftest.$ac_ext <<_ACEOF
13245/* end confdefs.h. */
13246
13247#ifdef HAVE_SYS_TYPES_H
13248#include <sys/types.h>
13249#endif
13250
13251
13252 typedef off_t ac__type_sizeof_;
13253int
13254main ()
13255{
13256static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13257test_array [0] = 0
13258
13259 ;
13260 return 0;
13261}
13262_ACEOF
13263rm -f conftest.$ac_objext
13264if { (ac_try="$ac_compile"
13265case "(($ac_try" in
13266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13267 *) ac_try_echo=$ac_try;;
13268esac
13269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13270 (eval "$ac_compile") 2>conftest.er1
13271 ac_status=$?
13272 grep -v '^ *+' conftest.er1 >conftest.err
13273 rm -f conftest.er1
13274 cat conftest.err >&5
13275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13276 (exit $ac_status); } && {
13277 test -z "$ac_c_werror_flag" ||
13278 test ! -s conftest.err
13279 } && test -s conftest.$ac_objext; then
13280 ac_lo=$ac_mid; break
13281else
13282 echo "$as_me: failed program was:" >&5
13283sed 's/^/| /' conftest.$ac_ext >&5
13284
13285 ac_hi=`expr '(' $ac_mid ')' - 1`
13286 if test $ac_mid -le $ac_hi; then
13287 ac_lo= ac_hi=
13288 break
13289 fi
13290 ac_mid=`expr 2 '*' $ac_mid`
13291fi
13292
13293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13294 done
13295else
13296 echo "$as_me: failed program was:" >&5
13297sed 's/^/| /' conftest.$ac_ext >&5
13298
13299 ac_lo= ac_hi=
13300fi
13301
13302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13303fi
13304
13305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13306# Binary search between lo and hi bounds.
13307while test "x$ac_lo" != "x$ac_hi"; do
13308 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13309 cat >conftest.$ac_ext <<_ACEOF
13310/* confdefs.h. */
13311_ACEOF
13312cat confdefs.h >>conftest.$ac_ext
13313cat >>conftest.$ac_ext <<_ACEOF
13314/* end confdefs.h. */
13315
13316#ifdef HAVE_SYS_TYPES_H
13317#include <sys/types.h>
13318#endif
13319
13320
13321 typedef off_t ac__type_sizeof_;
13322int
13323main ()
13324{
13325static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13326test_array [0] = 0
13327
13328 ;
13329 return 0;
13330}
13331_ACEOF
13332rm -f conftest.$ac_objext
13333if { (ac_try="$ac_compile"
13334case "(($ac_try" in
13335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13336 *) ac_try_echo=$ac_try;;
13337esac
13338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13339 (eval "$ac_compile") 2>conftest.er1
13340 ac_status=$?
13341 grep -v '^ *+' conftest.er1 >conftest.err
13342 rm -f conftest.er1
13343 cat conftest.err >&5
13344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13345 (exit $ac_status); } && {
13346 test -z "$ac_c_werror_flag" ||
13347 test ! -s conftest.err
13348 } && test -s conftest.$ac_objext; then
13349 ac_hi=$ac_mid
13350else
13351 echo "$as_me: failed program was:" >&5
13352sed 's/^/| /' conftest.$ac_ext >&5
13353
13354 ac_lo=`expr '(' $ac_mid ')' + 1`
13355fi
13356
13357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13358done
13359case $ac_lo in
13360?*) ac_cv_sizeof_off_t=$ac_lo;;
13361'') if test "$ac_cv_type_off_t" = yes; then
13362 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13363See \`config.log' for more details." >&5
13364echo "$as_me: error: cannot compute sizeof (off_t)
13365See \`config.log' for more details." >&2;}
13366 { (exit 77); exit 77; }; }
13367 else
13368 ac_cv_sizeof_off_t=0
13369 fi ;;
13370esac
13371else
13372 cat >conftest.$ac_ext <<_ACEOF
13373/* confdefs.h. */
13374_ACEOF
13375cat confdefs.h >>conftest.$ac_ext
13376cat >>conftest.$ac_ext <<_ACEOF
13377/* end confdefs.h. */
13378
13379#ifdef HAVE_SYS_TYPES_H
13380#include <sys/types.h>
13381#endif
13382
13383
13384 typedef off_t ac__type_sizeof_;
13385static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13386static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13387#include <stdio.h>
13388#include <stdlib.h>
13389int
13390main ()
13391{
13392
13393 FILE *f = fopen ("conftest.val", "w");
13394 if (! f)
13395 return 1;
13396 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13397 {
13398 long int i = longval ();
13399 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13400 return 1;
13401 fprintf (f, "%ld\n", i);
13402 }
13403 else
13404 {
13405 unsigned long int i = ulongval ();
13406 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13407 return 1;
13408 fprintf (f, "%lu\n", i);
13409 }
13410 return ferror (f) || fclose (f) != 0;
13411
13412 ;
13413 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013414}
Martin v. Löwis11437992002-04-12 09:54:03 +000013415_ACEOF
13416rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013417if { (ac_try="$ac_link"
13418case "(($ac_try" in
13419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13420 *) ac_try_echo=$ac_try;;
13421esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013427 { (case "(($ac_try" in
13428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13429 *) ac_try_echo=$ac_try;;
13430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013432 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013435 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013436 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013438 echo "$as_me: program exited with status $ac_status" >&5
13439echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013440sed 's/^/| /' conftest.$ac_ext >&5
13441
Martin v. Löwis11437992002-04-12 09:54:03 +000013442( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013443if test "$ac_cv_type_off_t" = yes; then
13444 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13445See \`config.log' for more details." >&5
13446echo "$as_me: error: cannot compute sizeof (off_t)
13447See \`config.log' for more details." >&2;}
13448 { (exit 77); exit 77; }; }
13449 else
13450 ac_cv_sizeof_off_t=0
13451 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013454fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013455rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013456fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013457{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13458echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013460
13461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013463#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013464_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013465
Michael W. Hudson54241132001-12-07 15:38:26 +000013466
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013467
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013468{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13469echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013470if test "$have_long_long" = yes
13471then
13472if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013473 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013474
Martin v. Löwis11437992002-04-12 09:54:03 +000013475cat >>confdefs.h <<\_ACEOF
13476#define HAVE_LARGEFILE_SUPPORT 1
13477_ACEOF
13478
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013479 { echo "$as_me:$LINENO: result: yes" >&5
13480echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013481else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013482 { echo "$as_me:$LINENO: result: no" >&5
13483echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013484fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013485else
13486 { echo "$as_me:$LINENO: result: no" >&5
13487echo "${ECHO_T}no" >&6; }
13488fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013489
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013490{ echo "$as_me:$LINENO: checking for time_t" >&5
13491echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13492if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013494else
Martin v. Löwis11437992002-04-12 09:54:03 +000013495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013496/* confdefs.h. */
13497_ACEOF
13498cat confdefs.h >>conftest.$ac_ext
13499cat >>conftest.$ac_ext <<_ACEOF
13500/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013501
13502#ifdef HAVE_SYS_TYPES_H
13503#include <sys/types.h>
13504#endif
13505#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013506#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013507#endif
13508
13509
13510typedef time_t ac__type_new_;
13511int
13512main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013513{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013514if ((ac__type_new_ *) 0)
13515 return 0;
13516if (sizeof (ac__type_new_))
13517 return 0;
13518 ;
13519 return 0;
13520}
13521_ACEOF
13522rm -f conftest.$ac_objext
13523if { (ac_try="$ac_compile"
13524case "(($ac_try" in
13525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13526 *) ac_try_echo=$ac_try;;
13527esac
13528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13529 (eval "$ac_compile") 2>conftest.er1
13530 ac_status=$?
13531 grep -v '^ *+' conftest.er1 >conftest.err
13532 rm -f conftest.er1
13533 cat conftest.err >&5
13534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13535 (exit $ac_status); } && {
13536 test -z "$ac_c_werror_flag" ||
13537 test ! -s conftest.err
13538 } && test -s conftest.$ac_objext; then
13539 ac_cv_type_time_t=yes
13540else
13541 echo "$as_me: failed program was:" >&5
13542sed 's/^/| /' conftest.$ac_ext >&5
13543
13544 ac_cv_type_time_t=no
13545fi
13546
13547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13548fi
13549{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13550echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13551
13552# The cast to long int works around a bug in the HP C Compiler
13553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13555# This bug is HP SR number 8606223364.
13556{ echo "$as_me:$LINENO: checking size of time_t" >&5
13557echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13558if test "${ac_cv_sizeof_time_t+set}" = set; then
13559 echo $ECHO_N "(cached) $ECHO_C" >&6
13560else
13561 if test "$cross_compiling" = yes; then
13562 # Depending upon the size, compute the lo and hi bounds.
13563cat >conftest.$ac_ext <<_ACEOF
13564/* confdefs.h. */
13565_ACEOF
13566cat confdefs.h >>conftest.$ac_ext
13567cat >>conftest.$ac_ext <<_ACEOF
13568/* end confdefs.h. */
13569
13570#ifdef HAVE_SYS_TYPES_H
13571#include <sys/types.h>
13572#endif
13573#ifdef HAVE_TIME_H
13574#include <time.h>
13575#endif
13576
13577
13578 typedef time_t ac__type_sizeof_;
13579int
13580main ()
13581{
13582static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13583test_array [0] = 0
13584
13585 ;
13586 return 0;
13587}
13588_ACEOF
13589rm -f conftest.$ac_objext
13590if { (ac_try="$ac_compile"
13591case "(($ac_try" in
13592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13593 *) ac_try_echo=$ac_try;;
13594esac
13595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13596 (eval "$ac_compile") 2>conftest.er1
13597 ac_status=$?
13598 grep -v '^ *+' conftest.er1 >conftest.err
13599 rm -f conftest.er1
13600 cat conftest.err >&5
13601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13602 (exit $ac_status); } && {
13603 test -z "$ac_c_werror_flag" ||
13604 test ! -s conftest.err
13605 } && test -s conftest.$ac_objext; then
13606 ac_lo=0 ac_mid=0
13607 while :; do
13608 cat >conftest.$ac_ext <<_ACEOF
13609/* confdefs.h. */
13610_ACEOF
13611cat confdefs.h >>conftest.$ac_ext
13612cat >>conftest.$ac_ext <<_ACEOF
13613/* end confdefs.h. */
13614
13615#ifdef HAVE_SYS_TYPES_H
13616#include <sys/types.h>
13617#endif
13618#ifdef HAVE_TIME_H
13619#include <time.h>
13620#endif
13621
13622
13623 typedef time_t ac__type_sizeof_;
13624int
13625main ()
13626{
13627static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13628test_array [0] = 0
13629
13630 ;
13631 return 0;
13632}
13633_ACEOF
13634rm -f conftest.$ac_objext
13635if { (ac_try="$ac_compile"
13636case "(($ac_try" in
13637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13638 *) ac_try_echo=$ac_try;;
13639esac
13640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13641 (eval "$ac_compile") 2>conftest.er1
13642 ac_status=$?
13643 grep -v '^ *+' conftest.er1 >conftest.err
13644 rm -f conftest.er1
13645 cat conftest.err >&5
13646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13647 (exit $ac_status); } && {
13648 test -z "$ac_c_werror_flag" ||
13649 test ! -s conftest.err
13650 } && test -s conftest.$ac_objext; then
13651 ac_hi=$ac_mid; break
13652else
13653 echo "$as_me: failed program was:" >&5
13654sed 's/^/| /' conftest.$ac_ext >&5
13655
13656 ac_lo=`expr $ac_mid + 1`
13657 if test $ac_lo -le $ac_mid; then
13658 ac_lo= ac_hi=
13659 break
13660 fi
13661 ac_mid=`expr 2 '*' $ac_mid + 1`
13662fi
13663
13664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13665 done
13666else
13667 echo "$as_me: failed program was:" >&5
13668sed 's/^/| /' conftest.$ac_ext >&5
13669
13670 cat >conftest.$ac_ext <<_ACEOF
13671/* confdefs.h. */
13672_ACEOF
13673cat confdefs.h >>conftest.$ac_ext
13674cat >>conftest.$ac_ext <<_ACEOF
13675/* end confdefs.h. */
13676
13677#ifdef HAVE_SYS_TYPES_H
13678#include <sys/types.h>
13679#endif
13680#ifdef HAVE_TIME_H
13681#include <time.h>
13682#endif
13683
13684
13685 typedef time_t ac__type_sizeof_;
13686int
13687main ()
13688{
13689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13690test_array [0] = 0
13691
13692 ;
13693 return 0;
13694}
13695_ACEOF
13696rm -f conftest.$ac_objext
13697if { (ac_try="$ac_compile"
13698case "(($ac_try" in
13699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13700 *) ac_try_echo=$ac_try;;
13701esac
13702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13703 (eval "$ac_compile") 2>conftest.er1
13704 ac_status=$?
13705 grep -v '^ *+' conftest.er1 >conftest.err
13706 rm -f conftest.er1
13707 cat conftest.err >&5
13708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13709 (exit $ac_status); } && {
13710 test -z "$ac_c_werror_flag" ||
13711 test ! -s conftest.err
13712 } && test -s conftest.$ac_objext; then
13713 ac_hi=-1 ac_mid=-1
13714 while :; do
13715 cat >conftest.$ac_ext <<_ACEOF
13716/* confdefs.h. */
13717_ACEOF
13718cat confdefs.h >>conftest.$ac_ext
13719cat >>conftest.$ac_ext <<_ACEOF
13720/* end confdefs.h. */
13721
13722#ifdef HAVE_SYS_TYPES_H
13723#include <sys/types.h>
13724#endif
13725#ifdef HAVE_TIME_H
13726#include <time.h>
13727#endif
13728
13729
13730 typedef time_t ac__type_sizeof_;
13731int
13732main ()
13733{
13734static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13735test_array [0] = 0
13736
13737 ;
13738 return 0;
13739}
13740_ACEOF
13741rm -f conftest.$ac_objext
13742if { (ac_try="$ac_compile"
13743case "(($ac_try" in
13744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13745 *) ac_try_echo=$ac_try;;
13746esac
13747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13748 (eval "$ac_compile") 2>conftest.er1
13749 ac_status=$?
13750 grep -v '^ *+' conftest.er1 >conftest.err
13751 rm -f conftest.er1
13752 cat conftest.err >&5
13753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13754 (exit $ac_status); } && {
13755 test -z "$ac_c_werror_flag" ||
13756 test ! -s conftest.err
13757 } && test -s conftest.$ac_objext; then
13758 ac_lo=$ac_mid; break
13759else
13760 echo "$as_me: failed program was:" >&5
13761sed 's/^/| /' conftest.$ac_ext >&5
13762
13763 ac_hi=`expr '(' $ac_mid ')' - 1`
13764 if test $ac_mid -le $ac_hi; then
13765 ac_lo= ac_hi=
13766 break
13767 fi
13768 ac_mid=`expr 2 '*' $ac_mid`
13769fi
13770
13771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13772 done
13773else
13774 echo "$as_me: failed program was:" >&5
13775sed 's/^/| /' conftest.$ac_ext >&5
13776
13777 ac_lo= ac_hi=
13778fi
13779
13780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13781fi
13782
13783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13784# Binary search between lo and hi bounds.
13785while test "x$ac_lo" != "x$ac_hi"; do
13786 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13787 cat >conftest.$ac_ext <<_ACEOF
13788/* confdefs.h. */
13789_ACEOF
13790cat confdefs.h >>conftest.$ac_ext
13791cat >>conftest.$ac_ext <<_ACEOF
13792/* end confdefs.h. */
13793
13794#ifdef HAVE_SYS_TYPES_H
13795#include <sys/types.h>
13796#endif
13797#ifdef HAVE_TIME_H
13798#include <time.h>
13799#endif
13800
13801
13802 typedef time_t ac__type_sizeof_;
13803int
13804main ()
13805{
13806static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13807test_array [0] = 0
13808
13809 ;
13810 return 0;
13811}
13812_ACEOF
13813rm -f conftest.$ac_objext
13814if { (ac_try="$ac_compile"
13815case "(($ac_try" in
13816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13817 *) ac_try_echo=$ac_try;;
13818esac
13819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13820 (eval "$ac_compile") 2>conftest.er1
13821 ac_status=$?
13822 grep -v '^ *+' conftest.er1 >conftest.err
13823 rm -f conftest.er1
13824 cat conftest.err >&5
13825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13826 (exit $ac_status); } && {
13827 test -z "$ac_c_werror_flag" ||
13828 test ! -s conftest.err
13829 } && test -s conftest.$ac_objext; then
13830 ac_hi=$ac_mid
13831else
13832 echo "$as_me: failed program was:" >&5
13833sed 's/^/| /' conftest.$ac_ext >&5
13834
13835 ac_lo=`expr '(' $ac_mid ')' + 1`
13836fi
13837
13838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13839done
13840case $ac_lo in
13841?*) ac_cv_sizeof_time_t=$ac_lo;;
13842'') if test "$ac_cv_type_time_t" = yes; then
13843 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13844See \`config.log' for more details." >&5
13845echo "$as_me: error: cannot compute sizeof (time_t)
13846See \`config.log' for more details." >&2;}
13847 { (exit 77); exit 77; }; }
13848 else
13849 ac_cv_sizeof_time_t=0
13850 fi ;;
13851esac
13852else
13853 cat >conftest.$ac_ext <<_ACEOF
13854/* confdefs.h. */
13855_ACEOF
13856cat confdefs.h >>conftest.$ac_ext
13857cat >>conftest.$ac_ext <<_ACEOF
13858/* end confdefs.h. */
13859
13860#ifdef HAVE_SYS_TYPES_H
13861#include <sys/types.h>
13862#endif
13863#ifdef HAVE_TIME_H
13864#include <time.h>
13865#endif
13866
13867
13868 typedef time_t ac__type_sizeof_;
13869static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13870static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13871#include <stdio.h>
13872#include <stdlib.h>
13873int
13874main ()
13875{
13876
13877 FILE *f = fopen ("conftest.val", "w");
13878 if (! f)
13879 return 1;
13880 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13881 {
13882 long int i = longval ();
13883 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13884 return 1;
13885 fprintf (f, "%ld\n", i);
13886 }
13887 else
13888 {
13889 unsigned long int i = ulongval ();
13890 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13891 return 1;
13892 fprintf (f, "%lu\n", i);
13893 }
13894 return ferror (f) || fclose (f) != 0;
13895
13896 ;
13897 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013898}
Martin v. Löwis11437992002-04-12 09:54:03 +000013899_ACEOF
13900rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901if { (ac_try="$ac_link"
13902case "(($ac_try" in
13903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13904 *) ac_try_echo=$ac_try;;
13905esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013907 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013911 { (case "(($ac_try" in
13912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13913 *) ac_try_echo=$ac_try;;
13914esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013916 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013920 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013922 echo "$as_me: program exited with status $ac_status" >&5
13923echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013924sed 's/^/| /' conftest.$ac_ext >&5
13925
Martin v. Löwis11437992002-04-12 09:54:03 +000013926( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013927if test "$ac_cv_type_time_t" = yes; then
13928 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13929See \`config.log' for more details." >&5
13930echo "$as_me: error: cannot compute sizeof (time_t)
13931See \`config.log' for more details." >&2;}
13932 { (exit 77); exit 77; }; }
13933 else
13934 ac_cv_sizeof_time_t=0
13935 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013937rm -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 +000013938fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013939rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013940fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013941{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13942echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013943
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013944
13945
Martin v. Löwis11437992002-04-12 09:54:03 +000013946cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013947#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013948_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013949
Michael W. Hudson54241132001-12-07 15:38:26 +000013950
13951
Trent Mick635f6fb2000-08-23 21:33:05 +000013952# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013953ac_save_cc="$CC"
13954if test "$ac_cv_kpthread" = "yes"
13955then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013956elif test "$ac_cv_kthread" = "yes"
13957then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013958elif test "$ac_cv_pthread" = "yes"
13959then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013960fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013961{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13962echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013963have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013965/* confdefs.h. */
13966_ACEOF
13967cat confdefs.h >>conftest.$ac_ext
13968cat >>conftest.$ac_ext <<_ACEOF
13969/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013970#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013971int
13972main ()
13973{
Guido van Rossum12580492000-09-24 16:47:19 +000013974pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 ;
13976 return 0;
13977}
13978_ACEOF
13979rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013980if { (ac_try="$ac_compile"
13981case "(($ac_try" in
13982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13983 *) ac_try_echo=$ac_try;;
13984esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013988 grep -v '^ *+' conftest.er1 >conftest.err
13989 rm -f conftest.er1
13990 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992 (exit $ac_status); } && {
13993 test -z "$ac_c_werror_flag" ||
13994 test ! -s conftest.err
13995 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013996 have_pthread_t=yes
13997else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013999sed 's/^/| /' conftest.$ac_ext >&5
14000
Martin v. Löwiseba40652007-08-30 20:10:57 +000014001
Trent Mick635f6fb2000-08-23 21:33:05 +000014002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014003
14004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014005{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14006echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014007if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014008 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14009echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14010if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014011 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014012else
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014014/* confdefs.h. */
14015_ACEOF
14016cat confdefs.h >>conftest.$ac_ext
14017cat >>conftest.$ac_ext <<_ACEOF
14018/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014019
14020#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014021#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014022#endif
14023
14024
14025typedef pthread_t ac__type_new_;
14026int
14027main ()
14028{
14029if ((ac__type_new_ *) 0)
14030 return 0;
14031if (sizeof (ac__type_new_))
14032 return 0;
14033 ;
14034 return 0;
14035}
14036_ACEOF
14037rm -f conftest.$ac_objext
14038if { (ac_try="$ac_compile"
14039case "(($ac_try" in
14040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14041 *) ac_try_echo=$ac_try;;
14042esac
14043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14044 (eval "$ac_compile") 2>conftest.er1
14045 ac_status=$?
14046 grep -v '^ *+' conftest.er1 >conftest.err
14047 rm -f conftest.er1
14048 cat conftest.err >&5
14049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14050 (exit $ac_status); } && {
14051 test -z "$ac_c_werror_flag" ||
14052 test ! -s conftest.err
14053 } && test -s conftest.$ac_objext; then
14054 ac_cv_type_pthread_t=yes
14055else
14056 echo "$as_me: failed program was:" >&5
14057sed 's/^/| /' conftest.$ac_ext >&5
14058
14059 ac_cv_type_pthread_t=no
14060fi
14061
14062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14063fi
14064{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14065echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14066
14067# The cast to long int works around a bug in the HP C Compiler
14068# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14069# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14070# This bug is HP SR number 8606223364.
14071{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14072echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14073if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14074 echo $ECHO_N "(cached) $ECHO_C" >&6
14075else
14076 if test "$cross_compiling" = yes; then
14077 # Depending upon the size, compute the lo and hi bounds.
14078cat >conftest.$ac_ext <<_ACEOF
14079/* confdefs.h. */
14080_ACEOF
14081cat confdefs.h >>conftest.$ac_ext
14082cat >>conftest.$ac_ext <<_ACEOF
14083/* end confdefs.h. */
14084
14085#ifdef HAVE_PTHREAD_H
14086#include <pthread.h>
14087#endif
14088
14089
14090 typedef pthread_t ac__type_sizeof_;
14091int
14092main ()
14093{
14094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14095test_array [0] = 0
14096
14097 ;
14098 return 0;
14099}
14100_ACEOF
14101rm -f conftest.$ac_objext
14102if { (ac_try="$ac_compile"
14103case "(($ac_try" in
14104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14105 *) ac_try_echo=$ac_try;;
14106esac
14107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14108 (eval "$ac_compile") 2>conftest.er1
14109 ac_status=$?
14110 grep -v '^ *+' conftest.er1 >conftest.err
14111 rm -f conftest.er1
14112 cat conftest.err >&5
14113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14114 (exit $ac_status); } && {
14115 test -z "$ac_c_werror_flag" ||
14116 test ! -s conftest.err
14117 } && test -s conftest.$ac_objext; then
14118 ac_lo=0 ac_mid=0
14119 while :; do
14120 cat >conftest.$ac_ext <<_ACEOF
14121/* confdefs.h. */
14122_ACEOF
14123cat confdefs.h >>conftest.$ac_ext
14124cat >>conftest.$ac_ext <<_ACEOF
14125/* end confdefs.h. */
14126
14127#ifdef HAVE_PTHREAD_H
14128#include <pthread.h>
14129#endif
14130
14131
14132 typedef pthread_t ac__type_sizeof_;
14133int
14134main ()
14135{
14136static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14137test_array [0] = 0
14138
14139 ;
14140 return 0;
14141}
14142_ACEOF
14143rm -f conftest.$ac_objext
14144if { (ac_try="$ac_compile"
14145case "(($ac_try" in
14146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14147 *) ac_try_echo=$ac_try;;
14148esac
14149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14150 (eval "$ac_compile") 2>conftest.er1
14151 ac_status=$?
14152 grep -v '^ *+' conftest.er1 >conftest.err
14153 rm -f conftest.er1
14154 cat conftest.err >&5
14155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14156 (exit $ac_status); } && {
14157 test -z "$ac_c_werror_flag" ||
14158 test ! -s conftest.err
14159 } && test -s conftest.$ac_objext; then
14160 ac_hi=$ac_mid; break
14161else
14162 echo "$as_me: failed program was:" >&5
14163sed 's/^/| /' conftest.$ac_ext >&5
14164
14165 ac_lo=`expr $ac_mid + 1`
14166 if test $ac_lo -le $ac_mid; then
14167 ac_lo= ac_hi=
14168 break
14169 fi
14170 ac_mid=`expr 2 '*' $ac_mid + 1`
14171fi
14172
14173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14174 done
14175else
14176 echo "$as_me: failed program was:" >&5
14177sed 's/^/| /' conftest.$ac_ext >&5
14178
14179 cat >conftest.$ac_ext <<_ACEOF
14180/* confdefs.h. */
14181_ACEOF
14182cat confdefs.h >>conftest.$ac_ext
14183cat >>conftest.$ac_ext <<_ACEOF
14184/* end confdefs.h. */
14185
14186#ifdef HAVE_PTHREAD_H
14187#include <pthread.h>
14188#endif
14189
14190
14191 typedef pthread_t ac__type_sizeof_;
14192int
14193main ()
14194{
14195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14196test_array [0] = 0
14197
14198 ;
14199 return 0;
14200}
14201_ACEOF
14202rm -f conftest.$ac_objext
14203if { (ac_try="$ac_compile"
14204case "(($ac_try" in
14205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14206 *) ac_try_echo=$ac_try;;
14207esac
14208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14209 (eval "$ac_compile") 2>conftest.er1
14210 ac_status=$?
14211 grep -v '^ *+' conftest.er1 >conftest.err
14212 rm -f conftest.er1
14213 cat conftest.err >&5
14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14215 (exit $ac_status); } && {
14216 test -z "$ac_c_werror_flag" ||
14217 test ! -s conftest.err
14218 } && test -s conftest.$ac_objext; then
14219 ac_hi=-1 ac_mid=-1
14220 while :; do
14221 cat >conftest.$ac_ext <<_ACEOF
14222/* confdefs.h. */
14223_ACEOF
14224cat confdefs.h >>conftest.$ac_ext
14225cat >>conftest.$ac_ext <<_ACEOF
14226/* end confdefs.h. */
14227
14228#ifdef HAVE_PTHREAD_H
14229#include <pthread.h>
14230#endif
14231
14232
14233 typedef pthread_t ac__type_sizeof_;
14234int
14235main ()
14236{
14237static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14238test_array [0] = 0
14239
14240 ;
14241 return 0;
14242}
14243_ACEOF
14244rm -f conftest.$ac_objext
14245if { (ac_try="$ac_compile"
14246case "(($ac_try" in
14247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14248 *) ac_try_echo=$ac_try;;
14249esac
14250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14251 (eval "$ac_compile") 2>conftest.er1
14252 ac_status=$?
14253 grep -v '^ *+' conftest.er1 >conftest.err
14254 rm -f conftest.er1
14255 cat conftest.err >&5
14256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14257 (exit $ac_status); } && {
14258 test -z "$ac_c_werror_flag" ||
14259 test ! -s conftest.err
14260 } && test -s conftest.$ac_objext; then
14261 ac_lo=$ac_mid; break
14262else
14263 echo "$as_me: failed program was:" >&5
14264sed 's/^/| /' conftest.$ac_ext >&5
14265
14266 ac_hi=`expr '(' $ac_mid ')' - 1`
14267 if test $ac_mid -le $ac_hi; then
14268 ac_lo= ac_hi=
14269 break
14270 fi
14271 ac_mid=`expr 2 '*' $ac_mid`
14272fi
14273
14274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14275 done
14276else
14277 echo "$as_me: failed program was:" >&5
14278sed 's/^/| /' conftest.$ac_ext >&5
14279
14280 ac_lo= ac_hi=
14281fi
14282
14283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14284fi
14285
14286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14287# Binary search between lo and hi bounds.
14288while test "x$ac_lo" != "x$ac_hi"; do
14289 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14290 cat >conftest.$ac_ext <<_ACEOF
14291/* confdefs.h. */
14292_ACEOF
14293cat confdefs.h >>conftest.$ac_ext
14294cat >>conftest.$ac_ext <<_ACEOF
14295/* end confdefs.h. */
14296
14297#ifdef HAVE_PTHREAD_H
14298#include <pthread.h>
14299#endif
14300
14301
14302 typedef pthread_t ac__type_sizeof_;
14303int
14304main ()
14305{
14306static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14307test_array [0] = 0
14308
14309 ;
14310 return 0;
14311}
14312_ACEOF
14313rm -f conftest.$ac_objext
14314if { (ac_try="$ac_compile"
14315case "(($ac_try" in
14316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14317 *) ac_try_echo=$ac_try;;
14318esac
14319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14320 (eval "$ac_compile") 2>conftest.er1
14321 ac_status=$?
14322 grep -v '^ *+' conftest.er1 >conftest.err
14323 rm -f conftest.er1
14324 cat conftest.err >&5
14325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14326 (exit $ac_status); } && {
14327 test -z "$ac_c_werror_flag" ||
14328 test ! -s conftest.err
14329 } && test -s conftest.$ac_objext; then
14330 ac_hi=$ac_mid
14331else
14332 echo "$as_me: failed program was:" >&5
14333sed 's/^/| /' conftest.$ac_ext >&5
14334
14335 ac_lo=`expr '(' $ac_mid ')' + 1`
14336fi
14337
14338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14339done
14340case $ac_lo in
14341?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14342'') if test "$ac_cv_type_pthread_t" = yes; then
14343 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14344See \`config.log' for more details." >&5
14345echo "$as_me: error: cannot compute sizeof (pthread_t)
14346See \`config.log' for more details." >&2;}
14347 { (exit 77); exit 77; }; }
14348 else
14349 ac_cv_sizeof_pthread_t=0
14350 fi ;;
14351esac
14352else
14353 cat >conftest.$ac_ext <<_ACEOF
14354/* confdefs.h. */
14355_ACEOF
14356cat confdefs.h >>conftest.$ac_ext
14357cat >>conftest.$ac_ext <<_ACEOF
14358/* end confdefs.h. */
14359
14360#ifdef HAVE_PTHREAD_H
14361#include <pthread.h>
14362#endif
14363
14364
14365 typedef pthread_t ac__type_sizeof_;
14366static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14367static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14368#include <stdio.h>
14369#include <stdlib.h>
14370int
14371main ()
14372{
14373
14374 FILE *f = fopen ("conftest.val", "w");
14375 if (! f)
14376 return 1;
14377 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14378 {
14379 long int i = longval ();
14380 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14381 return 1;
14382 fprintf (f, "%ld\n", i);
14383 }
14384 else
14385 {
14386 unsigned long int i = ulongval ();
14387 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14388 return 1;
14389 fprintf (f, "%lu\n", i);
14390 }
14391 return ferror (f) || fclose (f) != 0;
14392
14393 ;
14394 return 0;
14395}
Martin v. Löwis11437992002-04-12 09:54:03 +000014396_ACEOF
14397rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014398if { (ac_try="$ac_link"
14399case "(($ac_try" in
14400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14401 *) ac_try_echo=$ac_try;;
14402esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014404 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014408 { (case "(($ac_try" in
14409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14410 *) ac_try_echo=$ac_try;;
14411esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014413 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014414 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014416 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014417 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014419 echo "$as_me: program exited with status $ac_status" >&5
14420echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014421sed 's/^/| /' conftest.$ac_ext >&5
14422
Martin v. Löwis11437992002-04-12 09:54:03 +000014423( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014424if test "$ac_cv_type_pthread_t" = yes; then
14425 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14426See \`config.log' for more details." >&5
14427echo "$as_me: error: cannot compute sizeof (pthread_t)
14428See \`config.log' for more details." >&2;}
14429 { (exit 77); exit 77; }; }
14430 else
14431 ac_cv_sizeof_pthread_t=0
14432 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014434rm -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 +000014435fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014436rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014437fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014438{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014439echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014441
14442
Martin v. Löwis11437992002-04-12 09:54:03 +000014443cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014444#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014445_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014446
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014447
Trent Mick635f6fb2000-08-23 21:33:05 +000014448fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014449CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014450
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014451{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14452echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014453# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014454if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014455 enableval=$enable_toolbox_glue;
14456fi
Jack Jansene578a632001-08-15 01:27:14 +000014457
14458
14459if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014460then
Jack Jansene578a632001-08-15 01:27:14 +000014461 case $ac_sys_system/$ac_sys_release in
14462 Darwin/*)
14463 enable_toolbox_glue="yes";;
14464 *)
14465 enable_toolbox_glue="no";;
14466 esac
14467fi
14468case "$enable_toolbox_glue" in
14469yes)
Jack Jansene578a632001-08-15 01:27:14 +000014470 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014471 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014472
14473cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014474#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014475_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014476
14477 ;;
14478*)
Jack Jansene578a632001-08-15 01:27:14 +000014479 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014480 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014481 ;;
14482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014483{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14484echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014485
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014486
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014487
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014488case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014489 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014490 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14491 ;;
14492 Darwin/*)
14493 OTHER_LIBTOOL_OPT=""
14494 ;;
14495esac
14496
14497
Ronald Oussoren25967582009-09-06 10:00:26 +000014498ARCH_RUN_32BIT=""
14499
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014500case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014501 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014502 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14503 if test "${enable_universalsdk}"; then
14504 :
14505 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014506 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014507 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014508 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014509 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014510 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014511 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14512 if test ${gcc_version} '<' 4.0
14513 then
14514 LIBTOOL_CRUFT="-lcc_dynamic"
14515 else
14516 LIBTOOL_CRUFT=""
14517 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014518 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014519 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014520else
14521 cat >conftest.$ac_ext <<_ACEOF
14522/* confdefs.h. */
14523_ACEOF
14524cat confdefs.h >>conftest.$ac_ext
14525cat >>conftest.$ac_ext <<_ACEOF
14526/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014527
Ronald Oussoren25967582009-09-06 10:00:26 +000014528 #include <unistd.h>
14529 int main(int argc, char*argv[])
14530 {
14531 if (sizeof(long) == 4) {
14532 return 0;
14533 } else {
14534 return 1;
14535 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014536 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014537
Ronald Oussoren25967582009-09-06 10:00:26 +000014538_ACEOF
14539rm -f conftest$ac_exeext
14540if { (ac_try="$ac_link"
14541case "(($ac_try" in
14542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14543 *) ac_try_echo=$ac_try;;
14544esac
14545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14546 (eval "$ac_link") 2>&5
14547 ac_status=$?
14548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14549 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14550 { (case "(($ac_try" in
14551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14552 *) ac_try_echo=$ac_try;;
14553esac
14554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14555 (eval "$ac_try") 2>&5
14556 ac_status=$?
14557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14558 (exit $ac_status); }; }; then
14559 ac_osx_32bit=yes
14560else
14561 echo "$as_me: program exited with status $ac_status" >&5
14562echo "$as_me: failed program was:" >&5
14563sed 's/^/| /' conftest.$ac_ext >&5
14564
14565( exit $ac_status )
14566ac_osx_32bit=no
14567fi
14568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14569fi
14570
14571
14572
14573 if test "${ac_osx_32bit}" = "yes"; then
14574 case `arch` in
14575 i386)
14576 MACOSX_DEFAULT_ARCH="i386"
14577 ;;
14578 ppc)
14579 MACOSX_DEFAULT_ARCH="ppc"
14580 ;;
14581 *)
14582 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14583echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14584 { (exit 1); exit 1; }; }
14585 ;;
14586 esac
14587 else
14588 case `arch` in
14589 i386)
14590 MACOSX_DEFAULT_ARCH="x86_64"
14591 ;;
14592 ppc)
14593 MACOSX_DEFAULT_ARCH="ppc64"
14594 ;;
14595 *)
14596 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14597echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14598 { (exit 1); exit 1; }; }
14599 ;;
14600 esac
14601
14602 #ARCH_RUN_32BIT="true"
14603 fi
14604
14605 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014606 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014607 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014608esac
14609
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014610{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14611echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014612if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014613then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014614 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014615 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014616 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014617
Martin v. Löwis11437992002-04-12 09:54:03 +000014618cat >>confdefs.h <<\_ACEOF
14619#define WITH_NEXT_FRAMEWORK 1
14620_ACEOF
14621
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014622 { echo "$as_me:$LINENO: result: yes" >&5
14623echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014624 if test $enable_shared = "yes"
14625 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014626 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14627echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&2;}
Ronald Oussoren450d5612009-06-08 21:12:41 +000014628 { (exit 1); exit 1; }; }
14629 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014631 { echo "$as_me:$LINENO: result: no" >&5
14632echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014633fi
14634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014635{ echo "$as_me:$LINENO: checking for dyld" >&5
14636echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014637case $ac_sys_system/$ac_sys_release in
14638 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014639
Martin v. Löwis11437992002-04-12 09:54:03 +000014640cat >>confdefs.h <<\_ACEOF
14641#define WITH_DYLD 1
14642_ACEOF
14643
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014644 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14645echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014646 ;;
14647 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014648 { echo "$as_me:$LINENO: result: no" >&5
14649echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014650 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014651esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014652
Guido van Rossum0a516c91994-09-12 10:58:40 +000014653# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014654
Michael W. Hudson54241132001-12-07 15:38:26 +000014655
14656
14657
14658
Guido van Rossum0a516c91994-09-12 10:58:40 +000014659# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014660# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014661{ echo "$as_me:$LINENO: checking SO" >&5
14662echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014663if test -z "$SO"
14664then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014665 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014666 hp*|HP*)
14667 case `uname -m` in
14668 ia64) SO=.so;;
14669 *) SO=.sl;;
14670 esac
14671 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014672 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014673 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014674 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014675else
14676 # this might also be a termcap variable, see #610332
14677 echo
14678 echo '====================================================================='
14679 echo '+ +'
14680 echo '+ WARNING: You have set SO in your environment. +'
14681 echo '+ Do you really mean to change the extension for shared libraries? +'
14682 echo '+ Continuing in 10 seconds to let you to ponder. +'
14683 echo '+ +'
14684 echo '====================================================================='
14685 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014686fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014687{ echo "$as_me:$LINENO: result: $SO" >&5
14688echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014689
Ronald Oussoren79f90492009-01-02 10:44:46 +000014690
Neal Norwitz58e28882006-05-19 07:00:58 +000014691cat >>confdefs.h <<_ACEOF
14692#define SHLIB_EXT "$SO"
14693_ACEOF
14694
Guido van Rossum0a516c91994-09-12 10:58:40 +000014695# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014696# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014697# (Shared libraries in this instance are shared modules to be loaded into
14698# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014699{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14700echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014701if test -z "$LDSHARED"
14702then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014703 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014704 AIX*)
14705 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014706 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014707 ;;
14708 BeOS*)
14709 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014710 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014711 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014712 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014713 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014714 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014715 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014716 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014717 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014718 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014719 hp*|HP*)
14720 if test "$GCC" = "yes"
14721 then LDSHARED='$(CC) -shared'
14722 else LDSHARED='ld -b';
14723 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014724 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014725 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014726 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14727 if test "$enable_framework" ; then
14728 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014729 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14730 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014731 else
14732 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014733 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014734 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014735 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014736 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14737 if test "$enable_framework" ; then
14738 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014739 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14740 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014741 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014742 # No framework, use the Python app as bundle-loader
14743 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014744 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014745 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014746 Darwin/*)
14747 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14748 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014749
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014750 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014751 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014752 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014753 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014754 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014755 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14756 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014757 else
14758 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14759 if test "$enable_framework" ; then
14760 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014761 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14762 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014763 else
14764 # No framework, use the Python app as bundle-loader
14765 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14766 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14767 fi
14768 fi
14769 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014770 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014771 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014772 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014773 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014774 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014775 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014776 else
14777 LDSHARED="ld -Bshareable ${LDFLAGS}"
14778 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014779 OpenBSD*)
14780 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14781 then
14782 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14783 else
14784 case `uname -r` in
14785 [01].* | 2.[0-7] | 2.[0-7].*)
14786 LDSHARED="ld -Bshareable ${LDFLAGS}"
14787 ;;
14788 *)
14789 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14790 ;;
14791 esac
14792 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014793 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014794 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014795 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014796 then LDSHARED='$(CC) -shared'
14797 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014798 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014799 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014800 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014801 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014802 *) LDSHARED="ld";;
14803 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014804fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014805{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14806echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014807BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014808# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014809# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014810{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14811echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014812if test -z "$CCSHARED"
14813then
Guido van Rossum07397971997-04-29 21:49:50 +000014814 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014815 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014816 then CCSHARED="-fPIC";
14817 elif test `uname -p` = sparc;
14818 then CCSHARED="-xcode=pic32";
14819 else CCSHARED="-Kpic";
14820 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014821 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014822 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014823 else CCSHARED="+z";
14824 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014825 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014826 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014827 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014828 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014829 if test "$GCC" = "yes"
14830 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014831 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014832 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014833 SCO_SV*)
14834 if test "$GCC" = "yes"
14835 then CCSHARED="-fPIC"
14836 else CCSHARED="-Kpic -belf"
14837 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014838 IRIX*/6*) case $CC in
14839 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014840 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014841 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014842 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014843 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014844fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014845{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14846echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014847# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014848# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014849{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14850echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014851if test -z "$LINKFORSHARED"
14852then
Guido van Rossum07397971997-04-29 21:49:50 +000014853 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014854 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014855 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014856 LINKFORSHARED="-Wl,-E -Wl,+s";;
14857# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014858 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014859 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014860 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014862 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14863 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014864 # not used by the core itself but which needs to be in the core so
14865 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014866 # -prebind is no longer used, because it actually seems to give a
14867 # slowdown in stead of a speedup, maybe due to the large number of
14868 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014869
14870 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014871 if test "$enable_framework"
14872 then
Jack Jansenda49e192005-01-07 13:08:22 +000014873 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014874 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014875 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014876 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014877 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014878 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014879 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014880 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14881 then
14882 LINKFORSHARED="-Wl,--export-dynamic"
14883 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014884 SunOS/5*) case $CC in
14885 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014886 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014887 then
14888 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014889 fi;;
14890 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014891 CYGWIN*)
14892 if test $enable_shared = "no"
14893 then
14894 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14895 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014896 QNX*)
14897 # -Wl,-E causes the symbols to be added to the dynamic
14898 # symbol table so that they can be found when a module
14899 # is loaded. -N 2048K causes the stack size to be set
14900 # to 2048 kilobytes so that the stack doesn't overflow
14901 # when running test_compile.py.
14902 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014903 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014904fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014905{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14906echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014907
Michael W. Hudson54241132001-12-07 15:38:26 +000014908
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014909
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014910{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14911echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014912if test ! "$LIBRARY" = "$LDLIBRARY"
14913then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014914 case $ac_sys_system in
14915 CYGWIN*)
14916 # Cygwin needs CCSHARED when building extension DLLs
14917 # but not when building the interpreter DLL.
14918 CFLAGSFORSHARED='';;
14919 *)
14920 CFLAGSFORSHARED='$(CCSHARED)'
14921 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014922fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014923{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14924echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014925
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014926# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14927# library (with --enable-shared).
14928# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014929# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14930# if it is not required, since it creates a dependency of the shared library
14931# to LIBS. This, in turn, means that applications linking the shared libpython
14932# don't need to link LIBS explicitly. The default should be only changed
14933# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014934
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014935{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14936echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014937case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014938 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014939 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014941{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14942echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014943
14944
Guido van Rossum627b2d71993-12-24 10:39:16 +000014945# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014946
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014947{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14948echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014949if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014950 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014951else
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014953LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014954cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014955/* confdefs.h. */
14956_ACEOF
14957cat confdefs.h >>conftest.$ac_ext
14958cat >>conftest.$ac_ext <<_ACEOF
14959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014960
Martin v. Löwiseba40652007-08-30 20:10:57 +000014961/* Override any GCC internal prototype to avoid an error.
14962 Use char because int might match the return type of a GCC
14963 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014964#ifdef __cplusplus
14965extern "C"
14966#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014967char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014968int
14969main ()
14970{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 ;
14973 return 0;
14974}
14975_ACEOF
14976rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977if { (ac_try="$ac_link"
14978case "(($ac_try" in
14979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14980 *) ac_try_echo=$ac_try;;
14981esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014983 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014985 grep -v '^ *+' conftest.er1 >conftest.err
14986 rm -f conftest.er1
14987 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014989 (exit $ac_status); } && {
14990 test -z "$ac_c_werror_flag" ||
14991 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014992 } && test -s conftest$ac_exeext &&
14993 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014995else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014997sed 's/^/| /' conftest.$ac_ext >&5
14998
Martin v. Löwiseba40652007-08-30 20:10:57 +000014999 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015001
15002rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015004LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015005fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015006{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15007echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15008if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 cat >>confdefs.h <<_ACEOF
15010#define HAVE_LIBDL 1
15011_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015012
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015013 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015014
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015015fi
15016 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015018{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15019echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015020if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015021 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015022else
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015024LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015026/* confdefs.h. */
15027_ACEOF
15028cat confdefs.h >>conftest.$ac_ext
15029cat >>conftest.$ac_ext <<_ACEOF
15030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015031
Martin v. Löwiseba40652007-08-30 20:10:57 +000015032/* Override any GCC internal prototype to avoid an error.
15033 Use char because int might match the return type of a GCC
15034 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015035#ifdef __cplusplus
15036extern "C"
15037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015038char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015039int
15040main ()
15041{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015042return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ;
15044 return 0;
15045}
15046_ACEOF
15047rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048if { (ac_try="$ac_link"
15049case "(($ac_try" in
15050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15051 *) ac_try_echo=$ac_try;;
15052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015056 grep -v '^ *+' conftest.er1 >conftest.err
15057 rm -f conftest.er1
15058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015060 (exit $ac_status); } && {
15061 test -z "$ac_c_werror_flag" ||
15062 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015063 } && test -s conftest$ac_exeext &&
15064 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015065 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015066else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015068sed 's/^/| /' conftest.$ac_ext >&5
15069
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015072
15073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015075LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015076fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015077{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15078echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15079if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 cat >>confdefs.h <<_ACEOF
15081#define HAVE_LIBDLD 1
15082_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015083
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015084 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015085
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015086fi
15087 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015088
Ronald Oussoren79f90492009-01-02 10:44:46 +000015089# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015090if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015091 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15092echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015093if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015094 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015095else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015096 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015098/* confdefs.h. */
15099_ACEOF
15100cat confdefs.h >>conftest.$ac_ext
15101cat >>conftest.$ac_ext <<_ACEOF
15102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015103
Martin v. Löwiseba40652007-08-30 20:10:57 +000015104/* Override any GCC internal prototype to avoid an error.
15105 Use char because int might match the return type of a GCC
15106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015107#ifdef __cplusplus
15108extern "C"
15109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015110char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015111int
15112main ()
15113{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015114return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015115 ;
15116 return 0;
15117}
15118_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015119for ac_lib in '' pthread rt posix4; do
15120 if test -z "$ac_lib"; then
15121 ac_res="none required"
15122 else
15123 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125 fi
15126 rm -f conftest.$ac_objext conftest$ac_exeext
15127if { (ac_try="$ac_link"
15128case "(($ac_try" in
15129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15130 *) ac_try_echo=$ac_try;;
15131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015133 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015134 ac_status=$?
15135 grep -v '^ *+' conftest.er1 >conftest.err
15136 rm -f conftest.er1
15137 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015139 (exit $ac_status); } && {
15140 test -z "$ac_c_werror_flag" ||
15141 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015142 } && test -s conftest$ac_exeext &&
15143 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015145else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015146 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015147sed 's/^/| /' conftest.$ac_ext >&5
15148
Martin v. Löwiseba40652007-08-30 20:10:57 +000015149
Brett Cannon19fab762007-06-02 03:02:29 +000015150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015151
15152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15153 conftest$ac_exeext
15154 if test "${ac_cv_search_sem_init+set}" = set; then
15155 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015157done
15158if test "${ac_cv_search_sem_init+set}" = set; then
15159 :
15160else
15161 ac_cv_search_sem_init=no
15162fi
15163rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015164LIBS=$ac_func_search_save_LIBS
15165fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015166{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15167echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015168ac_res=$ac_cv_search_sem_init
15169if test "$ac_res" != no; then
15170 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015171
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015172fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015173 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015174 # posix4 on Solaris 2.6
15175 # pthread (first!) on Linux
15176fi
15177
Martin v. Löwis19d17342003-06-14 21:03:05 +000015178# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015179{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15180echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015181if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015182 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015183else
15184 ac_check_lib_save_LIBS=$LIBS
15185LIBS="-lintl $LIBS"
15186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015187/* confdefs.h. */
15188_ACEOF
15189cat confdefs.h >>conftest.$ac_ext
15190cat >>conftest.$ac_ext <<_ACEOF
15191/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015192
Martin v. Löwiseba40652007-08-30 20:10:57 +000015193/* Override any GCC internal prototype to avoid an error.
15194 Use char because int might match the return type of a GCC
15195 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015196#ifdef __cplusplus
15197extern "C"
15198#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015199char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015200int
15201main ()
15202{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015204 ;
15205 return 0;
15206}
15207_ACEOF
15208rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209if { (ac_try="$ac_link"
15210case "(($ac_try" in
15211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15212 *) ac_try_echo=$ac_try;;
15213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015217 grep -v '^ *+' conftest.er1 >conftest.err
15218 rm -f conftest.er1
15219 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015221 (exit $ac_status); } && {
15222 test -z "$ac_c_werror_flag" ||
15223 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015224 } && test -s conftest$ac_exeext &&
15225 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015226 ac_cv_lib_intl_textdomain=yes
15227else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015229sed 's/^/| /' conftest.$ac_ext >&5
15230
Martin v. Löwiseba40652007-08-30 20:10:57 +000015231 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015233
15234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015236LIBS=$ac_check_lib_save_LIBS
15237fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015238{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15239echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15240if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015241
15242cat >>confdefs.h <<\_ACEOF
15243#define WITH_LIBINTL 1
15244_ACEOF
15245
15246fi
15247
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015248
15249# checks for system dependent C++ extensions support
15250case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015251 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15252echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015254/* confdefs.h. */
15255_ACEOF
15256cat confdefs.h >>conftest.$ac_ext
15257cat >>conftest.$ac_ext <<_ACEOF
15258/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015259#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015260int
15261main ()
15262{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015263loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015264 ;
15265 return 0;
15266}
15267_ACEOF
15268rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269if { (ac_try="$ac_link"
15270case "(($ac_try" in
15271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15272 *) ac_try_echo=$ac_try;;
15273esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015277 grep -v '^ *+' conftest.er1 >conftest.err
15278 rm -f conftest.er1
15279 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015281 (exit $ac_status); } && {
15282 test -z "$ac_c_werror_flag" ||
15283 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015284 } && test -s conftest$ac_exeext &&
15285 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015286
Martin v. Löwis11437992002-04-12 09:54:03 +000015287cat >>confdefs.h <<\_ACEOF
15288#define AIX_GENUINE_CPLUSPLUS 1
15289_ACEOF
15290
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015291 { echo "$as_me:$LINENO: result: yes" >&5
15292echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015293else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015295sed 's/^/| /' conftest.$ac_ext >&5
15296
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015297 { echo "$as_me:$LINENO: result: no" >&5
15298echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300
15301rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015302 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015303 *) ;;
15304esac
15305
Guido van Rossum70c7f481998-03-26 18:44:10 +000015306# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015307# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015308{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15309echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015310if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015311 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015312else
Martin v. Löwis11437992002-04-12 09:54:03 +000015313 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015314LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015315cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015316/* confdefs.h. */
15317_ACEOF
15318cat confdefs.h >>conftest.$ac_ext
15319cat >>conftest.$ac_ext <<_ACEOF
15320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015321
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322/* Override any GCC internal prototype to avoid an error.
15323 Use char because int might match the return type of a GCC
15324 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015325#ifdef __cplusplus
15326extern "C"
15327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015328char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015329int
15330main ()
15331{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 ;
15334 return 0;
15335}
15336_ACEOF
15337rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338if { (ac_try="$ac_link"
15339case "(($ac_try" in
15340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15341 *) ac_try_echo=$ac_try;;
15342esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015346 grep -v '^ *+' conftest.er1 >conftest.err
15347 rm -f conftest.er1
15348 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015350 (exit $ac_status); } && {
15351 test -z "$ac_c_werror_flag" ||
15352 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015353 } && test -s conftest$ac_exeext &&
15354 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015356else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015358sed 's/^/| /' conftest.$ac_ext >&5
15359
Martin v. Löwiseba40652007-08-30 20:10:57 +000015360 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015362
15363rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015364 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015365LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015366fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015367{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15368echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15369if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015370 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015371fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015372 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015373{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15374echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015375if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015376 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015377else
Martin v. Löwis11437992002-04-12 09:54:03 +000015378 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015379LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015381/* confdefs.h. */
15382_ACEOF
15383cat confdefs.h >>conftest.$ac_ext
15384cat >>conftest.$ac_ext <<_ACEOF
15385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015386
Martin v. Löwiseba40652007-08-30 20:10:57 +000015387/* Override any GCC internal prototype to avoid an error.
15388 Use char because int might match the return type of a GCC
15389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015390#ifdef __cplusplus
15391extern "C"
15392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015393char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015394int
15395main ()
15396{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015398 ;
15399 return 0;
15400}
15401_ACEOF
15402rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403if { (ac_try="$ac_link"
15404case "(($ac_try" in
15405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15406 *) ac_try_echo=$ac_try;;
15407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015411 grep -v '^ *+' conftest.er1 >conftest.err
15412 rm -f conftest.er1
15413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015415 (exit $ac_status); } && {
15416 test -z "$ac_c_werror_flag" ||
15417 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015418 } && test -s conftest$ac_exeext &&
15419 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015420 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015421else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015423sed 's/^/| /' conftest.$ac_ext >&5
15424
Martin v. Löwiseba40652007-08-30 20:10:57 +000015425 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015427
15428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015429 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015430LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015431fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015432{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15433echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15434if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015435 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015436fi
15437 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015438
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015439case "$ac_sys_system" in
15440BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015441{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15442echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015443if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015444 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015445else
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015447LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015449/* confdefs.h. */
15450_ACEOF
15451cat confdefs.h >>conftest.$ac_ext
15452cat >>conftest.$ac_ext <<_ACEOF
15453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015454
Martin v. Löwiseba40652007-08-30 20:10:57 +000015455/* Override any GCC internal prototype to avoid an error.
15456 Use char because int might match the return type of a GCC
15457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015458#ifdef __cplusplus
15459extern "C"
15460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015461char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015462int
15463main ()
15464{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ;
15467 return 0;
15468}
15469_ACEOF
15470rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471if { (ac_try="$ac_link"
15472case "(($ac_try" in
15473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15474 *) ac_try_echo=$ac_try;;
15475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015477 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015479 grep -v '^ *+' conftest.er1 >conftest.err
15480 rm -f conftest.er1
15481 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483 (exit $ac_status); } && {
15484 test -z "$ac_c_werror_flag" ||
15485 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015486 } && test -s conftest$ac_exeext &&
15487 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015488 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015489else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015491sed 's/^/| /' conftest.$ac_ext >&5
15492
Martin v. Löwiseba40652007-08-30 20:10:57 +000015493 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015495
15496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015497 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015498LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015500{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15501echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15502if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015503 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015504fi
15505 # BeOS
15506;;
15507esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015509{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15510echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015511
Martin v. Löwiseba40652007-08-30 20:10:57 +000015512# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015513if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015514 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015515{ echo "$as_me:$LINENO: result: $withval" >&5
15516echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015517LIBS="$withval $LIBS"
15518
15519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015520 { echo "$as_me:$LINENO: result: no" >&5
15521echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015522fi
15523
Guido van Rossum7f43da71994-08-01 12:15:30 +000015524
Benjamin Peterson2c196742009-12-31 03:17:18 +000015525# Check for use of the system expat library
15526{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15527echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15528
15529# Check whether --with-system_expat was given.
15530if test "${with_system_expat+set}" = set; then
15531 withval=$with_system_expat;
15532fi
15533
15534
15535{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15536echo "${ECHO_T}$with_system_expat" >&6; }
15537
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015538# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015539{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15540echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015541
Martin v. Löwiseba40652007-08-30 20:10:57 +000015542# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015543if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015544 withval=$with_system_ffi;
15545fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015546
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015547
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015548if test "$with_system_ffi" = "yes"; then
15549 if test -n "$ac_tool_prefix"; then
15550 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15551set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15552{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15553echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15554if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15555 echo $ECHO_N "(cached) $ECHO_C" >&6
15556else
15557 case $PKG_CONFIG in
15558 [\\/]* | ?:[\\/]*)
15559 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15560 ;;
15561 *)
15562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15563for as_dir in $PATH
15564do
15565 IFS=$as_save_IFS
15566 test -z "$as_dir" && as_dir=.
15567 for ac_exec_ext in '' $ac_executable_extensions; do
15568 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15569 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15570 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15571 break 2
15572 fi
15573done
15574done
15575IFS=$as_save_IFS
15576
15577 ;;
15578esac
15579fi
15580PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15581if test -n "$PKG_CONFIG"; then
15582 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15583echo "${ECHO_T}$PKG_CONFIG" >&6; }
15584else
15585 { echo "$as_me:$LINENO: result: no" >&5
15586echo "${ECHO_T}no" >&6; }
15587fi
15588
15589
15590fi
15591if test -z "$ac_cv_path_PKG_CONFIG"; then
15592 ac_pt_PKG_CONFIG=$PKG_CONFIG
15593 # Extract the first word of "pkg-config", so it can be a program name with args.
15594set dummy pkg-config; ac_word=$2
15595{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15596echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15597if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15598 echo $ECHO_N "(cached) $ECHO_C" >&6
15599else
15600 case $ac_pt_PKG_CONFIG in
15601 [\\/]* | ?:[\\/]*)
15602 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15603 ;;
15604 *)
15605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15606for as_dir in $PATH
15607do
15608 IFS=$as_save_IFS
15609 test -z "$as_dir" && as_dir=.
15610 for ac_exec_ext in '' $ac_executable_extensions; do
15611 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15612 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15613 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15614 break 2
15615 fi
15616done
15617done
15618IFS=$as_save_IFS
15619
15620 ;;
15621esac
15622fi
15623ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15624if test -n "$ac_pt_PKG_CONFIG"; then
15625 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15626echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15627else
15628 { echo "$as_me:$LINENO: result: no" >&5
15629echo "${ECHO_T}no" >&6; }
15630fi
15631
15632 if test "x$ac_pt_PKG_CONFIG" = x; then
15633 PKG_CONFIG=""
15634 else
15635 case $cross_compiling:$ac_tool_warned in
15636yes:)
15637{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15638whose name does not start with the host triplet. If you think this
15639configuration is useful to you, please write to autoconf@gnu.org." >&5
15640echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15641whose name does not start with the host triplet. If you think this
15642configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15643ac_tool_warned=yes ;;
15644esac
15645 PKG_CONFIG=$ac_pt_PKG_CONFIG
15646 fi
15647else
15648 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15649fi
15650
15651 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15652else
15653 LIBFFI_INCLUDEDIR=""
15654fi
15655
15656
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015657{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15658echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015659
Benjamin Peterson867475c2009-04-29 20:36:25 +000015660# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015661{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15662echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015663
15664# Check whether --with-dbmliborder was given.
15665if test "${with_dbmliborder+set}" = set; then
15666 withval=$with_dbmliborder;
15667if test x$with_dbmliborder = xyes
15668then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015669{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15670echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015671 { (exit 1); exit 1; }; }
15672else
15673 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15674 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15675 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015676 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15677echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015678 { (exit 1); exit 1; }; }
15679 fi
15680 done
15681fi
15682fi
15683
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015684{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15685echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015686
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015687# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015688
15689
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015690{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15691echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015692
Martin v. Löwiseba40652007-08-30 20:10:57 +000015693# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015694if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015695 withval=$with_signal_module;
15696fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015697
15698
15699if test -z "$with_signal_module"
15700then with_signal_module="yes"
15701fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015702{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15703echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015704
15705if test "${with_signal_module}" = "yes"; then
15706 USE_SIGNAL_MODULE=""
15707 SIGNAL_OBJS=""
15708else
15709 USE_SIGNAL_MODULE="#"
15710 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15711fi
15712
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015713# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015714
Barry Warsawc0d24d82000-06-29 16:12:00 +000015715USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015716
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015717{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15718echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
Guido van Rossumec2f0731997-01-22 20:54:01 +000015720
Martin v. Löwiseba40652007-08-30 20:10:57 +000015721# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015722if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015723 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015724{ echo "$as_me:$LINENO: result: $withval" >&5
15725echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015726LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015727if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015728 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015729fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015730else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015731 { echo "$as_me:$LINENO: result: no" >&5
15732echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015733fi
15734
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
15736# Templates for things AC_DEFINEd more than once.
15737# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015738
15739
Martin v. Löwis11437992002-04-12 09:54:03 +000015740
15741
15742
15743
15744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015745{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15746echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015747
Martin v. Löwiseba40652007-08-30 20:10:57 +000015748# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015749if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015750 withval=$with_threads;
15751fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015752
15753
Barry Warsawc0d24d82000-06-29 16:12:00 +000015754# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015755
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015757if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015758 withval=$with_thread; with_threads=$with_thread
15759fi
15760
Barry Warsawc0d24d82000-06-29 16:12:00 +000015761
15762if test -z "$with_threads"
15763then with_threads="yes"
15764fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015765{ echo "$as_me:$LINENO: result: $with_threads" >&5
15766echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015767
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015768
Barry Warsawc0d24d82000-06-29 16:12:00 +000015769if test "$with_threads" = "no"
15770then
15771 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015772elif test "$ac_cv_pthread_is_default" = yes
15773then
Martin v. Löwis11437992002-04-12 09:54:03 +000015774 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015775#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015776_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015777
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015778 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015779 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015780#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015781_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015782
15783 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015784 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015785elif test "$ac_cv_kpthread" = "yes"
15786then
15787 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015788 if test "$ac_cv_cxx_thread" = "yes"; then
15789 CXX="$CXX -Kpthread"
15790 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015791 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015792#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015793_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015794
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015795 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015796 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015797elif test "$ac_cv_kthread" = "yes"
15798then
15799 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015800 if test "$ac_cv_cxx_thread" = "yes"; then
15801 CXX="$CXX -Kthread"
15802 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015803 cat >>confdefs.h <<\_ACEOF
15804#define WITH_THREAD 1
15805_ACEOF
15806
15807 posix_threads=yes
15808 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015809elif test "$ac_cv_pthread" = "yes"
15810then
15811 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015812 if test "$ac_cv_cxx_thread" = "yes"; then
15813 CXX="$CXX -pthread"
15814 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015815 cat >>confdefs.h <<\_ACEOF
15816#define WITH_THREAD 1
15817_ACEOF
15818
15819 posix_threads=yes
15820 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015821else
15822 if test ! -z "$with_threads" -a -d "$with_threads"
15823 then LDFLAGS="$LDFLAGS -L$with_threads"
15824 fi
15825 if test ! -z "$withval" -a -d "$withval"
15826 then LDFLAGS="$LDFLAGS -L$withval"
15827 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015828
15829 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015830 # define _POSIX_THREADS in unistd.h. Some apparently don't
15831 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015832 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15833echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015835/* confdefs.h. */
15836_ACEOF
15837cat confdefs.h >>conftest.$ac_ext
15838cat >>conftest.$ac_ext <<_ACEOF
15839/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015840
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015841#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015842#ifdef _POSIX_THREADS
15843yes
15844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015845
15846_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015848 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015849 unistd_defines_pthreads=yes
15850else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015851 unistd_defines_pthreads=no
15852fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000015853rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015854
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015855 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15856echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015857
Martin v. Löwis11437992002-04-12 09:54:03 +000015858 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015859#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015860_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015861
Martin v. Löwis11437992002-04-12 09:54:03 +000015862 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015863 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15864echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015865if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015866 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015867fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015868{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15869echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015870else
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015872{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15873echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015875/* confdefs.h. */
15876_ACEOF
15877cat confdefs.h >>conftest.$ac_ext
15878cat >>conftest.$ac_ext <<_ACEOF
15879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015880$ac_includes_default
15881#include <cthreads.h>
15882_ACEOF
15883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015884if { (ac_try="$ac_compile"
15885case "(($ac_try" in
15886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15887 *) ac_try_echo=$ac_try;;
15888esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015892 grep -v '^ *+' conftest.er1 >conftest.err
15893 rm -f conftest.er1
15894 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015896 (exit $ac_status); } && {
15897 test -z "$ac_c_werror_flag" ||
15898 test ! -s conftest.err
15899 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015900 ac_header_compiler=yes
15901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015903sed 's/^/| /' conftest.$ac_ext >&5
15904
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015907
15908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015909{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15910echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015911
15912# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015913{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15914echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015915cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015916/* confdefs.h. */
15917_ACEOF
15918cat confdefs.h >>conftest.$ac_ext
15919cat >>conftest.$ac_ext <<_ACEOF
15920/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015921#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015922_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015923if { (ac_try="$ac_cpp conftest.$ac_ext"
15924case "(($ac_try" in
15925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15926 *) ac_try_echo=$ac_try;;
15927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015929 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015930 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015931 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015932 rm -f conftest.er1
15933 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015935 (exit $ac_status); } >/dev/null && {
15936 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15937 test ! -s conftest.err
15938 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015939 ac_header_preproc=yes
15940else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015942sed 's/^/| /' conftest.$ac_ext >&5
15943
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015946
Martin v. Löwis11437992002-04-12 09:54:03 +000015947rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015948{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15949echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015950
15951# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015952case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15953 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015954 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15955echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15956 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15957echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015958 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015959 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015960 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015961 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15962echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15963 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15964echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15965 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15966echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15967 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15968echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15969 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15970echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15971 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15972echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015973 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015974## -------------------------------------- ##
15975## Report this to http://bugs.python.org/ ##
15976## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015977_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015978 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015979 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015980esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015981{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15982echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015983if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015984 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015985else
15986 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015987fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015988{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15989echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
15991fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015992if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015994#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015995_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015996
Martin v. Löwis11437992002-04-12 09:54:03 +000015997 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015998#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015999_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016000
Martin v. Löwis11437992002-04-12 09:54:03 +000016001
16002cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016003#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016004_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016005
16006 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016007 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016008else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016009
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016011 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16012echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016013if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016014 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016015fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016016{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16017echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016018else
Martin v. Löwis11437992002-04-12 09:54:03 +000016019 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016020{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16021echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016022cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016023/* confdefs.h. */
16024_ACEOF
16025cat confdefs.h >>conftest.$ac_ext
16026cat >>conftest.$ac_ext <<_ACEOF
16027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016028$ac_includes_default
16029#include <mach/cthreads.h>
16030_ACEOF
16031rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016032if { (ac_try="$ac_compile"
16033case "(($ac_try" in
16034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16035 *) ac_try_echo=$ac_try;;
16036esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016038 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016040 grep -v '^ *+' conftest.er1 >conftest.err
16041 rm -f conftest.er1
16042 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016044 (exit $ac_status); } && {
16045 test -z "$ac_c_werror_flag" ||
16046 test ! -s conftest.err
16047 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016048 ac_header_compiler=yes
16049else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016051sed 's/^/| /' conftest.$ac_ext >&5
16052
Martin v. Löwiseba40652007-08-30 20:10:57 +000016053 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016055
16056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016057{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16058echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016059
16060# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016061{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16062echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016063cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016064/* confdefs.h. */
16065_ACEOF
16066cat confdefs.h >>conftest.$ac_ext
16067cat >>conftest.$ac_ext <<_ACEOF
16068/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016069#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016070_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016071if { (ac_try="$ac_cpp conftest.$ac_ext"
16072case "(($ac_try" in
16073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16074 *) ac_try_echo=$ac_try;;
16075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016077 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016078 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016079 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 rm -f conftest.er1
16081 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016083 (exit $ac_status); } >/dev/null && {
16084 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16085 test ! -s conftest.err
16086 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016087 ac_header_preproc=yes
16088else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016090sed 's/^/| /' conftest.$ac_ext >&5
16091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016094
Martin v. Löwis11437992002-04-12 09:54:03 +000016095rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016096{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16097echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016098
16099# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016100case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16101 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016102 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16103echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16104 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16105echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016106 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016107 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016108 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016109 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16110echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16111 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16112echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16113 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16114echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16115 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16116echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16117 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16118echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16119 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16120echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016121 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016122## -------------------------------------- ##
16123## Report this to http://bugs.python.org/ ##
16124## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016125_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016126 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016127 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016128esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016129{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16130echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016131if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016132 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016133else
16134 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016135fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016136{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16137echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016138
16139fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016140if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016142#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016143_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016144
Martin v. Löwis11437992002-04-12 09:54:03 +000016145 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016146#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016147_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016148
Martin v. Löwis11437992002-04-12 09:54:03 +000016149
16150cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016151#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016152_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016153
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016154 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016155else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016156
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016157 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16158echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016159
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016161if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016162 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16163echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016164 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016165#define WITH_THREAD 1
16166_ACEOF
16167
16168
16169cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016170#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016171_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016172
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016173 LIBS="-lpth $LIBS"
16174 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016176 { echo "$as_me:$LINENO: result: no" >&5
16177echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016178
16179 # Just looking for pthread_create in libpthread is not enough:
16180 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16181 # So we really have to include pthread.h, and then link.
16182 _libs=$LIBS
16183 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016184 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16185echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016187/* confdefs.h. */
16188_ACEOF
16189cat confdefs.h >>conftest.$ac_ext
16190cat >>conftest.$ac_ext <<_ACEOF
16191/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016192#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016193
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016194void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016195int
16196main ()
16197{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016198
16199pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 ;
16201 return 0;
16202}
16203_ACEOF
16204rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016205if { (ac_try="$ac_link"
16206case "(($ac_try" in
16207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16208 *) ac_try_echo=$ac_try;;
16209esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016211 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016213 grep -v '^ *+' conftest.er1 >conftest.err
16214 rm -f conftest.er1
16215 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016217 (exit $ac_status); } && {
16218 test -z "$ac_c_werror_flag" ||
16219 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016220 } && test -s conftest$ac_exeext &&
16221 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016222
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016223 { echo "$as_me:$LINENO: result: yes" >&5
16224echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016225 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016226#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016227_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016228
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016229 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016230 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016231else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016233sed 's/^/| /' conftest.$ac_ext >&5
16234
Martin v. Löwis11437992002-04-12 09:54:03 +000016235
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016236 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016237 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16238echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016239if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016240 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016241else
Martin v. Löwis11437992002-04-12 09:54:03 +000016242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016243/* confdefs.h. */
16244_ACEOF
16245cat confdefs.h >>conftest.$ac_ext
16246cat >>conftest.$ac_ext <<_ACEOF
16247/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016248/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16249 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16250#define pthread_detach innocuous_pthread_detach
16251
Guido van Rossumad678af1998-10-02 14:42:15 +000016252/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016253 which can conflict with char pthread_detach (); below.
16254 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016255 <limits.h> exists even on freestanding compilers. */
16256
16257#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016258# include <limits.h>
16259#else
16260# include <assert.h>
16261#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016262
16263#undef pthread_detach
16264
Martin v. Löwiseba40652007-08-30 20:10:57 +000016265/* Override any GCC internal prototype to avoid an error.
16266 Use char because int might match the return type of a GCC
16267 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016268#ifdef __cplusplus
16269extern "C"
16270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016271char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016272/* The GNU C library defines this for functions which it implements
16273 to always fail with ENOSYS. Some functions are actually named
16274 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016275#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016276choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016277#endif
16278
Skip Montanaro6dead952003-09-25 14:50:04 +000016279int
16280main ()
16281{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016282return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016283 ;
16284 return 0;
16285}
16286_ACEOF
16287rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016288if { (ac_try="$ac_link"
16289case "(($ac_try" in
16290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16291 *) ac_try_echo=$ac_try;;
16292esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016294 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016296 grep -v '^ *+' conftest.er1 >conftest.err
16297 rm -f conftest.er1
16298 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016300 (exit $ac_status); } && {
16301 test -z "$ac_c_werror_flag" ||
16302 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016303 } && test -s conftest$ac_exeext &&
16304 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016305 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016306else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016308sed 's/^/| /' conftest.$ac_ext >&5
16309
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016312
16313rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016314 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016315fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016316{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16317echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16318if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016319 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016320#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016321_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016322
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016323 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016324 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016325else
Guido van Rossumad678af1998-10-02 14:42:15 +000016326
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016327 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016328 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16329echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016330if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016331 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016332fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016333{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16334echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016335else
16336 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016337{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16338echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016340/* confdefs.h. */
16341_ACEOF
16342cat confdefs.h >>conftest.$ac_ext
16343cat >>conftest.$ac_ext <<_ACEOF
16344/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016345$ac_includes_default
16346#include <atheos/threads.h>
16347_ACEOF
16348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016349if { (ac_try="$ac_compile"
16350case "(($ac_try" in
16351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16352 *) ac_try_echo=$ac_try;;
16353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016357 grep -v '^ *+' conftest.er1 >conftest.err
16358 rm -f conftest.er1
16359 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016361 (exit $ac_status); } && {
16362 test -z "$ac_c_werror_flag" ||
16363 test ! -s conftest.err
16364 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016365 ac_header_compiler=yes
16366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016368sed 's/^/| /' conftest.$ac_ext >&5
16369
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016372
16373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016374{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16375echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016376
16377# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016378{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16379echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016381/* confdefs.h. */
16382_ACEOF
16383cat confdefs.h >>conftest.$ac_ext
16384cat >>conftest.$ac_ext <<_ACEOF
16385/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016386#include <atheos/threads.h>
16387_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016388if { (ac_try="$ac_cpp conftest.$ac_ext"
16389case "(($ac_try" in
16390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16391 *) ac_try_echo=$ac_try;;
16392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016394 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016395 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016396 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016397 rm -f conftest.er1
16398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016400 (exit $ac_status); } >/dev/null && {
16401 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16402 test ! -s conftest.err
16403 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016404 ac_header_preproc=yes
16405else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016407sed 's/^/| /' conftest.$ac_ext >&5
16408
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016409 ac_header_preproc=no
16410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016411
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016412rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016413{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16414echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016415
16416# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016417case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16418 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016419 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16420echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16421 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16422echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016423 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016424 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016425 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016426 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16427echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16428 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16429echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16430 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16431echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16432 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16433echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16434 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16435echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16436 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16437echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016438 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016439## -------------------------------------- ##
16440## Report this to http://bugs.python.org/ ##
16441## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016442_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016443 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016444 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016445esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016446{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16447echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016448if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016449 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016450else
16451 ac_cv_header_atheos_threads_h=$ac_header_preproc
16452fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016453{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16454echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016455
16456fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016457if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016458 cat >>confdefs.h <<\_ACEOF
16459#define WITH_THREAD 1
16460_ACEOF
16461
16462
16463cat >>confdefs.h <<\_ACEOF
16464#define ATHEOS_THREADS 1
16465_ACEOF
16466
16467 THREADOBJ="Python/thread.o"
16468else
16469
Martin v. Löwis11437992002-04-12 09:54:03 +000016470 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016471 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16472echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016473if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016474 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016475fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016476{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16477echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016478else
Martin v. Löwis11437992002-04-12 09:54:03 +000016479 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016480{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16481echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016483/* confdefs.h. */
16484_ACEOF
16485cat confdefs.h >>conftest.$ac_ext
16486cat >>conftest.$ac_ext <<_ACEOF
16487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016488$ac_includes_default
16489#include <kernel/OS.h>
16490_ACEOF
16491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016492if { (ac_try="$ac_compile"
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_compile") 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
16507 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016508 ac_header_compiler=yes
16509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016511sed 's/^/| /' conftest.$ac_ext >&5
16512
Martin v. Löwiseba40652007-08-30 20:10:57 +000016513 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016515
16516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016517{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16518echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016519
16520# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016521{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16522echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016523cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016524/* confdefs.h. */
16525_ACEOF
16526cat confdefs.h >>conftest.$ac_ext
16527cat >>conftest.$ac_ext <<_ACEOF
16528/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016529#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016530_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016531if { (ac_try="$ac_cpp conftest.$ac_ext"
16532case "(($ac_try" in
16533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16534 *) ac_try_echo=$ac_try;;
16535esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016537 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016539 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016540 rm -f conftest.er1
16541 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016543 (exit $ac_status); } >/dev/null && {
16544 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16545 test ! -s conftest.err
16546 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 ac_header_preproc=yes
16548else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016550sed 's/^/| /' conftest.$ac_ext >&5
16551
Martin v. Löwis11437992002-04-12 09:54:03 +000016552 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016554
Martin v. Löwis11437992002-04-12 09:54:03 +000016555rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016556{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16557echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016558
Martin v. Löwis11437992002-04-12 09:54:03 +000016559# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016560case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16561 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016562 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16563echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16564 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16565echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016566 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016567 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016568 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016569 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16570echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16571 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16572echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16573 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16574echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16575 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16576echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16577 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16578echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16579 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16580echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016581 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016582## -------------------------------------- ##
16583## Report this to http://bugs.python.org/ ##
16584## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016585_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016587 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016588esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016589{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16590echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016591if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016592 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016593else
16594 ac_cv_header_kernel_OS_h=$ac_header_preproc
16595fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016596{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16597echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016598
16599fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016600if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016601 cat >>confdefs.h <<\_ACEOF
16602#define WITH_THREAD 1
16603_ACEOF
16604
16605
16606cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016607#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016608_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016609
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016610 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016611else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016612
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016613 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16614echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016615if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016616 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016617else
Martin v. Löwis11437992002-04-12 09:54:03 +000016618 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016619LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016621/* confdefs.h. */
16622_ACEOF
16623cat confdefs.h >>conftest.$ac_ext
16624cat >>conftest.$ac_ext <<_ACEOF
16625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016626
Martin v. Löwiseba40652007-08-30 20:10:57 +000016627/* Override any GCC internal prototype to avoid an error.
16628 Use char because int might match the return type of a GCC
16629 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016630#ifdef __cplusplus
16631extern "C"
16632#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016633char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016634int
16635main ()
16636{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016637return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016638 ;
16639 return 0;
16640}
16641_ACEOF
16642rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016643if { (ac_try="$ac_link"
16644case "(($ac_try" in
16645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16646 *) ac_try_echo=$ac_try;;
16647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016649 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016651 grep -v '^ *+' conftest.er1 >conftest.err
16652 rm -f conftest.er1
16653 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016655 (exit $ac_status); } && {
16656 test -z "$ac_c_werror_flag" ||
16657 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016658 } && test -s conftest$ac_exeext &&
16659 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016660 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016663sed 's/^/| /' conftest.$ac_ext >&5
16664
Martin v. Löwiseba40652007-08-30 20:10:57 +000016665 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016667
16668rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016670LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016671fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016672{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16673echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16674if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016675 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016676#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016677_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016678
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016679 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016680 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016681 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016682else
Greg Steinadf63d62000-07-05 10:38:09 +000016683
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016684 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16685echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016686if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016687 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016688else
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016690LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016692/* confdefs.h. */
16693_ACEOF
16694cat confdefs.h >>conftest.$ac_ext
16695cat >>conftest.$ac_ext <<_ACEOF
16696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016697
Martin v. Löwiseba40652007-08-30 20:10:57 +000016698/* Override any GCC internal prototype to avoid an error.
16699 Use char because int might match the return type of a GCC
16700 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016701#ifdef __cplusplus
16702extern "C"
16703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016704char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016705int
16706main ()
16707{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016708return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016709 ;
16710 return 0;
16711}
16712_ACEOF
16713rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016714if { (ac_try="$ac_link"
16715case "(($ac_try" in
16716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16717 *) ac_try_echo=$ac_try;;
16718esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016720 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016722 grep -v '^ *+' conftest.er1 >conftest.err
16723 rm -f conftest.er1
16724 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016726 (exit $ac_status); } && {
16727 test -z "$ac_c_werror_flag" ||
16728 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016729 } && test -s conftest$ac_exeext &&
16730 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016731 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016734sed 's/^/| /' conftest.$ac_ext >&5
16735
Martin v. Löwiseba40652007-08-30 20:10:57 +000016736 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016738
16739rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016740 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016741LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016742fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016743{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16744echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16745if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016747#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016748_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016749
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016750 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016751 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016752 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016753else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016754
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016755 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16756echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016757if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016759else
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016761LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016762cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016763/* confdefs.h. */
16764_ACEOF
16765cat confdefs.h >>conftest.$ac_ext
16766cat >>conftest.$ac_ext <<_ACEOF
16767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016768
Martin v. Löwiseba40652007-08-30 20:10:57 +000016769/* Override any GCC internal prototype to avoid an error.
16770 Use char because int might match the return type of a GCC
16771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016772#ifdef __cplusplus
16773extern "C"
16774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016775char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016776int
16777main ()
16778{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016779return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016780 ;
16781 return 0;
16782}
16783_ACEOF
16784rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016785if { (ac_try="$ac_link"
16786case "(($ac_try" in
16787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16788 *) ac_try_echo=$ac_try;;
16789esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016791 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016793 grep -v '^ *+' conftest.er1 >conftest.err
16794 rm -f conftest.er1
16795 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016797 (exit $ac_status); } && {
16798 test -z "$ac_c_werror_flag" ||
16799 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016800 } && test -s conftest$ac_exeext &&
16801 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016802 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016803else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016805sed 's/^/| /' conftest.$ac_ext >&5
16806
Martin v. Löwiseba40652007-08-30 20:10:57 +000016807 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016809
16810rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016811 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016812LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016813fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016814{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16815echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16816if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016817 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016818#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016819_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016820
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016821 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016822 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016823 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016824else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016825
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016826 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16827echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016828if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016829 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016830else
Martin v. Löwis11437992002-04-12 09:54:03 +000016831 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016832LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016834/* confdefs.h. */
16835_ACEOF
16836cat confdefs.h >>conftest.$ac_ext
16837cat >>conftest.$ac_ext <<_ACEOF
16838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016839
Martin v. Löwiseba40652007-08-30 20:10:57 +000016840/* Override any GCC internal prototype to avoid an error.
16841 Use char because int might match the return type of a GCC
16842 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016843#ifdef __cplusplus
16844extern "C"
16845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016846char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016847int
16848main ()
16849{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016850return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016851 ;
16852 return 0;
16853}
16854_ACEOF
16855rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016856if { (ac_try="$ac_link"
16857case "(($ac_try" in
16858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16859 *) ac_try_echo=$ac_try;;
16860esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016862 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016864 grep -v '^ *+' conftest.er1 >conftest.err
16865 rm -f conftest.er1
16866 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016868 (exit $ac_status); } && {
16869 test -z "$ac_c_werror_flag" ||
16870 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016871 } && test -s conftest$ac_exeext &&
16872 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016873 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016874else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016876sed 's/^/| /' conftest.$ac_ext >&5
16877
Martin v. Löwiseba40652007-08-30 20:10:57 +000016878 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016880
16881rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016883LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016884fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016885{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16886echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16887if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016888 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016889#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016890_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016891
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016892 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016893 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016894 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016895else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016896
Martin v. Löwis130fb172001-07-19 11:00:41 +000016897 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016898fi
16899
Guido van Rossum627b2d71993-12-24 10:39:16 +000016900
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016901fi
16902
Guido van Rossum0be3e491997-05-22 20:33:33 +000016903fi
16904
Guido van Rossum49545951997-12-02 19:28:29 +000016905fi
16906
Guido van Rossumb93a8621998-05-07 13:27:32 +000016907fi
16908
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016909
Michael W. Hudson54241132001-12-07 15:38:26 +000016910fi
16911
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016912
16913fi
16914
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016916
16917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016919fi
16920
Martin v. Löwis11437992002-04-12 09:54:03 +000016921fi
16922
16923
16924fi
16925
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016926
Michael W. Hudson54241132001-12-07 15:38:26 +000016927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016928 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16929echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016930if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016932else
Martin v. Löwis11437992002-04-12 09:54:03 +000016933 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016934LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016936/* confdefs.h. */
16937_ACEOF
16938cat confdefs.h >>conftest.$ac_ext
16939cat >>conftest.$ac_ext <<_ACEOF
16940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016941
Martin v. Löwiseba40652007-08-30 20:10:57 +000016942/* Override any GCC internal prototype to avoid an error.
16943 Use char because int might match the return type of a GCC
16944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016945#ifdef __cplusplus
16946extern "C"
16947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016948char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016949int
16950main ()
16951{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016952return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016953 ;
16954 return 0;
16955}
16956_ACEOF
16957rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016958if { (ac_try="$ac_link"
16959case "(($ac_try" in
16960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16961 *) ac_try_echo=$ac_try;;
16962esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016964 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016966 grep -v '^ *+' conftest.er1 >conftest.err
16967 rm -f conftest.er1
16968 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970 (exit $ac_status); } && {
16971 test -z "$ac_c_werror_flag" ||
16972 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016973 } && test -s conftest$ac_exeext &&
16974 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016975 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016976else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016978sed 's/^/| /' conftest.$ac_ext >&5
16979
Martin v. Löwiseba40652007-08-30 20:10:57 +000016980 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016982
16983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016984 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016985LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016986fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016987{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16988echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16989if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016990 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016991#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016992_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016993
Martin v. Löwis130fb172001-07-19 11:00:41 +000016994 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016995 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016996 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016997fi
16998
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016999
Neal Norwitza978ab02002-11-02 16:58:05 +000017000 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017001 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17002echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017003if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017005else
Martin v. Löwis11437992002-04-12 09:54:03 +000017006 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017007LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017008cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017009/* confdefs.h. */
17010_ACEOF
17011cat confdefs.h >>conftest.$ac_ext
17012cat >>conftest.$ac_ext <<_ACEOF
17013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017014
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015/* Override any GCC internal prototype to avoid an error.
17016 Use char because int might match the return type of a GCC
17017 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017018#ifdef __cplusplus
17019extern "C"
17020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017021char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017022int
17023main ()
17024{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017025return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017026 ;
17027 return 0;
17028}
17029_ACEOF
17030rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017031if { (ac_try="$ac_link"
17032case "(($ac_try" in
17033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17034 *) ac_try_echo=$ac_try;;
17035esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017037 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017039 grep -v '^ *+' conftest.er1 >conftest.err
17040 rm -f conftest.er1
17041 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017043 (exit $ac_status); } && {
17044 test -z "$ac_c_werror_flag" ||
17045 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017046 } && test -s conftest$ac_exeext &&
17047 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017048 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017049else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017051sed 's/^/| /' conftest.$ac_ext >&5
17052
Martin v. Löwiseba40652007-08-30 20:10:57 +000017053 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017055
17056rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017057 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017058LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017059fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017060{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17061echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17062if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017063 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017064#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017065_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017066
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017067 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017068 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017069 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017070fi
17071
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017072 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017073
Martin v. Löwis130fb172001-07-19 11:00:41 +000017074 if test "$USE_THREAD_MODULE" != "#"
17075 then
17076 # If the above checks didn't disable threads, (at least) OSF1
17077 # needs this '-threads' argument during linking.
17078 case $ac_sys_system in
17079 OSF1) LDLAST=-threads;;
17080 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017081 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017082fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017083
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017084if test "$posix_threads" = "yes"; then
17085 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017086
17087cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017088#define _POSIX_THREADS 1
17089_ACEOF
17090
17091 fi
17092
17093 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17094 case $ac_sys_system/$ac_sys_release in
17095 SunOS/5.6)
17096cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017097#define HAVE_PTHREAD_DESTRUCTOR 1
17098_ACEOF
17099
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017100 ;;
17101 SunOS/5.8)
17102cat >>confdefs.h <<\_ACEOF
17103#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17104_ACEOF
17105
17106 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017107 AIX/5)
17108cat >>confdefs.h <<\_ACEOF
17109#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17110_ACEOF
17111
17112 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017113 esac
17114
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017115 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17116echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017117 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017118 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017119else
17120 if test "$cross_compiling" = yes; then
17121 ac_cv_pthread_system_supported=no
17122else
17123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017124/* confdefs.h. */
17125_ACEOF
17126cat confdefs.h >>conftest.$ac_ext
17127cat >>conftest.$ac_ext <<_ACEOF
17128/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017129#include <pthread.h>
17130 void *foo(void *parm) {
17131 return NULL;
17132 }
17133 main() {
17134 pthread_attr_t attr;
17135 pthread_t id;
17136 if (pthread_attr_init(&attr)) exit(-1);
17137 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17138 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17139 exit(0);
17140 }
17141_ACEOF
17142rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017143if { (ac_try="$ac_link"
17144case "(($ac_try" in
17145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17146 *) ac_try_echo=$ac_try;;
17147esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017149 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017150 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017152 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017153 { (case "(($ac_try" in
17154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17155 *) ac_try_echo=$ac_try;;
17156esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017158 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017159 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017161 (exit $ac_status); }; }; then
17162 ac_cv_pthread_system_supported=yes
17163else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017164 echo "$as_me: program exited with status $ac_status" >&5
17165echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017166sed 's/^/| /' conftest.$ac_ext >&5
17167
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017168( exit $ac_status )
17169ac_cv_pthread_system_supported=no
17170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017171rm -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 +000017172fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017173
Martin v. Löwiseba40652007-08-30 20:10:57 +000017174
17175
Guido van Rossum627b2d71993-12-24 10:39:16 +000017176fi
17177
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017178 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17179echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017180 if test "$ac_cv_pthread_system_supported" = "yes"; then
17181
17182cat >>confdefs.h <<\_ACEOF
17183#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17184_ACEOF
17185
17186 fi
17187
17188for ac_func in pthread_sigmask
17189do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017190as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17191{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17192echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017193if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017194 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017195else
17196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017197/* confdefs.h. */
17198_ACEOF
17199cat confdefs.h >>conftest.$ac_ext
17200cat >>conftest.$ac_ext <<_ACEOF
17201/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017202/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17203 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17204#define $ac_func innocuous_$ac_func
17205
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017206/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017207 which can conflict with char $ac_func (); below.
17208 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017209 <limits.h> exists even on freestanding compilers. */
17210
17211#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017212# include <limits.h>
17213#else
17214# include <assert.h>
17215#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017216
17217#undef $ac_func
17218
Martin v. Löwiseba40652007-08-30 20:10:57 +000017219/* Override any GCC internal prototype to avoid an error.
17220 Use char because int might match the return type of a GCC
17221 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017222#ifdef __cplusplus
17223extern "C"
17224#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017225char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017226/* The GNU C library defines this for functions which it implements
17227 to always fail with ENOSYS. Some functions are actually named
17228 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017229#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017230choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017231#endif
17232
Skip Montanaro6dead952003-09-25 14:50:04 +000017233int
17234main ()
17235{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017236return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017237 ;
17238 return 0;
17239}
17240_ACEOF
17241rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017242if { (ac_try="$ac_link"
17243case "(($ac_try" in
17244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17245 *) ac_try_echo=$ac_try;;
17246esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017250 grep -v '^ *+' conftest.er1 >conftest.err
17251 rm -f conftest.er1
17252 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017254 (exit $ac_status); } && {
17255 test -z "$ac_c_werror_flag" ||
17256 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017257 } && test -s conftest$ac_exeext &&
17258 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017259 eval "$as_ac_var=yes"
17260else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017262sed 's/^/| /' conftest.$ac_ext >&5
17263
Martin v. Löwiseba40652007-08-30 20:10:57 +000017264 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017266
17267rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017268 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017269fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017270ac_res=`eval echo '${'$as_ac_var'}'`
17271 { echo "$as_me:$LINENO: result: $ac_res" >&5
17272echo "${ECHO_T}$ac_res" >&6; }
17273if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017274 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017275#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017276_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017277 case $ac_sys_system in
17278 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017279
Jason Tishlerfac083d2003-07-22 15:20:49 +000017280cat >>confdefs.h <<\_ACEOF
17281#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17282_ACEOF
17283
17284 ;;
17285 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017286fi
17287done
17288
17289fi
17290
17291
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017292# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017293
17294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017295{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17296echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017297# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017298if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017299 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017300 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017301 { echo "$as_me:$LINENO: result: no" >&5
17302echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017303 ipv6=no
17304 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017305 *) { echo "$as_me:$LINENO: result: yes" >&5
17306echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017307 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017308#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017309_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017310
17311 ipv6=yes
17312 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017313 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017314else
Martin v. Löwis11437992002-04-12 09:54:03 +000017315
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017316 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017317 { echo "$as_me:$LINENO: result: no" >&5
17318echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017319 ipv6=no
17320
17321else
Martin v. Löwis11437992002-04-12 09:54:03 +000017322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017323/* confdefs.h. */
17324_ACEOF
17325cat confdefs.h >>conftest.$ac_ext
17326cat >>conftest.$ac_ext <<_ACEOF
17327/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017328 /* AF_INET6 available check */
17329#include <sys/types.h>
17330#include <sys/socket.h>
17331main()
17332{
17333 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17334 exit(1);
17335 else
17336 exit(0);
17337}
17338
Martin v. Löwis11437992002-04-12 09:54:03 +000017339_ACEOF
17340rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017341if { (ac_try="$ac_link"
17342case "(($ac_try" in
17343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17344 *) ac_try_echo=$ac_try;;
17345esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017347 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017348 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017350 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017351 { (case "(($ac_try" in
17352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17353 *) ac_try_echo=$ac_try;;
17354esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017356 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017357 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017359 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017360 { echo "$as_me:$LINENO: result: yes" >&5
17361echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017362 ipv6=yes
17363else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017364 echo "$as_me: program exited with status $ac_status" >&5
17365echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017366sed 's/^/| /' conftest.$ac_ext >&5
17367
Martin v. Löwis11437992002-04-12 09:54:03 +000017368( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017369{ echo "$as_me:$LINENO: result: no" >&5
17370echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017371 ipv6=no
17372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017373rm -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 +000017374fi
17375
Martin v. Löwiseba40652007-08-30 20:10:57 +000017376
17377
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017378if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017379 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17380echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017382/* confdefs.h. */
17383_ACEOF
17384cat confdefs.h >>conftest.$ac_ext
17385cat >>conftest.$ac_ext <<_ACEOF
17386/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017387#include <sys/types.h>
17388#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017389int
17390main ()
17391{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017392struct sockaddr_in6 x;
17393x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017394 ;
17395 return 0;
17396}
17397_ACEOF
17398rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017399if { (ac_try="$ac_compile"
17400case "(($ac_try" in
17401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17402 *) ac_try_echo=$ac_try;;
17403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017407 grep -v '^ *+' conftest.er1 >conftest.err
17408 rm -f conftest.er1
17409 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017411 (exit $ac_status); } && {
17412 test -z "$ac_c_werror_flag" ||
17413 test ! -s conftest.err
17414 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017415 { echo "$as_me:$LINENO: result: yes" >&5
17416echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017417 ipv6=yes
17418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017420sed 's/^/| /' conftest.$ac_ext >&5
17421
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017422 { echo "$as_me:$LINENO: result: no" >&5
17423echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017424 ipv6=no
17425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017426
17427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017428fi
17429
17430if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017431 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017432#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017433_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017434
17435fi
17436
Martin v. Löwiseba40652007-08-30 20:10:57 +000017437fi
17438
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017439
17440ipv6type=unknown
17441ipv6lib=none
17442ipv6trylibc=no
17443
17444if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017445 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17446echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017447 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17448 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017449 case $i in
17450 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017452/* confdefs.h. */
17453_ACEOF
17454cat confdefs.h >>conftest.$ac_ext
17455cat >>conftest.$ac_ext <<_ACEOF
17456/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017457
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017458#include <netinet/in.h>
17459#ifdef IPV6_INRIA_VERSION
17460yes
17461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017462_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017464 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017465 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017466fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017467rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017468
17469 ;;
17470 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017472/* confdefs.h. */
17473_ACEOF
17474cat confdefs.h >>conftest.$ac_ext
17475cat >>conftest.$ac_ext <<_ACEOF
17476/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017477
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017478#include <netinet/in.h>
17479#ifdef __KAME__
17480yes
17481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017482_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017484 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017485 ipv6type=$i;
17486 ipv6lib=inet6
17487 ipv6libdir=/usr/local/v6/lib
17488 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017489fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017490rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017491
17492 ;;
17493 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017495/* confdefs.h. */
17496_ACEOF
17497cat confdefs.h >>conftest.$ac_ext
17498cat >>conftest.$ac_ext <<_ACEOF
17499/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017500
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017501#include <features.h>
17502#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17503yes
17504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017505_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017507 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017508 ipv6type=$i;
17509 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017510fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017511rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017512
17513 ;;
17514 linux-inet6)
17515 if test -d /usr/inet6; then
17516 ipv6type=$i
17517 ipv6lib=inet6
17518 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017519 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017520 fi
17521 ;;
17522 solaris)
17523 if test -f /etc/netconfig; then
17524 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17525 ipv6type=$i
17526 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017527 fi
17528 fi
17529 ;;
17530 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017532/* confdefs.h. */
17533_ACEOF
17534cat confdefs.h >>conftest.$ac_ext
17535cat >>conftest.$ac_ext <<_ACEOF
17536/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017537
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017538#include <sys/param.h>
17539#ifdef _TOSHIBA_INET6
17540yes
17541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017542_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017544 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017545 ipv6type=$i;
17546 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017547 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017548fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017549rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017550
17551 ;;
17552 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017554/* confdefs.h. */
17555_ACEOF
17556cat confdefs.h >>conftest.$ac_ext
17557cat >>conftest.$ac_ext <<_ACEOF
17558/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017559
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017560#include </usr/local/v6/include/sys/v6config.h>
17561#ifdef __V6D__
17562yes
17563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017564_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017566 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017567 ipv6type=$i;
17568 ipv6lib=v6;
17569 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017570 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017571fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017572rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017573
17574 ;;
17575 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017577/* confdefs.h. */
17578_ACEOF
17579cat confdefs.h >>conftest.$ac_ext
17580cat >>conftest.$ac_ext <<_ACEOF
17581/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017582
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017583#include <sys/param.h>
17584#ifdef _ZETA_MINAMI_INET6
17585yes
17586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017587_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017589 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017590 ipv6type=$i;
17591 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017592 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017593fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017594rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017595
17596 ;;
17597 esac
17598 if test "$ipv6type" != "unknown"; then
17599 break
17600 fi
17601 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017602 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17603echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017604fi
17605
17606if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17607 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17608 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17609 echo "using lib$ipv6lib"
17610 else
17611 if test $ipv6trylibc = "yes"; then
17612 echo "using libc"
17613 else
17614 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17615 echo "You need to fetch lib$ipv6lib.a from appropriate"
17616 echo 'ipv6 kit and compile beforehand.'
17617 exit 1
17618 fi
17619 fi
17620fi
17621
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017622{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17623echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017624cat >conftest.$ac_ext <<_ACEOF
17625/* confdefs.h. */
17626_ACEOF
17627cat confdefs.h >>conftest.$ac_ext
17628cat >>conftest.$ac_ext <<_ACEOF
17629/* end confdefs.h. */
17630#include <Carbon/Carbon.h>
17631int
17632main ()
17633{
17634FSIORefNum fRef = 0
17635 ;
17636 return 0;
17637}
17638_ACEOF
17639rm -f conftest.$ac_objext
17640if { (ac_try="$ac_compile"
17641case "(($ac_try" in
17642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17643 *) ac_try_echo=$ac_try;;
17644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017646 (eval "$ac_compile") 2>conftest.er1
17647 ac_status=$?
17648 grep -v '^ *+' conftest.er1 >conftest.err
17649 rm -f conftest.er1
17650 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017652 (exit $ac_status); } && {
17653 test -z "$ac_c_werror_flag" ||
17654 test ! -s conftest.err
17655 } && test -s conftest.$ac_objext; then
17656
17657cat >>confdefs.h <<\_ACEOF
17658#define HAVE_OSX105_SDK 1
17659_ACEOF
17660
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017661 { echo "$as_me:$LINENO: result: yes" >&5
17662echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017663else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017664 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017665sed 's/^/| /' conftest.$ac_ext >&5
17666
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017667 { echo "$as_me:$LINENO: result: no" >&5
17668echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017669
17670fi
17671
17672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17673
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017674# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017675{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17676echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017677
Martin v. Löwiseba40652007-08-30 20:10:57 +000017678# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017679if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017680 withval=$with_doc_strings;
17681fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017682
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017683
17684if test -z "$with_doc_strings"
17685then with_doc_strings="yes"
17686fi
17687if test "$with_doc_strings" != "no"
17688then
17689
17690cat >>confdefs.h <<\_ACEOF
17691#define WITH_DOC_STRINGS 1
17692_ACEOF
17693
17694fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017695{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17696echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017697
Neil Schemenauera35c6882001-02-27 04:45:05 +000017698# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017699{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17700echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017701
Martin v. Löwiseba40652007-08-30 20:10:57 +000017702# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017703if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017704 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017705if test "$withval" != no
17706then
17707
17708cat >>confdefs.h <<\_ACEOF
17709#define WITH_TSC 1
17710_ACEOF
17711
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017712 { echo "$as_me:$LINENO: result: yes" >&5
17713echo "${ECHO_T}yes" >&6; }
17714else { echo "$as_me:$LINENO: result: no" >&5
17715echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017716fi
17717else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017718 { echo "$as_me:$LINENO: result: no" >&5
17719echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017720fi
17721
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017722
17723# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017724{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17725echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017726
Martin v. Löwiseba40652007-08-30 20:10:57 +000017727# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017728if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017729 withval=$with_pymalloc;
17730fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017731
Neil Schemenauera35c6882001-02-27 04:45:05 +000017732
Neil Schemenauer16c22972002-03-22 15:34:49 +000017733if test -z "$with_pymalloc"
17734then with_pymalloc="yes"
17735fi
17736if test "$with_pymalloc" != "no"
17737then
Martin v. Löwis11437992002-04-12 09:54:03 +000017738
17739cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017740#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017741_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017742
17743fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017744{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17745echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017746
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017747# Check for Valgrind support
17748{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17749echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17750
17751# Check whether --with-valgrind was given.
17752if test "${with_valgrind+set}" = set; then
17753 withval=$with_valgrind;
17754else
17755 with_valgrind=no
17756fi
17757
17758{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17759echo "${ECHO_T}$with_valgrind" >&6; }
17760if test "$with_valgrind" != no; then
17761 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17762 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17763echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17764if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17765 echo $ECHO_N "(cached) $ECHO_C" >&6
17766fi
17767{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17768echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17769else
17770 # Is the header compilable?
17771{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17772echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17773cat >conftest.$ac_ext <<_ACEOF
17774/* confdefs.h. */
17775_ACEOF
17776cat confdefs.h >>conftest.$ac_ext
17777cat >>conftest.$ac_ext <<_ACEOF
17778/* end confdefs.h. */
17779$ac_includes_default
17780#include <valgrind/valgrind.h>
17781_ACEOF
17782rm -f conftest.$ac_objext
17783if { (ac_try="$ac_compile"
17784case "(($ac_try" in
17785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17786 *) ac_try_echo=$ac_try;;
17787esac
17788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17789 (eval "$ac_compile") 2>conftest.er1
17790 ac_status=$?
17791 grep -v '^ *+' conftest.er1 >conftest.err
17792 rm -f conftest.er1
17793 cat conftest.err >&5
17794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17795 (exit $ac_status); } && {
17796 test -z "$ac_c_werror_flag" ||
17797 test ! -s conftest.err
17798 } && test -s conftest.$ac_objext; then
17799 ac_header_compiler=yes
17800else
17801 echo "$as_me: failed program was:" >&5
17802sed 's/^/| /' conftest.$ac_ext >&5
17803
17804 ac_header_compiler=no
17805fi
17806
17807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17808{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17809echo "${ECHO_T}$ac_header_compiler" >&6; }
17810
17811# Is the header present?
17812{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17813echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17814cat >conftest.$ac_ext <<_ACEOF
17815/* confdefs.h. */
17816_ACEOF
17817cat confdefs.h >>conftest.$ac_ext
17818cat >>conftest.$ac_ext <<_ACEOF
17819/* end confdefs.h. */
17820#include <valgrind/valgrind.h>
17821_ACEOF
17822if { (ac_try="$ac_cpp conftest.$ac_ext"
17823case "(($ac_try" in
17824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17825 *) ac_try_echo=$ac_try;;
17826esac
17827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17828 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17829 ac_status=$?
17830 grep -v '^ *+' conftest.er1 >conftest.err
17831 rm -f conftest.er1
17832 cat conftest.err >&5
17833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17834 (exit $ac_status); } >/dev/null && {
17835 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17836 test ! -s conftest.err
17837 }; then
17838 ac_header_preproc=yes
17839else
17840 echo "$as_me: failed program was:" >&5
17841sed 's/^/| /' conftest.$ac_ext >&5
17842
17843 ac_header_preproc=no
17844fi
17845
17846rm -f conftest.err conftest.$ac_ext
17847{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17848echo "${ECHO_T}$ac_header_preproc" >&6; }
17849
17850# So? What about this header?
17851case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17852 yes:no: )
17853 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17854echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17855 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17856echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17857 ac_header_preproc=yes
17858 ;;
17859 no:yes:* )
17860 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17861echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17862 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17863echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17864 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17865echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17866 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17867echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17868 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17869echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17870 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17871echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17872 ( cat <<\_ASBOX
17873## -------------------------------------- ##
17874## Report this to http://bugs.python.org/ ##
17875## -------------------------------------- ##
17876_ASBOX
17877 ) | sed "s/^/$as_me: WARNING: /" >&2
17878 ;;
17879esac
17880{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17881echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17882if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17883 echo $ECHO_N "(cached) $ECHO_C" >&6
17884else
17885 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17886fi
17887{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17888echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17889
17890fi
17891if test $ac_cv_header_valgrind_valgrind_h = yes; then
17892
17893cat >>confdefs.h <<\_ACEOF
17894#define WITH_VALGRIND 1
17895_ACEOF
17896
17897else
17898 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17899echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17900 { (exit 1); exit 1; }; }
17901
17902fi
17903
17904
17905fi
17906
Barry Warsawef82cd72000-06-30 16:21:01 +000017907# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017908{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17909echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017910
Martin v. Löwiseba40652007-08-30 20:10:57 +000017911# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017912if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017913 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017914if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017915then
17916
17917cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017918#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017919_ACEOF
17920
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017921 { echo "$as_me:$LINENO: result: yes" >&5
17922echo "${ECHO_T}yes" >&6; }
17923else { echo "$as_me:$LINENO: result: no" >&5
17924echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017925fi
17926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017927 { echo "$as_me:$LINENO: result: no" >&5
17928echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017929fi
17930
Barry Warsawef82cd72000-06-30 16:21:01 +000017931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017932# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017933
Guido van Rossum98935bf2001-09-05 19:13:16 +000017934DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017935
Guido van Rossume97ee181999-12-20 21:27:22 +000017936# the dlopen() function means we might want to use dynload_shlib.o. some
17937# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017938
Thomas Wouters3a584202000-08-05 23:28:51 +000017939for ac_func in dlopen
17940do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017941as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17942{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17943echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017944if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017946else
Martin v. Löwis11437992002-04-12 09:54:03 +000017947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017948/* confdefs.h. */
17949_ACEOF
17950cat confdefs.h >>conftest.$ac_ext
17951cat >>conftest.$ac_ext <<_ACEOF
17952/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017953/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17954 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17955#define $ac_func innocuous_$ac_func
17956
Guido van Rossume97ee181999-12-20 21:27:22 +000017957/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017958 which can conflict with char $ac_func (); below.
17959 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017960 <limits.h> exists even on freestanding compilers. */
17961
17962#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017963# include <limits.h>
17964#else
17965# include <assert.h>
17966#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017967
17968#undef $ac_func
17969
Martin v. Löwiseba40652007-08-30 20:10:57 +000017970/* Override any GCC internal prototype to avoid an error.
17971 Use char because int might match the return type of a GCC
17972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017973#ifdef __cplusplus
17974extern "C"
17975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017976char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017977/* The GNU C library defines this for functions which it implements
17978 to always fail with ENOSYS. Some functions are actually named
17979 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017980#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017981choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017982#endif
17983
Skip Montanaro6dead952003-09-25 14:50:04 +000017984int
17985main ()
17986{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017987return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017988 ;
17989 return 0;
17990}
17991_ACEOF
17992rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017993if { (ac_try="$ac_link"
17994case "(($ac_try" in
17995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17996 *) ac_try_echo=$ac_try;;
17997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017999 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018001 grep -v '^ *+' conftest.er1 >conftest.err
18002 rm -f conftest.er1
18003 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018005 (exit $ac_status); } && {
18006 test -z "$ac_c_werror_flag" ||
18007 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018008 } && test -s conftest$ac_exeext &&
18009 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018010 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000018015 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018017
18018rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018019 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018020fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018021ac_res=`eval echo '${'$as_ac_var'}'`
18022 { echo "$as_me:$LINENO: result: $ac_res" >&5
18023echo "${ECHO_T}$ac_res" >&6; }
18024if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018025 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018026#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018027_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018028
Guido van Rossume97ee181999-12-20 21:27:22 +000018029fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018030done
Guido van Rossume97ee181999-12-20 21:27:22 +000018031
Michael W. Hudson54241132001-12-07 15:38:26 +000018032
Guido van Rossume97ee181999-12-20 21:27:22 +000018033# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18034# loading of modules.
18035
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018036{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18037echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018038if test -z "$DYNLOADFILE"
18039then
18040 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018041 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18042 if test "$ac_cv_func_dlopen" = yes
18043 then DYNLOADFILE="dynload_shlib.o"
18044 else DYNLOADFILE="dynload_aix.o"
18045 fi
18046 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018047 BeOS*) DYNLOADFILE="dynload_beos.o";;
18048 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018049 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18050 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018051 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018052 *)
18053 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18054 # out any dynamic loading
18055 if test "$ac_cv_func_dlopen" = yes
18056 then DYNLOADFILE="dynload_shlib.o"
18057 else DYNLOADFILE="dynload_stub.o"
18058 fi
18059 ;;
18060 esac
18061fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018062{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18063echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018064if test "$DYNLOADFILE" != "dynload_stub.o"
18065then
Martin v. Löwis11437992002-04-12 09:54:03 +000018066
18067cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018068#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018069_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018070
18071fi
18072
Neil Schemenauer4e425612001-06-19 15:44:15 +000018073# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18074
Michael W. Hudson54241132001-12-07 15:38:26 +000018075
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018076{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18077echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018078if test -z "$MACHDEP_OBJS"
18079then
Jack Jansene578a632001-08-15 01:27:14 +000018080 MACHDEP_OBJS=$extra_machdep_objs
18081else
18082 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018083fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018084{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18085echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018086
Guido van Rossum627b2d71993-12-24 10:39:16 +000018087# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
Martin v. Löwisd6320502004-08-12 13:45:08 +000018159
Martin v. Löwisc3001752005-01-23 09:27:24 +000018160
18161
Neal Norwitz05a45592006-03-20 06:30:08 +000018162
18163
Martin v. Löwis382abef2007-02-19 10:55:19 +000018164
18165
Christian Heimes36281872007-11-30 21:11:28 +000018166
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018167
18168
Jesse Noller355b1262009-04-02 00:03:28 +000018169
18170
18171
18172
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018186
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018187for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18188 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018189 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018190 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018191 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018192 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018193 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018194 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18195 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018196 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018197 setlocale setregid setreuid setresuid setresgid \
18198 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018199 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018200 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018201 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018202do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018203as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18204{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18205echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018206if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018207 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018208else
Martin v. Löwis11437992002-04-12 09:54:03 +000018209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018210/* confdefs.h. */
18211_ACEOF
18212cat confdefs.h >>conftest.$ac_ext
18213cat >>conftest.$ac_ext <<_ACEOF
18214/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018215/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18216 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18217#define $ac_func innocuous_$ac_func
18218
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018219/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018220 which can conflict with char $ac_func (); below.
18221 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018222 <limits.h> exists even on freestanding compilers. */
18223
18224#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018225# include <limits.h>
18226#else
18227# include <assert.h>
18228#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018229
18230#undef $ac_func
18231
Martin v. Löwiseba40652007-08-30 20:10:57 +000018232/* Override any GCC internal prototype to avoid an error.
18233 Use char because int might match the return type of a GCC
18234 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018235#ifdef __cplusplus
18236extern "C"
18237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018238char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018239/* The GNU C library defines this for functions which it implements
18240 to always fail with ENOSYS. Some functions are actually named
18241 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018242#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018243choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018244#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018245
Skip Montanaro6dead952003-09-25 14:50:04 +000018246int
18247main ()
18248{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018249return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018250 ;
18251 return 0;
18252}
18253_ACEOF
18254rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018255if { (ac_try="$ac_link"
18256case "(($ac_try" in
18257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18258 *) ac_try_echo=$ac_try;;
18259esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018261 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018263 grep -v '^ *+' conftest.er1 >conftest.err
18264 rm -f conftest.er1
18265 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018267 (exit $ac_status); } && {
18268 test -z "$ac_c_werror_flag" ||
18269 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018270 } && test -s conftest$ac_exeext &&
18271 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018272 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018275sed 's/^/| /' conftest.$ac_ext >&5
18276
Martin v. Löwiseba40652007-08-30 20:10:57 +000018277 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018279
18280rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018281 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018282fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018283ac_res=`eval echo '${'$as_ac_var'}'`
18284 { echo "$as_me:$LINENO: result: $ac_res" >&5
18285echo "${ECHO_T}$ac_res" >&6; }
18286if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018287 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018288#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018289_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018290
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018291fi
18292done
18293
Michael W. Hudson54241132001-12-07 15:38:26 +000018294
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018295# For some functions, having a definition is not sufficient, since
18296# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018297{ echo "$as_me:$LINENO: checking for chroot" >&5
18298echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018299cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018300/* confdefs.h. */
18301_ACEOF
18302cat confdefs.h >>conftest.$ac_ext
18303cat >>conftest.$ac_ext <<_ACEOF
18304/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018305#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018306int
18307main ()
18308{
18309void *x=chroot
18310 ;
18311 return 0;
18312}
18313_ACEOF
18314rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018315if { (ac_try="$ac_compile"
18316case "(($ac_try" in
18317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18318 *) ac_try_echo=$ac_try;;
18319esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018323 grep -v '^ *+' conftest.er1 >conftest.err
18324 rm -f conftest.er1
18325 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018327 (exit $ac_status); } && {
18328 test -z "$ac_c_werror_flag" ||
18329 test ! -s conftest.err
18330 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018331
18332cat >>confdefs.h <<\_ACEOF
18333#define HAVE_CHROOT 1
18334_ACEOF
18335
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018336 { echo "$as_me:$LINENO: result: yes" >&5
18337echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018338else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018340sed 's/^/| /' conftest.$ac_ext >&5
18341
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018342 { echo "$as_me:$LINENO: result: no" >&5
18343echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018344
18345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018346
18347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018348{ echo "$as_me:$LINENO: checking for link" >&5
18349echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018350cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018351/* confdefs.h. */
18352_ACEOF
18353cat confdefs.h >>conftest.$ac_ext
18354cat >>conftest.$ac_ext <<_ACEOF
18355/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018356#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018357int
18358main ()
18359{
18360void *x=link
18361 ;
18362 return 0;
18363}
18364_ACEOF
18365rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018366if { (ac_try="$ac_compile"
18367case "(($ac_try" in
18368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18369 *) ac_try_echo=$ac_try;;
18370esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018372 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018374 grep -v '^ *+' conftest.er1 >conftest.err
18375 rm -f conftest.er1
18376 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018378 (exit $ac_status); } && {
18379 test -z "$ac_c_werror_flag" ||
18380 test ! -s conftest.err
18381 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018382
18383cat >>confdefs.h <<\_ACEOF
18384#define HAVE_LINK 1
18385_ACEOF
18386
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018387 { echo "$as_me:$LINENO: result: yes" >&5
18388echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018391sed 's/^/| /' conftest.$ac_ext >&5
18392
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018393 { echo "$as_me:$LINENO: result: no" >&5
18394echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018395
18396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018397
18398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018399{ echo "$as_me:$LINENO: checking for symlink" >&5
18400echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018402/* confdefs.h. */
18403_ACEOF
18404cat confdefs.h >>conftest.$ac_ext
18405cat >>conftest.$ac_ext <<_ACEOF
18406/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018407#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018408int
18409main ()
18410{
18411void *x=symlink
18412 ;
18413 return 0;
18414}
18415_ACEOF
18416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018417if { (ac_try="$ac_compile"
18418case "(($ac_try" in
18419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18420 *) ac_try_echo=$ac_try;;
18421esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018425 grep -v '^ *+' conftest.er1 >conftest.err
18426 rm -f conftest.er1
18427 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018429 (exit $ac_status); } && {
18430 test -z "$ac_c_werror_flag" ||
18431 test ! -s conftest.err
18432 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018433
18434cat >>confdefs.h <<\_ACEOF
18435#define HAVE_SYMLINK 1
18436_ACEOF
18437
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018438 { echo "$as_me:$LINENO: result: yes" >&5
18439echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018442sed 's/^/| /' conftest.$ac_ext >&5
18443
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018444 { echo "$as_me:$LINENO: result: no" >&5
18445echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018446
18447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018448
18449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018450{ echo "$as_me:$LINENO: checking for fchdir" >&5
18451echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018453/* confdefs.h. */
18454_ACEOF
18455cat confdefs.h >>conftest.$ac_ext
18456cat >>conftest.$ac_ext <<_ACEOF
18457/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018458#include <unistd.h>
18459int
18460main ()
18461{
18462void *x=fchdir
18463 ;
18464 return 0;
18465}
18466_ACEOF
18467rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018468if { (ac_try="$ac_compile"
18469case "(($ac_try" in
18470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18471 *) ac_try_echo=$ac_try;;
18472esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018474 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018475 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018476 grep -v '^ *+' conftest.er1 >conftest.err
18477 rm -f conftest.er1
18478 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018480 (exit $ac_status); } && {
18481 test -z "$ac_c_werror_flag" ||
18482 test ! -s conftest.err
18483 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018484
18485cat >>confdefs.h <<\_ACEOF
18486#define HAVE_FCHDIR 1
18487_ACEOF
18488
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018489 { echo "$as_me:$LINENO: result: yes" >&5
18490echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018491else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018493sed 's/^/| /' conftest.$ac_ext >&5
18494
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018495 { echo "$as_me:$LINENO: result: no" >&5
18496echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018497
18498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018499
18500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018501{ echo "$as_me:$LINENO: checking for fsync" >&5
18502echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018503cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018504/* confdefs.h. */
18505_ACEOF
18506cat confdefs.h >>conftest.$ac_ext
18507cat >>conftest.$ac_ext <<_ACEOF
18508/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018509#include <unistd.h>
18510int
18511main ()
18512{
18513void *x=fsync
18514 ;
18515 return 0;
18516}
18517_ACEOF
18518rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018519if { (ac_try="$ac_compile"
18520case "(($ac_try" in
18521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18522 *) ac_try_echo=$ac_try;;
18523esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018527 grep -v '^ *+' conftest.er1 >conftest.err
18528 rm -f conftest.er1
18529 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018531 (exit $ac_status); } && {
18532 test -z "$ac_c_werror_flag" ||
18533 test ! -s conftest.err
18534 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018535
18536cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018537#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018538_ACEOF
18539
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018540 { echo "$as_me:$LINENO: result: yes" >&5
18541echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018544sed 's/^/| /' conftest.$ac_ext >&5
18545
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018546 { echo "$as_me:$LINENO: result: no" >&5
18547echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018548
18549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018550
18551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018552{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18553echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018555/* confdefs.h. */
18556_ACEOF
18557cat confdefs.h >>conftest.$ac_ext
18558cat >>conftest.$ac_ext <<_ACEOF
18559/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018560#include <unistd.h>
18561int
18562main ()
18563{
18564void *x=fdatasync
18565 ;
18566 return 0;
18567}
18568_ACEOF
18569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018570if { (ac_try="$ac_compile"
18571case "(($ac_try" in
18572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18573 *) ac_try_echo=$ac_try;;
18574esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018578 grep -v '^ *+' conftest.er1 >conftest.err
18579 rm -f conftest.er1
18580 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018582 (exit $ac_status); } && {
18583 test -z "$ac_c_werror_flag" ||
18584 test ! -s conftest.err
18585 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018586
18587cat >>confdefs.h <<\_ACEOF
18588#define HAVE_FDATASYNC 1
18589_ACEOF
18590
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018591 { echo "$as_me:$LINENO: result: yes" >&5
18592echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018593else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018595sed 's/^/| /' conftest.$ac_ext >&5
18596
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018597 { echo "$as_me:$LINENO: result: no" >&5
18598echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018599
18600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018601
18602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018603{ echo "$as_me:$LINENO: checking for epoll" >&5
18604echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018605cat >conftest.$ac_ext <<_ACEOF
18606/* confdefs.h. */
18607_ACEOF
18608cat confdefs.h >>conftest.$ac_ext
18609cat >>conftest.$ac_ext <<_ACEOF
18610/* end confdefs.h. */
18611#include <sys/epoll.h>
18612int
18613main ()
18614{
18615void *x=epoll_create
18616 ;
18617 return 0;
18618}
18619_ACEOF
18620rm -f conftest.$ac_objext
18621if { (ac_try="$ac_compile"
18622case "(($ac_try" in
18623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18624 *) ac_try_echo=$ac_try;;
18625esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018627 (eval "$ac_compile") 2>conftest.er1
18628 ac_status=$?
18629 grep -v '^ *+' conftest.er1 >conftest.err
18630 rm -f conftest.er1
18631 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018633 (exit $ac_status); } && {
18634 test -z "$ac_c_werror_flag" ||
18635 test ! -s conftest.err
18636 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018637
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018638cat >>confdefs.h <<\_ACEOF
18639#define HAVE_EPOLL 1
18640_ACEOF
18641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018642 { echo "$as_me:$LINENO: result: yes" >&5
18643echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018644else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018645 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018646sed 's/^/| /' conftest.$ac_ext >&5
18647
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018648 { echo "$as_me:$LINENO: result: no" >&5
18649echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018650
18651fi
18652
18653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018654{ echo "$as_me:$LINENO: checking for kqueue" >&5
18655echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018656cat >conftest.$ac_ext <<_ACEOF
18657/* confdefs.h. */
18658_ACEOF
18659cat confdefs.h >>conftest.$ac_ext
18660cat >>conftest.$ac_ext <<_ACEOF
18661/* end confdefs.h. */
18662
18663#include <sys/types.h>
18664#include <sys/event.h>
18665
18666int
18667main ()
18668{
18669int x=kqueue()
18670 ;
18671 return 0;
18672}
18673_ACEOF
18674rm -f conftest.$ac_objext
18675if { (ac_try="$ac_compile"
18676case "(($ac_try" in
18677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18678 *) ac_try_echo=$ac_try;;
18679esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018681 (eval "$ac_compile") 2>conftest.er1
18682 ac_status=$?
18683 grep -v '^ *+' conftest.er1 >conftest.err
18684 rm -f conftest.er1
18685 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018687 (exit $ac_status); } && {
18688 test -z "$ac_c_werror_flag" ||
18689 test ! -s conftest.err
18690 } && test -s conftest.$ac_objext; then
18691
18692cat >>confdefs.h <<\_ACEOF
18693#define HAVE_KQUEUE 1
18694_ACEOF
18695
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018696 { echo "$as_me:$LINENO: result: yes" >&5
18697echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018698else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018699 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018700sed 's/^/| /' conftest.$ac_ext >&5
18701
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018702 { echo "$as_me:$LINENO: result: no" >&5
18703echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018704
18705fi
18706
18707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018708# On some systems (eg. FreeBSD 5), we would find a definition of the
18709# functions ctermid_r, setgroups in the library, but no prototype
18710# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18711# address to avoid compiler warnings and potential miscompilations
18712# because of the missing prototypes.
18713
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018714{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18715echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018716cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018717/* confdefs.h. */
18718_ACEOF
18719cat confdefs.h >>conftest.$ac_ext
18720cat >>conftest.$ac_ext <<_ACEOF
18721/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018722
18723#include "confdefs.h"
18724#include <stdio.h>
18725
Martin v. Löwisd5843682002-11-21 20:41:28 +000018726int
18727main ()
18728{
18729void* p = ctermid_r
18730 ;
18731 return 0;
18732}
18733_ACEOF
18734rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018735if { (ac_try="$ac_compile"
18736case "(($ac_try" in
18737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18738 *) ac_try_echo=$ac_try;;
18739esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018741 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018743 grep -v '^ *+' conftest.er1 >conftest.err
18744 rm -f conftest.er1
18745 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018747 (exit $ac_status); } && {
18748 test -z "$ac_c_werror_flag" ||
18749 test ! -s conftest.err
18750 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018751
18752cat >>confdefs.h <<\_ACEOF
18753#define HAVE_CTERMID_R 1
18754_ACEOF
18755
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018756 { echo "$as_me:$LINENO: result: yes" >&5
18757echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018758else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018760sed 's/^/| /' conftest.$ac_ext >&5
18761
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018762 { echo "$as_me:$LINENO: result: no" >&5
18763echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018764
18765fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018766
Martin v. Löwiseba40652007-08-30 20:10:57 +000018767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18768
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018769{ echo "$as_me:$LINENO: checking for flock" >&5
18770echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018771cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018772/* confdefs.h. */
18773_ACEOF
18774cat confdefs.h >>conftest.$ac_ext
18775cat >>conftest.$ac_ext <<_ACEOF
18776/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018777
18778#include "confdefs.h"
18779#include <sys/file.h>
18780
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018781int
18782main ()
18783{
18784void* p = flock
18785 ;
18786 return 0;
18787}
18788_ACEOF
18789rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018790if { (ac_try="$ac_compile"
18791case "(($ac_try" in
18792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18793 *) ac_try_echo=$ac_try;;
18794esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018796 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018798 grep -v '^ *+' conftest.er1 >conftest.err
18799 rm -f conftest.er1
18800 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018802 (exit $ac_status); } && {
18803 test -z "$ac_c_werror_flag" ||
18804 test ! -s conftest.err
18805 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018806
18807cat >>confdefs.h <<\_ACEOF
18808#define HAVE_FLOCK 1
18809_ACEOF
18810
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018811 { echo "$as_me:$LINENO: result: yes" >&5
18812echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018813else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018815sed 's/^/| /' conftest.$ac_ext >&5
18816
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018817 { echo "$as_me:$LINENO: result: no" >&5
18818echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018819
18820fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018821
Martin v. Löwiseba40652007-08-30 20:10:57 +000018822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18823
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018824{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18825echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018826cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018827/* confdefs.h. */
18828_ACEOF
18829cat confdefs.h >>conftest.$ac_ext
18830cat >>conftest.$ac_ext <<_ACEOF
18831/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018832
18833#include "confdefs.h"
18834#include <unistd.h>
18835
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018836int
18837main ()
18838{
18839void* p = getpagesize
18840 ;
18841 return 0;
18842}
18843_ACEOF
18844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018845if { (ac_try="$ac_compile"
18846case "(($ac_try" in
18847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18848 *) ac_try_echo=$ac_try;;
18849esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018853 grep -v '^ *+' conftest.er1 >conftest.err
18854 rm -f conftest.er1
18855 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018857 (exit $ac_status); } && {
18858 test -z "$ac_c_werror_flag" ||
18859 test ! -s conftest.err
18860 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018861
18862cat >>confdefs.h <<\_ACEOF
18863#define HAVE_GETPAGESIZE 1
18864_ACEOF
18865
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018866 { echo "$as_me:$LINENO: result: yes" >&5
18867echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018868else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018870sed 's/^/| /' conftest.$ac_ext >&5
18871
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018872 { echo "$as_me:$LINENO: result: no" >&5
18873echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018874
18875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018876
18877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018878
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018879for ac_prog in true
18880do
18881 # Extract the first word of "$ac_prog", so it can be a program name with args.
18882set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018883{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18884echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018885if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018886 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018887else
18888 if test -n "$TRUE"; then
18889 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18890else
18891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18892for as_dir in $PATH
18893do
18894 IFS=$as_save_IFS
18895 test -z "$as_dir" && as_dir=.
18896 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018897 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 +000018898 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018899 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018900 break 2
18901 fi
18902done
18903done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018904IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018905
18906fi
18907fi
18908TRUE=$ac_cv_prog_TRUE
18909if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018910 { echo "$as_me:$LINENO: result: $TRUE" >&5
18911echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018913 { echo "$as_me:$LINENO: result: no" >&5
18914echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018915fi
18916
Martin v. Löwiseba40652007-08-30 20:10:57 +000018917
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018918 test -n "$TRUE" && break
18919done
18920test -n "$TRUE" || TRUE="/bin/true"
18921
18922
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018923{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18924echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018925if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018926 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018927else
18928 ac_check_lib_save_LIBS=$LIBS
18929LIBS="-lc $LIBS"
18930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018931/* confdefs.h. */
18932_ACEOF
18933cat confdefs.h >>conftest.$ac_ext
18934cat >>conftest.$ac_ext <<_ACEOF
18935/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018936
Martin v. Löwiseba40652007-08-30 20:10:57 +000018937/* Override any GCC internal prototype to avoid an error.
18938 Use char because int might match the return type of a GCC
18939 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018940#ifdef __cplusplus
18941extern "C"
18942#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018943char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018944int
18945main ()
18946{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018947return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018948 ;
18949 return 0;
18950}
18951_ACEOF
18952rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018953if { (ac_try="$ac_link"
18954case "(($ac_try" in
18955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18956 *) ac_try_echo=$ac_try;;
18957esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018961 grep -v '^ *+' conftest.er1 >conftest.err
18962 rm -f conftest.er1
18963 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018965 (exit $ac_status); } && {
18966 test -z "$ac_c_werror_flag" ||
18967 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018968 } && test -s conftest$ac_exeext &&
18969 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018970 ac_cv_lib_c_inet_aton=yes
18971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018973sed 's/^/| /' conftest.$ac_ext >&5
18974
Martin v. Löwiseba40652007-08-30 20:10:57 +000018975 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018977
18978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018979 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018980LIBS=$ac_check_lib_save_LIBS
18981fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018982{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18983echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18984if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018985 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018986else
18987
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018988{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18989echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018990if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018991 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018992else
18993 ac_check_lib_save_LIBS=$LIBS
18994LIBS="-lresolv $LIBS"
18995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018996/* confdefs.h. */
18997_ACEOF
18998cat confdefs.h >>conftest.$ac_ext
18999cat >>conftest.$ac_ext <<_ACEOF
19000/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019001
Martin v. Löwiseba40652007-08-30 20:10:57 +000019002/* Override any GCC internal prototype to avoid an error.
19003 Use char because int might match the return type of a GCC
19004 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019005#ifdef __cplusplus
19006extern "C"
19007#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019008char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019009int
19010main ()
19011{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019012return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019013 ;
19014 return 0;
19015}
19016_ACEOF
19017rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019018if { (ac_try="$ac_link"
19019case "(($ac_try" in
19020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19021 *) ac_try_echo=$ac_try;;
19022esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019024 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019026 grep -v '^ *+' conftest.er1 >conftest.err
19027 rm -f conftest.er1
19028 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019030 (exit $ac_status); } && {
19031 test -z "$ac_c_werror_flag" ||
19032 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019033 } && test -s conftest$ac_exeext &&
19034 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019035 ac_cv_lib_resolv_inet_aton=yes
19036else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019037 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019038sed 's/^/| /' conftest.$ac_ext >&5
19039
Martin v. Löwiseba40652007-08-30 20:10:57 +000019040 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019042
19043rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019044 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019045LIBS=$ac_check_lib_save_LIBS
19046fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019047{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19048echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19049if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019050 cat >>confdefs.h <<_ACEOF
19051#define HAVE_LIBRESOLV 1
19052_ACEOF
19053
19054 LIBS="-lresolv $LIBS"
19055
19056fi
19057
19058
19059fi
19060
19061
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019062# On Tru64, chflags seems to be present, but calling it will
19063# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019064{ echo "$as_me:$LINENO: checking for chflags" >&5
19065echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019066if test "${ac_cv_have_chflags+set}" = set; then
19067 echo $ECHO_N "(cached) $ECHO_C" >&6
19068else
19069 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019070 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019071else
19072 cat >conftest.$ac_ext <<_ACEOF
19073/* confdefs.h. */
19074_ACEOF
19075cat confdefs.h >>conftest.$ac_ext
19076cat >>conftest.$ac_ext <<_ACEOF
19077/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019078[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019079#include <sys/stat.h>
19080#include <unistd.h>
19081int main(int argc, char*argv[])
19082{
19083 if(chflags(argv[0], 0) != 0)
19084 return 1;
19085 return 0;
19086}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019087]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019088_ACEOF
19089rm -f conftest$ac_exeext
19090if { (ac_try="$ac_link"
19091case "(($ac_try" in
19092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19093 *) ac_try_echo=$ac_try;;
19094esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019096 (eval "$ac_link") 2>&5
19097 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19100 { (case "(($ac_try" in
19101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19102 *) ac_try_echo=$ac_try;;
19103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019105 (eval "$ac_try") 2>&5
19106 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019108 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019109 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019110else
19111 echo "$as_me: program exited with status $ac_status" >&5
19112echo "$as_me: failed program was:" >&5
19113sed 's/^/| /' conftest.$ac_ext >&5
19114
19115( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019116ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019117fi
19118rm -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 +000019119fi
19120
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019121
19122
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019123fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019124{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19125echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019126if test "$ac_cv_have_chflags" = cross ; then
19127 { echo "$as_me:$LINENO: checking for chflags" >&5
19128echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19129if test "${ac_cv_func_chflags+set}" = set; then
19130 echo $ECHO_N "(cached) $ECHO_C" >&6
19131else
19132 cat >conftest.$ac_ext <<_ACEOF
19133/* confdefs.h. */
19134_ACEOF
19135cat confdefs.h >>conftest.$ac_ext
19136cat >>conftest.$ac_ext <<_ACEOF
19137/* end confdefs.h. */
19138/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19139 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19140#define chflags innocuous_chflags
19141
19142/* System header to define __stub macros and hopefully few prototypes,
19143 which can conflict with char chflags (); below.
19144 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19145 <limits.h> exists even on freestanding compilers. */
19146
19147#ifdef __STDC__
19148# include <limits.h>
19149#else
19150# include <assert.h>
19151#endif
19152
19153#undef chflags
19154
19155/* Override any GCC internal prototype to avoid an error.
19156 Use char because int might match the return type of a GCC
19157 builtin and then its argument prototype would still apply. */
19158#ifdef __cplusplus
19159extern "C"
19160#endif
19161char chflags ();
19162/* The GNU C library defines this for functions which it implements
19163 to always fail with ENOSYS. Some functions are actually named
19164 something starting with __ and the normal name is an alias. */
19165#if defined __stub_chflags || defined __stub___chflags
19166choke me
19167#endif
19168
19169int
19170main ()
19171{
19172return chflags ();
19173 ;
19174 return 0;
19175}
19176_ACEOF
19177rm -f conftest.$ac_objext conftest$ac_exeext
19178if { (ac_try="$ac_link"
19179case "(($ac_try" in
19180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19181 *) ac_try_echo=$ac_try;;
19182esac
19183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19184 (eval "$ac_link") 2>conftest.er1
19185 ac_status=$?
19186 grep -v '^ *+' conftest.er1 >conftest.err
19187 rm -f conftest.er1
19188 cat conftest.err >&5
19189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19190 (exit $ac_status); } && {
19191 test -z "$ac_c_werror_flag" ||
19192 test ! -s conftest.err
19193 } && test -s conftest$ac_exeext &&
19194 $as_test_x conftest$ac_exeext; then
19195 ac_cv_func_chflags=yes
19196else
19197 echo "$as_me: failed program was:" >&5
19198sed 's/^/| /' conftest.$ac_ext >&5
19199
19200 ac_cv_func_chflags=no
19201fi
19202
19203rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19204 conftest$ac_exeext conftest.$ac_ext
19205fi
19206{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19207echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19208if test $ac_cv_func_chflags = yes; then
19209 ac_cv_have_chflags="yes"
19210else
19211 ac_cv_have_chflags="no"
19212fi
19213
19214fi
19215if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019216
19217cat >>confdefs.h <<\_ACEOF
19218#define HAVE_CHFLAGS 1
19219_ACEOF
19220
19221fi
19222
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019223{ echo "$as_me:$LINENO: checking for lchflags" >&5
19224echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019225if test "${ac_cv_have_lchflags+set}" = set; then
19226 echo $ECHO_N "(cached) $ECHO_C" >&6
19227else
19228 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019229 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019230else
19231 cat >conftest.$ac_ext <<_ACEOF
19232/* confdefs.h. */
19233_ACEOF
19234cat confdefs.h >>conftest.$ac_ext
19235cat >>conftest.$ac_ext <<_ACEOF
19236/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019237[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019238#include <sys/stat.h>
19239#include <unistd.h>
19240int main(int argc, char*argv[])
19241{
19242 if(lchflags(argv[0], 0) != 0)
19243 return 1;
19244 return 0;
19245}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019246]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019247_ACEOF
19248rm -f conftest$ac_exeext
19249if { (ac_try="$ac_link"
19250case "(($ac_try" in
19251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19252 *) ac_try_echo=$ac_try;;
19253esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019255 (eval "$ac_link") 2>&5
19256 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019258 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19259 { (case "(($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öwisa51d5c82007-12-04 08:37:59 +000019264 (eval "$ac_try") 2>&5
19265 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019267 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019268 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019269else
19270 echo "$as_me: program exited with status $ac_status" >&5
19271echo "$as_me: failed program was:" >&5
19272sed 's/^/| /' conftest.$ac_ext >&5
19273
19274( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019275ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019276fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19278fi
19279
19280
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019281
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019282fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019283{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19284echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019285if test "$ac_cv_have_lchflags" = cross ; then
19286 { echo "$as_me:$LINENO: checking for lchflags" >&5
19287echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19288if test "${ac_cv_func_lchflags+set}" = set; then
19289 echo $ECHO_N "(cached) $ECHO_C" >&6
19290else
19291 cat >conftest.$ac_ext <<_ACEOF
19292/* confdefs.h. */
19293_ACEOF
19294cat confdefs.h >>conftest.$ac_ext
19295cat >>conftest.$ac_ext <<_ACEOF
19296/* end confdefs.h. */
19297/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19298 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19299#define lchflags innocuous_lchflags
19300
19301/* System header to define __stub macros and hopefully few prototypes,
19302 which can conflict with char lchflags (); below.
19303 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19304 <limits.h> exists even on freestanding compilers. */
19305
19306#ifdef __STDC__
19307# include <limits.h>
19308#else
19309# include <assert.h>
19310#endif
19311
19312#undef lchflags
19313
19314/* Override any GCC internal prototype to avoid an error.
19315 Use char because int might match the return type of a GCC
19316 builtin and then its argument prototype would still apply. */
19317#ifdef __cplusplus
19318extern "C"
19319#endif
19320char lchflags ();
19321/* The GNU C library defines this for functions which it implements
19322 to always fail with ENOSYS. Some functions are actually named
19323 something starting with __ and the normal name is an alias. */
19324#if defined __stub_lchflags || defined __stub___lchflags
19325choke me
19326#endif
19327
19328int
19329main ()
19330{
19331return lchflags ();
19332 ;
19333 return 0;
19334}
19335_ACEOF
19336rm -f conftest.$ac_objext conftest$ac_exeext
19337if { (ac_try="$ac_link"
19338case "(($ac_try" in
19339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19340 *) ac_try_echo=$ac_try;;
19341esac
19342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19343 (eval "$ac_link") 2>conftest.er1
19344 ac_status=$?
19345 grep -v '^ *+' conftest.er1 >conftest.err
19346 rm -f conftest.er1
19347 cat conftest.err >&5
19348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19349 (exit $ac_status); } && {
19350 test -z "$ac_c_werror_flag" ||
19351 test ! -s conftest.err
19352 } && test -s conftest$ac_exeext &&
19353 $as_test_x conftest$ac_exeext; then
19354 ac_cv_func_lchflags=yes
19355else
19356 echo "$as_me: failed program was:" >&5
19357sed 's/^/| /' conftest.$ac_ext >&5
19358
19359 ac_cv_func_lchflags=no
19360fi
19361
19362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19363 conftest$ac_exeext conftest.$ac_ext
19364fi
19365{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19366echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19367if test $ac_cv_func_lchflags = yes; then
19368 ac_cv_have_lchflags="yes"
19369else
19370 ac_cv_have_lchflags="no"
19371fi
19372
19373fi
19374if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019375
19376cat >>confdefs.h <<\_ACEOF
19377#define HAVE_LCHFLAGS 1
19378_ACEOF
19379
19380fi
19381
Ronald Oussorenf8752642006-07-06 10:13:35 +000019382case $ac_sys_system/$ac_sys_release in
19383Darwin/*)
19384 _CUR_CFLAGS="${CFLAGS}"
19385 _CUR_LDFLAGS="${LDFLAGS}"
19386 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19387 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19388 ;;
19389esac
19390
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019391{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19392echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019393if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019394 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019395else
19396 ac_check_lib_save_LIBS=$LIBS
19397LIBS="-lz $LIBS"
19398cat >conftest.$ac_ext <<_ACEOF
19399/* confdefs.h. */
19400_ACEOF
19401cat confdefs.h >>conftest.$ac_ext
19402cat >>conftest.$ac_ext <<_ACEOF
19403/* end confdefs.h. */
19404
Martin v. Löwiseba40652007-08-30 20:10:57 +000019405/* Override any GCC internal prototype to avoid an error.
19406 Use char because int might match the return type of a GCC
19407 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019408#ifdef __cplusplus
19409extern "C"
19410#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019411char inflateCopy ();
19412int
19413main ()
19414{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019415return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019416 ;
19417 return 0;
19418}
19419_ACEOF
19420rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019421if { (ac_try="$ac_link"
19422case "(($ac_try" in
19423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19424 *) ac_try_echo=$ac_try;;
19425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019427 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019428 ac_status=$?
19429 grep -v '^ *+' conftest.er1 >conftest.err
19430 rm -f conftest.er1
19431 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019433 (exit $ac_status); } && {
19434 test -z "$ac_c_werror_flag" ||
19435 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019436 } && test -s conftest$ac_exeext &&
19437 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019438 ac_cv_lib_z_inflateCopy=yes
19439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019440 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019441sed 's/^/| /' conftest.$ac_ext >&5
19442
Martin v. Löwiseba40652007-08-30 20:10:57 +000019443 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019445
19446rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019447 conftest$ac_exeext conftest.$ac_ext
19448LIBS=$ac_check_lib_save_LIBS
19449fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019450{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19451echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19452if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019453
19454cat >>confdefs.h <<\_ACEOF
19455#define HAVE_ZLIB_COPY 1
19456_ACEOF
19457
19458fi
19459
19460
Ronald Oussorenf8752642006-07-06 10:13:35 +000019461case $ac_sys_system/$ac_sys_release in
19462Darwin/*)
19463 CFLAGS="${_CUR_CFLAGS}"
19464 LDFLAGS="${_CUR_LDFLAGS}"
19465 ;;
19466esac
19467
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019468{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19469echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019471/* confdefs.h. */
19472_ACEOF
19473cat confdefs.h >>conftest.$ac_ext
19474cat >>conftest.$ac_ext <<_ACEOF
19475/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019476
19477#include "confdefs.h"
19478#include <netdb.h>
19479
Martin v. Löwise9416172003-05-03 10:12:45 +000019480int
19481main ()
19482{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019483void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019484 ;
19485 return 0;
19486}
19487_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019488rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019489if { (ac_try="$ac_link"
19490case "(($ac_try" in
19491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19492 *) ac_try_echo=$ac_try;;
19493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019495 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019497 grep -v '^ *+' conftest.er1 >conftest.err
19498 rm -f conftest.er1
19499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019501 (exit $ac_status); } && {
19502 test -z "$ac_c_werror_flag" ||
19503 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019504 } && test -s conftest$ac_exeext &&
19505 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019506
19507cat >>confdefs.h <<\_ACEOF
19508#define HAVE_HSTRERROR 1
19509_ACEOF
19510
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019511 { echo "$as_me:$LINENO: result: yes" >&5
19512echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019513else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019515sed 's/^/| /' conftest.$ac_ext >&5
19516
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019517 { echo "$as_me:$LINENO: result: no" >&5
19518echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019519
19520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019521
19522rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019523 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019524
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019525{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19526echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019527cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019528/* confdefs.h. */
19529_ACEOF
19530cat confdefs.h >>conftest.$ac_ext
19531cat >>conftest.$ac_ext <<_ACEOF
19532/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019533
19534#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019535#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019536#include <sys/socket.h>
19537#include <netinet/in.h>
19538#include <arpa/inet.h>
19539
Martin v. Löwise9416172003-05-03 10:12:45 +000019540int
19541main ()
19542{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019543void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019544 ;
19545 return 0;
19546}
19547_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019548rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019549if { (ac_try="$ac_link"
19550case "(($ac_try" in
19551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19552 *) ac_try_echo=$ac_try;;
19553esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019555 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019557 grep -v '^ *+' conftest.er1 >conftest.err
19558 rm -f conftest.er1
19559 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019561 (exit $ac_status); } && {
19562 test -z "$ac_c_werror_flag" ||
19563 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019564 } && test -s conftest$ac_exeext &&
19565 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019566
19567cat >>confdefs.h <<\_ACEOF
19568#define HAVE_INET_ATON 1
19569_ACEOF
19570
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019571 { echo "$as_me:$LINENO: result: yes" >&5
19572echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019575sed 's/^/| /' conftest.$ac_ext >&5
19576
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019577 { echo "$as_me:$LINENO: result: no" >&5
19578echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019579
19580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019581
19582rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019583 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019584
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019585{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19586echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019588/* confdefs.h. */
19589_ACEOF
19590cat confdefs.h >>conftest.$ac_ext
19591cat >>conftest.$ac_ext <<_ACEOF
19592/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019593
19594#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019595#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019596#include <sys/socket.h>
19597#include <netinet/in.h>
19598#include <arpa/inet.h>
19599
Martin v. Löwise9416172003-05-03 10:12:45 +000019600int
19601main ()
19602{
19603void* p = inet_pton
19604 ;
19605 return 0;
19606}
19607_ACEOF
19608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019609if { (ac_try="$ac_compile"
19610case "(($ac_try" in
19611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19612 *) ac_try_echo=$ac_try;;
19613esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019617 grep -v '^ *+' conftest.er1 >conftest.err
19618 rm -f conftest.er1
19619 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019621 (exit $ac_status); } && {
19622 test -z "$ac_c_werror_flag" ||
19623 test ! -s conftest.err
19624 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019625
19626cat >>confdefs.h <<\_ACEOF
19627#define HAVE_INET_PTON 1
19628_ACEOF
19629
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019630 { echo "$as_me:$LINENO: result: yes" >&5
19631echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019632else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019634sed 's/^/| /' conftest.$ac_ext >&5
19635
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019636 { echo "$as_me:$LINENO: result: no" >&5
19637echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019638
19639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019640
19641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019642
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019643# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019644{ echo "$as_me:$LINENO: checking for setgroups" >&5
19645echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019646cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019647/* confdefs.h. */
19648_ACEOF
19649cat confdefs.h >>conftest.$ac_ext
19650cat >>conftest.$ac_ext <<_ACEOF
19651/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019652
19653#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019654#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019655#ifdef HAVE_GRP_H
19656#include <grp.h>
19657#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019658
Martin v. Löwisd5843682002-11-21 20:41:28 +000019659int
19660main ()
19661{
19662void* p = setgroups
19663 ;
19664 return 0;
19665}
19666_ACEOF
19667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019668if { (ac_try="$ac_compile"
19669case "(($ac_try" in
19670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19671 *) ac_try_echo=$ac_try;;
19672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019676 grep -v '^ *+' conftest.er1 >conftest.err
19677 rm -f conftest.er1
19678 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019680 (exit $ac_status); } && {
19681 test -z "$ac_c_werror_flag" ||
19682 test ! -s conftest.err
19683 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019684
19685cat >>confdefs.h <<\_ACEOF
19686#define HAVE_SETGROUPS 1
19687_ACEOF
19688
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019689 { echo "$as_me:$LINENO: result: yes" >&5
19690echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019691else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019693sed 's/^/| /' conftest.$ac_ext >&5
19694
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019695 { echo "$as_me:$LINENO: result: no" >&5
19696echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019697
19698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019699
19700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019701
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019702# check for openpty and forkpty
19703
Martin v. Löwis11437992002-04-12 09:54:03 +000019704
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019705for ac_func in openpty
19706do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019707as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19708{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19709echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019710if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019712else
Martin v. Löwis11437992002-04-12 09:54:03 +000019713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019714/* confdefs.h. */
19715_ACEOF
19716cat confdefs.h >>conftest.$ac_ext
19717cat >>conftest.$ac_ext <<_ACEOF
19718/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019719/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19720 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19721#define $ac_func innocuous_$ac_func
19722
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019723/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019724 which can conflict with char $ac_func (); below.
19725 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019726 <limits.h> exists even on freestanding compilers. */
19727
19728#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019729# include <limits.h>
19730#else
19731# include <assert.h>
19732#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019733
19734#undef $ac_func
19735
Martin v. Löwiseba40652007-08-30 20:10:57 +000019736/* Override any GCC internal prototype to avoid an error.
19737 Use char because int might match the return type of a GCC
19738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019739#ifdef __cplusplus
19740extern "C"
19741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019742char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019743/* The GNU C library defines this for functions which it implements
19744 to always fail with ENOSYS. Some functions are actually named
19745 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019746#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019747choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019748#endif
19749
Skip Montanaro6dead952003-09-25 14:50:04 +000019750int
19751main ()
19752{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019753return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019754 ;
19755 return 0;
19756}
19757_ACEOF
19758rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019759if { (ac_try="$ac_link"
19760case "(($ac_try" in
19761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19762 *) ac_try_echo=$ac_try;;
19763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019765 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019767 grep -v '^ *+' conftest.er1 >conftest.err
19768 rm -f conftest.er1
19769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019771 (exit $ac_status); } && {
19772 test -z "$ac_c_werror_flag" ||
19773 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019774 } && test -s conftest$ac_exeext &&
19775 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019776 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019777else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019779sed 's/^/| /' conftest.$ac_ext >&5
19780
Martin v. Löwiseba40652007-08-30 20:10:57 +000019781 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019783
19784rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019785 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019786fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019787ac_res=`eval echo '${'$as_ac_var'}'`
19788 { echo "$as_me:$LINENO: result: $ac_res" >&5
19789echo "${ECHO_T}$ac_res" >&6; }
19790if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019791 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019792#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019793_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019794
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019795else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019796 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19797echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019798if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019799 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019800else
Martin v. Löwis11437992002-04-12 09:54:03 +000019801 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019802LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019804/* confdefs.h. */
19805_ACEOF
19806cat confdefs.h >>conftest.$ac_ext
19807cat >>conftest.$ac_ext <<_ACEOF
19808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019809
Martin v. Löwiseba40652007-08-30 20:10:57 +000019810/* Override any GCC internal prototype to avoid an error.
19811 Use char because int might match the return type of a GCC
19812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019813#ifdef __cplusplus
19814extern "C"
19815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019816char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019817int
19818main ()
19819{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019820return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019821 ;
19822 return 0;
19823}
19824_ACEOF
19825rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019826if { (ac_try="$ac_link"
19827case "(($ac_try" in
19828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19829 *) ac_try_echo=$ac_try;;
19830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019832 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019834 grep -v '^ *+' conftest.er1 >conftest.err
19835 rm -f conftest.er1
19836 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019838 (exit $ac_status); } && {
19839 test -z "$ac_c_werror_flag" ||
19840 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019841 } && test -s conftest$ac_exeext &&
19842 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019843 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019846sed 's/^/| /' conftest.$ac_ext >&5
19847
Martin v. Löwiseba40652007-08-30 20:10:57 +000019848 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019850
19851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019853LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019854fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019855{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19856echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19857if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019858 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019859#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019860_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019861 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019862else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019863 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19864echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019865if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019866 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019867else
19868 ac_check_lib_save_LIBS=$LIBS
19869LIBS="-lbsd $LIBS"
19870cat >conftest.$ac_ext <<_ACEOF
19871/* confdefs.h. */
19872_ACEOF
19873cat confdefs.h >>conftest.$ac_ext
19874cat >>conftest.$ac_ext <<_ACEOF
19875/* end confdefs.h. */
19876
Martin v. Löwiseba40652007-08-30 20:10:57 +000019877/* Override any GCC internal prototype to avoid an error.
19878 Use char because int might match the return type of a GCC
19879 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019880#ifdef __cplusplus
19881extern "C"
19882#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019883char openpty ();
19884int
19885main ()
19886{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019887return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019888 ;
19889 return 0;
19890}
19891_ACEOF
19892rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019893if { (ac_try="$ac_link"
19894case "(($ac_try" in
19895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19896 *) ac_try_echo=$ac_try;;
19897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019899 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019900 ac_status=$?
19901 grep -v '^ *+' conftest.er1 >conftest.err
19902 rm -f conftest.er1
19903 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019905 (exit $ac_status); } && {
19906 test -z "$ac_c_werror_flag" ||
19907 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019908 } && test -s conftest$ac_exeext &&
19909 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019910 ac_cv_lib_bsd_openpty=yes
19911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019912 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019913sed 's/^/| /' conftest.$ac_ext >&5
19914
Martin v. Löwiseba40652007-08-30 20:10:57 +000019915 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019917
19918rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019919 conftest$ac_exeext conftest.$ac_ext
19920LIBS=$ac_check_lib_save_LIBS
19921fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019922{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19923echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19924if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019925 cat >>confdefs.h <<\_ACEOF
19926#define HAVE_OPENPTY 1
19927_ACEOF
19928 LIBS="$LIBS -lbsd"
19929fi
19930
19931
19932fi
19933
Fred Drake8cef4cf2000-06-28 16:40:38 +000019934
19935fi
19936done
19937
Martin v. Löwis11437992002-04-12 09:54:03 +000019938
Fred Drake8cef4cf2000-06-28 16:40:38 +000019939for ac_func in forkpty
19940do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019941as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19942{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19943echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019944if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019945 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019946else
Martin v. Löwis11437992002-04-12 09:54:03 +000019947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019948/* confdefs.h. */
19949_ACEOF
19950cat confdefs.h >>conftest.$ac_ext
19951cat >>conftest.$ac_ext <<_ACEOF
19952/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019953/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19954 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19955#define $ac_func innocuous_$ac_func
19956
Fred Drake8cef4cf2000-06-28 16:40:38 +000019957/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019958 which can conflict with char $ac_func (); below.
19959 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019960 <limits.h> exists even on freestanding compilers. */
19961
19962#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019963# include <limits.h>
19964#else
19965# include <assert.h>
19966#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019967
19968#undef $ac_func
19969
Martin v. Löwiseba40652007-08-30 20:10:57 +000019970/* Override any GCC internal prototype to avoid an error.
19971 Use char because int might match the return type of a GCC
19972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019973#ifdef __cplusplus
19974extern "C"
19975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019976char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019977/* The GNU C library defines this for functions which it implements
19978 to always fail with ENOSYS. Some functions are actually named
19979 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019980#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019981choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019982#endif
19983
Skip Montanaro6dead952003-09-25 14:50:04 +000019984int
19985main ()
19986{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019988 ;
19989 return 0;
19990}
19991_ACEOF
19992rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019993if { (ac_try="$ac_link"
19994case "(($ac_try" in
19995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19996 *) ac_try_echo=$ac_try;;
19997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019999 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020001 grep -v '^ *+' conftest.er1 >conftest.err
20002 rm -f conftest.er1
20003 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020005 (exit $ac_status); } && {
20006 test -z "$ac_c_werror_flag" ||
20007 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020008 } && test -s conftest$ac_exeext &&
20009 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020010 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020011else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020013sed 's/^/| /' conftest.$ac_ext >&5
20014
Martin v. Löwiseba40652007-08-30 20:10:57 +000020015 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020017
20018rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020019 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020020fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020021ac_res=`eval echo '${'$as_ac_var'}'`
20022 { echo "$as_me:$LINENO: result: $ac_res" >&5
20023echo "${ECHO_T}$ac_res" >&6; }
20024if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020025 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020026#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020027_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020028
Fred Drake8cef4cf2000-06-28 16:40:38 +000020029else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020030 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20031echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020032if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020033 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020034else
Martin v. Löwis11437992002-04-12 09:54:03 +000020035 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020036LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020037cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020038/* confdefs.h. */
20039_ACEOF
20040cat confdefs.h >>conftest.$ac_ext
20041cat >>conftest.$ac_ext <<_ACEOF
20042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020043
Martin v. Löwiseba40652007-08-30 20:10:57 +000020044/* Override any GCC internal prototype to avoid an error.
20045 Use char because int might match the return type of a GCC
20046 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020047#ifdef __cplusplus
20048extern "C"
20049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020050char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020051int
20052main ()
20053{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020054return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020055 ;
20056 return 0;
20057}
20058_ACEOF
20059rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020060if { (ac_try="$ac_link"
20061case "(($ac_try" in
20062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20063 *) ac_try_echo=$ac_try;;
20064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020066 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020068 grep -v '^ *+' conftest.er1 >conftest.err
20069 rm -f conftest.er1
20070 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072 (exit $ac_status); } && {
20073 test -z "$ac_c_werror_flag" ||
20074 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020075 } && test -s conftest$ac_exeext &&
20076 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020078else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020080sed 's/^/| /' conftest.$ac_ext >&5
20081
Martin v. Löwiseba40652007-08-30 20:10:57 +000020082 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020084
20085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020087LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020088fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020089{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20090echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20091if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020092 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020093#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020094_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020095 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020096else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020097 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20098echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020099if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020100 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020101else
20102 ac_check_lib_save_LIBS=$LIBS
20103LIBS="-lbsd $LIBS"
20104cat >conftest.$ac_ext <<_ACEOF
20105/* confdefs.h. */
20106_ACEOF
20107cat confdefs.h >>conftest.$ac_ext
20108cat >>conftest.$ac_ext <<_ACEOF
20109/* end confdefs.h. */
20110
Martin v. Löwiseba40652007-08-30 20:10:57 +000020111/* Override any GCC internal prototype to avoid an error.
20112 Use char because int might match the return type of a GCC
20113 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020114#ifdef __cplusplus
20115extern "C"
20116#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020117char forkpty ();
20118int
20119main ()
20120{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020121return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020122 ;
20123 return 0;
20124}
20125_ACEOF
20126rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020127if { (ac_try="$ac_link"
20128case "(($ac_try" in
20129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20130 *) ac_try_echo=$ac_try;;
20131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020134 ac_status=$?
20135 grep -v '^ *+' conftest.er1 >conftest.err
20136 rm -f conftest.er1
20137 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020139 (exit $ac_status); } && {
20140 test -z "$ac_c_werror_flag" ||
20141 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020142 } && test -s conftest$ac_exeext &&
20143 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020144 ac_cv_lib_bsd_forkpty=yes
20145else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020146 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020147sed 's/^/| /' conftest.$ac_ext >&5
20148
Martin v. Löwiseba40652007-08-30 20:10:57 +000020149 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020151
20152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020153 conftest$ac_exeext conftest.$ac_ext
20154LIBS=$ac_check_lib_save_LIBS
20155fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020156{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20157echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20158if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020159 cat >>confdefs.h <<\_ACEOF
20160#define HAVE_FORKPTY 1
20161_ACEOF
20162 LIBS="$LIBS -lbsd"
20163fi
20164
20165
20166fi
20167
Fred Drake8cef4cf2000-06-28 16:40:38 +000020168
20169fi
20170done
20171
Jack Jansendd19cf82001-12-06 22:36:17 +000020172
Brett Cannonaa5778d2008-03-18 04:09:00 +000020173# Stuff for expat.
20174
20175for ac_func in memmove
20176do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020177as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20178{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20179echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020180if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020181 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020182else
20183 cat >conftest.$ac_ext <<_ACEOF
20184/* confdefs.h. */
20185_ACEOF
20186cat confdefs.h >>conftest.$ac_ext
20187cat >>conftest.$ac_ext <<_ACEOF
20188/* end confdefs.h. */
20189/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20190 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20191#define $ac_func innocuous_$ac_func
20192
20193/* System header to define __stub macros and hopefully few prototypes,
20194 which can conflict with char $ac_func (); below.
20195 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20196 <limits.h> exists even on freestanding compilers. */
20197
20198#ifdef __STDC__
20199# include <limits.h>
20200#else
20201# include <assert.h>
20202#endif
20203
20204#undef $ac_func
20205
20206/* Override any GCC internal prototype to avoid an error.
20207 Use char because int might match the return type of a GCC
20208 builtin and then its argument prototype would still apply. */
20209#ifdef __cplusplus
20210extern "C"
20211#endif
20212char $ac_func ();
20213/* The GNU C library defines this for functions which it implements
20214 to always fail with ENOSYS. Some functions are actually named
20215 something starting with __ and the normal name is an alias. */
20216#if defined __stub_$ac_func || defined __stub___$ac_func
20217choke me
20218#endif
20219
20220int
20221main ()
20222{
20223return $ac_func ();
20224 ;
20225 return 0;
20226}
20227_ACEOF
20228rm -f conftest.$ac_objext conftest$ac_exeext
20229if { (ac_try="$ac_link"
20230case "(($ac_try" in
20231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20232 *) ac_try_echo=$ac_try;;
20233esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020235 (eval "$ac_link") 2>conftest.er1
20236 ac_status=$?
20237 grep -v '^ *+' conftest.er1 >conftest.err
20238 rm -f conftest.er1
20239 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020241 (exit $ac_status); } && {
20242 test -z "$ac_c_werror_flag" ||
20243 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020244 } && test -s conftest$ac_exeext &&
20245 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020246 eval "$as_ac_var=yes"
20247else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020248 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020249sed 's/^/| /' conftest.$ac_ext >&5
20250
20251 eval "$as_ac_var=no"
20252fi
20253
20254rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20255 conftest$ac_exeext conftest.$ac_ext
20256fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020257ac_res=`eval echo '${'$as_ac_var'}'`
20258 { echo "$as_me:$LINENO: result: $ac_res" >&5
20259echo "${ECHO_T}$ac_res" >&6; }
20260if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020261 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020262#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020263_ACEOF
20264
20265fi
20266done
20267
20268
Michael W. Hudson54241132001-12-07 15:38:26 +000020269# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020270
20271
20272
20273
20274
20275
Fred Drake8cef4cf2000-06-28 16:40:38 +000020276for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20277do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020278as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20279{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20280echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020281if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020282 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020283else
Martin v. Löwis11437992002-04-12 09:54:03 +000020284 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020285/* confdefs.h. */
20286_ACEOF
20287cat confdefs.h >>conftest.$ac_ext
20288cat >>conftest.$ac_ext <<_ACEOF
20289/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020290/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20291 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20292#define $ac_func innocuous_$ac_func
20293
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020294/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020295 which can conflict with char $ac_func (); below.
20296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020297 <limits.h> exists even on freestanding compilers. */
20298
20299#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020300# include <limits.h>
20301#else
20302# include <assert.h>
20303#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020304
20305#undef $ac_func
20306
Martin v. Löwiseba40652007-08-30 20:10:57 +000020307/* Override any GCC internal prototype to avoid an error.
20308 Use char because int might match the return type of a GCC
20309 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020310#ifdef __cplusplus
20311extern "C"
20312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020313char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020314/* The GNU C library defines this for functions which it implements
20315 to always fail with ENOSYS. Some functions are actually named
20316 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020317#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020318choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020319#endif
20320
Skip Montanaro6dead952003-09-25 14:50:04 +000020321int
20322main ()
20323{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020324return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020325 ;
20326 return 0;
20327}
20328_ACEOF
20329rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020330if { (ac_try="$ac_link"
20331case "(($ac_try" in
20332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20333 *) ac_try_echo=$ac_try;;
20334esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020336 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020338 grep -v '^ *+' conftest.er1 >conftest.err
20339 rm -f conftest.er1
20340 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020342 (exit $ac_status); } && {
20343 test -z "$ac_c_werror_flag" ||
20344 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020345 } && test -s conftest$ac_exeext &&
20346 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020347 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020348else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020350sed 's/^/| /' conftest.$ac_ext >&5
20351
Martin v. Löwiseba40652007-08-30 20:10:57 +000020352 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020354
20355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020356 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020357fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020358ac_res=`eval echo '${'$as_ac_var'}'`
20359 { echo "$as_me:$LINENO: result: $ac_res" >&5
20360echo "${ECHO_T}$ac_res" >&6; }
20361if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020362 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020363#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020364_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020365
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020366fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020367done
20368
Michael W. Hudson54241132001-12-07 15:38:26 +000020369
Martin v. Löwis11437992002-04-12 09:54:03 +000020370
20371
20372
Brett Cannonaa5778d2008-03-18 04:09:00 +000020373for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020374do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020375as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20376{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20377echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020378if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020379 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020380else
Martin v. Löwis11437992002-04-12 09:54:03 +000020381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020382/* confdefs.h. */
20383_ACEOF
20384cat confdefs.h >>conftest.$ac_ext
20385cat >>conftest.$ac_ext <<_ACEOF
20386/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020387/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20388 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20389#define $ac_func innocuous_$ac_func
20390
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020391/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020392 which can conflict with char $ac_func (); below.
20393 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020394 <limits.h> exists even on freestanding compilers. */
20395
20396#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020397# include <limits.h>
20398#else
20399# include <assert.h>
20400#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020401
20402#undef $ac_func
20403
Martin v. Löwiseba40652007-08-30 20:10:57 +000020404/* Override any GCC internal prototype to avoid an error.
20405 Use char because int might match the return type of a GCC
20406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020407#ifdef __cplusplus
20408extern "C"
20409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020410char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020411/* The GNU C library defines this for functions which it implements
20412 to always fail with ENOSYS. Some functions are actually named
20413 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020414#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020415choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020416#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020417
Skip Montanaro6dead952003-09-25 14:50:04 +000020418int
20419main ()
20420{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020421return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020422 ;
20423 return 0;
20424}
20425_ACEOF
20426rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020427if { (ac_try="$ac_link"
20428case "(($ac_try" in
20429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20430 *) ac_try_echo=$ac_try;;
20431esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020433 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020435 grep -v '^ *+' conftest.er1 >conftest.err
20436 rm -f conftest.er1
20437 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439 (exit $ac_status); } && {
20440 test -z "$ac_c_werror_flag" ||
20441 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020442 } && test -s conftest$ac_exeext &&
20443 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020444 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020445else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020447sed 's/^/| /' conftest.$ac_ext >&5
20448
Martin v. Löwiseba40652007-08-30 20:10:57 +000020449 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020451
20452rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020453 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020454fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020455ac_res=`eval echo '${'$as_ac_var'}'`
20456 { echo "$as_me:$LINENO: result: $ac_res" >&5
20457echo "${ECHO_T}$ac_res" >&6; }
20458if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020459 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020460#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020461_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020462
Martin v. Löwis1142de32002-03-29 16:28:31 +000020463else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020464 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020465 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020466 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20467 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020468esac
20469
Martin v. Löwis1142de32002-03-29 16:28:31 +000020470fi
20471done
20472
20473
Martin v. Löwis11437992002-04-12 09:54:03 +000020474
Martin v. Löwis1142de32002-03-29 16:28:31 +000020475for ac_func in getpgrp
20476do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020477as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20478{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20479echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020480if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020482else
Martin v. Löwis11437992002-04-12 09:54:03 +000020483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020484/* confdefs.h. */
20485_ACEOF
20486cat confdefs.h >>conftest.$ac_ext
20487cat >>conftest.$ac_ext <<_ACEOF
20488/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020489/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20490 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20491#define $ac_func innocuous_$ac_func
20492
Martin v. Löwis1142de32002-03-29 16:28:31 +000020493/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020494 which can conflict with char $ac_func (); below.
20495 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020496 <limits.h> exists even on freestanding compilers. */
20497
20498#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020499# include <limits.h>
20500#else
20501# include <assert.h>
20502#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020503
20504#undef $ac_func
20505
Martin v. Löwiseba40652007-08-30 20:10:57 +000020506/* Override any GCC internal prototype to avoid an error.
20507 Use char because int might match the return type of a GCC
20508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020509#ifdef __cplusplus
20510extern "C"
20511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020512char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020513/* The GNU C library defines this for functions which it implements
20514 to always fail with ENOSYS. Some functions are actually named
20515 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020516#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020517choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020518#endif
20519
Skip Montanaro6dead952003-09-25 14:50:04 +000020520int
20521main ()
20522{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020523return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020524 ;
20525 return 0;
20526}
20527_ACEOF
20528rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020529if { (ac_try="$ac_link"
20530case "(($ac_try" in
20531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20532 *) ac_try_echo=$ac_try;;
20533esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020537 grep -v '^ *+' conftest.er1 >conftest.err
20538 rm -f conftest.er1
20539 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020541 (exit $ac_status); } && {
20542 test -z "$ac_c_werror_flag" ||
20543 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020544 } && test -s conftest$ac_exeext &&
20545 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020546 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020549sed 's/^/| /' conftest.$ac_ext >&5
20550
Martin v. Löwiseba40652007-08-30 20:10:57 +000020551 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020553
20554rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020555 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020557ac_res=`eval echo '${'$as_ac_var'}'`
20558 { echo "$as_me:$LINENO: result: $ac_res" >&5
20559echo "${ECHO_T}$ac_res" >&6; }
20560if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020561 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020562#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020563_ACEOF
20564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020565/* confdefs.h. */
20566_ACEOF
20567cat confdefs.h >>conftest.$ac_ext
20568cat >>conftest.$ac_ext <<_ACEOF
20569/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020570#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020571int
20572main ()
20573{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020574getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020575 ;
20576 return 0;
20577}
20578_ACEOF
20579rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020580if { (ac_try="$ac_compile"
20581case "(($ac_try" in
20582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20583 *) ac_try_echo=$ac_try;;
20584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020588 grep -v '^ *+' conftest.er1 >conftest.err
20589 rm -f conftest.er1
20590 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020592 (exit $ac_status); } && {
20593 test -z "$ac_c_werror_flag" ||
20594 test ! -s conftest.err
20595 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020596
20597cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020598#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020599_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020600
Martin v. Löwis11437992002-04-12 09:54:03 +000020601
Guido van Rossumf78abae1997-01-21 22:02:36 +000020602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020604sed 's/^/| /' conftest.$ac_ext >&5
20605
Martin v. Löwiseba40652007-08-30 20:10:57 +000020606
Guido van Rossum627b2d71993-12-24 10:39:16 +000020607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020608
20609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020610
Guido van Rossum627b2d71993-12-24 10:39:16 +000020611fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020612done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020613
Jack Jansen150753c2003-03-29 22:07:47 +000020614
20615for ac_func in setpgrp
20616do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020617as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20618{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20619echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020620if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020621 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020622else
Martin v. Löwis11437992002-04-12 09:54:03 +000020623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020624/* confdefs.h. */
20625_ACEOF
20626cat confdefs.h >>conftest.$ac_ext
20627cat >>conftest.$ac_ext <<_ACEOF
20628/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020629/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20630 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20631#define $ac_func innocuous_$ac_func
20632
Jack Jansen150753c2003-03-29 22:07:47 +000020633/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020634 which can conflict with char $ac_func (); below.
20635 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020636 <limits.h> exists even on freestanding compilers. */
20637
20638#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020639# include <limits.h>
20640#else
20641# include <assert.h>
20642#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020643
20644#undef $ac_func
20645
Martin v. Löwiseba40652007-08-30 20:10:57 +000020646/* Override any GCC internal prototype to avoid an error.
20647 Use char because int might match the return type of a GCC
20648 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020649#ifdef __cplusplus
20650extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020651#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020652char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020653/* The GNU C library defines this for functions which it implements
20654 to always fail with ENOSYS. Some functions are actually named
20655 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020656#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020657choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020658#endif
20659
Skip Montanaro6dead952003-09-25 14:50:04 +000020660int
20661main ()
20662{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020663return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020664 ;
20665 return 0;
20666}
20667_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020668rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669if { (ac_try="$ac_link"
20670case "(($ac_try" in
20671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20672 *) ac_try_echo=$ac_try;;
20673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020675 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020677 grep -v '^ *+' conftest.er1 >conftest.err
20678 rm -f conftest.er1
20679 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020681 (exit $ac_status); } && {
20682 test -z "$ac_c_werror_flag" ||
20683 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020684 } && test -s conftest$ac_exeext &&
20685 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020686 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020687else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020689sed 's/^/| /' conftest.$ac_ext >&5
20690
Martin v. Löwiseba40652007-08-30 20:10:57 +000020691 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020693
20694rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020695 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020696fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020697ac_res=`eval echo '${'$as_ac_var'}'`
20698 { echo "$as_me:$LINENO: result: $ac_res" >&5
20699echo "${ECHO_T}$ac_res" >&6; }
20700if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020701 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020702#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020703_ACEOF
20704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020705/* confdefs.h. */
20706_ACEOF
20707cat confdefs.h >>conftest.$ac_ext
20708cat >>conftest.$ac_ext <<_ACEOF
20709/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020710#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020711int
20712main ()
20713{
20714setpgrp(0,0);
20715 ;
20716 return 0;
20717}
20718_ACEOF
20719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020720if { (ac_try="$ac_compile"
20721case "(($ac_try" in
20722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20723 *) ac_try_echo=$ac_try;;
20724esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020726 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020728 grep -v '^ *+' conftest.er1 >conftest.err
20729 rm -f conftest.er1
20730 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732 (exit $ac_status); } && {
20733 test -z "$ac_c_werror_flag" ||
20734 test ! -s conftest.err
20735 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020736
20737cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020738#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020739_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020740
Jack Jansen150753c2003-03-29 22:07:47 +000020741
20742else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020744sed 's/^/| /' conftest.$ac_ext >&5
20745
Martin v. Löwiseba40652007-08-30 20:10:57 +000020746
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020748
20749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020750
20751fi
20752done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020753
Martin v. Löwis11437992002-04-12 09:54:03 +000020754
Thomas Wouters3a584202000-08-05 23:28:51 +000020755for ac_func in gettimeofday
20756do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020757as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20758{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20759echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020760if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020762else
Martin v. Löwis11437992002-04-12 09:54:03 +000020763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020764/* confdefs.h. */
20765_ACEOF
20766cat confdefs.h >>conftest.$ac_ext
20767cat >>conftest.$ac_ext <<_ACEOF
20768/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020769/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20770 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20771#define $ac_func innocuous_$ac_func
20772
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020773/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020774 which can conflict with char $ac_func (); below.
20775 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020776 <limits.h> exists even on freestanding compilers. */
20777
20778#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020779# include <limits.h>
20780#else
20781# include <assert.h>
20782#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020783
20784#undef $ac_func
20785
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786/* Override any GCC internal prototype to avoid an error.
20787 Use char because int might match the return type of a GCC
20788 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020789#ifdef __cplusplus
20790extern "C"
20791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020792char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020793/* The GNU C library defines this for functions which it implements
20794 to always fail with ENOSYS. Some functions are actually named
20795 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020796#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020797choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020798#endif
20799
Skip Montanaro6dead952003-09-25 14:50:04 +000020800int
20801main ()
20802{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020803return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020804 ;
20805 return 0;
20806}
20807_ACEOF
20808rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020809if { (ac_try="$ac_link"
20810case "(($ac_try" in
20811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20812 *) ac_try_echo=$ac_try;;
20813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020815 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020817 grep -v '^ *+' conftest.er1 >conftest.err
20818 rm -f conftest.er1
20819 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020821 (exit $ac_status); } && {
20822 test -z "$ac_c_werror_flag" ||
20823 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020824 } && test -s conftest$ac_exeext &&
20825 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020826 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020827else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020829sed 's/^/| /' conftest.$ac_ext >&5
20830
Martin v. Löwiseba40652007-08-30 20:10:57 +000020831 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020833
20834rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020835 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020836fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020837ac_res=`eval echo '${'$as_ac_var'}'`
20838 { echo "$as_me:$LINENO: result: $ac_res" >&5
20839echo "${ECHO_T}$ac_res" >&6; }
20840if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020841 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020842#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020843_ACEOF
20844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020845/* confdefs.h. */
20846_ACEOF
20847cat confdefs.h >>conftest.$ac_ext
20848cat >>conftest.$ac_ext <<_ACEOF
20849/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020850#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020851int
20852main ()
20853{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020854gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020855 ;
20856 return 0;
20857}
20858_ACEOF
20859rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020860if { (ac_try="$ac_compile"
20861case "(($ac_try" in
20862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20863 *) ac_try_echo=$ac_try;;
20864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020868 grep -v '^ *+' conftest.er1 >conftest.err
20869 rm -f conftest.er1
20870 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020872 (exit $ac_status); } && {
20873 test -z "$ac_c_werror_flag" ||
20874 test ! -s conftest.err
20875 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020876 :
20877else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020879sed 's/^/| /' conftest.$ac_ext >&5
20880
Martin v. Löwis11437992002-04-12 09:54:03 +000020881
20882cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020883#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020884_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020885
Martin v. Löwis11437992002-04-12 09:54:03 +000020886
Guido van Rossum627b2d71993-12-24 10:39:16 +000020887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020888
20889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020890
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020891fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020892done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020893
Michael W. Hudson54241132001-12-07 15:38:26 +000020894
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020895{ echo "$as_me:$LINENO: checking for major" >&5
20896echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020897cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020898/* confdefs.h. */
20899_ACEOF
20900cat confdefs.h >>conftest.$ac_ext
20901cat >>conftest.$ac_ext <<_ACEOF
20902/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020903
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020904#if defined(MAJOR_IN_MKDEV)
20905#include <sys/mkdev.h>
20906#elif defined(MAJOR_IN_SYSMACROS)
20907#include <sys/sysmacros.h>
20908#else
20909#include <sys/types.h>
20910#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020911
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020912int
20913main ()
20914{
20915
20916 makedev(major(0),minor(0));
20917
20918 ;
20919 return 0;
20920}
20921_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020922rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020923if { (ac_try="$ac_link"
20924case "(($ac_try" in
20925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20926 *) ac_try_echo=$ac_try;;
20927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020929 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020931 grep -v '^ *+' conftest.er1 >conftest.err
20932 rm -f conftest.er1
20933 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020935 (exit $ac_status); } && {
20936 test -z "$ac_c_werror_flag" ||
20937 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020938 } && test -s conftest$ac_exeext &&
20939 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020940
20941
20942cat >>confdefs.h <<\_ACEOF
20943#define HAVE_DEVICE_MACROS 1
20944_ACEOF
20945
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020946 { echo "$as_me:$LINENO: result: yes" >&5
20947echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020948
20949else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020951sed 's/^/| /' conftest.$ac_ext >&5
20952
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020953
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020954 { echo "$as_me:$LINENO: result: no" >&5
20955echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020956
20957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020958
20959rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020960 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020961
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020962# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020963# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020964{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20965echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020966cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020967/* confdefs.h. */
20968_ACEOF
20969cat confdefs.h >>conftest.$ac_ext
20970cat >>conftest.$ac_ext <<_ACEOF
20971/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020972
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020973#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020974#include <sys/socket.h>
20975#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020976#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020977
Martin v. Löwis11437992002-04-12 09:54:03 +000020978int
20979main ()
20980{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020981getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020982 ;
20983 return 0;
20984}
20985_ACEOF
20986rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020987if { (ac_try="$ac_link"
20988case "(($ac_try" in
20989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20990 *) ac_try_echo=$ac_try;;
20991esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020993 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020995 grep -v '^ *+' conftest.er1 >conftest.err
20996 rm -f conftest.er1
20997 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020999 (exit $ac_status); } && {
21000 test -z "$ac_c_werror_flag" ||
21001 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021002 } && test -s conftest$ac_exeext &&
21003 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021004 have_getaddrinfo=yes
21005else
21006 echo "$as_me: failed program was:" >&5
21007sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021008
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021009 have_getaddrinfo=no
21010fi
21011
21012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21013 conftest$ac_exeext conftest.$ac_ext
21014{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21015echo "${ECHO_T}$have_getaddrinfo" >&6; }
21016if test $have_getaddrinfo = yes
21017then
21018 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021019echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021020 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21021 echo $ECHO_N "(cached) $ECHO_C" >&6
21022else
21023 if test "$cross_compiling" = yes; then
21024 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021025else
Martin v. Löwis11437992002-04-12 09:54:03 +000021026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021027/* confdefs.h. */
21028_ACEOF
21029cat confdefs.h >>conftest.$ac_ext
21030cat >>conftest.$ac_ext <<_ACEOF
21031/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021032
21033#include <sys/types.h>
21034#include <netdb.h>
21035#include <string.h>
21036#include <sys/socket.h>
21037#include <netinet/in.h>
21038
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021039int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021040{
21041 int passive, gaierr, inet4 = 0, inet6 = 0;
21042 struct addrinfo hints, *ai, *aitop;
21043 char straddr[INET6_ADDRSTRLEN], strport[16];
21044
21045 for (passive = 0; passive <= 1; passive++) {
21046 memset(&hints, 0, sizeof(hints));
21047 hints.ai_family = AF_UNSPEC;
21048 hints.ai_flags = passive ? AI_PASSIVE : 0;
21049 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021050 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021051 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21052 (void)gai_strerror(gaierr);
21053 goto bad;
21054 }
21055 for (ai = aitop; ai; ai = ai->ai_next) {
21056 if (ai->ai_addr == NULL ||
21057 ai->ai_addrlen == 0 ||
21058 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21059 straddr, sizeof(straddr), strport, sizeof(strport),
21060 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21061 goto bad;
21062 }
21063 switch (ai->ai_family) {
21064 case AF_INET:
21065 if (strcmp(strport, "54321") != 0) {
21066 goto bad;
21067 }
21068 if (passive) {
21069 if (strcmp(straddr, "0.0.0.0") != 0) {
21070 goto bad;
21071 }
21072 } else {
21073 if (strcmp(straddr, "127.0.0.1") != 0) {
21074 goto bad;
21075 }
21076 }
21077 inet4++;
21078 break;
21079 case AF_INET6:
21080 if (strcmp(strport, "54321") != 0) {
21081 goto bad;
21082 }
21083 if (passive) {
21084 if (strcmp(straddr, "::") != 0) {
21085 goto bad;
21086 }
21087 } else {
21088 if (strcmp(straddr, "::1") != 0) {
21089 goto bad;
21090 }
21091 }
21092 inet6++;
21093 break;
21094 case AF_UNSPEC:
21095 goto bad;
21096 break;
21097 default:
21098 /* another family support? */
21099 break;
21100 }
21101 }
21102 }
21103
21104 if (!(inet4 == 0 || inet4 == 2))
21105 goto bad;
21106 if (!(inet6 == 0 || inet6 == 2))
21107 goto bad;
21108
21109 if (aitop)
21110 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021111 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021112
21113 bad:
21114 if (aitop)
21115 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021116 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021117}
21118
Martin v. Löwis11437992002-04-12 09:54:03 +000021119_ACEOF
21120rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021121if { (ac_try="$ac_link"
21122case "(($ac_try" in
21123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21124 *) ac_try_echo=$ac_try;;
21125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021127 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021131 { (case "(($ac_try" in
21132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21133 *) ac_try_echo=$ac_try;;
21134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021136 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021137 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021139 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021140 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021142 echo "$as_me: program exited with status $ac_status" >&5
21143echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021144sed 's/^/| /' conftest.$ac_ext >&5
21145
Martin v. Löwis11437992002-04-12 09:54:03 +000021146( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021147ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021149rm -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 +000021150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021151
21152
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021153fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021154
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021156
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021157if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021158then
21159 if test $ipv6 = yes
21160 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021161 echo 'Fatal: You must get working getaddrinfo() function.'
21162 echo ' or you can specify "--disable-ipv6"'.
21163 exit 1
21164 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021165else
Martin v. Löwis11437992002-04-12 09:54:03 +000021166
21167cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021168#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021169_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021170
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021172
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021173for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021174do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021175as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21176{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21177echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021178if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021179 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021180else
Martin v. Löwis11437992002-04-12 09:54:03 +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. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021187/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21188 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21189#define $ac_func innocuous_$ac_func
21190
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021191/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021192 which can conflict with char $ac_func (); below.
21193 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021194 <limits.h> exists even on freestanding compilers. */
21195
21196#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021197# include <limits.h>
21198#else
21199# include <assert.h>
21200#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021201
21202#undef $ac_func
21203
Martin v. Löwiseba40652007-08-30 20:10:57 +000021204/* Override any GCC internal prototype to avoid an error.
21205 Use char because int might match the return type of a GCC
21206 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021207#ifdef __cplusplus
21208extern "C"
21209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021210char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021211/* The GNU C library defines this for functions which it implements
21212 to always fail with ENOSYS. Some functions are actually named
21213 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021214#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021215choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021216#endif
21217
Skip Montanaro6dead952003-09-25 14:50:04 +000021218int
21219main ()
21220{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021221return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021222 ;
21223 return 0;
21224}
21225_ACEOF
21226rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021227if { (ac_try="$ac_link"
21228case "(($ac_try" in
21229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21230 *) ac_try_echo=$ac_try;;
21231esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021235 grep -v '^ *+' conftest.er1 >conftest.err
21236 rm -f conftest.er1
21237 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021239 (exit $ac_status); } && {
21240 test -z "$ac_c_werror_flag" ||
21241 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021242 } && test -s conftest$ac_exeext &&
21243 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021244 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021245else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021247sed 's/^/| /' conftest.$ac_ext >&5
21248
Martin v. Löwiseba40652007-08-30 20:10:57 +000021249 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021251
21252rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021253 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021254fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021255ac_res=`eval echo '${'$as_ac_var'}'`
21256 { echo "$as_me:$LINENO: result: $ac_res" >&5
21257echo "${ECHO_T}$ac_res" >&6; }
21258if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021259 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021260#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021261_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021262
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021263fi
21264done
21265
Michael W. Hudson54241132001-12-07 15:38:26 +000021266
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021267# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021268{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21269echo $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 +000021270if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021271 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021272else
Martin v. Löwis11437992002-04-12 09:54:03 +000021273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021274/* confdefs.h. */
21275_ACEOF
21276cat confdefs.h >>conftest.$ac_ext
21277cat >>conftest.$ac_ext <<_ACEOF
21278/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021279#include <sys/types.h>
21280#include <sys/time.h>
21281#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021282
Martin v. Löwis11437992002-04-12 09:54:03 +000021283int
21284main ()
21285{
21286if ((struct tm *) 0)
21287return 0;
21288 ;
21289 return 0;
21290}
21291_ACEOF
21292rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021293if { (ac_try="$ac_compile"
21294case "(($ac_try" in
21295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21296 *) ac_try_echo=$ac_try;;
21297esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021301 grep -v '^ *+' conftest.er1 >conftest.err
21302 rm -f conftest.er1
21303 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021305 (exit $ac_status); } && {
21306 test -z "$ac_c_werror_flag" ||
21307 test ! -s conftest.err
21308 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021309 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021312sed 's/^/| /' conftest.$ac_ext >&5
21313
Martin v. Löwiseba40652007-08-30 20:10:57 +000021314 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021316
21317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021318fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021319{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21320echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021321if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021322
21323cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021324#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021325_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021326
21327fi
21328
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021329{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21330echo $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 +000021331if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021333else
Martin v. Löwis11437992002-04-12 09:54:03 +000021334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021335/* confdefs.h. */
21336_ACEOF
21337cat confdefs.h >>conftest.$ac_ext
21338cat >>conftest.$ac_ext <<_ACEOF
21339/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021340#include <sys/types.h>
21341#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021342
Martin v. Löwis11437992002-04-12 09:54:03 +000021343int
21344main ()
21345{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021346struct tm tm;
21347 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021348 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021349 ;
21350 return 0;
21351}
21352_ACEOF
21353rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021354if { (ac_try="$ac_compile"
21355case "(($ac_try" in
21356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21357 *) ac_try_echo=$ac_try;;
21358esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021362 grep -v '^ *+' conftest.er1 >conftest.err
21363 rm -f conftest.er1
21364 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021366 (exit $ac_status); } && {
21367 test -z "$ac_c_werror_flag" ||
21368 test ! -s conftest.err
21369 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021370 ac_cv_struct_tm=time.h
21371else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021373sed 's/^/| /' conftest.$ac_ext >&5
21374
Martin v. Löwiseba40652007-08-30 20:10:57 +000021375 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021377
21378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021379fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021380{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21381echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021382if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021383
21384cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021385#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021386_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021387
21388fi
21389
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021390{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21391echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021392if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021394else
Martin v. Löwis11437992002-04-12 09:54:03 +000021395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021396/* confdefs.h. */
21397_ACEOF
21398cat confdefs.h >>conftest.$ac_ext
21399cat >>conftest.$ac_ext <<_ACEOF
21400/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021401#include <sys/types.h>
21402#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021403
21404
Martin v. Löwis11437992002-04-12 09:54:03 +000021405int
21406main ()
21407{
21408static struct tm ac_aggr;
21409if (ac_aggr.tm_zone)
21410return 0;
21411 ;
21412 return 0;
21413}
21414_ACEOF
21415rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021416if { (ac_try="$ac_compile"
21417case "(($ac_try" in
21418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21419 *) ac_try_echo=$ac_try;;
21420esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021424 grep -v '^ *+' conftest.er1 >conftest.err
21425 rm -f conftest.er1
21426 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021428 (exit $ac_status); } && {
21429 test -z "$ac_c_werror_flag" ||
21430 test ! -s conftest.err
21431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021432 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021433else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021435sed 's/^/| /' conftest.$ac_ext >&5
21436
Martin v. Löwiseba40652007-08-30 20:10:57 +000021437 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021438/* confdefs.h. */
21439_ACEOF
21440cat confdefs.h >>conftest.$ac_ext
21441cat >>conftest.$ac_ext <<_ACEOF
21442/* end confdefs.h. */
21443#include <sys/types.h>
21444#include <$ac_cv_struct_tm>
21445
21446
21447int
21448main ()
21449{
21450static struct tm ac_aggr;
21451if (sizeof ac_aggr.tm_zone)
21452return 0;
21453 ;
21454 return 0;
21455}
21456_ACEOF
21457rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021458if { (ac_try="$ac_compile"
21459case "(($ac_try" in
21460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21461 *) ac_try_echo=$ac_try;;
21462esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021464 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021466 grep -v '^ *+' conftest.er1 >conftest.err
21467 rm -f conftest.er1
21468 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021470 (exit $ac_status); } && {
21471 test -z "$ac_c_werror_flag" ||
21472 test ! -s conftest.err
21473 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021474 ac_cv_member_struct_tm_tm_zone=yes
21475else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021477sed 's/^/| /' conftest.$ac_ext >&5
21478
Martin v. Löwiseba40652007-08-30 20:10:57 +000021479 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021481
21482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021484
21485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021486fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021487{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21488echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21489if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021490
21491cat >>confdefs.h <<_ACEOF
21492#define HAVE_STRUCT_TM_TM_ZONE 1
21493_ACEOF
21494
21495
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021496fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021497
Martin v. Löwis11437992002-04-12 09:54:03 +000021498if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21499
21500cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021501#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021503
21504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021505 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21506echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021507if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021508 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021509else
21510 cat >conftest.$ac_ext <<_ACEOF
21511/* confdefs.h. */
21512_ACEOF
21513cat confdefs.h >>conftest.$ac_ext
21514cat >>conftest.$ac_ext <<_ACEOF
21515/* end confdefs.h. */
21516#include <time.h>
21517
21518int
21519main ()
21520{
21521#ifndef tzname
21522 (void) tzname;
21523#endif
21524
21525 ;
21526 return 0;
21527}
21528_ACEOF
21529rm -f conftest.$ac_objext
21530if { (ac_try="$ac_compile"
21531case "(($ac_try" in
21532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21533 *) ac_try_echo=$ac_try;;
21534esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021536 (eval "$ac_compile") 2>conftest.er1
21537 ac_status=$?
21538 grep -v '^ *+' conftest.er1 >conftest.err
21539 rm -f conftest.er1
21540 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021542 (exit $ac_status); } && {
21543 test -z "$ac_c_werror_flag" ||
21544 test ! -s conftest.err
21545 } && test -s conftest.$ac_objext; then
21546 ac_cv_have_decl_tzname=yes
21547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021548 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021549sed 's/^/| /' conftest.$ac_ext >&5
21550
21551 ac_cv_have_decl_tzname=no
21552fi
21553
21554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21555fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021556{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21557echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21558if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021559
21560cat >>confdefs.h <<_ACEOF
21561#define HAVE_DECL_TZNAME 1
21562_ACEOF
21563
21564
21565else
21566 cat >>confdefs.h <<_ACEOF
21567#define HAVE_DECL_TZNAME 0
21568_ACEOF
21569
21570
21571fi
21572
21573
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021574 { echo "$as_me:$LINENO: checking for tzname" >&5
21575echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021576if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021577 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021578else
Martin v. Löwis11437992002-04-12 09:54:03 +000021579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021580/* confdefs.h. */
21581_ACEOF
21582cat confdefs.h >>conftest.$ac_ext
21583cat >>conftest.$ac_ext <<_ACEOF
21584/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021585#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021586#if !HAVE_DECL_TZNAME
21587extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021589
Martin v. Löwis11437992002-04-12 09:54:03 +000021590int
21591main ()
21592{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021593return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021594 ;
21595 return 0;
21596}
21597_ACEOF
21598rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021599if { (ac_try="$ac_link"
21600case "(($ac_try" in
21601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21602 *) ac_try_echo=$ac_try;;
21603esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021605 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021607 grep -v '^ *+' conftest.er1 >conftest.err
21608 rm -f conftest.er1
21609 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021611 (exit $ac_status); } && {
21612 test -z "$ac_c_werror_flag" ||
21613 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021614 } && test -s conftest$ac_exeext &&
21615 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021616 ac_cv_var_tzname=yes
21617else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021619sed 's/^/| /' conftest.$ac_ext >&5
21620
Martin v. Löwiseba40652007-08-30 20:10:57 +000021621 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021623
21624rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021625 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021626fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021627{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21628echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021629 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021630
21631cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021632#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021633_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021634
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021635 fi
21636fi
21637
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021638{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21639echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021640if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021641 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021642else
21643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021644/* confdefs.h. */
21645_ACEOF
21646cat confdefs.h >>conftest.$ac_ext
21647cat >>conftest.$ac_ext <<_ACEOF
21648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021649$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021650int
21651main ()
21652{
21653static struct stat ac_aggr;
21654if (ac_aggr.st_rdev)
21655return 0;
21656 ;
21657 return 0;
21658}
21659_ACEOF
21660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021661if { (ac_try="$ac_compile"
21662case "(($ac_try" in
21663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21664 *) ac_try_echo=$ac_try;;
21665esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021669 grep -v '^ *+' conftest.er1 >conftest.err
21670 rm -f conftest.er1
21671 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021673 (exit $ac_status); } && {
21674 test -z "$ac_c_werror_flag" ||
21675 test ! -s conftest.err
21676 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021677 ac_cv_member_struct_stat_st_rdev=yes
21678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021680sed 's/^/| /' conftest.$ac_ext >&5
21681
Martin v. Löwiseba40652007-08-30 20:10:57 +000021682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021683/* confdefs.h. */
21684_ACEOF
21685cat confdefs.h >>conftest.$ac_ext
21686cat >>conftest.$ac_ext <<_ACEOF
21687/* end confdefs.h. */
21688$ac_includes_default
21689int
21690main ()
21691{
21692static struct stat ac_aggr;
21693if (sizeof ac_aggr.st_rdev)
21694return 0;
21695 ;
21696 return 0;
21697}
21698_ACEOF
21699rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021700if { (ac_try="$ac_compile"
21701case "(($ac_try" in
21702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21703 *) ac_try_echo=$ac_try;;
21704esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021706 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021708 grep -v '^ *+' conftest.er1 >conftest.err
21709 rm -f conftest.er1
21710 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021712 (exit $ac_status); } && {
21713 test -z "$ac_c_werror_flag" ||
21714 test ! -s conftest.err
21715 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021716 ac_cv_member_struct_stat_st_rdev=yes
21717else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021719sed 's/^/| /' conftest.$ac_ext >&5
21720
Martin v. Löwiseba40652007-08-30 20:10:57 +000021721 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021723
21724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021726
21727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021728fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021729{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21730echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21731if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021732
21733cat >>confdefs.h <<_ACEOF
21734#define HAVE_STRUCT_STAT_ST_RDEV 1
21735_ACEOF
21736
21737
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021738fi
21739
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021740{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21741echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021742if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021743 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021744else
Martin v. Löwis11437992002-04-12 09:54:03 +000021745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021746/* confdefs.h. */
21747_ACEOF
21748cat confdefs.h >>conftest.$ac_ext
21749cat >>conftest.$ac_ext <<_ACEOF
21750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021751$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021752int
21753main ()
21754{
21755static struct stat ac_aggr;
21756if (ac_aggr.st_blksize)
21757return 0;
21758 ;
21759 return 0;
21760}
21761_ACEOF
21762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021763if { (ac_try="$ac_compile"
21764case "(($ac_try" in
21765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21766 *) ac_try_echo=$ac_try;;
21767esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021771 grep -v '^ *+' conftest.er1 >conftest.err
21772 rm -f conftest.er1
21773 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021775 (exit $ac_status); } && {
21776 test -z "$ac_c_werror_flag" ||
21777 test ! -s conftest.err
21778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021779 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021780else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021782sed 's/^/| /' conftest.$ac_ext >&5
21783
Martin v. Löwiseba40652007-08-30 20:10:57 +000021784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021785/* confdefs.h. */
21786_ACEOF
21787cat confdefs.h >>conftest.$ac_ext
21788cat >>conftest.$ac_ext <<_ACEOF
21789/* end confdefs.h. */
21790$ac_includes_default
21791int
21792main ()
21793{
21794static struct stat ac_aggr;
21795if (sizeof ac_aggr.st_blksize)
21796return 0;
21797 ;
21798 return 0;
21799}
21800_ACEOF
21801rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021802if { (ac_try="$ac_compile"
21803case "(($ac_try" in
21804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21805 *) ac_try_echo=$ac_try;;
21806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021808 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021810 grep -v '^ *+' conftest.er1 >conftest.err
21811 rm -f conftest.er1
21812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021814 (exit $ac_status); } && {
21815 test -z "$ac_c_werror_flag" ||
21816 test ! -s conftest.err
21817 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021818 ac_cv_member_struct_stat_st_blksize=yes
21819else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021821sed 's/^/| /' conftest.$ac_ext >&5
21822
Martin v. Löwiseba40652007-08-30 20:10:57 +000021823 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021825
21826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021828
21829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021830fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021831{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21832echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21833if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021834
Martin v. Löwis11437992002-04-12 09:54:03 +000021835cat >>confdefs.h <<_ACEOF
21836#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21837_ACEOF
21838
21839
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021840fi
21841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021842{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21843echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021844if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021845 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021846else
21847 cat >conftest.$ac_ext <<_ACEOF
21848/* confdefs.h. */
21849_ACEOF
21850cat confdefs.h >>conftest.$ac_ext
21851cat >>conftest.$ac_ext <<_ACEOF
21852/* end confdefs.h. */
21853$ac_includes_default
21854int
21855main ()
21856{
21857static struct stat ac_aggr;
21858if (ac_aggr.st_flags)
21859return 0;
21860 ;
21861 return 0;
21862}
21863_ACEOF
21864rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021865if { (ac_try="$ac_compile"
21866case "(($ac_try" in
21867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21868 *) ac_try_echo=$ac_try;;
21869esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021871 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021872 ac_status=$?
21873 grep -v '^ *+' conftest.er1 >conftest.err
21874 rm -f conftest.er1
21875 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877 (exit $ac_status); } && {
21878 test -z "$ac_c_werror_flag" ||
21879 test ! -s conftest.err
21880 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021881 ac_cv_member_struct_stat_st_flags=yes
21882else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021883 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021884sed 's/^/| /' conftest.$ac_ext >&5
21885
Martin v. Löwiseba40652007-08-30 20:10:57 +000021886 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021887/* confdefs.h. */
21888_ACEOF
21889cat confdefs.h >>conftest.$ac_ext
21890cat >>conftest.$ac_ext <<_ACEOF
21891/* end confdefs.h. */
21892$ac_includes_default
21893int
21894main ()
21895{
21896static struct stat ac_aggr;
21897if (sizeof ac_aggr.st_flags)
21898return 0;
21899 ;
21900 return 0;
21901}
21902_ACEOF
21903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021904if { (ac_try="$ac_compile"
21905case "(($ac_try" in
21906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21907 *) ac_try_echo=$ac_try;;
21908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021910 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021911 ac_status=$?
21912 grep -v '^ *+' conftest.er1 >conftest.err
21913 rm -f conftest.er1
21914 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021916 (exit $ac_status); } && {
21917 test -z "$ac_c_werror_flag" ||
21918 test ! -s conftest.err
21919 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021920 ac_cv_member_struct_stat_st_flags=yes
21921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021922 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021923sed 's/^/| /' conftest.$ac_ext >&5
21924
Martin v. Löwiseba40652007-08-30 20:10:57 +000021925 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021927
21928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021930
21931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021932fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021933{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21934echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21935if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021936
21937cat >>confdefs.h <<_ACEOF
21938#define HAVE_STRUCT_STAT_ST_FLAGS 1
21939_ACEOF
21940
21941
21942fi
21943
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021944{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21945echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021946if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021947 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021948else
21949 cat >conftest.$ac_ext <<_ACEOF
21950/* confdefs.h. */
21951_ACEOF
21952cat confdefs.h >>conftest.$ac_ext
21953cat >>conftest.$ac_ext <<_ACEOF
21954/* end confdefs.h. */
21955$ac_includes_default
21956int
21957main ()
21958{
21959static struct stat ac_aggr;
21960if (ac_aggr.st_gen)
21961return 0;
21962 ;
21963 return 0;
21964}
21965_ACEOF
21966rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021967if { (ac_try="$ac_compile"
21968case "(($ac_try" in
21969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21970 *) ac_try_echo=$ac_try;;
21971esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021974 ac_status=$?
21975 grep -v '^ *+' conftest.er1 >conftest.err
21976 rm -f conftest.er1
21977 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021979 (exit $ac_status); } && {
21980 test -z "$ac_c_werror_flag" ||
21981 test ! -s conftest.err
21982 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021983 ac_cv_member_struct_stat_st_gen=yes
21984else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021985 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021986sed 's/^/| /' conftest.$ac_ext >&5
21987
Martin v. Löwiseba40652007-08-30 20:10:57 +000021988 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021989/* confdefs.h. */
21990_ACEOF
21991cat confdefs.h >>conftest.$ac_ext
21992cat >>conftest.$ac_ext <<_ACEOF
21993/* end confdefs.h. */
21994$ac_includes_default
21995int
21996main ()
21997{
21998static struct stat ac_aggr;
21999if (sizeof ac_aggr.st_gen)
22000return 0;
22001 ;
22002 return 0;
22003}
22004_ACEOF
22005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022006if { (ac_try="$ac_compile"
22007case "(($ac_try" in
22008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22009 *) ac_try_echo=$ac_try;;
22010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022013 ac_status=$?
22014 grep -v '^ *+' conftest.er1 >conftest.err
22015 rm -f conftest.er1
22016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022018 (exit $ac_status); } && {
22019 test -z "$ac_c_werror_flag" ||
22020 test ! -s conftest.err
22021 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022022 ac_cv_member_struct_stat_st_gen=yes
22023else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022024 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022025sed 's/^/| /' conftest.$ac_ext >&5
22026
Martin v. Löwiseba40652007-08-30 20:10:57 +000022027 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022029
22030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022032
22033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022034fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022035{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22036echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22037if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022038
22039cat >>confdefs.h <<_ACEOF
22040#define HAVE_STRUCT_STAT_ST_GEN 1
22041_ACEOF
22042
22043
22044fi
22045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022046{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22047echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022048if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022049 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022050else
22051 cat >conftest.$ac_ext <<_ACEOF
22052/* confdefs.h. */
22053_ACEOF
22054cat confdefs.h >>conftest.$ac_ext
22055cat >>conftest.$ac_ext <<_ACEOF
22056/* end confdefs.h. */
22057$ac_includes_default
22058int
22059main ()
22060{
22061static struct stat ac_aggr;
22062if (ac_aggr.st_birthtime)
22063return 0;
22064 ;
22065 return 0;
22066}
22067_ACEOF
22068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022069if { (ac_try="$ac_compile"
22070case "(($ac_try" in
22071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22072 *) ac_try_echo=$ac_try;;
22073esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022076 ac_status=$?
22077 grep -v '^ *+' conftest.er1 >conftest.err
22078 rm -f conftest.er1
22079 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022081 (exit $ac_status); } && {
22082 test -z "$ac_c_werror_flag" ||
22083 test ! -s conftest.err
22084 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022085 ac_cv_member_struct_stat_st_birthtime=yes
22086else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022087 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022088sed 's/^/| /' conftest.$ac_ext >&5
22089
Martin v. Löwiseba40652007-08-30 20:10:57 +000022090 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022091/* confdefs.h. */
22092_ACEOF
22093cat confdefs.h >>conftest.$ac_ext
22094cat >>conftest.$ac_ext <<_ACEOF
22095/* end confdefs.h. */
22096$ac_includes_default
22097int
22098main ()
22099{
22100static struct stat ac_aggr;
22101if (sizeof ac_aggr.st_birthtime)
22102return 0;
22103 ;
22104 return 0;
22105}
22106_ACEOF
22107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022108if { (ac_try="$ac_compile"
22109case "(($ac_try" in
22110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22111 *) ac_try_echo=$ac_try;;
22112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022115 ac_status=$?
22116 grep -v '^ *+' conftest.er1 >conftest.err
22117 rm -f conftest.er1
22118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022120 (exit $ac_status); } && {
22121 test -z "$ac_c_werror_flag" ||
22122 test ! -s conftest.err
22123 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022124 ac_cv_member_struct_stat_st_birthtime=yes
22125else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022126 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022127sed 's/^/| /' conftest.$ac_ext >&5
22128
Martin v. Löwiseba40652007-08-30 20:10:57 +000022129 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022131
22132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022134
22135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022137{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22138echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22139if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022140
22141cat >>confdefs.h <<_ACEOF
22142#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22143_ACEOF
22144
22145
22146fi
22147
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022148{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22149echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022150if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022151 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022152else
Martin v. Löwis11437992002-04-12 09:54:03 +000022153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022154/* confdefs.h. */
22155_ACEOF
22156cat confdefs.h >>conftest.$ac_ext
22157cat >>conftest.$ac_ext <<_ACEOF
22158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022159$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022160int
22161main ()
22162{
22163static struct stat ac_aggr;
22164if (ac_aggr.st_blocks)
22165return 0;
22166 ;
22167 return 0;
22168}
22169_ACEOF
22170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022171if { (ac_try="$ac_compile"
22172case "(($ac_try" in
22173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22174 *) ac_try_echo=$ac_try;;
22175esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022179 grep -v '^ *+' conftest.er1 >conftest.err
22180 rm -f conftest.er1
22181 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022183 (exit $ac_status); } && {
22184 test -z "$ac_c_werror_flag" ||
22185 test ! -s conftest.err
22186 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022187 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022188else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022190sed 's/^/| /' conftest.$ac_ext >&5
22191
Martin v. Löwiseba40652007-08-30 20:10:57 +000022192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022193/* confdefs.h. */
22194_ACEOF
22195cat confdefs.h >>conftest.$ac_ext
22196cat >>conftest.$ac_ext <<_ACEOF
22197/* end confdefs.h. */
22198$ac_includes_default
22199int
22200main ()
22201{
22202static struct stat ac_aggr;
22203if (sizeof ac_aggr.st_blocks)
22204return 0;
22205 ;
22206 return 0;
22207}
22208_ACEOF
22209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022210if { (ac_try="$ac_compile"
22211case "(($ac_try" in
22212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22213 *) ac_try_echo=$ac_try;;
22214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022216 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022218 grep -v '^ *+' conftest.er1 >conftest.err
22219 rm -f conftest.er1
22220 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022222 (exit $ac_status); } && {
22223 test -z "$ac_c_werror_flag" ||
22224 test ! -s conftest.err
22225 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022226 ac_cv_member_struct_stat_st_blocks=yes
22227else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022229sed 's/^/| /' conftest.$ac_ext >&5
22230
Martin v. Löwiseba40652007-08-30 20:10:57 +000022231 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022233
22234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022236
22237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022238fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022239{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22240echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22241if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022242
Martin v. Löwis11437992002-04-12 09:54:03 +000022243cat >>confdefs.h <<_ACEOF
22244#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22245_ACEOF
22246
22247
22248cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022249#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022250_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022251
22252else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022253 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022254 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022255 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22256 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022257esac
22258
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022259fi
22260
Michael W. Hudson54241132001-12-07 15:38:26 +000022261
Martin v. Löwis11437992002-04-12 09:54:03 +000022262
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022263{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22264echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022265if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022266 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022267else
Martin v. Löwis11437992002-04-12 09:54:03 +000022268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022269/* confdefs.h. */
22270_ACEOF
22271cat confdefs.h >>conftest.$ac_ext
22272cat >>conftest.$ac_ext <<_ACEOF
22273/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022274#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022275int
22276main ()
22277{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022278return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022279 ;
22280 return 0;
22281}
22282_ACEOF
22283rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022284if { (ac_try="$ac_compile"
22285case "(($ac_try" in
22286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22287 *) ac_try_echo=$ac_try;;
22288esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022290 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022292 grep -v '^ *+' conftest.er1 >conftest.err
22293 rm -f conftest.er1
22294 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022296 (exit $ac_status); } && {
22297 test -z "$ac_c_werror_flag" ||
22298 test ! -s conftest.err
22299 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022300 ac_cv_header_time_altzone=yes
22301else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022303sed 's/^/| /' conftest.$ac_ext >&5
22304
Martin v. Löwiseba40652007-08-30 20:10:57 +000022305 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022306fi
22307
Martin v. Löwiseba40652007-08-30 20:10:57 +000022308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22309fi
22310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022311{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22312echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022313if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022314
22315cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022316#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022317_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022318
22319fi
22320
Guido van Rossumda88dad1995-01-26 00:46:29 +000022321was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022322{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22323echo $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 +000022324cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022325/* confdefs.h. */
22326_ACEOF
22327cat confdefs.h >>conftest.$ac_ext
22328cat >>conftest.$ac_ext <<_ACEOF
22329/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022330
22331#include <sys/types.h>
22332#include <sys/select.h>
22333#include <sys/time.h>
22334
Martin v. Löwis11437992002-04-12 09:54:03 +000022335int
22336main ()
22337{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022338;
Martin v. Löwis11437992002-04-12 09:54:03 +000022339 ;
22340 return 0;
22341}
22342_ACEOF
22343rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022344if { (ac_try="$ac_compile"
22345case "(($ac_try" in
22346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22347 *) ac_try_echo=$ac_try;;
22348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022352 grep -v '^ *+' conftest.er1 >conftest.err
22353 rm -f conftest.er1
22354 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022356 (exit $ac_status); } && {
22357 test -z "$ac_c_werror_flag" ||
22358 test ! -s conftest.err
22359 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022360
22361
22362cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022363#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022364_ACEOF
22365
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022366 was_it_defined=yes
22367
Guido van Rossumf78abae1997-01-21 22:02:36 +000022368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022370sed 's/^/| /' conftest.$ac_ext >&5
22371
Brett Cannon19fab762007-06-02 03:02:29 +000022372
Martin v. Löwiseba40652007-08-30 20:10:57 +000022373fi
22374
22375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022376{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22377echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022378
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022379{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22380echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022381if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022383else
Martin v. Löwis11437992002-04-12 09:54:03 +000022384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022385/* confdefs.h. */
22386_ACEOF
22387cat confdefs.h >>conftest.$ac_ext
22388cat >>conftest.$ac_ext <<_ACEOF
22389/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022390
22391# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022392int
22393main ()
22394{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022395struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022396 ;
22397 return 0;
22398}
22399_ACEOF
22400rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022401if { (ac_try="$ac_compile"
22402case "(($ac_try" in
22403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22404 *) ac_try_echo=$ac_try;;
22405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022409 grep -v '^ *+' conftest.er1 >conftest.err
22410 rm -f conftest.er1
22411 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022413 (exit $ac_status); } && {
22414 test -z "$ac_c_werror_flag" ||
22415 test ! -s conftest.err
22416 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022417 ac_cv_struct_addrinfo=yes
22418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022420sed 's/^/| /' conftest.$ac_ext >&5
22421
Martin v. Löwiseba40652007-08-30 20:10:57 +000022422 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022423fi
22424
Martin v. Löwiseba40652007-08-30 20:10:57 +000022425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22426fi
22427
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022428{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22429echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022430if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022431
22432cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022433#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022434_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022435
22436fi
22437
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022438{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22439echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022440if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022441 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022442else
Martin v. Löwis11437992002-04-12 09:54:03 +000022443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022444/* confdefs.h. */
22445_ACEOF
22446cat confdefs.h >>conftest.$ac_ext
22447cat >>conftest.$ac_ext <<_ACEOF
22448/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022449
22450# include <sys/types.h>
22451# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022452int
22453main ()
22454{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022455struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022456 ;
22457 return 0;
22458}
22459_ACEOF
22460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022461if { (ac_try="$ac_compile"
22462case "(($ac_try" in
22463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22464 *) ac_try_echo=$ac_try;;
22465esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022469 grep -v '^ *+' conftest.er1 >conftest.err
22470 rm -f conftest.er1
22471 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022473 (exit $ac_status); } && {
22474 test -z "$ac_c_werror_flag" ||
22475 test ! -s conftest.err
22476 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022477 ac_cv_struct_sockaddr_storage=yes
22478else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022480sed 's/^/| /' conftest.$ac_ext >&5
22481
Martin v. Löwiseba40652007-08-30 20:10:57 +000022482 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022483fi
22484
Martin v. Löwiseba40652007-08-30 20:10:57 +000022485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22486fi
22487
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022488{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22489echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022490if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022491
22492cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022493#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022494_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022495
22496fi
22497
Guido van Rossum627b2d71993-12-24 10:39:16 +000022498# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022499
Michael W. Hudson54241132001-12-07 15:38:26 +000022500
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022501{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22502echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022503if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022504 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022505else
Martin v. Löwis11437992002-04-12 09:54:03 +000022506 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022507/* confdefs.h. */
22508_ACEOF
22509cat confdefs.h >>conftest.$ac_ext
22510cat >>conftest.$ac_ext <<_ACEOF
22511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022512$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022513int
22514main ()
22515{
22516static int test_array [1 - 2 * !(((char) -1) < 0)];
22517test_array [0] = 0
22518
22519 ;
22520 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022521}
Martin v. Löwis11437992002-04-12 09:54:03 +000022522_ACEOF
22523rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022524if { (ac_try="$ac_compile"
22525case "(($ac_try" in
22526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22527 *) ac_try_echo=$ac_try;;
22528esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022530 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022532 grep -v '^ *+' conftest.er1 >conftest.err
22533 rm -f conftest.er1
22534 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022536 (exit $ac_status); } && {
22537 test -z "$ac_c_werror_flag" ||
22538 test ! -s conftest.err
22539 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022540 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022541else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022543sed 's/^/| /' conftest.$ac_ext >&5
22544
Martin v. Löwiseba40652007-08-30 20:10:57 +000022545 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022547
22548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022549fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022550{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22551echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022552if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022553 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022554#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022555_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022556
22557fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022558
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022559{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22560echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022561if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022562 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022563else
22564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022565/* confdefs.h. */
22566_ACEOF
22567cat confdefs.h >>conftest.$ac_ext
22568cat >>conftest.$ac_ext <<_ACEOF
22569/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022570
Martin v. Löwis11437992002-04-12 09:54:03 +000022571int
22572main ()
22573{
22574/* FIXME: Include the comments suggested by Paul. */
22575#ifndef __cplusplus
22576 /* Ultrix mips cc rejects this. */
22577 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022578 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022579 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022580 char const *const *pcpcc;
22581 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022582 /* NEC SVR4.0.2 mips cc rejects this. */
22583 struct point {int x, y;};
22584 static struct point const zero = {0,0};
22585 /* AIX XL C 1.02.0.0 rejects this.
22586 It does not let you subtract one const X* pointer from another in
22587 an arm of an if-expression whose if-part is not a constant
22588 expression */
22589 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022590 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022591 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022592 ++pcpcc;
22593 ppc = (char**) pcpcc;
22594 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022595 { /* SCO 3.2v4 cc rejects this. */
22596 char *t;
22597 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022598
Martin v. Löwis11437992002-04-12 09:54:03 +000022599 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022600 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022601 }
22602 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22603 int x[] = {25, 17};
22604 const int *foo = &x[0];
22605 ++foo;
22606 }
22607 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22608 typedef const int *iptr;
22609 iptr p = 0;
22610 ++p;
22611 }
22612 { /* AIX XL C 1.02.0.0 rejects this saying
22613 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22614 struct s { int j; const int *ap[3]; };
22615 struct s *b; b->j = 5;
22616 }
22617 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22618 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022619 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022620 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022621 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022622#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022623
Martin v. Löwis11437992002-04-12 09:54:03 +000022624 ;
22625 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022626}
Martin v. Löwis11437992002-04-12 09:54:03 +000022627_ACEOF
22628rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022629if { (ac_try="$ac_compile"
22630case "(($ac_try" in
22631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22632 *) ac_try_echo=$ac_try;;
22633esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022637 grep -v '^ *+' conftest.er1 >conftest.err
22638 rm -f conftest.er1
22639 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022641 (exit $ac_status); } && {
22642 test -z "$ac_c_werror_flag" ||
22643 test ! -s conftest.err
22644 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022645 ac_cv_c_const=yes
22646else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022648sed 's/^/| /' conftest.$ac_ext >&5
22649
Martin v. Löwiseba40652007-08-30 20:10:57 +000022650 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022652
22653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022654fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022655{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22656echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022657if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022658
22659cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022660#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022661_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022662
22663fi
22664
Michael W. Hudson54241132001-12-07 15:38:26 +000022665
Guido van Rossumda88dad1995-01-26 00:46:29 +000022666works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022667{ echo "$as_me:$LINENO: checking for working volatile" >&5
22668echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022670/* confdefs.h. */
22671_ACEOF
22672cat confdefs.h >>conftest.$ac_ext
22673cat >>conftest.$ac_ext <<_ACEOF
22674/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022675
Martin v. Löwis11437992002-04-12 09:54:03 +000022676int
22677main ()
22678{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022679volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022680 ;
22681 return 0;
22682}
22683_ACEOF
22684rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022685if { (ac_try="$ac_compile"
22686case "(($ac_try" in
22687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22688 *) ac_try_echo=$ac_try;;
22689esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022691 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022693 grep -v '^ *+' conftest.er1 >conftest.err
22694 rm -f conftest.er1
22695 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022697 (exit $ac_status); } && {
22698 test -z "$ac_c_werror_flag" ||
22699 test ! -s conftest.err
22700 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022701 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022702else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022704sed 's/^/| /' conftest.$ac_ext >&5
22705
Martin v. Löwis11437992002-04-12 09:54:03 +000022706
22707cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022708#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022709_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022710
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022711
Guido van Rossum627b2d71993-12-24 10:39:16 +000022712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022713
22714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022715{ echo "$as_me:$LINENO: result: $works" >&5
22716echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022717
Guido van Rossumda88dad1995-01-26 00:46:29 +000022718works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022719{ echo "$as_me:$LINENO: checking for working signed char" >&5
22720echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022721cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022722/* confdefs.h. */
22723_ACEOF
22724cat confdefs.h >>conftest.$ac_ext
22725cat >>conftest.$ac_ext <<_ACEOF
22726/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022727
Martin v. Löwis11437992002-04-12 09:54:03 +000022728int
22729main ()
22730{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022731signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022732 ;
22733 return 0;
22734}
22735_ACEOF
22736rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022737if { (ac_try="$ac_compile"
22738case "(($ac_try" in
22739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22740 *) ac_try_echo=$ac_try;;
22741esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022745 grep -v '^ *+' conftest.er1 >conftest.err
22746 rm -f conftest.er1
22747 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022749 (exit $ac_status); } && {
22750 test -z "$ac_c_werror_flag" ||
22751 test ! -s conftest.err
22752 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022753 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022754else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022756sed 's/^/| /' conftest.$ac_ext >&5
22757
Martin v. Löwis11437992002-04-12 09:54:03 +000022758
22759cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022760#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022761_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022762
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022763
Guido van Rossum7f43da71994-08-01 12:15:30 +000022764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022765
22766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022767{ echo "$as_me:$LINENO: result: $works" >&5
22768echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022769
Guido van Rossumda88dad1995-01-26 00:46:29 +000022770have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022771{ echo "$as_me:$LINENO: checking for prototypes" >&5
22772echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022774/* confdefs.h. */
22775_ACEOF
22776cat confdefs.h >>conftest.$ac_ext
22777cat >>conftest.$ac_ext <<_ACEOF
22778/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022779int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022780int
22781main ()
22782{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022783return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022784 ;
22785 return 0;
22786}
22787_ACEOF
22788rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022789if { (ac_try="$ac_compile"
22790case "(($ac_try" in
22791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22792 *) ac_try_echo=$ac_try;;
22793esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022797 grep -v '^ *+' conftest.er1 >conftest.err
22798 rm -f conftest.er1
22799 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022801 (exit $ac_status); } && {
22802 test -z "$ac_c_werror_flag" ||
22803 test ! -s conftest.err
22804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022805
22806
22807cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022808#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022809_ACEOF
22810
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022811 have_prototypes=yes
22812
Guido van Rossumf78abae1997-01-21 22:02:36 +000022813else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022815sed 's/^/| /' conftest.$ac_ext >&5
22816
Martin v. Löwiseba40652007-08-30 20:10:57 +000022817
Guido van Rossum7f43da71994-08-01 12:15:30 +000022818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022819
22820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022821{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22822echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022823
Guido van Rossumda88dad1995-01-26 00:46:29 +000022824works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022825{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22826echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022827cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022828/* confdefs.h. */
22829_ACEOF
22830cat confdefs.h >>conftest.$ac_ext
22831cat >>conftest.$ac_ext <<_ACEOF
22832/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022833
22834#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022835int foo(int x, ...) {
22836 va_list va;
22837 va_start(va, x);
22838 va_arg(va, int);
22839 va_arg(va, char *);
22840 va_arg(va, double);
22841 return 0;
22842}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022843
Martin v. Löwis11437992002-04-12 09:54:03 +000022844int
22845main ()
22846{
Guido van Rossum90eea071996-08-30 20:58:57 +000022847return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022848 ;
22849 return 0;
22850}
22851_ACEOF
22852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022853if { (ac_try="$ac_compile"
22854case "(($ac_try" in
22855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22856 *) ac_try_echo=$ac_try;;
22857esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022861 grep -v '^ *+' conftest.er1 >conftest.err
22862 rm -f conftest.er1
22863 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022865 (exit $ac_status); } && {
22866 test -z "$ac_c_werror_flag" ||
22867 test ! -s conftest.err
22868 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022869
22870
22871cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022872#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022873_ACEOF
22874
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022875 works=yes
22876
Guido van Rossumf78abae1997-01-21 22:02:36 +000022877else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022879sed 's/^/| /' conftest.$ac_ext >&5
22880
Martin v. Löwiseba40652007-08-30 20:10:57 +000022881
Guido van Rossum627b2d71993-12-24 10:39:16 +000022882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022883
22884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022885{ echo "$as_me:$LINENO: result: $works" >&5
22886echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022887
Martin v. Löwisd6320502004-08-12 13:45:08 +000022888# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022889{ echo "$as_me:$LINENO: checking for socketpair" >&5
22890echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022891cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022892/* confdefs.h. */
22893_ACEOF
22894cat confdefs.h >>conftest.$ac_ext
22895cat >>conftest.$ac_ext <<_ACEOF
22896/* end confdefs.h. */
22897
22898#include <sys/types.h>
22899#include <sys/socket.h>
22900
22901int
22902main ()
22903{
22904void *x=socketpair
22905 ;
22906 return 0;
22907}
22908_ACEOF
22909rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022910if { (ac_try="$ac_compile"
22911case "(($ac_try" in
22912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22913 *) ac_try_echo=$ac_try;;
22914esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022918 grep -v '^ *+' conftest.er1 >conftest.err
22919 rm -f conftest.er1
22920 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922 (exit $ac_status); } && {
22923 test -z "$ac_c_werror_flag" ||
22924 test ! -s conftest.err
22925 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022926
22927cat >>confdefs.h <<\_ACEOF
22928#define HAVE_SOCKETPAIR 1
22929_ACEOF
22930
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022931 { echo "$as_me:$LINENO: result: yes" >&5
22932echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022933else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022934 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022935sed 's/^/| /' conftest.$ac_ext >&5
22936
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022937 { echo "$as_me:$LINENO: result: no" >&5
22938echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022939
22940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022941
22942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022943
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022944# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022945{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22946echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022948/* confdefs.h. */
22949_ACEOF
22950cat confdefs.h >>conftest.$ac_ext
22951cat >>conftest.$ac_ext <<_ACEOF
22952/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022953#include <sys/types.h>
22954#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022955int
22956main ()
22957{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022958struct sockaddr x;
22959x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022960 ;
22961 return 0;
22962}
22963_ACEOF
22964rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022965if { (ac_try="$ac_compile"
22966case "(($ac_try" in
22967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22968 *) ac_try_echo=$ac_try;;
22969esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022973 grep -v '^ *+' conftest.er1 >conftest.err
22974 rm -f conftest.er1
22975 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022977 (exit $ac_status); } && {
22978 test -z "$ac_c_werror_flag" ||
22979 test ! -s conftest.err
22980 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022981 { echo "$as_me:$LINENO: result: yes" >&5
22982echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022983
22984cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022985#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022986_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022987
22988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022990sed 's/^/| /' conftest.$ac_ext >&5
22991
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022992 { echo "$as_me:$LINENO: result: no" >&5
22993echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022995
22996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022997
Guido van Rossumda88dad1995-01-26 00:46:29 +000022998va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022999{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23000echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023001cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023002/* confdefs.h. */
23003_ACEOF
23004cat confdefs.h >>conftest.$ac_ext
23005cat >>conftest.$ac_ext <<_ACEOF
23006/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023007
23008#ifdef HAVE_STDARG_PROTOTYPES
23009#include <stdarg.h>
23010#else
23011#include <varargs.h>
23012#endif
23013
Martin v. Löwis11437992002-04-12 09:54:03 +000023014int
23015main ()
23016{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023017va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023018 ;
23019 return 0;
23020}
23021_ACEOF
23022rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023023if { (ac_try="$ac_compile"
23024case "(($ac_try" in
23025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23026 *) ac_try_echo=$ac_try;;
23027esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023029 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023031 grep -v '^ *+' conftest.er1 >conftest.err
23032 rm -f conftest.er1
23033 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023035 (exit $ac_status); } && {
23036 test -z "$ac_c_werror_flag" ||
23037 test ! -s conftest.err
23038 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023039 :
23040else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023042sed 's/^/| /' conftest.$ac_ext >&5
23043
Martin v. Löwis11437992002-04-12 09:54:03 +000023044
23045
23046cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023047#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023048_ACEOF
23049
Guido van Rossumda88dad1995-01-26 00:46:29 +000023050 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023051
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023053
23054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023055{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23056echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023057
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023058# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023059
23060
23061
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023062{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23063echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023064if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023065 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023066else
Martin v. Löwis11437992002-04-12 09:54:03 +000023067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023068/* confdefs.h. */
23069_ACEOF
23070cat confdefs.h >>conftest.$ac_ext
23071cat >>conftest.$ac_ext <<_ACEOF
23072/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023073/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23074 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23075#define gethostbyname_r innocuous_gethostbyname_r
23076
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023077/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023078 which can conflict with char gethostbyname_r (); below.
23079 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023080 <limits.h> exists even on freestanding compilers. */
23081
23082#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023083# include <limits.h>
23084#else
23085# include <assert.h>
23086#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023087
23088#undef gethostbyname_r
23089
Martin v. Löwiseba40652007-08-30 20:10:57 +000023090/* Override any GCC internal prototype to avoid an error.
23091 Use char because int might match the return type of a GCC
23092 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023093#ifdef __cplusplus
23094extern "C"
23095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023096char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023097/* The GNU C library defines this for functions which it implements
23098 to always fail with ENOSYS. Some functions are actually named
23099 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023100#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023101choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023102#endif
23103
Skip Montanaro6dead952003-09-25 14:50:04 +000023104int
23105main ()
23106{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023107return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023108 ;
23109 return 0;
23110}
23111_ACEOF
23112rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023113if { (ac_try="$ac_link"
23114case "(($ac_try" in
23115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23116 *) ac_try_echo=$ac_try;;
23117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023119 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023121 grep -v '^ *+' conftest.er1 >conftest.err
23122 rm -f conftest.er1
23123 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023125 (exit $ac_status); } && {
23126 test -z "$ac_c_werror_flag" ||
23127 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023128 } && test -s conftest$ac_exeext &&
23129 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023130 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023133sed 's/^/| /' conftest.$ac_ext >&5
23134
Martin v. Löwiseba40652007-08-30 20:10:57 +000023135 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023137
23138rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023139 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023140fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023141{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23142echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23143if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023144
Martin v. Löwis11437992002-04-12 09:54:03 +000023145 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023146#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023147_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023148
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023149 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23150echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023151 OLD_CFLAGS=$CFLAGS
23152 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023154/* confdefs.h. */
23155_ACEOF
23156cat confdefs.h >>conftest.$ac_ext
23157cat >>conftest.$ac_ext <<_ACEOF
23158/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023159
23160# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023161
Martin v. Löwis11437992002-04-12 09:54:03 +000023162int
23163main ()
23164{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023165
23166 char *name;
23167 struct hostent *he, *res;
23168 char buffer[2048];
23169 int buflen = 2048;
23170 int h_errnop;
23171
23172 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023173
23174 ;
23175 return 0;
23176}
23177_ACEOF
23178rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023179if { (ac_try="$ac_compile"
23180case "(($ac_try" in
23181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23182 *) ac_try_echo=$ac_try;;
23183esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023185 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023187 grep -v '^ *+' conftest.er1 >conftest.err
23188 rm -f conftest.er1
23189 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023191 (exit $ac_status); } && {
23192 test -z "$ac_c_werror_flag" ||
23193 test ! -s conftest.err
23194 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023195
23196 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023197#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023198_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023199
Martin v. Löwis11437992002-04-12 09:54:03 +000023200
23201cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023202#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023203_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023204
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023205 { echo "$as_me:$LINENO: result: yes" >&5
23206echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023207
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023208else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023210sed 's/^/| /' conftest.$ac_ext >&5
23211
Martin v. Löwis11437992002-04-12 09:54:03 +000023212
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023213 { echo "$as_me:$LINENO: result: no" >&5
23214echo "${ECHO_T}no" >&6; }
23215 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23216echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023218/* confdefs.h. */
23219_ACEOF
23220cat confdefs.h >>conftest.$ac_ext
23221cat >>conftest.$ac_ext <<_ACEOF
23222/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023223
23224# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023225
Martin v. Löwis11437992002-04-12 09:54:03 +000023226int
23227main ()
23228{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023229
23230 char *name;
23231 struct hostent *he;
23232 char buffer[2048];
23233 int buflen = 2048;
23234 int h_errnop;
23235
23236 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023237
23238 ;
23239 return 0;
23240}
23241_ACEOF
23242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023243if { (ac_try="$ac_compile"
23244case "(($ac_try" in
23245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23246 *) ac_try_echo=$ac_try;;
23247esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023251 grep -v '^ *+' conftest.er1 >conftest.err
23252 rm -f conftest.er1
23253 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023255 (exit $ac_status); } && {
23256 test -z "$ac_c_werror_flag" ||
23257 test ! -s conftest.err
23258 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023259
23260 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023261#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023262_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023263
Martin v. Löwis11437992002-04-12 09:54:03 +000023264
23265cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023266#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023267_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023268
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023269 { echo "$as_me:$LINENO: result: yes" >&5
23270echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023271
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023274sed 's/^/| /' conftest.$ac_ext >&5
23275
Martin v. Löwis11437992002-04-12 09:54:03 +000023276
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023277 { echo "$as_me:$LINENO: result: no" >&5
23278echo "${ECHO_T}no" >&6; }
23279 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23280echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023282/* confdefs.h. */
23283_ACEOF
23284cat confdefs.h >>conftest.$ac_ext
23285cat >>conftest.$ac_ext <<_ACEOF
23286/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023287
23288# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023289
Martin v. Löwis11437992002-04-12 09:54:03 +000023290int
23291main ()
23292{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023293
23294 char *name;
23295 struct hostent *he;
23296 struct hostent_data data;
23297
23298 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023299
23300 ;
23301 return 0;
23302}
23303_ACEOF
23304rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023305if { (ac_try="$ac_compile"
23306case "(($ac_try" in
23307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23308 *) ac_try_echo=$ac_try;;
23309esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023311 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023313 grep -v '^ *+' conftest.er1 >conftest.err
23314 rm -f conftest.er1
23315 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023317 (exit $ac_status); } && {
23318 test -z "$ac_c_werror_flag" ||
23319 test ! -s conftest.err
23320 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023321
23322 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023323#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023324_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023325
Martin v. Löwis11437992002-04-12 09:54:03 +000023326
23327cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023328#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023329_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023330
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023331 { echo "$as_me:$LINENO: result: yes" >&5
23332echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023333
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023334else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023336sed 's/^/| /' conftest.$ac_ext >&5
23337
Martin v. Löwis11437992002-04-12 09:54:03 +000023338
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023339 { echo "$as_me:$LINENO: result: no" >&5
23340echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023341
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023343
23344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023345
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023347
23348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023349
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023351
23352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023353 CFLAGS=$OLD_CFLAGS
23354
23355else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023356
Martin v. Löwis11437992002-04-12 09:54:03 +000023357
23358for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023359do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023360as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23361{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23362echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023363if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023365else
Martin v. Löwis11437992002-04-12 09:54:03 +000023366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023367/* confdefs.h. */
23368_ACEOF
23369cat confdefs.h >>conftest.$ac_ext
23370cat >>conftest.$ac_ext <<_ACEOF
23371/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023372/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23373 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23374#define $ac_func innocuous_$ac_func
23375
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023376/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023377 which can conflict with char $ac_func (); below.
23378 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023379 <limits.h> exists even on freestanding compilers. */
23380
23381#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023382# include <limits.h>
23383#else
23384# include <assert.h>
23385#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023386
23387#undef $ac_func
23388
Martin v. Löwiseba40652007-08-30 20:10:57 +000023389/* Override any GCC internal prototype to avoid an error.
23390 Use char because int might match the return type of a GCC
23391 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023392#ifdef __cplusplus
23393extern "C"
23394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023395char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023396/* The GNU C library defines this for functions which it implements
23397 to always fail with ENOSYS. Some functions are actually named
23398 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023399#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023400choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023401#endif
23402
Skip Montanaro6dead952003-09-25 14:50:04 +000023403int
23404main ()
23405{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023407 ;
23408 return 0;
23409}
23410_ACEOF
23411rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023412if { (ac_try="$ac_link"
23413case "(($ac_try" in
23414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23415 *) ac_try_echo=$ac_try;;
23416esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023418 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023420 grep -v '^ *+' conftest.er1 >conftest.err
23421 rm -f conftest.er1
23422 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023424 (exit $ac_status); } && {
23425 test -z "$ac_c_werror_flag" ||
23426 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023427 } && test -s conftest$ac_exeext &&
23428 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023429 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023430else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023432sed 's/^/| /' conftest.$ac_ext >&5
23433
Martin v. Löwiseba40652007-08-30 20:10:57 +000023434 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023436
23437rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023438 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023439fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023440ac_res=`eval echo '${'$as_ac_var'}'`
23441 { echo "$as_me:$LINENO: result: $ac_res" >&5
23442echo "${ECHO_T}$ac_res" >&6; }
23443if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023444 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023445#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023446_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023447
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023448fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023449done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023450
Michael W. Hudson54241132001-12-07 15:38:26 +000023451
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023452fi
23453
Michael W. Hudson54241132001-12-07 15:38:26 +000023454
23455
23456
23457
23458
23459
Guido van Rossum627b2d71993-12-24 10:39:16 +000023460# checks for system services
23461# (none yet)
23462
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023463# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023464{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23465echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023466if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023467 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023468else
Martin v. Löwis11437992002-04-12 09:54:03 +000023469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023470/* confdefs.h. */
23471_ACEOF
23472cat confdefs.h >>conftest.$ac_ext
23473cat >>conftest.$ac_ext <<_ACEOF
23474/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023475/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23476 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23477#define __fpu_control innocuous___fpu_control
23478
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023479/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023480 which can conflict with char __fpu_control (); below.
23481 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023482 <limits.h> exists even on freestanding compilers. */
23483
23484#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023485# include <limits.h>
23486#else
23487# include <assert.h>
23488#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023489
23490#undef __fpu_control
23491
Martin v. Löwiseba40652007-08-30 20:10:57 +000023492/* Override any GCC internal prototype to avoid an error.
23493 Use char because int might match the return type of a GCC
23494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023495#ifdef __cplusplus
23496extern "C"
23497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023498char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023499/* The GNU C library defines this for functions which it implements
23500 to always fail with ENOSYS. Some functions are actually named
23501 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023502#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023503choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023504#endif
23505
Skip Montanaro6dead952003-09-25 14:50:04 +000023506int
23507main ()
23508{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023509return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023510 ;
23511 return 0;
23512}
23513_ACEOF
23514rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023515if { (ac_try="$ac_link"
23516case "(($ac_try" in
23517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23518 *) ac_try_echo=$ac_try;;
23519esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023521 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023523 grep -v '^ *+' conftest.er1 >conftest.err
23524 rm -f conftest.er1
23525 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023527 (exit $ac_status); } && {
23528 test -z "$ac_c_werror_flag" ||
23529 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023530 } && test -s conftest$ac_exeext &&
23531 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023532 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023535sed 's/^/| /' conftest.$ac_ext >&5
23536
Martin v. Löwiseba40652007-08-30 20:10:57 +000023537 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023539
23540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023541 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023542fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023543{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23544echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23545if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023546 :
23547else
Martin v. Löwis11437992002-04-12 09:54:03 +000023548
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023549{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23550echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023551if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023552 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023553else
Martin v. Löwis11437992002-04-12 09:54:03 +000023554 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023555LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023557/* confdefs.h. */
23558_ACEOF
23559cat confdefs.h >>conftest.$ac_ext
23560cat >>conftest.$ac_ext <<_ACEOF
23561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023562
Martin v. Löwiseba40652007-08-30 20:10:57 +000023563/* Override any GCC internal prototype to avoid an error.
23564 Use char because int might match the return type of a GCC
23565 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023566#ifdef __cplusplus
23567extern "C"
23568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023569char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023570int
23571main ()
23572{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023573return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023574 ;
23575 return 0;
23576}
23577_ACEOF
23578rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023579if { (ac_try="$ac_link"
23580case "(($ac_try" in
23581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23582 *) ac_try_echo=$ac_try;;
23583esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023585 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023587 grep -v '^ *+' conftest.er1 >conftest.err
23588 rm -f conftest.er1
23589 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023591 (exit $ac_status); } && {
23592 test -z "$ac_c_werror_flag" ||
23593 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023594 } && test -s conftest$ac_exeext &&
23595 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023596 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023597else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023599sed 's/^/| /' conftest.$ac_ext >&5
23600
Martin v. Löwiseba40652007-08-30 20:10:57 +000023601 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023603
23604rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023605 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023606LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023607fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023608{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23609echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23610if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023611 cat >>confdefs.h <<_ACEOF
23612#define HAVE_LIBIEEE 1
23613_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023614
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023615 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023616
Guido van Rossum627b2d71993-12-24 10:39:16 +000023617fi
23618
Michael W. Hudson54241132001-12-07 15:38:26 +000023619
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023620fi
23621
Michael W. Hudson54241132001-12-07 15:38:26 +000023622
Guido van Rossum7f253911997-05-09 02:42:48 +000023623# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023624{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23625echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023626
Martin v. Löwiseba40652007-08-30 20:10:57 +000023627# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023628if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023629 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023630if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023631then
23632
23633cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023634#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023635_ACEOF
23636
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023637 { echo "$as_me:$LINENO: result: yes" >&5
23638echo "${ECHO_T}yes" >&6; }
23639else { echo "$as_me:$LINENO: result: no" >&5
23640echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023641fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023643 { echo "$as_me:$LINENO: result: no" >&5
23644echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023645fi
23646
Guido van Rossum7f253911997-05-09 02:42:48 +000023647
Guido van Rossum7f43da71994-08-01 12:15:30 +000023648# check for --with-libm=...
23649
Guido van Rossum563e7081996-09-10 18:20:48 +000023650case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023651Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023652BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023653*) LIBM=-lm
23654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023655{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23656echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023657
Martin v. Löwiseba40652007-08-30 20:10:57 +000023658# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023659if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023660 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023661if test "$withval" = no
23662then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023663 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23664echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023665elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023666then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023667 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23668echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23669else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23670echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023671 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023672fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023673else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023674 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23675echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023676fi
23677
Guido van Rossum7f43da71994-08-01 12:15:30 +000023678
23679# check for --with-libc=...
23680
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023681{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23682echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023683
Martin v. Löwiseba40652007-08-30 20:10:57 +000023684# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023685if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023686 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023687if test "$withval" = no
23688then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023689 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23690echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023691elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023692then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023693 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23694echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23695else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23696echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023697 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023698fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023700 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23701echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023702fi
23703
Guido van Rossum7f43da71994-08-01 12:15:30 +000023704
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023705# **************************************************
23706# * Check for various properties of floating point *
23707# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023708
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023709{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23710echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23711if test "${ac_cv_little_endian_double+set}" = set; then
23712 echo $ECHO_N "(cached) $ECHO_C" >&6
23713else
23714
23715if test "$cross_compiling" = yes; then
23716 ac_cv_little_endian_double=no
23717else
23718 cat >conftest.$ac_ext <<_ACEOF
23719/* confdefs.h. */
23720_ACEOF
23721cat confdefs.h >>conftest.$ac_ext
23722cat >>conftest.$ac_ext <<_ACEOF
23723/* end confdefs.h. */
23724
23725#include <string.h>
23726int main() {
23727 double x = 9006104071832581.0;
23728 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23729 return 0;
23730 else
23731 return 1;
23732}
23733
23734_ACEOF
23735rm -f conftest$ac_exeext
23736if { (ac_try="$ac_link"
23737case "(($ac_try" in
23738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23739 *) ac_try_echo=$ac_try;;
23740esac
23741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23742 (eval "$ac_link") 2>&5
23743 ac_status=$?
23744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23745 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23746 { (case "(($ac_try" in
23747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23748 *) ac_try_echo=$ac_try;;
23749esac
23750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23751 (eval "$ac_try") 2>&5
23752 ac_status=$?
23753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23754 (exit $ac_status); }; }; then
23755 ac_cv_little_endian_double=yes
23756else
23757 echo "$as_me: program exited with status $ac_status" >&5
23758echo "$as_me: failed program was:" >&5
23759sed 's/^/| /' conftest.$ac_ext >&5
23760
23761( exit $ac_status )
23762ac_cv_little_endian_double=no
23763fi
23764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23765fi
23766
23767
23768fi
23769
23770{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23771echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23772if test "$ac_cv_little_endian_double" = yes
23773then
23774
23775cat >>confdefs.h <<\_ACEOF
23776#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23777_ACEOF
23778
23779fi
23780
23781{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23782echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23783if test "${ac_cv_big_endian_double+set}" = set; then
23784 echo $ECHO_N "(cached) $ECHO_C" >&6
23785else
23786
23787if test "$cross_compiling" = yes; then
23788 ac_cv_big_endian_double=no
23789else
23790 cat >conftest.$ac_ext <<_ACEOF
23791/* confdefs.h. */
23792_ACEOF
23793cat confdefs.h >>conftest.$ac_ext
23794cat >>conftest.$ac_ext <<_ACEOF
23795/* end confdefs.h. */
23796
23797#include <string.h>
23798int main() {
23799 double x = 9006104071832581.0;
23800 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23801 return 0;
23802 else
23803 return 1;
23804}
23805
23806_ACEOF
23807rm -f conftest$ac_exeext
23808if { (ac_try="$ac_link"
23809case "(($ac_try" in
23810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23811 *) ac_try_echo=$ac_try;;
23812esac
23813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23814 (eval "$ac_link") 2>&5
23815 ac_status=$?
23816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23817 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23818 { (case "(($ac_try" in
23819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23820 *) ac_try_echo=$ac_try;;
23821esac
23822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23823 (eval "$ac_try") 2>&5
23824 ac_status=$?
23825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23826 (exit $ac_status); }; }; then
23827 ac_cv_big_endian_double=yes
23828else
23829 echo "$as_me: program exited with status $ac_status" >&5
23830echo "$as_me: failed program was:" >&5
23831sed 's/^/| /' conftest.$ac_ext >&5
23832
23833( exit $ac_status )
23834ac_cv_big_endian_double=no
23835fi
23836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23837fi
23838
23839
23840fi
23841
23842{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23843echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23844if test "$ac_cv_big_endian_double" = yes
23845then
23846
23847cat >>confdefs.h <<\_ACEOF
23848#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23849_ACEOF
23850
23851fi
23852
23853# Some ARM platforms use a mixed-endian representation for doubles.
23854# While Python doesn't currently have full support for these platforms
23855# (see e.g., issue 1762561), we can at least make sure that float <-> string
23856# conversions work.
23857{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23858echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23859if test "${ac_cv_mixed_endian_double+set}" = set; then
23860 echo $ECHO_N "(cached) $ECHO_C" >&6
23861else
23862
23863if test "$cross_compiling" = yes; then
23864 ac_cv_mixed_endian_double=no
23865else
23866 cat >conftest.$ac_ext <<_ACEOF
23867/* confdefs.h. */
23868_ACEOF
23869cat confdefs.h >>conftest.$ac_ext
23870cat >>conftest.$ac_ext <<_ACEOF
23871/* end confdefs.h. */
23872
23873#include <string.h>
23874int main() {
23875 double x = 9006104071832581.0;
23876 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23877 return 0;
23878 else
23879 return 1;
23880}
23881
23882_ACEOF
23883rm -f conftest$ac_exeext
23884if { (ac_try="$ac_link"
23885case "(($ac_try" in
23886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23887 *) ac_try_echo=$ac_try;;
23888esac
23889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23890 (eval "$ac_link") 2>&5
23891 ac_status=$?
23892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23893 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23894 { (case "(($ac_try" in
23895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23896 *) ac_try_echo=$ac_try;;
23897esac
23898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23899 (eval "$ac_try") 2>&5
23900 ac_status=$?
23901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23902 (exit $ac_status); }; }; then
23903 ac_cv_mixed_endian_double=yes
23904else
23905 echo "$as_me: program exited with status $ac_status" >&5
23906echo "$as_me: failed program was:" >&5
23907sed 's/^/| /' conftest.$ac_ext >&5
23908
23909( exit $ac_status )
23910ac_cv_mixed_endian_double=no
23911fi
23912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23913fi
23914
23915
23916fi
23917
23918{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23919echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
23920if test "$ac_cv_mixed_endian_double" = yes
23921then
23922
23923cat >>confdefs.h <<\_ACEOF
23924#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23925_ACEOF
23926
23927fi
23928
23929# The short float repr introduced in Python 3.1 requires the
23930# correctly-rounded string <-> double conversion functions from
23931# Python/dtoa.c, which in turn require that the FPU uses 53-bit
23932# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000023933# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023934# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000023935
23936# This inline assembler syntax may also work for suncc and icc,
23937# so we try it on all platforms.
23938
23939{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023940echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000023941cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023942/* confdefs.h. */
23943_ACEOF
23944cat confdefs.h >>conftest.$ac_ext
23945cat >>conftest.$ac_ext <<_ACEOF
23946/* end confdefs.h. */
23947
23948int
23949main ()
23950{
23951
Mark Dickinsona548dee2009-11-15 13:12:43 +000023952 unsigned short cw;
23953 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23954 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023955
23956 ;
23957 return 0;
23958}
23959_ACEOF
23960rm -f conftest.$ac_objext
23961if { (ac_try="$ac_compile"
23962case "(($ac_try" in
23963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23964 *) ac_try_echo=$ac_try;;
23965esac
23966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23967 (eval "$ac_compile") 2>conftest.er1
23968 ac_status=$?
23969 grep -v '^ *+' conftest.er1 >conftest.err
23970 rm -f conftest.er1
23971 cat conftest.err >&5
23972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23973 (exit $ac_status); } && {
23974 test -z "$ac_c_werror_flag" ||
23975 test ! -s conftest.err
23976 } && test -s conftest.$ac_objext; then
23977 have_gcc_asm_for_x87=yes
23978else
23979 echo "$as_me: failed program was:" >&5
23980sed 's/^/| /' conftest.$ac_ext >&5
23981
23982 have_gcc_asm_for_x87=no
23983fi
23984
23985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000023986{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023987echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000023988if test "$have_gcc_asm_for_x87" = yes
23989then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023990
23991cat >>confdefs.h <<\_ACEOF
23992#define HAVE_GCC_ASM_FOR_X87 1
23993_ACEOF
23994
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023995fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023996
Mark Dickinson04b27232009-01-04 12:29:36 +000023997# Detect whether system arithmetic is subject to x87-style double
23998# rounding issues. The result of this test has little meaning on non
23999# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24000# mode is round-to-nearest and double rounding issues are present, and
24001# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024002{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24003echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024004# $BASECFLAGS may affect the result
24005ac_save_cc="$CC"
24006CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024007if test "$cross_compiling" = yes; then
24008 ac_cv_x87_double_rounding=no
24009else
24010 cat >conftest.$ac_ext <<_ACEOF
24011/* confdefs.h. */
24012_ACEOF
24013cat confdefs.h >>conftest.$ac_ext
24014cat >>conftest.$ac_ext <<_ACEOF
24015/* end confdefs.h. */
24016
24017#include <stdlib.h>
24018#include <math.h>
24019int main() {
24020 volatile double x, y, z;
24021 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24022 x = 0.99999999999999989; /* 1-2**-53 */
24023 y = 1./x;
24024 if (y != 1.)
24025 exit(0);
24026 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24027 x = 1e16;
24028 y = 2.99999;
24029 z = x + y;
24030 if (z != 1e16+4.)
24031 exit(0);
24032 /* both tests show evidence of double rounding */
24033 exit(1);
24034}
24035
24036_ACEOF
24037rm -f conftest$ac_exeext
24038if { (ac_try="$ac_link"
24039case "(($ac_try" in
24040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24041 *) ac_try_echo=$ac_try;;
24042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024044 (eval "$ac_link") 2>&5
24045 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24048 { (case "(($ac_try" in
24049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24050 *) ac_try_echo=$ac_try;;
24051esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024053 (eval "$ac_try") 2>&5
24054 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024056 (exit $ac_status); }; }; then
24057 ac_cv_x87_double_rounding=no
24058else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024059 echo "$as_me: program exited with status $ac_status" >&5
24060echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024061sed 's/^/| /' conftest.$ac_ext >&5
24062
24063( exit $ac_status )
24064ac_cv_x87_double_rounding=yes
24065fi
24066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24067fi
24068
24069
Mark Dickinson99abd142009-10-24 13:44:16 +000024070CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024071{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24072echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024073if test "$ac_cv_x87_double_rounding" = yes
24074then
24075
24076cat >>confdefs.h <<\_ACEOF
24077#define X87_DOUBLE_ROUNDING 1
24078_ACEOF
24079
24080fi
24081
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024082# ************************************
24083# * Check for mathematical functions *
24084# ************************************
24085
24086LIBS_SAVE=$LIBS
24087LIBS="$LIBS $LIBM"
24088
Mark Dickinson265d7382008-04-21 22:32:24 +000024089# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24090# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024091{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24092echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024093if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024094 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024095else
24096
24097if test "$cross_compiling" = yes; then
24098 ac_cv_tanh_preserves_zero_sign=no
24099else
24100 cat >conftest.$ac_ext <<_ACEOF
24101/* confdefs.h. */
24102_ACEOF
24103cat confdefs.h >>conftest.$ac_ext
24104cat >>conftest.$ac_ext <<_ACEOF
24105/* end confdefs.h. */
24106
24107#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024108#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024109int main() {
24110 /* return 0 if either negative zeros don't exist
24111 on this platform or if negative zeros exist
24112 and tanh(-0.) == -0. */
24113 if (atan2(0., -1.) == atan2(-0., -1.) ||
24114 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24115 else exit(1);
24116}
24117
24118_ACEOF
24119rm -f conftest$ac_exeext
24120if { (ac_try="$ac_link"
24121case "(($ac_try" in
24122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24123 *) ac_try_echo=$ac_try;;
24124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024126 (eval "$ac_link") 2>&5
24127 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024129 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24130 { (case "(($ac_try" in
24131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24132 *) ac_try_echo=$ac_try;;
24133esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024135 (eval "$ac_try") 2>&5
24136 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024138 (exit $ac_status); }; }; then
24139 ac_cv_tanh_preserves_zero_sign=yes
24140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024141 echo "$as_me: program exited with status $ac_status" >&5
24142echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024143sed 's/^/| /' conftest.$ac_ext >&5
24144
24145( exit $ac_status )
24146ac_cv_tanh_preserves_zero_sign=no
24147fi
24148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24149fi
24150
24151
24152fi
24153
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024154{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24155echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024156if test "$ac_cv_tanh_preserves_zero_sign" = yes
24157then
24158
24159cat >>confdefs.h <<\_ACEOF
24160#define TANH_PRESERVES_ZERO_SIGN 1
24161_ACEOF
24162
24163fi
24164
Martin v. Löwis11437992002-04-12 09:54:03 +000024165
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024166
Michael W. Hudson54241132001-12-07 15:38:26 +000024167
Christian Heimes0a8143f2007-12-18 23:22:54 +000024168
24169
24170
24171
24172
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024173
Mark Dickinson65898e02009-09-05 10:27:00 +000024174for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24175do
24176as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24177{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24178echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24179if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24180 echo $ECHO_N "(cached) $ECHO_C" >&6
24181else
24182 cat >conftest.$ac_ext <<_ACEOF
24183/* confdefs.h. */
24184_ACEOF
24185cat confdefs.h >>conftest.$ac_ext
24186cat >>conftest.$ac_ext <<_ACEOF
24187/* end confdefs.h. */
24188/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24190#define $ac_func innocuous_$ac_func
24191
24192/* System header to define __stub macros and hopefully few prototypes,
24193 which can conflict with char $ac_func (); below.
24194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24195 <limits.h> exists even on freestanding compilers. */
24196
24197#ifdef __STDC__
24198# include <limits.h>
24199#else
24200# include <assert.h>
24201#endif
24202
24203#undef $ac_func
24204
24205/* Override any GCC internal prototype to avoid an error.
24206 Use char because int might match the return type of a GCC
24207 builtin and then its argument prototype would still apply. */
24208#ifdef __cplusplus
24209extern "C"
24210#endif
24211char $ac_func ();
24212/* The GNU C library defines this for functions which it implements
24213 to always fail with ENOSYS. Some functions are actually named
24214 something starting with __ and the normal name is an alias. */
24215#if defined __stub_$ac_func || defined __stub___$ac_func
24216choke me
24217#endif
24218
24219int
24220main ()
24221{
24222return $ac_func ();
24223 ;
24224 return 0;
24225}
24226_ACEOF
24227rm -f conftest.$ac_objext conftest$ac_exeext
24228if { (ac_try="$ac_link"
24229case "(($ac_try" in
24230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24231 *) ac_try_echo=$ac_try;;
24232esac
24233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24234 (eval "$ac_link") 2>conftest.er1
24235 ac_status=$?
24236 grep -v '^ *+' conftest.er1 >conftest.err
24237 rm -f conftest.er1
24238 cat conftest.err >&5
24239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24240 (exit $ac_status); } && {
24241 test -z "$ac_c_werror_flag" ||
24242 test ! -s conftest.err
24243 } && test -s conftest$ac_exeext &&
24244 $as_test_x conftest$ac_exeext; then
24245 eval "$as_ac_var=yes"
24246else
24247 echo "$as_me: failed program was:" >&5
24248sed 's/^/| /' conftest.$ac_ext >&5
24249
24250 eval "$as_ac_var=no"
24251fi
24252
24253rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24254 conftest$ac_exeext conftest.$ac_ext
24255fi
24256ac_res=`eval echo '${'$as_ac_var'}'`
24257 { echo "$as_me:$LINENO: result: $ac_res" >&5
24258echo "${ECHO_T}$ac_res" >&6; }
24259if test `eval echo '${'$as_ac_var'}'` = yes; then
24260 cat >>confdefs.h <<_ACEOF
24261#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24262_ACEOF
24263
24264fi
24265done
24266
24267
24268
24269
24270
24271
24272for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024273do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024274as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24275{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24276echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024277if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024278 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024279else
24280 cat >conftest.$ac_ext <<_ACEOF
24281/* confdefs.h. */
24282_ACEOF
24283cat confdefs.h >>conftest.$ac_ext
24284cat >>conftest.$ac_ext <<_ACEOF
24285/* end confdefs.h. */
24286/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24287 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24288#define $ac_func innocuous_$ac_func
24289
24290/* System header to define __stub macros and hopefully few prototypes,
24291 which can conflict with char $ac_func (); below.
24292 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24293 <limits.h> exists even on freestanding compilers. */
24294
24295#ifdef __STDC__
24296# include <limits.h>
24297#else
24298# include <assert.h>
24299#endif
24300
24301#undef $ac_func
24302
24303/* Override any GCC internal prototype to avoid an error.
24304 Use char because int might match the return type of a GCC
24305 builtin and then its argument prototype would still apply. */
24306#ifdef __cplusplus
24307extern "C"
24308#endif
24309char $ac_func ();
24310/* The GNU C library defines this for functions which it implements
24311 to always fail with ENOSYS. Some functions are actually named
24312 something starting with __ and the normal name is an alias. */
24313#if defined __stub_$ac_func || defined __stub___$ac_func
24314choke me
24315#endif
24316
24317int
24318main ()
24319{
24320return $ac_func ();
24321 ;
24322 return 0;
24323}
24324_ACEOF
24325rm -f conftest.$ac_objext conftest$ac_exeext
24326if { (ac_try="$ac_link"
24327case "(($ac_try" in
24328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24329 *) ac_try_echo=$ac_try;;
24330esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024332 (eval "$ac_link") 2>conftest.er1
24333 ac_status=$?
24334 grep -v '^ *+' conftest.er1 >conftest.err
24335 rm -f conftest.er1
24336 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024338 (exit $ac_status); } && {
24339 test -z "$ac_c_werror_flag" ||
24340 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024341 } && test -s conftest$ac_exeext &&
24342 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024343 eval "$as_ac_var=yes"
24344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024345 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024346sed 's/^/| /' conftest.$ac_ext >&5
24347
24348 eval "$as_ac_var=no"
24349fi
24350
24351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24352 conftest$ac_exeext conftest.$ac_ext
24353fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024354ac_res=`eval echo '${'$as_ac_var'}'`
24355 { echo "$as_me:$LINENO: result: $ac_res" >&5
24356echo "${ECHO_T}$ac_res" >&6; }
24357if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024358 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024359#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024360_ACEOF
24361
24362fi
24363done
24364
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024365{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24366echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024367if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024368 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024369else
24370 cat >conftest.$ac_ext <<_ACEOF
24371/* confdefs.h. */
24372_ACEOF
24373cat confdefs.h >>conftest.$ac_ext
24374cat >>conftest.$ac_ext <<_ACEOF
24375/* end confdefs.h. */
24376#include <math.h>
24377
24378int
24379main ()
24380{
24381#ifndef isinf
24382 (void) isinf;
24383#endif
24384
24385 ;
24386 return 0;
24387}
24388_ACEOF
24389rm -f conftest.$ac_objext
24390if { (ac_try="$ac_compile"
24391case "(($ac_try" in
24392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24393 *) ac_try_echo=$ac_try;;
24394esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024396 (eval "$ac_compile") 2>conftest.er1
24397 ac_status=$?
24398 grep -v '^ *+' conftest.er1 >conftest.err
24399 rm -f conftest.er1
24400 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024402 (exit $ac_status); } && {
24403 test -z "$ac_c_werror_flag" ||
24404 test ! -s conftest.err
24405 } && test -s conftest.$ac_objext; then
24406 ac_cv_have_decl_isinf=yes
24407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024408 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024409sed 's/^/| /' conftest.$ac_ext >&5
24410
24411 ac_cv_have_decl_isinf=no
24412fi
24413
24414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24415fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024416{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24417echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24418if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024419
24420cat >>confdefs.h <<_ACEOF
24421#define HAVE_DECL_ISINF 1
24422_ACEOF
24423
24424
24425else
24426 cat >>confdefs.h <<_ACEOF
24427#define HAVE_DECL_ISINF 0
24428_ACEOF
24429
24430
24431fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024432{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24433echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024434if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024435 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024436else
24437 cat >conftest.$ac_ext <<_ACEOF
24438/* confdefs.h. */
24439_ACEOF
24440cat confdefs.h >>conftest.$ac_ext
24441cat >>conftest.$ac_ext <<_ACEOF
24442/* end confdefs.h. */
24443#include <math.h>
24444
24445int
24446main ()
24447{
24448#ifndef isnan
24449 (void) isnan;
24450#endif
24451
24452 ;
24453 return 0;
24454}
24455_ACEOF
24456rm -f conftest.$ac_objext
24457if { (ac_try="$ac_compile"
24458case "(($ac_try" in
24459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24460 *) ac_try_echo=$ac_try;;
24461esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024463 (eval "$ac_compile") 2>conftest.er1
24464 ac_status=$?
24465 grep -v '^ *+' conftest.er1 >conftest.err
24466 rm -f conftest.er1
24467 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024469 (exit $ac_status); } && {
24470 test -z "$ac_c_werror_flag" ||
24471 test ! -s conftest.err
24472 } && test -s conftest.$ac_objext; then
24473 ac_cv_have_decl_isnan=yes
24474else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024475 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024476sed 's/^/| /' conftest.$ac_ext >&5
24477
24478 ac_cv_have_decl_isnan=no
24479fi
24480
24481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24482fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024483{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24484echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24485if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024486
24487cat >>confdefs.h <<_ACEOF
24488#define HAVE_DECL_ISNAN 1
24489_ACEOF
24490
24491
24492else
24493 cat >>confdefs.h <<_ACEOF
24494#define HAVE_DECL_ISNAN 0
24495_ACEOF
24496
24497
24498fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024499{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24500echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024501if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024502 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024503else
24504 cat >conftest.$ac_ext <<_ACEOF
24505/* confdefs.h. */
24506_ACEOF
24507cat confdefs.h >>conftest.$ac_ext
24508cat >>conftest.$ac_ext <<_ACEOF
24509/* end confdefs.h. */
24510#include <math.h>
24511
24512int
24513main ()
24514{
24515#ifndef isfinite
24516 (void) isfinite;
24517#endif
24518
24519 ;
24520 return 0;
24521}
24522_ACEOF
24523rm -f conftest.$ac_objext
24524if { (ac_try="$ac_compile"
24525case "(($ac_try" in
24526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24527 *) ac_try_echo=$ac_try;;
24528esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024530 (eval "$ac_compile") 2>conftest.er1
24531 ac_status=$?
24532 grep -v '^ *+' conftest.er1 >conftest.err
24533 rm -f conftest.er1
24534 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024536 (exit $ac_status); } && {
24537 test -z "$ac_c_werror_flag" ||
24538 test ! -s conftest.err
24539 } && test -s conftest.$ac_objext; then
24540 ac_cv_have_decl_isfinite=yes
24541else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024542 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024543sed 's/^/| /' conftest.$ac_ext >&5
24544
24545 ac_cv_have_decl_isfinite=no
24546fi
24547
24548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24549fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024550{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24551echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24552if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024553
24554cat >>confdefs.h <<_ACEOF
24555#define HAVE_DECL_ISFINITE 1
24556_ACEOF
24557
24558
24559else
24560 cat >>confdefs.h <<_ACEOF
24561#define HAVE_DECL_ISFINITE 0
24562_ACEOF
24563
24564
24565fi
24566
24567
Christian Heimes0a8143f2007-12-18 23:22:54 +000024568
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024569LIBS=$LIBS_SAVE
24570
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024571# For multiprocessing module, check that sem_open
24572# actually works. For FreeBSD versions <= 7.2,
24573# the kernel module that provides POSIX semaphores
24574# isn't loaded by default, so an attempt to call
24575# sem_open results in a 'Signal 12' error.
24576{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24577echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24578if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24579 echo $ECHO_N "(cached) $ECHO_C" >&6
24580else
24581 if test "$cross_compiling" = yes; then
24582 ac_cv_posix_semaphores_enabled=yes
24583else
24584 cat >conftest.$ac_ext <<_ACEOF
24585/* confdefs.h. */
24586_ACEOF
24587cat confdefs.h >>conftest.$ac_ext
24588cat >>conftest.$ac_ext <<_ACEOF
24589/* end confdefs.h. */
24590
24591#include <unistd.h>
24592#include <fcntl.h>
24593#include <stdio.h>
24594#include <semaphore.h>
24595#include <sys/stat.h>
24596
24597int main(void) {
24598 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24599 if (a == SEM_FAILED) {
24600 perror("sem_open");
24601 return 1;
24602 }
24603 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024604 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024605 return 0;
24606}
24607
24608_ACEOF
24609rm -f conftest$ac_exeext
24610if { (ac_try="$ac_link"
24611case "(($ac_try" in
24612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24613 *) ac_try_echo=$ac_try;;
24614esac
24615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24616 (eval "$ac_link") 2>&5
24617 ac_status=$?
24618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24619 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24620 { (case "(($ac_try" in
24621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24622 *) ac_try_echo=$ac_try;;
24623esac
24624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24625 (eval "$ac_try") 2>&5
24626 ac_status=$?
24627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24628 (exit $ac_status); }; }; then
24629 ac_cv_posix_semaphores_enabled=yes
24630else
24631 echo "$as_me: program exited with status $ac_status" >&5
24632echo "$as_me: failed program was:" >&5
24633sed 's/^/| /' conftest.$ac_ext >&5
24634
24635( exit $ac_status )
24636ac_cv_posix_semaphores_enabled=no
24637fi
24638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24639fi
24640
24641
24642
24643fi
24644
24645{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24646echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24647if test $ac_cv_posix_semaphores_enabled = no
24648then
24649
24650cat >>confdefs.h <<\_ACEOF
24651#define POSIX_SEMAPHORES_NOT_ENABLED 1
24652_ACEOF
24653
24654fi
24655
24656# Multiprocessing check for broken sem_getvalue
24657{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24658echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24659if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24660 echo $ECHO_N "(cached) $ECHO_C" >&6
24661else
24662 if test "$cross_compiling" = yes; then
24663 ac_cv_broken_sem_getvalue=yes
24664else
24665 cat >conftest.$ac_ext <<_ACEOF
24666/* confdefs.h. */
24667_ACEOF
24668cat confdefs.h >>conftest.$ac_ext
24669cat >>conftest.$ac_ext <<_ACEOF
24670/* end confdefs.h. */
24671
24672#include <unistd.h>
24673#include <fcntl.h>
24674#include <stdio.h>
24675#include <semaphore.h>
24676#include <sys/stat.h>
24677
24678int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024679 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024680 int count;
24681 int res;
24682 if(a==SEM_FAILED){
24683 perror("sem_open");
24684 return 1;
24685
24686 }
24687 res = sem_getvalue(a, &count);
24688 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024689 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024690 return res==-1 ? 1 : 0;
24691}
24692
24693_ACEOF
24694rm -f conftest$ac_exeext
24695if { (ac_try="$ac_link"
24696case "(($ac_try" in
24697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24698 *) ac_try_echo=$ac_try;;
24699esac
24700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24701 (eval "$ac_link") 2>&5
24702 ac_status=$?
24703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24705 { (case "(($ac_try" in
24706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24707 *) ac_try_echo=$ac_try;;
24708esac
24709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24710 (eval "$ac_try") 2>&5
24711 ac_status=$?
24712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24713 (exit $ac_status); }; }; then
24714 ac_cv_broken_sem_getvalue=no
24715else
24716 echo "$as_me: program exited with status $ac_status" >&5
24717echo "$as_me: failed program was:" >&5
24718sed 's/^/| /' conftest.$ac_ext >&5
24719
24720( exit $ac_status )
24721ac_cv_broken_sem_getvalue=yes
24722fi
24723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24724fi
24725
24726
24727
24728fi
24729
24730{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24731echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24732if test $ac_cv_broken_sem_getvalue = yes
24733then
24734
24735cat >>confdefs.h <<\_ACEOF
24736#define HAVE_BROKEN_SEM_GETVALUE 1
24737_ACEOF
24738
24739fi
24740
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024741# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024742{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24743echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024744# Check whether --enable-big-digits was given.
24745if test "${enable_big_digits+set}" = set; then
24746 enableval=$enable_big_digits; case $enable_big_digits in
24747yes)
24748 enable_big_digits=30 ;;
24749no)
24750 enable_big_digits=15 ;;
2475115|30)
24752 ;;
24753*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024754 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24755echo "$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 +000024756 { (exit 1); exit 1; }; } ;;
24757esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024758{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24759echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024760
24761cat >>confdefs.h <<_ACEOF
24762#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24763_ACEOF
24764
24765
24766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024767 { echo "$as_me:$LINENO: result: no value specified" >&5
24768echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024769fi
24770
24771
Guido van Rossumef2255b2000-03-10 22:30:29 +000024772# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024773if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024774 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24775echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024776if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024777 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024778fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024779{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24780echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024781else
Martin v. Löwis11437992002-04-12 09:54:03 +000024782 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024783{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24784echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024785cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024786/* confdefs.h. */
24787_ACEOF
24788cat confdefs.h >>conftest.$ac_ext
24789cat >>conftest.$ac_ext <<_ACEOF
24790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024791$ac_includes_default
24792#include <wchar.h>
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
Martin v. Löwis11437992002-04-12 09:54:03 +000024811 ac_header_compiler=yes
24812else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024814sed 's/^/| /' conftest.$ac_ext >&5
24815
Martin v. Löwiseba40652007-08-30 20:10:57 +000024816 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024818
24819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024820{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24821echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024822
24823# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024824{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24825echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024826cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024827/* confdefs.h. */
24828_ACEOF
24829cat confdefs.h >>conftest.$ac_ext
24830cat >>conftest.$ac_ext <<_ACEOF
24831/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024832#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024833_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024834if { (ac_try="$ac_cpp conftest.$ac_ext"
24835case "(($ac_try" in
24836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24837 *) ac_try_echo=$ac_try;;
24838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024840 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024841 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024842 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024843 rm -f conftest.er1
24844 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024846 (exit $ac_status); } >/dev/null && {
24847 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24848 test ! -s conftest.err
24849 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024850 ac_header_preproc=yes
24851else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024853sed 's/^/| /' conftest.$ac_ext >&5
24854
Martin v. Löwis11437992002-04-12 09:54:03 +000024855 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024857
Martin v. Löwis11437992002-04-12 09:54:03 +000024858rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024859{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24860echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024861
24862# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024863case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24864 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024865 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24866echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24867 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24868echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024869 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024870 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024871 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024872 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24873echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24874 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24875echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24876 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24877echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24878 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24879echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24880 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24881echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24882 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24883echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024884 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024885## -------------------------------------- ##
24886## Report this to http://bugs.python.org/ ##
24887## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024888_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024890 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024892{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24893echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024894if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024895 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024896else
24897 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024898fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024899{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24900echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024901
24902fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024903if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024904
24905
24906cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024907#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024908_ACEOF
24909
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024910 wchar_h="yes"
24911
Guido van Rossumef2255b2000-03-10 22:30:29 +000024912else
Martin v. Löwis11437992002-04-12 09:54:03 +000024913 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024914
24915fi
24916
Michael W. Hudson54241132001-12-07 15:38:26 +000024917
Martin v. Löwis11437992002-04-12 09:54:03 +000024918
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024919# determine wchar_t size
24920if test "$wchar_h" = yes
24921then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024922 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24923echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24924if test "${ac_cv_type_wchar_t+set}" = set; then
24925 echo $ECHO_N "(cached) $ECHO_C" >&6
24926else
24927 cat >conftest.$ac_ext <<_ACEOF
24928/* confdefs.h. */
24929_ACEOF
24930cat confdefs.h >>conftest.$ac_ext
24931cat >>conftest.$ac_ext <<_ACEOF
24932/* end confdefs.h. */
24933#include <wchar.h>
24934
24935typedef wchar_t ac__type_new_;
24936int
24937main ()
24938{
24939if ((ac__type_new_ *) 0)
24940 return 0;
24941if (sizeof (ac__type_new_))
24942 return 0;
24943 ;
24944 return 0;
24945}
24946_ACEOF
24947rm -f conftest.$ac_objext
24948if { (ac_try="$ac_compile"
24949case "(($ac_try" in
24950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24951 *) ac_try_echo=$ac_try;;
24952esac
24953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24954 (eval "$ac_compile") 2>conftest.er1
24955 ac_status=$?
24956 grep -v '^ *+' conftest.er1 >conftest.err
24957 rm -f conftest.er1
24958 cat conftest.err >&5
24959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24960 (exit $ac_status); } && {
24961 test -z "$ac_c_werror_flag" ||
24962 test ! -s conftest.err
24963 } && test -s conftest.$ac_objext; then
24964 ac_cv_type_wchar_t=yes
24965else
24966 echo "$as_me: failed program was:" >&5
24967sed 's/^/| /' conftest.$ac_ext >&5
24968
24969 ac_cv_type_wchar_t=no
24970fi
24971
24972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24973fi
24974{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24975echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24976
24977# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24980# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024981{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24982echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024983if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024984 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024985else
Martin v. Löwis11437992002-04-12 09:54:03 +000024986 if test "$cross_compiling" = yes; then
24987 # Depending upon the size, compute the lo and hi bounds.
24988cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024989/* confdefs.h. */
24990_ACEOF
24991cat confdefs.h >>conftest.$ac_ext
24992cat >>conftest.$ac_ext <<_ACEOF
24993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024994#include <wchar.h>
24995
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024996 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024997int
24998main ()
24999{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025000static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025001test_array [0] = 0
25002
25003 ;
25004 return 0;
25005}
25006_ACEOF
25007rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025008if { (ac_try="$ac_compile"
25009case "(($ac_try" in
25010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25011 *) ac_try_echo=$ac_try;;
25012esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025016 grep -v '^ *+' conftest.er1 >conftest.err
25017 rm -f conftest.er1
25018 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025020 (exit $ac_status); } && {
25021 test -z "$ac_c_werror_flag" ||
25022 test ! -s conftest.err
25023 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025024 ac_lo=0 ac_mid=0
25025 while :; do
25026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025027/* confdefs.h. */
25028_ACEOF
25029cat confdefs.h >>conftest.$ac_ext
25030cat >>conftest.$ac_ext <<_ACEOF
25031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025032#include <wchar.h>
25033
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025034 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025035int
25036main ()
25037{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025039test_array [0] = 0
25040
25041 ;
25042 return 0;
25043}
25044_ACEOF
25045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025046if { (ac_try="$ac_compile"
25047case "(($ac_try" in
25048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25049 *) ac_try_echo=$ac_try;;
25050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025054 grep -v '^ *+' conftest.er1 >conftest.err
25055 rm -f conftest.er1
25056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025058 (exit $ac_status); } && {
25059 test -z "$ac_c_werror_flag" ||
25060 test ! -s conftest.err
25061 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025062 ac_hi=$ac_mid; break
25063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025065sed 's/^/| /' conftest.$ac_ext >&5
25066
Martin v. Löwiseba40652007-08-30 20:10:57 +000025067 ac_lo=`expr $ac_mid + 1`
25068 if test $ac_lo -le $ac_mid; then
25069 ac_lo= ac_hi=
25070 break
25071 fi
25072 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025074
25075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025076 done
25077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025079sed 's/^/| /' conftest.$ac_ext >&5
25080
Martin v. Löwiseba40652007-08-30 20:10:57 +000025081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025082/* confdefs.h. */
25083_ACEOF
25084cat confdefs.h >>conftest.$ac_ext
25085cat >>conftest.$ac_ext <<_ACEOF
25086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025087#include <wchar.h>
25088
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025089 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025090int
25091main ()
25092{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025093static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025094test_array [0] = 0
25095
25096 ;
25097 return 0;
25098}
25099_ACEOF
25100rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025101if { (ac_try="$ac_compile"
25102case "(($ac_try" in
25103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25104 *) ac_try_echo=$ac_try;;
25105esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025109 grep -v '^ *+' conftest.er1 >conftest.err
25110 rm -f conftest.er1
25111 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025113 (exit $ac_status); } && {
25114 test -z "$ac_c_werror_flag" ||
25115 test ! -s conftest.err
25116 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025117 ac_hi=-1 ac_mid=-1
25118 while :; do
25119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025120/* confdefs.h. */
25121_ACEOF
25122cat confdefs.h >>conftest.$ac_ext
25123cat >>conftest.$ac_ext <<_ACEOF
25124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025125#include <wchar.h>
25126
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025127 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025128int
25129main ()
25130{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025131static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025132test_array [0] = 0
25133
25134 ;
25135 return 0;
25136}
25137_ACEOF
25138rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025139if { (ac_try="$ac_compile"
25140case "(($ac_try" in
25141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25142 *) ac_try_echo=$ac_try;;
25143esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025147 grep -v '^ *+' conftest.er1 >conftest.err
25148 rm -f conftest.er1
25149 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151 (exit $ac_status); } && {
25152 test -z "$ac_c_werror_flag" ||
25153 test ! -s conftest.err
25154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025155 ac_lo=$ac_mid; break
25156else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025158sed 's/^/| /' conftest.$ac_ext >&5
25159
Martin v. Löwiseba40652007-08-30 20:10:57 +000025160 ac_hi=`expr '(' $ac_mid ')' - 1`
25161 if test $ac_mid -le $ac_hi; then
25162 ac_lo= ac_hi=
25163 break
25164 fi
25165 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025167
25168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025169 done
25170else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025172sed 's/^/| /' conftest.$ac_ext >&5
25173
Martin v. Löwiseba40652007-08-30 20:10:57 +000025174 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025176
25177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179
25180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025181# Binary search between lo and hi bounds.
25182while test "x$ac_lo" != "x$ac_hi"; do
25183 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025185/* confdefs.h. */
25186_ACEOF
25187cat confdefs.h >>conftest.$ac_ext
25188cat >>conftest.$ac_ext <<_ACEOF
25189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025190#include <wchar.h>
25191
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025192 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025193int
25194main ()
25195{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025196static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025197test_array [0] = 0
25198
25199 ;
25200 return 0;
25201}
25202_ACEOF
25203rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025204if { (ac_try="$ac_compile"
25205case "(($ac_try" in
25206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25207 *) ac_try_echo=$ac_try;;
25208esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025212 grep -v '^ *+' conftest.er1 >conftest.err
25213 rm -f conftest.er1
25214 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025216 (exit $ac_status); } && {
25217 test -z "$ac_c_werror_flag" ||
25218 test ! -s conftest.err
25219 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025220 ac_hi=$ac_mid
25221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025223sed 's/^/| /' conftest.$ac_ext >&5
25224
Martin v. Löwiseba40652007-08-30 20:10:57 +000025225 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025227
25228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025229done
25230case $ac_lo in
25231?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025232'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025233 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025234See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025235echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025236See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025237 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025238 else
25239 ac_cv_sizeof_wchar_t=0
25240 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025241esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025242else
Martin v. Löwis11437992002-04-12 09:54:03 +000025243 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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025249#include <wchar.h>
25250
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025251 typedef wchar_t ac__type_sizeof_;
25252static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25253static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025254#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025255#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025256int
25257main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025258{
Martin v. Löwis11437992002-04-12 09:54:03 +000025259
25260 FILE *f = fopen ("conftest.val", "w");
25261 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025262 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025263 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025264 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025265 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025266 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025267 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025268 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025269 }
25270 else
25271 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025272 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025273 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025274 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025275 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025276 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025277 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025278
25279 ;
25280 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025281}
Martin v. Löwis11437992002-04-12 09:54:03 +000025282_ACEOF
25283rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025284if { (ac_try="$ac_link"
25285case "(($ac_try" in
25286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25287 *) ac_try_echo=$ac_try;;
25288esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025290 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025291 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025293 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025294 { (case "(($ac_try" in
25295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25296 *) ac_try_echo=$ac_try;;
25297esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025299 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025300 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025302 (exit $ac_status); }; }; then
25303 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025304else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025305 echo "$as_me: program exited with status $ac_status" >&5
25306echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025307sed 's/^/| /' conftest.$ac_ext >&5
25308
Martin v. Löwis11437992002-04-12 09:54:03 +000025309( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025310if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025311 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025312See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025313echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025314See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025315 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025316 else
25317 ac_cv_sizeof_wchar_t=0
25318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025321fi
25322rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025323fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025324{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25325echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025326
25327
25328
Martin v. Löwis11437992002-04-12 09:54:03 +000025329cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025330#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025331_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025332
Michael W. Hudson54241132001-12-07 15:38:26 +000025333
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025334fi
25335
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025336{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25337echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025338have_ucs4_tcl=no
25339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025340/* confdefs.h. */
25341_ACEOF
25342cat confdefs.h >>conftest.$ac_ext
25343cat >>conftest.$ac_ext <<_ACEOF
25344/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025345
25346#include <tcl.h>
25347#if TCL_UTF_MAX != 6
25348# error "NOT UCS4_TCL"
25349#endif
25350int
25351main ()
25352{
25353
25354 ;
25355 return 0;
25356}
25357_ACEOF
25358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025359if { (ac_try="$ac_compile"
25360case "(($ac_try" in
25361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25362 *) ac_try_echo=$ac_try;;
25363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025367 grep -v '^ *+' conftest.er1 >conftest.err
25368 rm -f conftest.er1
25369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025371 (exit $ac_status); } && {
25372 test -z "$ac_c_werror_flag" ||
25373 test ! -s conftest.err
25374 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025375
25376
25377cat >>confdefs.h <<\_ACEOF
25378#define HAVE_UCS4_TCL 1
25379_ACEOF
25380
25381 have_ucs4_tcl=yes
25382
25383else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025385sed 's/^/| /' conftest.$ac_ext >&5
25386
Martin v. Löwiseba40652007-08-30 20:10:57 +000025387
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025389
25390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025391{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25392echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025393
Skip Montanaro6dead952003-09-25 14:50:04 +000025394# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025395if test "$wchar_h" = yes
25396then
25397 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025398 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25399echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025400 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025401 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025402else
25403
25404 if test "$cross_compiling" = yes; then
25405 ac_cv_wchar_t_signed=yes
25406else
25407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025408/* confdefs.h. */
25409_ACEOF
25410cat confdefs.h >>conftest.$ac_ext
25411cat >>conftest.$ac_ext <<_ACEOF
25412/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025413
25414 #include <wchar.h>
25415 int main()
25416 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025417 /* Success: exit code 0 */
25418 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025419 }
25420
25421_ACEOF
25422rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025423if { (ac_try="$ac_link"
25424case "(($ac_try" in
25425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25426 *) ac_try_echo=$ac_try;;
25427esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025429 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025430 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025432 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025433 { (case "(($ac_try" in
25434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25435 *) ac_try_echo=$ac_try;;
25436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025438 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025439 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025441 (exit $ac_status); }; }; then
25442 ac_cv_wchar_t_signed=yes
25443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025444 echo "$as_me: program exited with status $ac_status" >&5
25445echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025446sed 's/^/| /' conftest.$ac_ext >&5
25447
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025448( exit $ac_status )
25449ac_cv_wchar_t_signed=no
25450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025451rm -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 +000025452fi
25453
Martin v. Löwiseba40652007-08-30 20:10:57 +000025454
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025455fi
25456
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025457 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25458echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025459fi
25460
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025461{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25462echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025463# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025464if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025465 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025466else
25467 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025468fi
25469
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025470
25471if test $enable_unicode = yes
25472then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025473 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025474 case "$have_ucs4_tcl" in
25475 yes) enable_unicode="ucs4"
25476 ;;
25477 *) enable_unicode="ucs2"
25478 ;;
25479 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025480fi
25481
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025482
25483
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025484case "$enable_unicode" in
25485ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025486 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025487#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025488_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025489
25490 ;;
25491ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025492 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025493#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025494_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025495
25496 ;;
25497esac
25498
Michael W. Hudson54241132001-12-07 15:38:26 +000025499
Martin v. Löwis11437992002-04-12 09:54:03 +000025500
25501
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025502
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025503if test "$enable_unicode" = "no"
25504then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025505 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025506 { echo "$as_me:$LINENO: result: not used" >&5
25507echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025508else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025509 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025510
25511cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025512#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025513_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025514
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025515
25516 # wchar_t is only usable if it maps to an unsigned type
25517 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025518 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025519 then
25520 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025521
Martin v. Löwis11437992002-04-12 09:54:03 +000025522cat >>confdefs.h <<\_ACEOF
25523#define HAVE_USABLE_WCHAR_T 1
25524_ACEOF
25525
25526 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025527#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025528_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025529
25530 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25531 then
25532 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025533 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025534#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025535_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025536
25537 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25538 then
25539 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025540 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025541#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025542_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025543
25544 else
25545 PY_UNICODE_TYPE="no type found"
25546 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025547 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25548echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025549fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025550
25551# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025552{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25553echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025554if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025555 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025556else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025557 # See if sys/param.h defines the BYTE_ORDER macro.
25558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025559/* confdefs.h. */
25560_ACEOF
25561cat confdefs.h >>conftest.$ac_ext
25562cat >>conftest.$ac_ext <<_ACEOF
25563/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025564#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025565#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025566
Martin v. Löwis11437992002-04-12 09:54:03 +000025567int
25568main ()
25569{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025570#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25571 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25572 bogus endian macros
25573#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025574
25575 ;
25576 return 0;
25577}
25578_ACEOF
25579rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025580if { (ac_try="$ac_compile"
25581case "(($ac_try" in
25582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25583 *) ac_try_echo=$ac_try;;
25584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025588 grep -v '^ *+' conftest.er1 >conftest.err
25589 rm -f conftest.er1
25590 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025592 (exit $ac_status); } && {
25593 test -z "$ac_c_werror_flag" ||
25594 test ! -s conftest.err
25595 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025596 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025597cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025598/* confdefs.h. */
25599_ACEOF
25600cat confdefs.h >>conftest.$ac_ext
25601cat >>conftest.$ac_ext <<_ACEOF
25602/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025603#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025604#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025605
Martin v. Löwis11437992002-04-12 09:54:03 +000025606int
25607main ()
25608{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025609#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025610 not big endian
25611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025612
25613 ;
25614 return 0;
25615}
25616_ACEOF
25617rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025618if { (ac_try="$ac_compile"
25619case "(($ac_try" in
25620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25621 *) ac_try_echo=$ac_try;;
25622esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025626 grep -v '^ *+' conftest.er1 >conftest.err
25627 rm -f conftest.er1
25628 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025630 (exit $ac_status); } && {
25631 test -z "$ac_c_werror_flag" ||
25632 test ! -s conftest.err
25633 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025634 ac_cv_c_bigendian=yes
25635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025637sed 's/^/| /' conftest.$ac_ext >&5
25638
Martin v. Löwiseba40652007-08-30 20:10:57 +000025639 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025641
25642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025643else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025645sed 's/^/| /' conftest.$ac_ext >&5
25646
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025647 # It does not; compile a test program.
25648if test "$cross_compiling" = yes; then
25649 # try to guess the endianness by grepping values into an object file
25650 ac_cv_c_bigendian=unknown
25651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025652/* confdefs.h. */
25653_ACEOF
25654cat confdefs.h >>conftest.$ac_ext
25655cat >>conftest.$ac_ext <<_ACEOF
25656/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025657short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25658short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25659void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25660short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25661short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25662void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025663int
25664main ()
25665{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025666 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025667 ;
25668 return 0;
25669}
25670_ACEOF
25671rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025672if { (ac_try="$ac_compile"
25673case "(($ac_try" in
25674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25675 *) ac_try_echo=$ac_try;;
25676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025680 grep -v '^ *+' conftest.er1 >conftest.err
25681 rm -f conftest.er1
25682 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025684 (exit $ac_status); } && {
25685 test -z "$ac_c_werror_flag" ||
25686 test ! -s conftest.err
25687 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025688 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025689 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025690fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025691if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25692 if test "$ac_cv_c_bigendian" = unknown; then
25693 ac_cv_c_bigendian=no
25694 else
25695 # finding both strings is unlikely to happen, but who knows?
25696 ac_cv_c_bigendian=unknown
25697 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025698fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025701sed 's/^/| /' conftest.$ac_ext >&5
25702
Martin v. Löwiseba40652007-08-30 20:10:57 +000025703
Martin v. Löwis11437992002-04-12 09:54:03 +000025704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025705
25706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025707else
25708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025709/* confdefs.h. */
25710_ACEOF
25711cat confdefs.h >>conftest.$ac_ext
25712cat >>conftest.$ac_ext <<_ACEOF
25713/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025714$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025715int
25716main ()
25717{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025718
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025719 /* Are we little or big endian? From Harbison&Steele. */
25720 union
25721 {
25722 long int l;
25723 char c[sizeof (long int)];
25724 } u;
25725 u.l = 1;
25726 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025727
25728 ;
25729 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025730}
Martin v. Löwis11437992002-04-12 09:54:03 +000025731_ACEOF
25732rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025733if { (ac_try="$ac_link"
25734case "(($ac_try" in
25735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25736 *) ac_try_echo=$ac_try;;
25737esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025739 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025740 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025742 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025743 { (case "(($ac_try" in
25744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25745 *) ac_try_echo=$ac_try;;
25746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025748 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025749 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025751 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025752 ac_cv_c_bigendian=no
25753else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025754 echo "$as_me: program exited with status $ac_status" >&5
25755echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025756sed 's/^/| /' conftest.$ac_ext >&5
25757
Martin v. Löwis11437992002-04-12 09:54:03 +000025758( exit $ac_status )
25759ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025761rm -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 +000025762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025763
25764
Martin v. Löwis11437992002-04-12 09:54:03 +000025765fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025766
25767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25768fi
25769{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25770echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25771case $ac_cv_c_bigendian in
25772 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025773
25774cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025775#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025776_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025777 ;;
25778 no)
25779 ;;
25780 *)
25781 { { echo "$as_me:$LINENO: error: unknown endianness
25782presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25783echo "$as_me: error: unknown endianness
25784presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025785 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025786esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025787
Michael W. Hudson54241132001-12-07 15:38:26 +000025788
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025789# Check whether right shifting a negative integer extends the sign bit
25790# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025791{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25792echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025793if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025794 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025795else
Martin v. Löwis11437992002-04-12 09:54:03 +000025796
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025797if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025798 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025799else
Martin v. Löwis11437992002-04-12 09:54:03 +000025800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025801/* confdefs.h. */
25802_ACEOF
25803cat confdefs.h >>conftest.$ac_ext
25804cat >>conftest.$ac_ext <<_ACEOF
25805/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025806
25807int main()
25808{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025809 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025810}
25811
Martin v. Löwis11437992002-04-12 09:54:03 +000025812_ACEOF
25813rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025814if { (ac_try="$ac_link"
25815case "(($ac_try" in
25816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25817 *) ac_try_echo=$ac_try;;
25818esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025820 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025821 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025823 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025824 { (case "(($ac_try" in
25825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25826 *) ac_try_echo=$ac_try;;
25827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025829 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025830 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025832 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025833 ac_cv_rshift_extends_sign=yes
25834else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025835 echo "$as_me: program exited with status $ac_status" >&5
25836echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025837sed 's/^/| /' conftest.$ac_ext >&5
25838
Martin v. Löwis11437992002-04-12 09:54:03 +000025839( exit $ac_status )
25840ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025842rm -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 +000025843fi
25844
Martin v. Löwiseba40652007-08-30 20:10:57 +000025845
25846fi
25847
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025848{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25849echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025850if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025851then
Martin v. Löwis11437992002-04-12 09:54:03 +000025852
25853cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025854#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025855_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025856
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025857fi
25858
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025859# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025860{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25861echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025862if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025863 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025864else
Martin v. Löwis11437992002-04-12 09:54:03 +000025865
25866cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025867/* confdefs.h. */
25868_ACEOF
25869cat confdefs.h >>conftest.$ac_ext
25870cat >>conftest.$ac_ext <<_ACEOF
25871/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025872#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025873int
25874main ()
25875{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025876
25877 FILE *f = fopen("/dev/null", "r");
25878 flockfile(f);
25879 getc_unlocked(f);
25880 funlockfile(f);
25881
Martin v. Löwis11437992002-04-12 09:54:03 +000025882 ;
25883 return 0;
25884}
25885_ACEOF
25886rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025887if { (ac_try="$ac_link"
25888case "(($ac_try" in
25889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25890 *) ac_try_echo=$ac_try;;
25891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025893 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025895 grep -v '^ *+' conftest.er1 >conftest.err
25896 rm -f conftest.er1
25897 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025899 (exit $ac_status); } && {
25900 test -z "$ac_c_werror_flag" ||
25901 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025902 } && test -s conftest$ac_exeext &&
25903 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025904 ac_cv_have_getc_unlocked=yes
25905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025907sed 's/^/| /' conftest.$ac_ext >&5
25908
Martin v. Löwiseba40652007-08-30 20:10:57 +000025909 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025911
25912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025913 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025914fi
25915
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025916{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25917echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025918if test "$ac_cv_have_getc_unlocked" = yes
25919then
Martin v. Löwis11437992002-04-12 09:54:03 +000025920
25921cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025922#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025923_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025924
25925fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025926
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025927# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025928# save the value of LIBS so we don't actually link Python with readline
25929LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025930
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025931# On some systems we need to link readline to a termcap compatible
25932# library. NOTE: Keep the precedence of listed libraries synchronised
25933# with setup.py.
25934py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025935{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25936echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025937for py_libtermcap in "" ncursesw ncurses curses termcap; do
25938 if test -z "$py_libtermcap"; then
25939 READLINE_LIBS="-lreadline"
25940 else
25941 READLINE_LIBS="-lreadline -l$py_libtermcap"
25942 fi
25943 LIBS="$READLINE_LIBS $LIBS_no_readline"
25944 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025945/* confdefs.h. */
25946_ACEOF
25947cat confdefs.h >>conftest.$ac_ext
25948cat >>conftest.$ac_ext <<_ACEOF
25949/* end confdefs.h. */
25950
Martin v. Löwiseba40652007-08-30 20:10:57 +000025951/* Override any GCC internal prototype to avoid an error.
25952 Use char because int might match the return type of a GCC
25953 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025954#ifdef __cplusplus
25955extern "C"
25956#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025957char readline ();
25958int
25959main ()
25960{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025961return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025962 ;
25963 return 0;
25964}
25965_ACEOF
25966rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025967if { (ac_try="$ac_link"
25968case "(($ac_try" in
25969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25970 *) ac_try_echo=$ac_try;;
25971esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025973 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025974 ac_status=$?
25975 grep -v '^ *+' conftest.er1 >conftest.err
25976 rm -f conftest.er1
25977 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025979 (exit $ac_status); } && {
25980 test -z "$ac_c_werror_flag" ||
25981 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025982 } && test -s conftest$ac_exeext &&
25983 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025984 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025985else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025986 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025987sed 's/^/| /' conftest.$ac_ext >&5
25988
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025989
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025991
25992rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025993 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025994 if test $py_cv_lib_readline = yes; then
25995 break
25996 fi
25997done
25998# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25999#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026000if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026001 { echo "$as_me:$LINENO: result: none" >&5
26002echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026003else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026004 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26005echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026006
26007cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026008#define HAVE_LIBREADLINE 1
26009_ACEOF
26010
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026011fi
26012
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026013# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026014{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26015echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026016if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026017 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026018else
26019 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026020LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026021cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026022/* confdefs.h. */
26023_ACEOF
26024cat confdefs.h >>conftest.$ac_ext
26025cat >>conftest.$ac_ext <<_ACEOF
26026/* end confdefs.h. */
26027
Martin v. Löwiseba40652007-08-30 20:10:57 +000026028/* Override any GCC internal prototype to avoid an error.
26029 Use char because int might match the return type of a GCC
26030 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026031#ifdef __cplusplus
26032extern "C"
26033#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026034char rl_callback_handler_install ();
26035int
26036main ()
26037{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026038return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026039 ;
26040 return 0;
26041}
26042_ACEOF
26043rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026044if { (ac_try="$ac_link"
26045case "(($ac_try" in
26046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26047 *) ac_try_echo=$ac_try;;
26048esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026050 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026052 grep -v '^ *+' conftest.er1 >conftest.err
26053 rm -f conftest.er1
26054 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026056 (exit $ac_status); } && {
26057 test -z "$ac_c_werror_flag" ||
26058 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026059 } && test -s conftest$ac_exeext &&
26060 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026061 ac_cv_lib_readline_rl_callback_handler_install=yes
26062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026063 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026064sed 's/^/| /' conftest.$ac_ext >&5
26065
Martin v. Löwiseba40652007-08-30 20:10:57 +000026066 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026068
26069rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026070 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026071LIBS=$ac_check_lib_save_LIBS
26072fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026073{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26074echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26075if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026076
26077cat >>confdefs.h <<\_ACEOF
26078#define HAVE_RL_CALLBACK 1
26079_ACEOF
26080
26081fi
26082
26083
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026084# check for readline 2.2
26085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026086/* confdefs.h. */
26087_ACEOF
26088cat confdefs.h >>conftest.$ac_ext
26089cat >>conftest.$ac_ext <<_ACEOF
26090/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026091#include <readline/readline.h>
26092_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026093if { (ac_try="$ac_cpp conftest.$ac_ext"
26094case "(($ac_try" in
26095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26096 *) ac_try_echo=$ac_try;;
26097esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026099 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026100 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026101 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026102 rm -f conftest.er1
26103 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026105 (exit $ac_status); } >/dev/null && {
26106 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26107 test ! -s conftest.err
26108 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026109 have_readline=yes
26110else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026112sed 's/^/| /' conftest.$ac_ext >&5
26113
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026114 have_readline=no
26115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026116
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026117rm -f conftest.err conftest.$ac_ext
26118if test $have_readline = yes
26119then
26120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026121/* confdefs.h. */
26122_ACEOF
26123cat confdefs.h >>conftest.$ac_ext
26124cat >>conftest.$ac_ext <<_ACEOF
26125/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026126#include <readline/readline.h>
26127
26128_ACEOF
26129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026130 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026131
26132cat >>confdefs.h <<\_ACEOF
26133#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26134_ACEOF
26135
26136fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000026137rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026138
26139 cat >conftest.$ac_ext <<_ACEOF
26140/* confdefs.h. */
26141_ACEOF
26142cat confdefs.h >>conftest.$ac_ext
26143cat >>conftest.$ac_ext <<_ACEOF
26144/* end confdefs.h. */
26145#include <readline/readline.h>
26146
26147_ACEOF
26148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26149 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26150
26151cat >>confdefs.h <<\_ACEOF
26152#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26153_ACEOF
26154
26155fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000026156rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026157
26158fi
26159
Martin v. Löwis0daad592001-09-30 21:09:59 +000026160# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026161{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26162echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026163if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026165else
Martin v. Löwis11437992002-04-12 09:54:03 +000026166 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026167LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026168cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026169/* confdefs.h. */
26170_ACEOF
26171cat confdefs.h >>conftest.$ac_ext
26172cat >>conftest.$ac_ext <<_ACEOF
26173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026174
Martin v. Löwiseba40652007-08-30 20:10:57 +000026175/* Override any GCC internal prototype to avoid an error.
26176 Use char because int might match the return type of a GCC
26177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026178#ifdef __cplusplus
26179extern "C"
26180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026181char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026182int
26183main ()
26184{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026185return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026186 ;
26187 return 0;
26188}
26189_ACEOF
26190rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026191if { (ac_try="$ac_link"
26192case "(($ac_try" in
26193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26194 *) ac_try_echo=$ac_try;;
26195esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026197 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026199 grep -v '^ *+' conftest.er1 >conftest.err
26200 rm -f conftest.er1
26201 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026203 (exit $ac_status); } && {
26204 test -z "$ac_c_werror_flag" ||
26205 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026206 } && test -s conftest$ac_exeext &&
26207 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026208 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026211sed 's/^/| /' conftest.$ac_ext >&5
26212
Martin v. Löwiseba40652007-08-30 20:10:57 +000026213 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026215
26216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026217 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026218LIBS=$ac_check_lib_save_LIBS
26219fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026220{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26221echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26222if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026223
Martin v. Löwis11437992002-04-12 09:54:03 +000026224cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026225#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026226_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026227
Martin v. Löwis0daad592001-09-30 21:09:59 +000026228fi
26229
Michael W. Hudson54241132001-12-07 15:38:26 +000026230
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026231# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026232{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26233echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026234if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026235 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026236else
26237 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026238LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026239cat >conftest.$ac_ext <<_ACEOF
26240/* confdefs.h. */
26241_ACEOF
26242cat confdefs.h >>conftest.$ac_ext
26243cat >>conftest.$ac_ext <<_ACEOF
26244/* end confdefs.h. */
26245
26246/* Override any GCC internal prototype to avoid an error.
26247 Use char because int might match the return type of a GCC
26248 builtin and then its argument prototype would still apply. */
26249#ifdef __cplusplus
26250extern "C"
26251#endif
26252char rl_completion_display_matches_hook ();
26253int
26254main ()
26255{
26256return rl_completion_display_matches_hook ();
26257 ;
26258 return 0;
26259}
26260_ACEOF
26261rm -f conftest.$ac_objext conftest$ac_exeext
26262if { (ac_try="$ac_link"
26263case "(($ac_try" in
26264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26265 *) ac_try_echo=$ac_try;;
26266esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026268 (eval "$ac_link") 2>conftest.er1
26269 ac_status=$?
26270 grep -v '^ *+' conftest.er1 >conftest.err
26271 rm -f conftest.er1
26272 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026274 (exit $ac_status); } && {
26275 test -z "$ac_c_werror_flag" ||
26276 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026277 } && test -s conftest$ac_exeext &&
26278 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026279 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26280else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026281 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026282sed 's/^/| /' conftest.$ac_ext >&5
26283
26284 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26285fi
26286
26287rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26288 conftest$ac_exeext conftest.$ac_ext
26289LIBS=$ac_check_lib_save_LIBS
26290fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026291{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26292echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26293if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026294
26295cat >>confdefs.h <<\_ACEOF
26296#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26297_ACEOF
26298
26299fi
26300
26301
Martin v. Löwis0daad592001-09-30 21:09:59 +000026302# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026303{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26304echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026305if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026306 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026307else
Martin v. Löwis11437992002-04-12 09:54:03 +000026308 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026309LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026310cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026311/* confdefs.h. */
26312_ACEOF
26313cat confdefs.h >>conftest.$ac_ext
26314cat >>conftest.$ac_ext <<_ACEOF
26315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026316
Martin v. Löwiseba40652007-08-30 20:10:57 +000026317/* Override any GCC internal prototype to avoid an error.
26318 Use char because int might match the return type of a GCC
26319 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026320#ifdef __cplusplus
26321extern "C"
26322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026323char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026324int
26325main ()
26326{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026327return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026328 ;
26329 return 0;
26330}
26331_ACEOF
26332rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026333if { (ac_try="$ac_link"
26334case "(($ac_try" in
26335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26336 *) ac_try_echo=$ac_try;;
26337esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026339 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026341 grep -v '^ *+' conftest.er1 >conftest.err
26342 rm -f conftest.er1
26343 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026345 (exit $ac_status); } && {
26346 test -z "$ac_c_werror_flag" ||
26347 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026348 } && test -s conftest$ac_exeext &&
26349 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026350 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026351else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026353sed 's/^/| /' conftest.$ac_ext >&5
26354
Martin v. Löwiseba40652007-08-30 20:10:57 +000026355 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026357
26358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026360LIBS=$ac_check_lib_save_LIBS
26361fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026362{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26363echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26364if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026365
Martin v. Löwis11437992002-04-12 09:54:03 +000026366cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026367#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026368_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026369
Guido van Rossum353ae582001-07-10 16:45:32 +000026370fi
26371
Jack Jansendd19cf82001-12-06 22:36:17 +000026372
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026373# also in readline 4.2
26374cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026375/* confdefs.h. */
26376_ACEOF
26377cat confdefs.h >>conftest.$ac_ext
26378cat >>conftest.$ac_ext <<_ACEOF
26379/* end confdefs.h. */
26380#include <readline/readline.h>
26381_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026382if { (ac_try="$ac_cpp conftest.$ac_ext"
26383case "(($ac_try" in
26384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26385 *) ac_try_echo=$ac_try;;
26386esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026388 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026389 ac_status=$?
26390 grep -v '^ *+' conftest.er1 >conftest.err
26391 rm -f conftest.er1
26392 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026394 (exit $ac_status); } >/dev/null && {
26395 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26396 test ! -s conftest.err
26397 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026398 have_readline=yes
26399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026400 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026401sed 's/^/| /' conftest.$ac_ext >&5
26402
26403 have_readline=no
26404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026405
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026406rm -f conftest.err conftest.$ac_ext
26407if test $have_readline = yes
26408then
26409 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026410/* confdefs.h. */
26411_ACEOF
26412cat confdefs.h >>conftest.$ac_ext
26413cat >>conftest.$ac_ext <<_ACEOF
26414/* end confdefs.h. */
26415#include <readline/readline.h>
26416
26417_ACEOF
26418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26419 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26420
26421cat >>confdefs.h <<\_ACEOF
26422#define HAVE_RL_CATCH_SIGNAL 1
26423_ACEOF
26424
26425fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000026426rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026427
26428fi
26429
Martin v. Löwis82bca632006-02-10 20:49:30 +000026430# End of readline checks: restore LIBS
26431LIBS=$LIBS_no_readline
26432
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026433{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26434echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026435if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026436 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026437else
Martin v. Löwis11437992002-04-12 09:54:03 +000026438
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026439if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026440 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026441else
Martin v. Löwis11437992002-04-12 09:54:03 +000026442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026443/* confdefs.h. */
26444_ACEOF
26445cat confdefs.h >>conftest.$ac_ext
26446cat >>conftest.$ac_ext <<_ACEOF
26447/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026448
26449int main()
26450{
26451 int val1 = nice(1);
26452 if (val1 != -1 && val1 == nice(2))
26453 exit(0);
26454 exit(1);
26455}
26456
Martin v. Löwis11437992002-04-12 09:54:03 +000026457_ACEOF
26458rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026459if { (ac_try="$ac_link"
26460case "(($ac_try" in
26461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26462 *) ac_try_echo=$ac_try;;
26463esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026465 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026466 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026469 { (case "(($ac_try" in
26470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26471 *) ac_try_echo=$ac_try;;
26472esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026474 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026475 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026477 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026478 ac_cv_broken_nice=yes
26479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026480 echo "$as_me: program exited with status $ac_status" >&5
26481echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026482sed 's/^/| /' conftest.$ac_ext >&5
26483
Martin v. Löwis11437992002-04-12 09:54:03 +000026484( exit $ac_status )
26485ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026487rm -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 +000026488fi
26489
Martin v. Löwiseba40652007-08-30 20:10:57 +000026490
26491fi
26492
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026493{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26494echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026495if test "$ac_cv_broken_nice" = yes
26496then
Martin v. Löwis11437992002-04-12 09:54:03 +000026497
26498cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026499#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026500_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026501
26502fi
26503
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026504{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26505echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026506if test "${ac_cv_broken_poll+set}" = set; then
26507 echo $ECHO_N "(cached) $ECHO_C" >&6
26508else
26509 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026510 ac_cv_broken_poll=no
26511else
26512 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026513/* confdefs.h. */
26514_ACEOF
26515cat confdefs.h >>conftest.$ac_ext
26516cat >>conftest.$ac_ext <<_ACEOF
26517/* end confdefs.h. */
26518
26519#include <poll.h>
26520
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026521int main()
26522{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026523 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026524 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026525
26526 close (42);
26527
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026528 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026529 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026530 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026531 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026532 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026533 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026534 return 1;
26535}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026536
26537_ACEOF
26538rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026539if { (ac_try="$ac_link"
26540case "(($ac_try" in
26541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26542 *) ac_try_echo=$ac_try;;
26543esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026545 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026546 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026548 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026549 { (case "(($ac_try" in
26550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26551 *) ac_try_echo=$ac_try;;
26552esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026554 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026555 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026557 (exit $ac_status); }; }; then
26558 ac_cv_broken_poll=yes
26559else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026560 echo "$as_me: program exited with status $ac_status" >&5
26561echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026562sed 's/^/| /' conftest.$ac_ext >&5
26563
26564( exit $ac_status )
26565ac_cv_broken_poll=no
26566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026567rm -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 +000026568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026569
26570
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026571fi
26572
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026573{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26574echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026575if test "$ac_cv_broken_poll" = yes
26576then
26577
26578cat >>confdefs.h <<\_ACEOF
26579#define HAVE_BROKEN_POLL 1
26580_ACEOF
26581
26582fi
26583
Brett Cannon43802422005-02-10 20:48:03 +000026584# 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 +000026585# (which is not required by ISO C or UNIX spec) and/or if we support
26586# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026587{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26588echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026589if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026590 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026591else
26592 cat >conftest.$ac_ext <<_ACEOF
26593/* confdefs.h. */
26594_ACEOF
26595cat confdefs.h >>conftest.$ac_ext
26596cat >>conftest.$ac_ext <<_ACEOF
26597/* end confdefs.h. */
26598#include <sys/types.h>
26599#include <$ac_cv_struct_tm>
26600
26601
26602int
26603main ()
26604{
26605static struct tm ac_aggr;
26606if (ac_aggr.tm_zone)
26607return 0;
26608 ;
26609 return 0;
26610}
26611_ACEOF
26612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026613if { (ac_try="$ac_compile"
26614case "(($ac_try" in
26615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26616 *) ac_try_echo=$ac_try;;
26617esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026619 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026620 ac_status=$?
26621 grep -v '^ *+' conftest.er1 >conftest.err
26622 rm -f conftest.er1
26623 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026625 (exit $ac_status); } && {
26626 test -z "$ac_c_werror_flag" ||
26627 test ! -s conftest.err
26628 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026629 ac_cv_member_struct_tm_tm_zone=yes
26630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026631 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026632sed 's/^/| /' conftest.$ac_ext >&5
26633
Martin v. Löwiseba40652007-08-30 20:10:57 +000026634 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026635/* confdefs.h. */
26636_ACEOF
26637cat confdefs.h >>conftest.$ac_ext
26638cat >>conftest.$ac_ext <<_ACEOF
26639/* end confdefs.h. */
26640#include <sys/types.h>
26641#include <$ac_cv_struct_tm>
26642
26643
26644int
26645main ()
26646{
26647static struct tm ac_aggr;
26648if (sizeof ac_aggr.tm_zone)
26649return 0;
26650 ;
26651 return 0;
26652}
26653_ACEOF
26654rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026655if { (ac_try="$ac_compile"
26656case "(($ac_try" in
26657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26658 *) ac_try_echo=$ac_try;;
26659esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026661 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026662 ac_status=$?
26663 grep -v '^ *+' conftest.er1 >conftest.err
26664 rm -f conftest.er1
26665 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026667 (exit $ac_status); } && {
26668 test -z "$ac_c_werror_flag" ||
26669 test ! -s conftest.err
26670 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026671 ac_cv_member_struct_tm_tm_zone=yes
26672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026673 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026674sed 's/^/| /' conftest.$ac_ext >&5
26675
Martin v. Löwiseba40652007-08-30 20:10:57 +000026676 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026678
26679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026681
26682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026683fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026684{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26685echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26686if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026687
26688cat >>confdefs.h <<_ACEOF
26689#define HAVE_STRUCT_TM_TM_ZONE 1
26690_ACEOF
26691
26692
26693fi
26694
26695if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26696
26697cat >>confdefs.h <<\_ACEOF
26698#define HAVE_TM_ZONE 1
26699_ACEOF
26700
26701else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026702 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26703echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026704if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026705 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026706else
26707 cat >conftest.$ac_ext <<_ACEOF
26708/* confdefs.h. */
26709_ACEOF
26710cat confdefs.h >>conftest.$ac_ext
26711cat >>conftest.$ac_ext <<_ACEOF
26712/* end confdefs.h. */
26713#include <time.h>
26714
26715int
26716main ()
26717{
26718#ifndef tzname
26719 (void) tzname;
26720#endif
26721
26722 ;
26723 return 0;
26724}
26725_ACEOF
26726rm -f conftest.$ac_objext
26727if { (ac_try="$ac_compile"
26728case "(($ac_try" in
26729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26730 *) ac_try_echo=$ac_try;;
26731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026733 (eval "$ac_compile") 2>conftest.er1
26734 ac_status=$?
26735 grep -v '^ *+' conftest.er1 >conftest.err
26736 rm -f conftest.er1
26737 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026739 (exit $ac_status); } && {
26740 test -z "$ac_c_werror_flag" ||
26741 test ! -s conftest.err
26742 } && test -s conftest.$ac_objext; then
26743 ac_cv_have_decl_tzname=yes
26744else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026745 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026746sed 's/^/| /' conftest.$ac_ext >&5
26747
26748 ac_cv_have_decl_tzname=no
26749fi
26750
26751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26752fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026753{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26754echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26755if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026756
26757cat >>confdefs.h <<_ACEOF
26758#define HAVE_DECL_TZNAME 1
26759_ACEOF
26760
26761
26762else
26763 cat >>confdefs.h <<_ACEOF
26764#define HAVE_DECL_TZNAME 0
26765_ACEOF
26766
26767
26768fi
26769
26770
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026771 { echo "$as_me:$LINENO: checking for tzname" >&5
26772echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026773if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026774 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026775else
26776 cat >conftest.$ac_ext <<_ACEOF
26777/* confdefs.h. */
26778_ACEOF
26779cat confdefs.h >>conftest.$ac_ext
26780cat >>conftest.$ac_ext <<_ACEOF
26781/* end confdefs.h. */
26782#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026783#if !HAVE_DECL_TZNAME
26784extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026785#endif
26786
26787int
26788main ()
26789{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026790return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026791 ;
26792 return 0;
26793}
26794_ACEOF
26795rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026796if { (ac_try="$ac_link"
26797case "(($ac_try" in
26798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26799 *) ac_try_echo=$ac_try;;
26800esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026802 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026803 ac_status=$?
26804 grep -v '^ *+' conftest.er1 >conftest.err
26805 rm -f conftest.er1
26806 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026808 (exit $ac_status); } && {
26809 test -z "$ac_c_werror_flag" ||
26810 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026811 } && test -s conftest$ac_exeext &&
26812 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026813 ac_cv_var_tzname=yes
26814else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026815 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026816sed 's/^/| /' conftest.$ac_ext >&5
26817
Martin v. Löwiseba40652007-08-30 20:10:57 +000026818 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026820
26821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026822 conftest$ac_exeext conftest.$ac_ext
26823fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026824{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26825echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026826 if test $ac_cv_var_tzname = yes; then
26827
26828cat >>confdefs.h <<\_ACEOF
26829#define HAVE_TZNAME 1
26830_ACEOF
26831
26832 fi
26833fi
26834
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026835
Martin v. Löwis1d459062005-03-14 21:23:33 +000026836# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026837{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26838echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026839if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026840 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026841else
26842
26843if test "$cross_compiling" = yes; then
26844 ac_cv_working_tzset=no
26845else
26846 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026847/* confdefs.h. */
26848_ACEOF
26849cat confdefs.h >>conftest.$ac_ext
26850cat >>conftest.$ac_ext <<_ACEOF
26851/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026852
26853#include <stdlib.h>
26854#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026855#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026856
26857#if HAVE_TZNAME
26858extern char *tzname[];
26859#endif
26860
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026861int main()
26862{
Brett Cannon18367812003-09-19 00:59:16 +000026863 /* Note that we need to ensure that not only does tzset(3)
26864 do 'something' with localtime, but it works as documented
26865 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026866 This includes making sure that tzname is set properly if
26867 tm->tm_zone does not exist since it is the alternative way
26868 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026869
26870 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026871 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026872 */
26873
Martin v. Löwis1d459062005-03-14 21:23:33 +000026874 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026875 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26876
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026877 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026878 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026879 if (localtime(&groundhogday)->tm_hour != 0)
26880 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026881#if HAVE_TZNAME
26882 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26883 if (strcmp(tzname[0], "UTC") ||
26884 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26885 exit(1);
26886#endif
Brett Cannon18367812003-09-19 00:59:16 +000026887
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026888 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026889 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026890 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026891 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026892#if HAVE_TZNAME
26893 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26894 exit(1);
26895#endif
Brett Cannon18367812003-09-19 00:59:16 +000026896
26897 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26898 tzset();
26899 if (localtime(&groundhogday)->tm_hour != 11)
26900 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026901#if HAVE_TZNAME
26902 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26903 exit(1);
26904#endif
26905
26906#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026907 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26908 exit(1);
26909 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26910 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026911#endif
Brett Cannon18367812003-09-19 00:59:16 +000026912
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026913 exit(0);
26914}
26915
26916_ACEOF
26917rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026918if { (ac_try="$ac_link"
26919case "(($ac_try" in
26920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26921 *) ac_try_echo=$ac_try;;
26922esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026924 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026925 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026928 { (case "(($ac_try" in
26929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26930 *) ac_try_echo=$ac_try;;
26931esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026933 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026934 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026936 (exit $ac_status); }; }; then
26937 ac_cv_working_tzset=yes
26938else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026939 echo "$as_me: program exited with status $ac_status" >&5
26940echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026941sed 's/^/| /' conftest.$ac_ext >&5
26942
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026943( exit $ac_status )
26944ac_cv_working_tzset=no
26945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026946rm -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 +000026947fi
26948
Martin v. Löwiseba40652007-08-30 20:10:57 +000026949
26950fi
26951
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026952{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26953echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026954if test "$ac_cv_working_tzset" = yes
26955then
26956
26957cat >>confdefs.h <<\_ACEOF
26958#define HAVE_WORKING_TZSET 1
26959_ACEOF
26960
26961fi
26962
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026963# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026964{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26965echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026966if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026967 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026968else
26969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026970/* confdefs.h. */
26971_ACEOF
26972cat confdefs.h >>conftest.$ac_ext
26973cat >>conftest.$ac_ext <<_ACEOF
26974/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026975#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026976int
26977main ()
26978{
26979
26980struct stat st;
26981st.st_mtim.tv_nsec = 1;
26982
26983 ;
26984 return 0;
26985}
26986_ACEOF
26987rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026988if { (ac_try="$ac_compile"
26989case "(($ac_try" in
26990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26991 *) ac_try_echo=$ac_try;;
26992esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026996 grep -v '^ *+' conftest.er1 >conftest.err
26997 rm -f conftest.er1
26998 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027000 (exit $ac_status); } && {
27001 test -z "$ac_c_werror_flag" ||
27002 test ! -s conftest.err
27003 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027004 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027005else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027007sed 's/^/| /' conftest.$ac_ext >&5
27008
Martin v. Löwiseba40652007-08-30 20:10:57 +000027009 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027010fi
27011
Martin v. Löwiseba40652007-08-30 20:10:57 +000027012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27013fi
27014
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027015{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27016echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027017if test "$ac_cv_stat_tv_nsec" = yes
27018then
27019
27020cat >>confdefs.h <<\_ACEOF
27021#define HAVE_STAT_TV_NSEC 1
27022_ACEOF
27023
27024fi
27025
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027026# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027027{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27028echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027029if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027030 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027031else
27032 cat >conftest.$ac_ext <<_ACEOF
27033/* confdefs.h. */
27034_ACEOF
27035cat confdefs.h >>conftest.$ac_ext
27036cat >>conftest.$ac_ext <<_ACEOF
27037/* end confdefs.h. */
27038#include <sys/stat.h>
27039int
27040main ()
27041{
27042
27043struct stat st;
27044st.st_mtimespec.tv_nsec = 1;
27045
27046 ;
27047 return 0;
27048}
27049_ACEOF
27050rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027051if { (ac_try="$ac_compile"
27052case "(($ac_try" in
27053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27054 *) ac_try_echo=$ac_try;;
27055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027058 ac_status=$?
27059 grep -v '^ *+' conftest.er1 >conftest.err
27060 rm -f conftest.er1
27061 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027063 (exit $ac_status); } && {
27064 test -z "$ac_c_werror_flag" ||
27065 test ! -s conftest.err
27066 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027067 ac_cv_stat_tv_nsec2=yes
27068else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027069 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027070sed 's/^/| /' conftest.$ac_ext >&5
27071
Martin v. Löwiseba40652007-08-30 20:10:57 +000027072 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027073fi
27074
Martin v. Löwiseba40652007-08-30 20:10:57 +000027075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27076fi
27077
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027078{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27079echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027080if test "$ac_cv_stat_tv_nsec2" = yes
27081then
27082
27083cat >>confdefs.h <<\_ACEOF
27084#define HAVE_STAT_TV_NSEC2 1
27085_ACEOF
27086
27087fi
27088
Jack Jansen666b1e72001-10-31 12:11:48 +000027089# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027090{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27091echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027092if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027093 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027094else
Martin v. Löwis11437992002-04-12 09:54:03 +000027095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027096/* confdefs.h. */
27097_ACEOF
27098cat confdefs.h >>conftest.$ac_ext
27099cat >>conftest.$ac_ext <<_ACEOF
27100/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027101#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027102int
27103main ()
27104{
Jack Jansen666b1e72001-10-31 12:11:48 +000027105
27106 int rtn;
27107 rtn = mvwdelch(0,0,0);
27108
Martin v. Löwis11437992002-04-12 09:54:03 +000027109 ;
27110 return 0;
27111}
27112_ACEOF
27113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027114if { (ac_try="$ac_compile"
27115case "(($ac_try" in
27116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27117 *) ac_try_echo=$ac_try;;
27118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027122 grep -v '^ *+' conftest.er1 >conftest.err
27123 rm -f conftest.er1
27124 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027126 (exit $ac_status); } && {
27127 test -z "$ac_c_werror_flag" ||
27128 test ! -s conftest.err
27129 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027130 ac_cv_mvwdelch_is_expression=yes
27131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027133sed 's/^/| /' conftest.$ac_ext >&5
27134
Martin v. Löwiseba40652007-08-30 20:10:57 +000027135 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027136fi
27137
Martin v. Löwiseba40652007-08-30 20:10:57 +000027138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27139fi
27140
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027141{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27142echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027143
27144if test "$ac_cv_mvwdelch_is_expression" = yes
27145then
Martin v. Löwis11437992002-04-12 09:54:03 +000027146
27147cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027148#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027149_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027150
27151fi
27152
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027153{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27154echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027155if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027156 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027157else
Martin v. Löwis11437992002-04-12 09:54:03 +000027158 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027159/* confdefs.h. */
27160_ACEOF
27161cat confdefs.h >>conftest.$ac_ext
27162cat >>conftest.$ac_ext <<_ACEOF
27163/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027164#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027165int
27166main ()
27167{
Jack Jansen666b1e72001-10-31 12:11:48 +000027168
27169 WINDOW *w;
27170 w->_flags = 0;
27171
Martin v. Löwis11437992002-04-12 09:54:03 +000027172 ;
27173 return 0;
27174}
27175_ACEOF
27176rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027177if { (ac_try="$ac_compile"
27178case "(($ac_try" in
27179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27180 *) ac_try_echo=$ac_try;;
27181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027183 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027185 grep -v '^ *+' conftest.er1 >conftest.err
27186 rm -f conftest.er1
27187 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027189 (exit $ac_status); } && {
27190 test -z "$ac_c_werror_flag" ||
27191 test ! -s conftest.err
27192 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027193 ac_cv_window_has_flags=yes
27194else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027196sed 's/^/| /' conftest.$ac_ext >&5
27197
Martin v. Löwiseba40652007-08-30 20:10:57 +000027198 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027199fi
27200
Martin v. Löwiseba40652007-08-30 20:10:57 +000027201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27202fi
27203
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027204{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27205echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027206
Jack Jansen666b1e72001-10-31 12:11:48 +000027207
27208if test "$ac_cv_window_has_flags" = yes
27209then
Martin v. Löwis11437992002-04-12 09:54:03 +000027210
27211cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027212#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027213_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027214
27215fi
27216
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027217{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27218echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027219cat >conftest.$ac_ext <<_ACEOF
27220/* confdefs.h. */
27221_ACEOF
27222cat confdefs.h >>conftest.$ac_ext
27223cat >>conftest.$ac_ext <<_ACEOF
27224/* end confdefs.h. */
27225#include <curses.h>
27226int
27227main ()
27228{
27229void *x=is_term_resized
27230 ;
27231 return 0;
27232}
27233_ACEOF
27234rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027235if { (ac_try="$ac_compile"
27236case "(($ac_try" in
27237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27238 *) ac_try_echo=$ac_try;;
27239esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027241 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027242 ac_status=$?
27243 grep -v '^ *+' conftest.er1 >conftest.err
27244 rm -f conftest.er1
27245 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027247 (exit $ac_status); } && {
27248 test -z "$ac_c_werror_flag" ||
27249 test ! -s conftest.err
27250 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027251
27252cat >>confdefs.h <<\_ACEOF
27253#define HAVE_CURSES_IS_TERM_RESIZED 1
27254_ACEOF
27255
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027256 { echo "$as_me:$LINENO: result: yes" >&5
27257echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027258else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027259 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027260sed 's/^/| /' conftest.$ac_ext >&5
27261
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027262 { echo "$as_me:$LINENO: result: no" >&5
27263echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027264
27265fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027266
Martin v. Löwiseba40652007-08-30 20:10:57 +000027267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27268
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027269{ echo "$as_me:$LINENO: checking for resize_term" >&5
27270echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027271cat >conftest.$ac_ext <<_ACEOF
27272/* confdefs.h. */
27273_ACEOF
27274cat confdefs.h >>conftest.$ac_ext
27275cat >>conftest.$ac_ext <<_ACEOF
27276/* end confdefs.h. */
27277#include <curses.h>
27278int
27279main ()
27280{
27281void *x=resize_term
27282 ;
27283 return 0;
27284}
27285_ACEOF
27286rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027287if { (ac_try="$ac_compile"
27288case "(($ac_try" in
27289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27290 *) ac_try_echo=$ac_try;;
27291esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027293 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027294 ac_status=$?
27295 grep -v '^ *+' conftest.er1 >conftest.err
27296 rm -f conftest.er1
27297 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027299 (exit $ac_status); } && {
27300 test -z "$ac_c_werror_flag" ||
27301 test ! -s conftest.err
27302 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027303
27304cat >>confdefs.h <<\_ACEOF
27305#define HAVE_CURSES_RESIZE_TERM 1
27306_ACEOF
27307
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027308 { echo "$as_me:$LINENO: result: yes" >&5
27309echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027311 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027312sed 's/^/| /' conftest.$ac_ext >&5
27313
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027314 { echo "$as_me:$LINENO: result: no" >&5
27315echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027316
27317fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027318
Martin v. Löwiseba40652007-08-30 20:10:57 +000027319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27320
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027321{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27322echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027323cat >conftest.$ac_ext <<_ACEOF
27324/* confdefs.h. */
27325_ACEOF
27326cat confdefs.h >>conftest.$ac_ext
27327cat >>conftest.$ac_ext <<_ACEOF
27328/* end confdefs.h. */
27329#include <curses.h>
27330int
27331main ()
27332{
27333void *x=resizeterm
27334 ;
27335 return 0;
27336}
27337_ACEOF
27338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027339if { (ac_try="$ac_compile"
27340case "(($ac_try" in
27341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27342 *) ac_try_echo=$ac_try;;
27343esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027345 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027346 ac_status=$?
27347 grep -v '^ *+' conftest.er1 >conftest.err
27348 rm -f conftest.er1
27349 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027351 (exit $ac_status); } && {
27352 test -z "$ac_c_werror_flag" ||
27353 test ! -s conftest.err
27354 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027355
27356cat >>confdefs.h <<\_ACEOF
27357#define HAVE_CURSES_RESIZETERM 1
27358_ACEOF
27359
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027360 { echo "$as_me:$LINENO: result: yes" >&5
27361echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027363 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027364sed 's/^/| /' conftest.$ac_ext >&5
27365
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027366 { echo "$as_me:$LINENO: result: no" >&5
27367echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027368
27369fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027370
Martin v. Löwiseba40652007-08-30 20:10:57 +000027371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27372
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027373{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27374echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027375
27376if test -r /dev/ptmx
27377then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027378 { echo "$as_me:$LINENO: result: yes" >&5
27379echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027380
27381cat >>confdefs.h <<\_ACEOF
27382#define HAVE_DEV_PTMX 1
27383_ACEOF
27384
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027385else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027386 { echo "$as_me:$LINENO: result: no" >&5
27387echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027388fi
27389
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027390{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27391echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027392
27393if test -r /dev/ptc
27394then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027395 { echo "$as_me:$LINENO: result: yes" >&5
27396echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027397
27398cat >>confdefs.h <<\_ACEOF
27399#define HAVE_DEV_PTC 1
27400_ACEOF
27401
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027403 { echo "$as_me:$LINENO: result: no" >&5
27404echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027405fi
27406
Mark Dickinson82864d12009-11-15 16:18:58 +000027407if test "$have_long_long" = yes
27408then
27409 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27410echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27411 if test "${ac_cv_have_long_long_format+set}" = set; then
27412 echo $ECHO_N "(cached) $ECHO_C" >&6
27413else
27414 if test "$cross_compiling" = yes; then
27415 ac_cv_have_long_long_format=no
27416else
27417 cat >conftest.$ac_ext <<_ACEOF
27418/* confdefs.h. */
27419_ACEOF
27420cat confdefs.h >>conftest.$ac_ext
27421cat >>conftest.$ac_ext <<_ACEOF
27422/* end confdefs.h. */
27423
27424 #include <stdio.h>
27425 #include <stddef.h>
27426 #include <string.h>
27427
27428 #ifdef HAVE_SYS_TYPES_H
27429 #include <sys/types.h>
27430 #endif
27431
27432 int main()
27433 {
27434 char buffer[256];
27435
27436 if (sprintf(buffer, "%lld", (long long)123) < 0)
27437 return 1;
27438 if (strcmp(buffer, "123"))
27439 return 1;
27440
27441 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27442 return 1;
27443 if (strcmp(buffer, "-123"))
27444 return 1;
27445
27446 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27447 return 1;
27448 if (strcmp(buffer, "123"))
27449 return 1;
27450
27451 return 0;
27452 }
27453
27454_ACEOF
27455rm -f conftest$ac_exeext
27456if { (ac_try="$ac_link"
27457case "(($ac_try" in
27458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27459 *) ac_try_echo=$ac_try;;
27460esac
27461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27462 (eval "$ac_link") 2>&5
27463 ac_status=$?
27464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27465 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27466 { (case "(($ac_try" in
27467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27468 *) ac_try_echo=$ac_try;;
27469esac
27470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27471 (eval "$ac_try") 2>&5
27472 ac_status=$?
27473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27474 (exit $ac_status); }; }; then
27475 ac_cv_have_long_long_format=yes
27476else
27477 echo "$as_me: program exited with status $ac_status" >&5
27478echo "$as_me: failed program was:" >&5
27479sed 's/^/| /' conftest.$ac_ext >&5
27480
27481( exit $ac_status )
27482ac_cv_have_long_long_format=no
27483fi
27484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27485fi
27486
27487
27488
27489fi
27490
27491 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27492echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27493fi
27494
Mark Dickinson5ce84742009-12-31 20:48:04 +000027495if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027496then
27497
27498cat >>confdefs.h <<\_ACEOF
27499#define PY_FORMAT_LONG_LONG "ll"
27500_ACEOF
27501
27502fi
27503
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027504if test $ac_sys_system = Darwin
27505then
27506 LIBS="$LIBS -framework CoreFoundation"
27507fi
27508
Mark Dickinson82864d12009-11-15 16:18:58 +000027509
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027510{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27511echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027512if test "${ac_cv_have_size_t_format+set}" = set; then
27513 echo $ECHO_N "(cached) $ECHO_C" >&6
27514else
27515 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027516 ac_cv_have_size_t_format="cross -- assuming yes"
27517
Brett Cannon09d12362006-05-11 05:11:33 +000027518else
27519 cat >conftest.$ac_ext <<_ACEOF
27520/* confdefs.h. */
27521_ACEOF
27522cat confdefs.h >>conftest.$ac_ext
27523cat >>conftest.$ac_ext <<_ACEOF
27524/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027525
Brett Cannon09d12362006-05-11 05:11:33 +000027526#include <stdio.h>
27527#include <stddef.h>
27528#include <string.h>
27529
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027530#ifdef HAVE_SYS_TYPES_H
27531#include <sys/types.h>
27532#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027533
27534#ifdef HAVE_SSIZE_T
27535typedef ssize_t Py_ssize_t;
27536#elif SIZEOF_VOID_P == SIZEOF_LONG
27537typedef long Py_ssize_t;
27538#else
27539typedef int Py_ssize_t;
27540#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027541
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027542int main()
27543{
27544 char buffer[256];
27545
Brett Cannon09d12362006-05-11 05:11:33 +000027546 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27547 return 1;
27548
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027549 if (strcmp(buffer, "123"))
27550 return 1;
27551
27552 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27553 return 1;
27554
27555 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027556 return 1;
27557
27558 return 0;
27559}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027560
Brett Cannon09d12362006-05-11 05:11:33 +000027561_ACEOF
27562rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027563if { (ac_try="$ac_link"
27564case "(($ac_try" in
27565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27566 *) ac_try_echo=$ac_try;;
27567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027569 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027570 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027573 { (case "(($ac_try" in
27574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27575 *) ac_try_echo=$ac_try;;
27576esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027578 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027579 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027581 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027582 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027583else
27584 echo "$as_me: program exited with status $ac_status" >&5
27585echo "$as_me: failed program was:" >&5
27586sed 's/^/| /' conftest.$ac_ext >&5
27587
27588( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027589ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027590fi
27591rm -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 +000027592fi
27593
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027594
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027595fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027596{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27597echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027598if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027599
27600cat >>confdefs.h <<\_ACEOF
27601#define PY_FORMAT_SIZE_T "z"
27602_ACEOF
27603
27604fi
27605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027606{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27607echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027608if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027609 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027610else
Martin v. Löwis11437992002-04-12 09:54:03 +000027611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027612/* confdefs.h. */
27613_ACEOF
27614cat confdefs.h >>conftest.$ac_ext
27615cat >>conftest.$ac_ext <<_ACEOF
27616/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027617
27618#ifdef HAVE_SYS_TYPES_H
27619#include <sys/types.h>
27620#endif
27621#ifdef HAVE_SYS_SOCKET_H
27622#include <sys/socket.h>
27623#endif
27624
27625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027626typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027627int
27628main ()
27629{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027630if ((ac__type_new_ *) 0)
27631 return 0;
27632if (sizeof (ac__type_new_))
27633 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027634 ;
27635 return 0;
27636}
27637_ACEOF
27638rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027639if { (ac_try="$ac_compile"
27640case "(($ac_try" in
27641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27642 *) ac_try_echo=$ac_try;;
27643esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027647 grep -v '^ *+' conftest.er1 >conftest.err
27648 rm -f conftest.er1
27649 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027651 (exit $ac_status); } && {
27652 test -z "$ac_c_werror_flag" ||
27653 test ! -s conftest.err
27654 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027655 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027656else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027658sed 's/^/| /' conftest.$ac_ext >&5
27659
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027660 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027662
27663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027664fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027665{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27666echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27667if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027668 :
27669else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027670
Martin v. Löwis01c04012002-11-11 14:58:44 +000027671cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027672#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027673_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027674
27675fi
27676
Michael W. Hudson54241132001-12-07 15:38:26 +000027677
Michael W. Hudson54241132001-12-07 15:38:26 +000027678
27679
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027680for h in `(cd $srcdir;echo Python/thread_*.h)`
27681do
27682 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27683done
27684
Michael W. Hudson54241132001-12-07 15:38:26 +000027685
Neal Norwitzd24499d2005-12-18 21:36:39 +000027686SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027687{ echo "$as_me:$LINENO: checking for build directories" >&5
27688echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027689for dir in $SRCDIRS; do
27690 if test ! -d $dir; then
27691 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027692 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027693done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027694{ echo "$as_me:$LINENO: result: done" >&5
27695echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027696
Guido van Rossum627b2d71993-12-24 10:39:16 +000027697# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027698ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027699
Martin v. Löwis11437992002-04-12 09:54:03 +000027700cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027701# This file is a shell script that caches the results of configure
27702# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027703# scripts and configure runs, see configure's option --config-cache.
27704# It is not useful on other systems. If it contains results you don't
27705# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027706#
Martin v. Löwis11437992002-04-12 09:54:03 +000027707# config.status only pays attention to the cache file if you give it
27708# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027709#
Skip Montanaro6dead952003-09-25 14:50:04 +000027710# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027711# loading this file, other *unset* `ac_cv_foo' will be assigned the
27712# following values.
27713
27714_ACEOF
27715
Guido van Rossumf78abae1997-01-21 22:02:36 +000027716# The following way of writing the cache mishandles newlines in values,
27717# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027718# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027719# Ultrix sh set writes to stderr and can't be redirected directly,
27720# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027721(
27722 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27723 eval ac_val=\$$ac_var
27724 case $ac_val in #(
27725 *${as_nl}*)
27726 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027727 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27728echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027729 esac
27730 case $ac_var in #(
27731 _ | IFS | as_nl) ;; #(
27732 *) $as_unset $ac_var ;;
27733 esac ;;
27734 esac
27735 done
27736
Martin v. Löwis11437992002-04-12 09:54:03 +000027737 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027738 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27739 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027740 # `set' does not quote correctly, so add quotes (double-quote
27741 # substitution turns \\\\ into \\, and sed turns \\ into \).
27742 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027743 "s/'/'\\\\''/g;
27744 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027745 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027746 *)
27747 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027748 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027749 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027750 esac |
27751 sort
27752) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027753 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027754 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027755 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027756 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027757 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27758 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027759 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27760 :end' >>confcache
27761if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27762 if test -w "$cache_file"; then
27763 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027764 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27765echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027766 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027767 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027768 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27769echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027770 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027771fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027772rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027773
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027774test "x$prefix" = xNONE && prefix=$ac_default_prefix
27775# Let make expand exec_prefix.
27776test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027777
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027778DEFS=-DHAVE_CONFIG_H
27779
Skip Montanaro6dead952003-09-25 14:50:04 +000027780ac_libobjs=
27781ac_ltlibobjs=
27782for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27783 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027784 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027785 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027786 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27787 # will be set to the directory where LIBOBJS objects are built.
27788 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27789 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027790done
27791LIBOBJS=$ac_libobjs
27792
27793LTLIBOBJS=$ac_ltlibobjs
27794
27795
Martin v. Löwis11437992002-04-12 09:54:03 +000027796
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027797: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027798ac_clean_files_save=$ac_clean_files
27799ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027800{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27801echo "$as_me: creating $CONFIG_STATUS" >&6;}
27802cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027803#! $SHELL
27804# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027805# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027806# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027807# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027808
Martin v. Löwis11437992002-04-12 09:54:03 +000027809debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027810ac_cs_recheck=false
27811ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027812SHELL=\${CONFIG_SHELL-$SHELL}
27813_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027814
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027815cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027816## --------------------- ##
27817## M4sh Initialization. ##
27818## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027819
Martin v. Löwiseba40652007-08-30 20:10:57 +000027820# Be more Bourne compatible
27821DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027822if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27823 emulate sh
27824 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027825 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027826 # is contrary to our usage. Disable this feature.
27827 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027828 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027829else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027830 case `(set -o) 2>/dev/null` in
27831 *posix*) set -o posix ;;
27832esac
27833
Martin v. Löwis11437992002-04-12 09:54:03 +000027834fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027835
Skip Montanaro6dead952003-09-25 14:50:04 +000027836
Martin v. Löwis11437992002-04-12 09:54:03 +000027837
27838
Martin v. Löwiseba40652007-08-30 20:10:57 +000027839# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027840# Avoid depending upon Character Ranges.
27841as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27842as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27843as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27844as_cr_digits='0123456789'
27845as_cr_alnum=$as_cr_Letters$as_cr_digits
27846
27847# The user is always right.
27848if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027849 echo "#! /bin/sh" >conf$$.sh
27850 echo "exit 0" >>conf$$.sh
27851 chmod +x conf$$.sh
27852 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27853 PATH_SEPARATOR=';'
27854 else
27855 PATH_SEPARATOR=:
27856 fi
27857 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027858fi
27859
Martin v. Löwiseba40652007-08-30 20:10:57 +000027860# Support unset when possible.
27861if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27862 as_unset=unset
27863else
27864 as_unset=false
27865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027866
Martin v. Löwiseba40652007-08-30 20:10:57 +000027867
27868# IFS
27869# We need space, tab and new line, in precisely that order. Quoting is
27870# there to prevent editors from complaining about space-tab.
27871# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27872# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027873as_nl='
27874'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027875IFS=" "" $as_nl"
27876
27877# Find who we are. Look in the path if we contain no directory separator.
27878case $0 in
27879 *[\\/]* ) as_myself=$0 ;;
27880 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027881for as_dir in $PATH
27882do
27883 IFS=$as_save_IFS
27884 test -z "$as_dir" && as_dir=.
27885 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27886done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027887IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027888
Martin v. Löwiseba40652007-08-30 20:10:57 +000027889 ;;
27890esac
27891# We did not find ourselves, most probably we were run as `sh COMMAND'
27892# in which case we are not to be found in the path.
27893if test "x$as_myself" = x; then
27894 as_myself=$0
27895fi
27896if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027897 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027898 { (exit 1); exit 1; }
27899fi
27900
27901# Work around bugs in pre-3.0 UWIN ksh.
27902for as_var in ENV MAIL MAILPATH
27903do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27904done
27905PS1='$ '
27906PS2='> '
27907PS4='+ '
27908
27909# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027910for as_var in \
27911 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27912 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27913 LC_TELEPHONE LC_TIME
27914do
27915 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27916 eval $as_var=C; export $as_var
27917 else
27918 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27919 fi
27920done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027921
27922# Required to use basename.
27923if expr a : '\(a\)' >/dev/null 2>&1 &&
27924 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27925 as_expr=expr
27926else
27927 as_expr=false
27928fi
27929
27930if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27931 as_basename=basename
27932else
27933 as_basename=false
27934fi
27935
27936
27937# Name of the executable.
27938as_me=`$as_basename -- "$0" ||
27939$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27940 X"$0" : 'X\(//\)$' \| \
27941 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027942echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027943 sed '/^.*\/\([^/][^/]*\)\/*$/{
27944 s//\1/
27945 q
27946 }
27947 /^X\/\(\/\/\)$/{
27948 s//\1/
27949 q
27950 }
27951 /^X\/\(\/\).*/{
27952 s//\1/
27953 q
27954 }
27955 s/.*/./; q'`
27956
27957# CDPATH.
27958$as_unset CDPATH
27959
27960
27961
Martin v. Löwis11437992002-04-12 09:54:03 +000027962 as_lineno_1=$LINENO
27963 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027964 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027965 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027966
Martin v. Löwis11437992002-04-12 09:54:03 +000027967 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27968 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000027969 # line-number line after each line using $LINENO; the second 'sed'
27970 # does the real work. The second script uses 'N' to pair each
27971 # line-number line with the line containing $LINENO, and appends
27972 # trailing '-' during substitution so that $LINENO is not a special
27973 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027974 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027975 # scripts with optimization help from Paolo Bonzini. Blame Lee
27976 # E. McMahon (1931-1989) for sed's syntax. :-)
27977 sed -n '
27978 p
27979 /[$]LINENO/=
27980 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027981 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027982 s/[$]LINENO.*/&-/
27983 t lineno
27984 b
27985 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027986 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027987 :loop
27988 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027989 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027990 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027991 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027992 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027993 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027994 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027995
Martin v. Löwis11437992002-04-12 09:54:03 +000027996 # Don't try to exec as it changes $[0], causing all sort of problems
27997 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027998 # original and so on. Autoconf is especially sensitive to this).
27999 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028000 # Exit status is that of the last command.
28001 exit
28002}
28003
28004
Martin v. Löwiseba40652007-08-30 20:10:57 +000028005if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28006 as_dirname=dirname
28007else
28008 as_dirname=false
28009fi
28010
28011ECHO_C= ECHO_N= ECHO_T=
28012case `echo -n x` in
28013-n*)
28014 case `echo 'x\c'` in
28015 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28016 *) ECHO_C='\c';;
28017 esac;;
28018*)
28019 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028021
Martin v. Löwiseba40652007-08-30 20:10:57 +000028022if expr a : '\(a\)' >/dev/null 2>&1 &&
28023 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028024 as_expr=expr
28025else
28026 as_expr=false
28027fi
28028
28029rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028030if test -d conf$$.dir; then
28031 rm -f conf$$.dir/conf$$.file
28032else
28033 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028034 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028035fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028036echo >conf$$.file
28037if ln -s conf$$.file conf$$ 2>/dev/null; then
28038 as_ln_s='ln -s'
28039 # ... but there are two gotchas:
28040 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28041 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28042 # In both cases, we have to default to `cp -p'.
28043 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028044 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028045elif ln conf$$.file conf$$ 2>/dev/null; then
28046 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028047else
28048 as_ln_s='cp -p'
28049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028050rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28051rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028052
Skip Montanaro6dead952003-09-25 14:50:04 +000028053if mkdir -p . 2>/dev/null; then
28054 as_mkdir_p=:
28055else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028056 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028057 as_mkdir_p=false
28058fi
28059
Martin v. Löwiseba40652007-08-30 20:10:57 +000028060if test -x / >/dev/null 2>&1; then
28061 as_test_x='test -x'
28062else
28063 if ls -dL / >/dev/null 2>&1; then
28064 as_ls_L_option=L
28065 else
28066 as_ls_L_option=
28067 fi
28068 as_test_x='
28069 eval sh -c '\''
28070 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028071 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028072 else
28073 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028074 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028075 esac;
28076 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28077 ???[sx]*):;;*)false;;esac;fi
28078 '\'' sh
28079 '
28080fi
28081as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028082
28083# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028084as_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 +000028085
28086# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028087as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028088
28089
Martin v. Löwis11437992002-04-12 09:54:03 +000028090exec 6>&1
28091
Martin v. Löwiseba40652007-08-30 20:10:57 +000028092# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028093# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028094# values after options handling.
28095ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028096This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028097generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028098
28099 CONFIG_FILES = $CONFIG_FILES
28100 CONFIG_HEADERS = $CONFIG_HEADERS
28101 CONFIG_LINKS = $CONFIG_LINKS
28102 CONFIG_COMMANDS = $CONFIG_COMMANDS
28103 $ $0 $@
28104
Martin v. Löwiseba40652007-08-30 20:10:57 +000028105on `(hostname || uname -n) 2>/dev/null | sed 1q`
28106"
28107
Martin v. Löwis11437992002-04-12 09:54:03 +000028108_ACEOF
28109
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028110cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028111# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028112config_files="$ac_config_files"
28113config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028114
Martin v. Löwiseba40652007-08-30 20:10:57 +000028115_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028116
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028117cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028118ac_cs_usage="\
28119\`$as_me' instantiates files from templates according to the
28120current configuration.
28121
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028122Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028123
28124 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028125 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028126 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028127 -d, --debug don't remove temporary files
28128 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028129 --file=FILE[:TEMPLATE]
28130 instantiate the configuration file FILE
28131 --header=FILE[:TEMPLATE]
28132 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028133
28134Configuration files:
28135$config_files
28136
28137Configuration headers:
28138$config_headers
28139
28140Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028141
Martin v. Löwiseba40652007-08-30 20:10:57 +000028142_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028143cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028144ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028145python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028146configured by $0, generated by GNU Autoconf 2.61,
28147 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028148
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028149Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028150This config.status script is free software; the Free Software Foundation
28151gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028152
28153ac_pwd='$ac_pwd'
28154srcdir='$srcdir'
28155INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028156_ACEOF
28157
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028158cat >>$CONFIG_STATUS <<\_ACEOF
28159# If no file are specified by the user, then we need to provide default
28160# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028161ac_need_defaults=:
28162while test $# != 0
28163do
28164 case $1 in
28165 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028166 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28167 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028168 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028169 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028170 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028171 ac_option=$1
28172 ac_optarg=$2
28173 ac_shift=shift
28174 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028175 esac
28176
Skip Montanaro6dead952003-09-25 14:50:04 +000028177 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028178 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028179 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28180 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028181 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028182 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028183 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028184 debug=: ;;
28185 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028186 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028187 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028188 ac_need_defaults=false;;
28189 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028190 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028191 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028192 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028193 --he | --h)
28194 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028195 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028196Try \`$0 --help' for more information." >&2
28197 { (exit 1); exit 1; }; };;
28198 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028199 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028200 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28201 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28202 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028203
28204 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028205 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028206Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028207 { (exit 1); exit 1; }; } ;;
28208
Martin v. Löwiseba40652007-08-30 20:10:57 +000028209 *) ac_config_targets="$ac_config_targets $1"
28210 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028211
28212 esac
28213 shift
28214done
28215
Skip Montanaro6dead952003-09-25 14:50:04 +000028216ac_configure_extra_args=
28217
28218if $ac_cs_silent; then
28219 exec 6>/dev/null
28220 ac_configure_extra_args="$ac_configure_extra_args --silent"
28221fi
28222
28223_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028224cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028225if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028226 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28227 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028228 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028229 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028230fi
28231
Martin v. Löwis11437992002-04-12 09:54:03 +000028232_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028233cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028234exec 5>>config.log
28235{
28236 echo
28237 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28238## Running $as_me. ##
28239_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028240 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028241} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028242
Martin v. Löwiseba40652007-08-30 20:10:57 +000028243_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028244cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028245_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028246
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028247cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028248
28249# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028250for ac_config_target in $ac_config_targets
28251do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028252 case $ac_config_target in
28253 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28254 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28255 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28256 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028257 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28258 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028259 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28260 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028261 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028262
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028263 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28264echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028265 { (exit 1); exit 1; }; };;
28266 esac
28267done
28268
Martin v. Löwiseba40652007-08-30 20:10:57 +000028269
Martin v. Löwis11437992002-04-12 09:54:03 +000028270# If the user did not use the arguments to specify the items to instantiate,
28271# then the envvar interface is used. Set only those that are not.
28272# We use the long form for the default assignment because of an extremely
28273# bizarre bug on SunOS 4.1.3.
28274if $ac_need_defaults; then
28275 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28276 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28277fi
28278
Skip Montanaro6dead952003-09-25 14:50:04 +000028279# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028280# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028281# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028282# Hook for its removal unless debugging.
28283# Note that there is a small window in which the directory will not be cleaned:
28284# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028285$debug ||
28286{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028287 tmp=
28288 trap 'exit_status=$?
28289 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28290' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028291 trap '{ (exit 1); exit 1; }' 1 2 13 15
28292}
Martin v. Löwis11437992002-04-12 09:54:03 +000028293# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028294
Martin v. Löwis11437992002-04-12 09:54:03 +000028295{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028296 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028297 test -n "$tmp" && test -d "$tmp"
28298} ||
28299{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028300 tmp=./conf$$-$RANDOM
28301 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028302} ||
28303{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028304 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028305 { (exit 1); exit 1; }
28306}
28307
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028308#
28309# Set up the sed scripts for CONFIG_FILES section.
28310#
28311
28312# No need to generate the scripts if there are no CONFIG_FILES.
28313# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028314if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028315
28316_ACEOF
28317
Martin v. Löwiseba40652007-08-30 20:10:57 +000028318
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028319
Martin v. Löwiseba40652007-08-30 20:10:57 +000028320ac_delim='%!_!# '
28321for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028322 cat >conf$$subs.sed <<_ACEOF
28323SHELL!$SHELL$ac_delim
28324PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28325PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28326PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28327PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28328PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28329PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28330exec_prefix!$exec_prefix$ac_delim
28331prefix!$prefix$ac_delim
28332program_transform_name!$program_transform_name$ac_delim
28333bindir!$bindir$ac_delim
28334sbindir!$sbindir$ac_delim
28335libexecdir!$libexecdir$ac_delim
28336datarootdir!$datarootdir$ac_delim
28337datadir!$datadir$ac_delim
28338sysconfdir!$sysconfdir$ac_delim
28339sharedstatedir!$sharedstatedir$ac_delim
28340localstatedir!$localstatedir$ac_delim
28341includedir!$includedir$ac_delim
28342oldincludedir!$oldincludedir$ac_delim
28343docdir!$docdir$ac_delim
28344infodir!$infodir$ac_delim
28345htmldir!$htmldir$ac_delim
28346dvidir!$dvidir$ac_delim
28347pdfdir!$pdfdir$ac_delim
28348psdir!$psdir$ac_delim
28349libdir!$libdir$ac_delim
28350localedir!$localedir$ac_delim
28351mandir!$mandir$ac_delim
28352DEFS!$DEFS$ac_delim
28353ECHO_C!$ECHO_C$ac_delim
28354ECHO_N!$ECHO_N$ac_delim
28355ECHO_T!$ECHO_T$ac_delim
28356LIBS!$LIBS$ac_delim
28357build_alias!$build_alias$ac_delim
28358host_alias!$host_alias$ac_delim
28359target_alias!$target_alias$ac_delim
28360VERSION!$VERSION$ac_delim
28361SOVERSION!$SOVERSION$ac_delim
28362CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28363UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28364ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028365LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028366PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28367PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28368PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28369PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28370PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28371FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28372FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28373FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28374FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28375FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28376MACHDEP!$MACHDEP$ac_delim
28377SGI_ABI!$SGI_ABI$ac_delim
28378EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28379EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28380CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28381EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28382CC!$CC$ac_delim
28383CFLAGS!$CFLAGS$ac_delim
28384LDFLAGS!$LDFLAGS$ac_delim
28385CPPFLAGS!$CPPFLAGS$ac_delim
28386ac_ct_CC!$ac_ct_CC$ac_delim
28387EXEEXT!$EXEEXT$ac_delim
28388OBJEXT!$OBJEXT$ac_delim
28389CXX!$CXX$ac_delim
28390MAINCC!$MAINCC$ac_delim
28391CPP!$CPP$ac_delim
28392GREP!$GREP$ac_delim
28393EGREP!$EGREP$ac_delim
28394BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28395LIBRARY!$LIBRARY$ac_delim
28396LDLIBRARY!$LDLIBRARY$ac_delim
28397DLLLIBRARY!$DLLLIBRARY$ac_delim
28398BLDLIBRARY!$BLDLIBRARY$ac_delim
28399LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28400INSTSONAME!$INSTSONAME$ac_delim
28401RUNSHARED!$RUNSHARED$ac_delim
28402LINKCC!$LINKCC$ac_delim
28403GNULD!$GNULD$ac_delim
28404RANLIB!$RANLIB$ac_delim
28405AR!$AR$ac_delim
28406ARFLAGS!$ARFLAGS$ac_delim
28407SVNVERSION!$SVNVERSION$ac_delim
28408INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28409INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28410INSTALL_DATA!$INSTALL_DATA$ac_delim
28411LN!$LN$ac_delim
28412OPT!$OPT$ac_delim
28413BASECFLAGS!$BASECFLAGS$ac_delim
28414UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28415OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28416LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28417SO!$SO$ac_delim
28418LDSHARED!$LDSHARED$ac_delim
28419BLDSHARED!$BLDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028420_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028421
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028422 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 +000028423 break
28424 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028425 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28426echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028427 { (exit 1); exit 1; }; }
28428 else
28429 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028430 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028431done
28432
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028433ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28434if test -n "$ac_eof"; then
28435 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28436 ac_eof=`expr $ac_eof + 1`
28437fi
28438
28439cat >>$CONFIG_STATUS <<_ACEOF
28440cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28441/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028442_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028443sed '
28444s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28445s/^/s,@/; s/!/@,|#_!!_#|/
28446:n
28447t n
28448s/'"$ac_delim"'$/,g/; t
28449s/$/\\/; p
28450N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28451' >>$CONFIG_STATUS <conf$$subs.sed
28452rm -f conf$$subs.sed
28453cat >>$CONFIG_STATUS <<_ACEOF
28454CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028455_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028456
28457
28458ac_delim='%!_!# '
28459for ac_last_try in false false false false false :; do
28460 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren92919a62009-12-24 13:30:58 +000028461CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028462LINKFORSHARED!$LINKFORSHARED$ac_delim
28463CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28464SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028465PKG_CONFIG!$PKG_CONFIG$ac_delim
28466LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028467USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28468SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28469USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28470LDLAST!$LDLAST$ac_delim
28471THREADOBJ!$THREADOBJ$ac_delim
28472DLINCLDIR!$DLINCLDIR$ac_delim
28473DYNLOADFILE!$DYNLOADFILE$ac_delim
28474MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28475TRUE!$TRUE$ac_delim
28476LIBOBJS!$LIBOBJS$ac_delim
28477HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28478HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28479HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28480HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28481HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28482LIBM!$LIBM$ac_delim
28483LIBC!$LIBC$ac_delim
28484UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28485THREADHEADERS!$THREADHEADERS$ac_delim
28486SRCDIRS!$SRCDIRS$ac_delim
28487LTLIBOBJS!$LTLIBOBJS$ac_delim
28488_ACEOF
28489
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028490 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028491 break
28492 elif $ac_last_try; then
28493 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28494echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028495 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028496 else
28497 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28498 fi
28499done
28500
28501ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28502if test -n "$ac_eof"; then
28503 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28504 ac_eof=`expr $ac_eof + 1`
28505fi
28506
28507cat >>$CONFIG_STATUS <<_ACEOF
28508cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28509/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028510_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028511sed '
28512s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28513s/^/s,@/; s/!/@,|#_!!_#|/
28514:n
28515t n
28516s/'"$ac_delim"'$/,g/; t
28517s/$/\\/; p
28518N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28519' >>$CONFIG_STATUS <conf$$subs.sed
28520rm -f conf$$subs.sed
28521cat >>$CONFIG_STATUS <<_ACEOF
28522:end
28523s/|#_!!_#|//g
28524CEOF$ac_eof
28525_ACEOF
28526
Martin v. Löwiseba40652007-08-30 20:10:57 +000028527
28528# VPATH may cause trouble with some makes, so we remove $(srcdir),
28529# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28530# trailing colons and then remove the whole line if VPATH becomes empty
28531# (actually we leave an empty line to preserve line numbers).
28532if test "x$srcdir" = x.; then
28533 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28534s/:*\$(srcdir):*/:/
28535s/:*\${srcdir}:*/:/
28536s/:*@srcdir@:*/:/
28537s/^\([^=]*=[ ]*\):*/\1/
28538s/:*$//
28539s/^[^=]*=[ ]*$//
28540}'
28541fi
28542
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028543cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028544fi # test -n "$CONFIG_FILES"
28545
Martin v. Löwiseba40652007-08-30 20:10:57 +000028546
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028547for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028548do
28549 case $ac_tag in
28550 :[FHLC]) ac_mode=$ac_tag; continue;;
28551 esac
28552 case $ac_mode$ac_tag in
28553 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028554 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28555echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028556 { (exit 1); exit 1; }; };;
28557 :[FH]-) ac_tag=-:-;;
28558 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28559 esac
28560 ac_save_IFS=$IFS
28561 IFS=:
28562 set x $ac_tag
28563 IFS=$ac_save_IFS
28564 shift
28565 ac_file=$1
28566 shift
28567
28568 case $ac_mode in
28569 :L) ac_source=$1;;
28570 :[FH])
28571 ac_file_inputs=
28572 for ac_f
28573 do
28574 case $ac_f in
28575 -) ac_f="$tmp/stdin";;
28576 *) # Look for the file first in the build tree, then in the source tree
28577 # (if the path is not absolute). The absolute path cannot be DOS-style,
28578 # because $ac_f cannot contain `:'.
28579 test -f "$ac_f" ||
28580 case $ac_f in
28581 [\\/$]*) false;;
28582 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28583 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028584 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28585echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028586 { (exit 1); exit 1; }; };;
28587 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028588 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028589 done
28590
28591 # Let's still pretend it is `configure' which instantiates (i.e., don't
28592 # use $as_me), people would be surprised to read:
28593 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028594 configure_input="Generated from "`IFS=:
28595 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028596 if test x"$ac_file" != x-; then
28597 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028598 { echo "$as_me:$LINENO: creating $ac_file" >&5
28599echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028600 fi
28601
28602 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028603 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028604 esac
28605 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028606 esac
28607
Martin v. Löwiseba40652007-08-30 20:10:57 +000028608 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028609$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028610 X"$ac_file" : 'X\(//\)[^/]' \| \
28611 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028612 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028613echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028614 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28615 s//\1/
28616 q
28617 }
28618 /^X\(\/\/\)[^/].*/{
28619 s//\1/
28620 q
28621 }
28622 /^X\(\/\/\)$/{
28623 s//\1/
28624 q
28625 }
28626 /^X\(\/\).*/{
28627 s//\1/
28628 q
28629 }
28630 s/.*/./; q'`
28631 { as_dir="$ac_dir"
28632 case $as_dir in #(
28633 -*) as_dir=./$as_dir;;
28634 esac
28635 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028636 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028637 while :; do
28638 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028639 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028640 *) as_qdir=$as_dir;;
28641 esac
28642 as_dirs="'$as_qdir' $as_dirs"
28643 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028644$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028645 X"$as_dir" : 'X\(//\)[^/]' \| \
28646 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028647 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028648echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028649 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28650 s//\1/
28651 q
28652 }
28653 /^X\(\/\/\)[^/].*/{
28654 s//\1/
28655 q
28656 }
28657 /^X\(\/\/\)$/{
28658 s//\1/
28659 q
28660 }
28661 /^X\(\/\).*/{
28662 s//\1/
28663 q
28664 }
28665 s/.*/./; q'`
28666 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028667 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028668 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028669 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28670echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028671 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028672 ac_builddir=.
28673
Martin v. Löwiseba40652007-08-30 20:10:57 +000028674case "$ac_dir" in
28675.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28676*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028677 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028678 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028679 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028680 case $ac_top_builddir_sub in
28681 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28682 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28683 esac ;;
28684esac
28685ac_abs_top_builddir=$ac_pwd
28686ac_abs_builddir=$ac_pwd$ac_dir_suffix
28687# for backward compatibility:
28688ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028689
28690case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028691 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028692 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028693 ac_top_srcdir=$ac_top_builddir_sub
28694 ac_abs_top_srcdir=$ac_pwd ;;
28695 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028696 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028697 ac_top_srcdir=$srcdir
28698 ac_abs_top_srcdir=$srcdir ;;
28699 *) # Relative name.
28700 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28701 ac_top_srcdir=$ac_top_build_prefix$srcdir
28702 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028703esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028704ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028705
Martin v. Löwis11437992002-04-12 09:54:03 +000028706
Martin v. Löwiseba40652007-08-30 20:10:57 +000028707 case $ac_mode in
28708 :F)
28709 #
28710 # CONFIG_FILE
28711 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028712
28713 case $INSTALL in
28714 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028715 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028716 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028717_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028718
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028719cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028720# If the template does not know about datarootdir, expand it.
28721# FIXME: This hack should be removed a few years after 2.60.
28722ac_datarootdir_hack=; ac_datarootdir_seen=
28723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028724case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028725 p
28726 q
28727}
28728/@datadir@/p
28729/@docdir@/p
28730/@infodir@/p
28731/@localedir@/p
28732/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028733' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028734*datarootdir*) ac_datarootdir_seen=yes;;
28735*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028736 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28737echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028738_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028739cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028740 ac_datarootdir_hack='
28741 s&@datadir@&$datadir&g
28742 s&@docdir@&$docdir&g
28743 s&@infodir@&$infodir&g
28744 s&@localedir@&$localedir&g
28745 s&@mandir@&$mandir&g
28746 s&\\\${datarootdir}&$datarootdir&g' ;;
28747esac
28748_ACEOF
28749
28750# Neutralize VPATH when `$srcdir' = `.'.
28751# Shell code in configure.ac might set extrasub.
28752# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028753cat >>$CONFIG_STATUS <<_ACEOF
28754 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028755$extrasub
28756_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028757cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028758:t
28759/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028760s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028761s&@top_builddir@&$ac_top_builddir_sub&;t t
28762s&@srcdir@&$ac_srcdir&;t t
28763s&@abs_srcdir@&$ac_abs_srcdir&;t t
28764s&@top_srcdir@&$ac_top_srcdir&;t t
28765s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28766s&@builddir@&$ac_builddir&;t t
28767s&@abs_builddir@&$ac_abs_builddir&;t t
28768s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28769s&@INSTALL@&$ac_INSTALL&;t t
28770$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028771" $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 +000028772
Martin v. Löwiseba40652007-08-30 20:10:57 +000028773test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28774 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28775 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028776 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028777which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028778echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028779which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028780
Martin v. Löwiseba40652007-08-30 20:10:57 +000028781 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028782 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028783 -) cat "$tmp/out"; rm -f "$tmp/out";;
28784 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28785 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028786 ;;
28787 :H)
28788 #
28789 # CONFIG_HEADER
28790 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028791_ACEOF
28792
28793# Transform confdefs.h into a sed script `conftest.defines', that
28794# substitutes the proper values into config.h.in to produce config.h.
28795rm -f conftest.defines conftest.tail
28796# First, append a space to every undef/define line, to ease matching.
28797echo 's/$/ /' >conftest.defines
28798# Then, protect against being on the right side of a sed subst, or in
28799# an unquoted here document, in config.status. If some macros were
28800# called several times there might be several #defines for the same
28801# symbol, which is useless. But do not sort them, since the last
28802# AC_DEFINE must be honored.
28803ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28804# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28805# NAME is the cpp macro being defined, VALUE is the value it is being given.
28806# PARAMS is the parameter list in the macro definition--in most cases, it's
28807# just an empty string.
28808ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28809ac_dB='\\)[ (].*,\\1define\\2'
28810ac_dC=' '
28811ac_dD=' ,'
28812
28813uniq confdefs.h |
28814 sed -n '
28815 t rset
28816 :rset
28817 s/^[ ]*#[ ]*define[ ][ ]*//
28818 t ok
28819 d
28820 :ok
28821 s/[\\&,]/\\&/g
28822 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28823 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28824 ' >>conftest.defines
28825
28826# Remove the space that was appended to ease matching.
28827# Then replace #undef with comments. This is necessary, for
28828# example, in the case of _POSIX_SOURCE, which is predefined and required
28829# on some systems where configure will not decide to define it.
28830# (The regexp can be short, since the line contains either #define or #undef.)
28831echo 's/ $//
28832s,^[ #]*u.*,/* & */,' >>conftest.defines
28833
28834# Break up conftest.defines:
28835ac_max_sed_lines=50
28836
28837# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28838# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28839# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28840# et cetera.
28841ac_in='$ac_file_inputs'
28842ac_out='"$tmp/out1"'
28843ac_nxt='"$tmp/out2"'
28844
28845while :
28846do
28847 # Write a here document:
28848 cat >>$CONFIG_STATUS <<_ACEOF
28849 # First, check the format of the line:
28850 cat >"\$tmp/defines.sed" <<\\CEOF
28851/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28852/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28853b
28854:def
28855_ACEOF
28856 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28857 echo 'CEOF
28858 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28859 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28860 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28861 grep . conftest.tail >/dev/null || break
28862 rm -f conftest.defines
28863 mv conftest.tail conftest.defines
28864done
28865rm -f conftest.defines conftest.tail
28866
28867echo "ac_result=$ac_in" >>$CONFIG_STATUS
28868cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028869 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028870 echo "/* $configure_input */" >"$tmp/config.h"
28871 cat "$ac_result" >>"$tmp/config.h"
28872 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28873 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28874echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028875 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028876 rm -f $ac_file
28877 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028878 fi
28879 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028880 echo "/* $configure_input */"
28881 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028882 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028883 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028884 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028885
Martin v. Löwiseba40652007-08-30 20:10:57 +000028886
28887 esac
28888
28889done # for ac_tag
28890
Guido van Rossum627b2d71993-12-24 10:39:16 +000028891
Martin v. Löwis11437992002-04-12 09:54:03 +000028892{ (exit 0); exit 0; }
28893_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028894chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028895ac_clean_files=$ac_clean_files_save
28896
28897
28898# configure is writing to config.log, and then calls config.status.
28899# config.status does its own redirection, appending to config.log.
28900# Unfortunately, on DOS this fails, as config.log is still kept open
28901# by configure, so config.status won't be able to write to it; its
28902# output is simply discarded. So we exec the FD to /dev/null,
28903# effectively closing config.log, so it can be properly (re)opened and
28904# appended to by config.status. When coming back to configure, we
28905# need to make the FD available again.
28906if test "$no_create" != yes; then
28907 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028908 ac_config_status_args=
28909 test "$silent" = yes &&
28910 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028911 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028912 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028913 exec 5>>config.log
28914 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28915 # would make configure fail if this is the last instruction.
28916 $ac_cs_success || { (exit 1); exit 1; }
28917fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028918
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028919
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028920echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028921if test ! -f Modules/Setup
28922then
28923 cp $srcdir/Modules/Setup.dist Modules/Setup
28924fi
28925
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028926echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028927if test ! -f Modules/Setup.local
28928then
28929 echo "# Edit this file for local setup changes" >Modules/Setup.local
28930fi
28931
28932echo "creating Makefile"
28933$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28934 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028935 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000028936
28937case $ac_sys_system in
28938BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028939 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028940
28941 Support for BeOS is deprecated as of Python 2.6.
28942 See PEP 11 for the gory details.
28943 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028944echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028945
28946 Support for BeOS is deprecated as of Python 2.6.
28947 See PEP 11 for the gory details.
28948 " >&2;}
28949 ;;
28950*) ;;
28951esac
28952
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028953mv config.c Modules