blob: dffff124870e49d59c0df90df9ffc6ee2b712d14 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussorena55af9a2010-01-17 16:25:57 +00002# From configure.in Revision: 77212 .
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;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00002145 Darwin/1[0-9].*)
2146 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002147 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2148 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2149 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002150 AIX/4)
2151 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002152 AIX/5)
2153 if test `uname -r` -eq 1; then
2154 define_xopen_source=no
2155 fi
2156 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002157 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2158 # defining NI_NUMERICHOST.
2159 QNX/6.3.2)
2160 define_xopen_source=no
2161 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002162
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002163esac
2164
2165if test $define_xopen_source = yes
2166then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002167 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2168 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002169 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2170 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002171 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002172 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002173
2174cat >>confdefs.h <<\_ACEOF
2175#define _XOPEN_SOURCE 500
2176_ACEOF
2177
2178 ;;
2179 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002180
2181cat >>confdefs.h <<\_ACEOF
2182#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002183_ACEOF
2184
Skip Montanarof0d5f792004-08-15 14:08:23 +00002185 ;;
2186 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002187
2188 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2189 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2190 # several APIs are not declared. Since this is also needed in some
2191 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002192 # except for Solaris 10, where it must not be defined,
2193 # as it implies XPG4.2
2194 case $ac_sys_system/$ac_sys_release in
2195 SunOS/5.10)
2196 ;;
2197 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002198
2199cat >>confdefs.h <<\_ACEOF
2200#define _XOPEN_SOURCE_EXTENDED 1
2201_ACEOF
2202
Martin v. Löwis7dece662005-11-26 11:38:24 +00002203 ;;
2204 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002205
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002206
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002207cat >>confdefs.h <<\_ACEOF
2208#define _POSIX_C_SOURCE 200112L
2209_ACEOF
2210
2211
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002212fi
2213
Guido van Rossum91922671997-10-09 20:24:13 +00002214#
2215# SGI compilers allow the specification of the both the ABI and the
2216# ISA on the command line. Depending on the values of these switches,
2217# different and often incompatable code will be generated.
2218#
2219# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2220# thus supply support for various ABI/ISA combinations. The MACHDEP
2221# variable is also adjusted.
2222#
2223
2224if test ! -z "$SGI_ABI"
2225then
2226 CC="cc $SGI_ABI"
2227 LDFLAGS="$SGI_ABI $LDFLAGS"
2228 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2229fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002230{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2231echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002232
Jack Jansen83f898c2002-12-30 22:23:40 +00002233# And add extra plat-mac for darwin
2234
Jack Jansen7b59b422003-03-17 15:44:10 +00002235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002236{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2237echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002238if test -z "$EXTRAPLATDIR"
2239then
2240 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002241 darwin)
2242 EXTRAPLATDIR="\$(PLATMACDIRS)"
2243 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2244 ;;
2245 *)
2246 EXTRAPLATDIR=""
2247 EXTRAMACHDEPPATH=""
2248 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002249 esac
2250fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002251{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2252echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002253
Jack Jansen6b08a402004-06-03 12:41:45 +00002254# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2255# it may influence the way we can build extensions, so distutils
2256# needs to check it
2257
Ronald Oussoren988117f2006-04-29 11:31:35 +00002258
Jack Jansen6b08a402004-06-03 12:41:45 +00002259CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002260EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002261
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002262{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2263echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002264ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002265{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2266echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002267
Guido van Rossum627b2d71993-12-24 10:39:16 +00002268# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002269
2270# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2271# for debug/optimization stuff. BASECFLAGS is for flags that are required
2272# just to get things to compile and link. Users are free to override OPT
2273# when running configure or make. The build should not break if they do.
2274# BASECFLAGS should generally not be messed with, however.
2275
2276# XXX shouldn't some/most/all of this code be merged with the stuff later
2277# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002278{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2279echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002280
Martin v. Löwiseba40652007-08-30 20:10:57 +00002281# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002282if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002283 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002284 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002285 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002286 without_gcc=yes;;
2287 yes) CC=gcc
2288 without_gcc=no;;
2289 *) CC=$withval
2290 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002291 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002292else
Martin v. Löwis11437992002-04-12 09:54:03 +00002293
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002294 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002295 AIX*) CC=cc_r
2296 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002297 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002298 case $BE_HOST_CPU in
2299 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002300 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002301 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002302 BASECFLAGS="$BASECFLAGS -export pragma"
2303 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002304 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002305 ;;
2306 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002307 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002308 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002309 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002310 ;;
2311 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002312 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2313echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002314 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002315 ;;
2316 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002317 AR="\$(srcdir)/Modules/ar_beos"
2318 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002319 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002320 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002321 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002322fi
2323
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002324{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2325echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002326
Guido van Rossum8b131c51995-03-09 14:10:13 +00002327# If the user switches compilers, we can't believe the cache
2328if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2329then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002330 { { echo "$as_me:$LINENO: 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)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002332echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002333(it is also a good idea to do 'make clean' before compiling)" >&2;}
2334 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002335fi
2336
Martin v. Löwis11437992002-04-12 09:54:03 +00002337ac_ext=c
2338ac_cpp='$CPP $CPPFLAGS'
2339ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2340ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2341ac_compiler_gnu=$ac_cv_c_compiler_gnu
2342if test -n "$ac_tool_prefix"; then
2343 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2344set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002345{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2346echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002347if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002349else
2350 if test -n "$CC"; then
2351 ac_cv_prog_CC="$CC" # Let the user override the test.
2352else
Martin v. Löwis11437992002-04-12 09:54:03 +00002353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2354for as_dir in $PATH
2355do
2356 IFS=$as_save_IFS
2357 test -z "$as_dir" && as_dir=.
2358 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002359 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 +00002360 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002361 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002362 break 2
2363 fi
2364done
2365done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002366IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002367
Jack Jansendd19cf82001-12-06 22:36:17 +00002368fi
2369fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002370CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002371if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002372 { echo "$as_me:$LINENO: result: $CC" >&5
2373echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002375 { echo "$as_me:$LINENO: result: no" >&5
2376echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377fi
2378
Martin v. Löwiseba40652007-08-30 20:10:57 +00002379
Martin v. Löwis11437992002-04-12 09:54:03 +00002380fi
2381if test -z "$ac_cv_prog_CC"; then
2382 ac_ct_CC=$CC
2383 # Extract the first word of "gcc", so it can be a program name with args.
2384set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002385{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2386echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002387if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002389else
2390 if test -n "$ac_ct_CC"; then
2391 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2392else
2393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2394for as_dir in $PATH
2395do
2396 IFS=$as_save_IFS
2397 test -z "$as_dir" && as_dir=.
2398 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002399 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 +00002400 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002401 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002402 break 2
2403 fi
2404done
2405done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002406IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
2408fi
2409fi
2410ac_ct_CC=$ac_cv_prog_ac_ct_CC
2411if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002412 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2413echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002415 { echo "$as_me:$LINENO: result: no" >&5
2416echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002417fi
2418
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419 if test "x$ac_ct_CC" = x; then
2420 CC=""
2421 else
2422 case $cross_compiling:$ac_tool_warned in
2423yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002424{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2425whose name does not start with the host triplet. If you think this
2426configuration is useful to you, please write to autoconf@gnu.org." >&5
2427echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2428whose name does not start with the host triplet. If you think this
2429configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430ac_tool_warned=yes ;;
2431esac
2432 CC=$ac_ct_CC
2433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002434else
2435 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002436fi
2437
Jack Jansendd19cf82001-12-06 22:36:17 +00002438if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002439 if test -n "$ac_tool_prefix"; then
2440 # 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 +00002441set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002442{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2443echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002444if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002445 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002446else
2447 if test -n "$CC"; then
2448 ac_cv_prog_CC="$CC" # Let the user override the test.
2449else
Martin v. Löwis11437992002-04-12 09:54:03 +00002450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2451for as_dir in $PATH
2452do
2453 IFS=$as_save_IFS
2454 test -z "$as_dir" && as_dir=.
2455 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002456 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 +00002457 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002458 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 break 2
2460 fi
2461done
2462done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002463IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002464
2465fi
2466fi
2467CC=$ac_cv_prog_CC
2468if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002469 { echo "$as_me:$LINENO: result: $CC" >&5
2470echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002471else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002472 { echo "$as_me:$LINENO: result: no" >&5
2473echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002474fi
2475
Martin v. Löwiseba40652007-08-30 20:10:57 +00002476
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002478fi
2479if test -z "$CC"; then
2480 # Extract the first word of "cc", so it can be a program name with args.
2481set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002482{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2483echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002484if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002485 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002486else
2487 if test -n "$CC"; then
2488 ac_cv_prog_CC="$CC" # Let the user override the test.
2489else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002490 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2492for as_dir in $PATH
2493do
2494 IFS=$as_save_IFS
2495 test -z "$as_dir" && as_dir=.
2496 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002497 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 +00002498 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2499 ac_prog_rejected=yes
2500 continue
2501 fi
2502 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002503 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 break 2
2505 fi
2506done
2507done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002509
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002510if test $ac_prog_rejected = yes; then
2511 # We found a bogon in the path, so make sure we never use it.
2512 set dummy $ac_cv_prog_CC
2513 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002515 # We chose a different compiler from the bogus one.
2516 # However, it has the same basename, so the bogon will be chosen
2517 # first if we set CC to just the basename; use the full file name.
2518 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002520 fi
2521fi
2522fi
2523fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002524CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002525if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002526 { echo "$as_me:$LINENO: result: $CC" >&5
2527echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002528else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002529 { echo "$as_me:$LINENO: result: no" >&5
2530echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002531fi
2532
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533
Martin v. Löwis11437992002-04-12 09:54:03 +00002534fi
2535if test -z "$CC"; then
2536 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 do
2539 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2540set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002541{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2542echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002543if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002544 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002545else
2546 if test -n "$CC"; then
2547 ac_cv_prog_CC="$CC" # Let the user override the test.
2548else
Martin v. Löwis11437992002-04-12 09:54:03 +00002549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2550for as_dir in $PATH
2551do
2552 IFS=$as_save_IFS
2553 test -z "$as_dir" && as_dir=.
2554 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002555 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 +00002556 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002557 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002559 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002560done
2561done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002562IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002563
2564fi
2565fi
2566CC=$ac_cv_prog_CC
2567if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002568 { echo "$as_me:$LINENO: result: $CC" >&5
2569echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002570else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002571 { echo "$as_me:$LINENO: result: no" >&5
2572echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002573fi
2574
Martin v. Löwiseba40652007-08-30 20:10:57 +00002575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 test -n "$CC" && break
2577 done
2578fi
2579if test -z "$CC"; then
2580 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002581 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002582do
2583 # Extract the first word of "$ac_prog", so it can be a program name with args.
2584set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002585{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2586echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002588 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002589else
2590 if test -n "$ac_ct_CC"; then
2591 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2592else
2593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2594for as_dir in $PATH
2595do
2596 IFS=$as_save_IFS
2597 test -z "$as_dir" && as_dir=.
2598 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599 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 +00002600 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002601 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 break 2
2603 fi
2604done
2605done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002606IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608fi
2609fi
2610ac_ct_CC=$ac_cv_prog_ac_ct_CC
2611if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002612 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2613echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002614else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002615 { echo "$as_me:$LINENO: result: no" >&5
2616echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002617fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002618
Martin v. Löwiseba40652007-08-30 20:10:57 +00002619
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 test -n "$ac_ct_CC" && break
2621done
Michael W. Hudson54241132001-12-07 15:38:26 +00002622
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623 if test "x$ac_ct_CC" = x; then
2624 CC=""
2625 else
2626 case $cross_compiling:$ac_tool_warned in
2627yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002628{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2629whose name does not start with the host triplet. If you think this
2630configuration is useful to you, please write to autoconf@gnu.org." >&5
2631echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2632whose name does not start with the host triplet. If you think this
2633configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002634ac_tool_warned=yes ;;
2635esac
2636 CC=$ac_ct_CC
2637 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002638fi
2639
2640fi
2641
2642
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002643test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002644See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002646See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002647 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002648
2649# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002650echo "$as_me:$LINENO: checking for C compiler version" >&5
2651ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002652{ (ac_try="$ac_compiler --version >&5"
2653case "(($ac_try" in
2654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2655 *) ac_try_echo=$ac_try;;
2656esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002662{ (ac_try="$ac_compiler -v >&5"
2663case "(($ac_try" in
2664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2665 *) ac_try_echo=$ac_try;;
2666esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002668 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002672{ (ac_try="$ac_compiler -V >&5"
2673case "(($ac_try" in
2674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2675 *) ac_try_echo=$ac_try;;
2676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002678 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 (exit $ac_status); }
2682
2683cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002684/* confdefs.h. */
2685_ACEOF
2686cat confdefs.h >>conftest.$ac_ext
2687cat >>conftest.$ac_ext <<_ACEOF
2688/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002689
Martin v. Löwis11437992002-04-12 09:54:03 +00002690int
2691main ()
2692{
2693
2694 ;
2695 return 0;
2696}
2697_ACEOF
2698ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002699ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002700# Try to create an executable without -o first, disregard a.out.
2701# It will help us diagnose broken compilers, and finding out an intuition
2702# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002703{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2704echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2705ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2706#
2707# List of possible output files, starting from the most likely.
2708# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2709# only as a last resort. b.out is created by i960 compilers.
2710ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2711#
2712# The IRIX 6 linker writes into existing files which may not be
2713# executable, retaining their permissions. Remove them first so a
2714# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002715ac_rmfiles=
2716for ac_file in $ac_files
2717do
2718 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002719 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002720 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2721 esac
2722done
2723rm -f $ac_rmfiles
2724
2725if { (ac_try="$ac_link_default"
2726case "(($ac_try" in
2727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2728 *) ac_try_echo=$ac_try;;
2729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002731 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002735 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2736# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2737# in a Makefile. We should not override ac_cv_exeext if it was cached,
2738# so that the user can short-circuit this test for compilers unknown to
2739# Autoconf.
2740for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002741do
2742 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002744 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002745 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002746 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002747 # We found the default executable, but exeext='' is most
2748 # certainly right.
2749 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002750 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002751 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2752 then :; else
2753 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2754 fi
2755 # We set ac_cv_exeext here because the later test for it is not
2756 # safe: cross compilers may not add the suffix if given an `-o'
2757 # argument, so we may need to know it at that point already.
2758 # Even if this section looks crufty: it has the advantage of
2759 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002760 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002761 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002762 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002763 esac
2764done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002765test "$ac_cv_exeext" = no && ac_cv_exeext=
2766
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002767else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002768 ac_file=''
2769fi
2770
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002771{ echo "$as_me:$LINENO: result: $ac_file" >&5
2772echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002773if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002775sed 's/^/| /' conftest.$ac_ext >&5
2776
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002777{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002778See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002779echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002780See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002781 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002782fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002783
Martin v. Löwis11437992002-04-12 09:54:03 +00002784ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002785
Martin v. Löwiseba40652007-08-30 20:10:57 +00002786# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002787# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002788{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2789echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002790# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2791# If not cross compiling, check that we can run a simple program.
2792if test "$cross_compiling" != yes; then
2793 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794 { (case "(($ac_try" in
2795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2796 *) ac_try_echo=$ac_try;;
2797esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002799 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002800 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 (exit $ac_status); }; }; then
2803 cross_compiling=no
2804 else
2805 if test "$cross_compiling" = maybe; then
2806 cross_compiling=yes
2807 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002808 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002809If you meant to cross compile, use \`--host'.
2810See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002811echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002812If you meant to cross compile, use \`--host'.
2813See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002814 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002815 fi
2816 fi
2817fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002818{ echo "$as_me:$LINENO: result: yes" >&5
2819echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002820
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002821rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002822ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002823# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002824# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002825{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2826echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2827{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2828echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002829
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002830{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2831echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002832if { (ac_try="$ac_link"
2833case "(($ac_try" in
2834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2835 *) ac_try_echo=$ac_try;;
2836esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002838 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 (exit $ac_status); }; then
2842 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2843# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2844# work properly (i.e., refer to `conftest.exe'), while it won't with
2845# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002846for ac_file in conftest.exe conftest conftest.*; do
2847 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002848 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002849 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002851 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 * ) break;;
2853 esac
2854done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002855else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002856 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002857See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002859See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002860 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002861fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002862
Martin v. Löwis11437992002-04-12 09:54:03 +00002863rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002864{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2865echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002866
2867rm -f conftest.$ac_ext
2868EXEEXT=$ac_cv_exeext
2869ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002870{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2871echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002872if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002873 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002874else
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002876/* confdefs.h. */
2877_ACEOF
2878cat confdefs.h >>conftest.$ac_ext
2879cat >>conftest.$ac_ext <<_ACEOF
2880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002881
Martin v. Löwis11437992002-04-12 09:54:03 +00002882int
2883main ()
2884{
2885
2886 ;
2887 return 0;
2888}
2889_ACEOF
2890rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002891if { (ac_try="$ac_compile"
2892case "(($ac_try" in
2893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2894 *) ac_try_echo=$ac_try;;
2895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002897 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002898 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002901 for ac_file in conftest.o conftest.obj conftest.*; do
2902 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002904 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2906 break;;
2907 esac
2908done
2909else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002911sed 's/^/| /' conftest.$ac_ext >&5
2912
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002913{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002914See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002915echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002916See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002917 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002918fi
2919
2920rm -f conftest.$ac_cv_objext conftest.$ac_ext
2921fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002922{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2923echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002924OBJEXT=$ac_cv_objext
2925ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002926{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2927echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002928if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002929 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002930else
2931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002932/* confdefs.h. */
2933_ACEOF
2934cat confdefs.h >>conftest.$ac_ext
2935cat >>conftest.$ac_ext <<_ACEOF
2936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Martin v. Löwis11437992002-04-12 09:54:03 +00002938int
2939main ()
2940{
2941#ifndef __GNUC__
2942 choke me
2943#endif
2944
2945 ;
2946 return 0;
2947}
2948_ACEOF
2949rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002950if { (ac_try="$ac_compile"
2951case "(($ac_try" in
2952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2953 *) ac_try_echo=$ac_try;;
2954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002958 grep -v '^ *+' conftest.er1 >conftest.err
2959 rm -f conftest.er1
2960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002962 (exit $ac_status); } && {
2963 test -z "$ac_c_werror_flag" ||
2964 test ! -s conftest.err
2965 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002966 ac_compiler_gnu=yes
2967else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002969sed 's/^/| /' conftest.$ac_ext >&5
2970
Martin v. Löwiseba40652007-08-30 20:10:57 +00002971 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002973
2974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002975ac_cv_c_compiler_gnu=$ac_compiler_gnu
2976
2977fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002978{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2979echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2980GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002981ac_test_CFLAGS=${CFLAGS+set}
2982ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002983{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2984echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002985if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002986 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002987else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002988 ac_save_c_werror_flag=$ac_c_werror_flag
2989 ac_c_werror_flag=yes
2990 ac_cv_prog_cc_g=no
2991 CFLAGS="-g"
2992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002993/* confdefs.h. */
2994_ACEOF
2995cat confdefs.h >>conftest.$ac_ext
2996cat >>conftest.$ac_ext <<_ACEOF
2997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
Martin v. Löwis11437992002-04-12 09:54:03 +00002999int
3000main ()
3001{
3002
3003 ;
3004 return 0;
3005}
3006_ACEOF
3007rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008if { (ac_try="$ac_compile"
3009case "(($ac_try" in
3010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3011 *) ac_try_echo=$ac_try;;
3012esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003016 grep -v '^ *+' conftest.er1 >conftest.err
3017 rm -f conftest.er1
3018 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003020 (exit $ac_status); } && {
3021 test -z "$ac_c_werror_flag" ||
3022 test ! -s conftest.err
3023 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003024 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003025else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003027sed 's/^/| /' conftest.$ac_ext >&5
3028
Martin v. Löwiseba40652007-08-30 20:10:57 +00003029 CFLAGS=""
3030 cat >conftest.$ac_ext <<_ACEOF
3031/* confdefs.h. */
3032_ACEOF
3033cat confdefs.h >>conftest.$ac_ext
3034cat >>conftest.$ac_ext <<_ACEOF
3035/* end confdefs.h. */
3036
3037int
3038main ()
3039{
3040
3041 ;
3042 return 0;
3043}
3044_ACEOF
3045rm -f conftest.$ac_objext
3046if { (ac_try="$ac_compile"
3047case "(($ac_try" in
3048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3049 *) ac_try_echo=$ac_try;;
3050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003052 (eval "$ac_compile") 2>conftest.er1
3053 ac_status=$?
3054 grep -v '^ *+' conftest.er1 >conftest.err
3055 rm -f conftest.er1
3056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003058 (exit $ac_status); } && {
3059 test -z "$ac_c_werror_flag" ||
3060 test ! -s conftest.err
3061 } && test -s conftest.$ac_objext; then
3062 :
3063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003064 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003065sed 's/^/| /' conftest.$ac_ext >&5
3066
3067 ac_c_werror_flag=$ac_save_c_werror_flag
3068 CFLAGS="-g"
3069 cat >conftest.$ac_ext <<_ACEOF
3070/* confdefs.h. */
3071_ACEOF
3072cat confdefs.h >>conftest.$ac_ext
3073cat >>conftest.$ac_ext <<_ACEOF
3074/* end confdefs.h. */
3075
3076int
3077main ()
3078{
3079
3080 ;
3081 return 0;
3082}
3083_ACEOF
3084rm -f conftest.$ac_objext
3085if { (ac_try="$ac_compile"
3086case "(($ac_try" in
3087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3088 *) ac_try_echo=$ac_try;;
3089esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003091 (eval "$ac_compile") 2>conftest.er1
3092 ac_status=$?
3093 grep -v '^ *+' conftest.er1 >conftest.err
3094 rm -f conftest.er1
3095 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097 (exit $ac_status); } && {
3098 test -z "$ac_c_werror_flag" ||
3099 test ! -s conftest.err
3100 } && test -s conftest.$ac_objext; then
3101 ac_cv_prog_cc_g=yes
3102else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003103 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003104sed 's/^/| /' conftest.$ac_ext >&5
3105
3106
Guido van Rossum627b2d71993-12-24 10:39:16 +00003107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003108
3109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003111
3112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3113fi
3114
3115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3116 ac_c_werror_flag=$ac_save_c_werror_flag
3117fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003118{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3119echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003120if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003121 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003122elif test $ac_cv_prog_cc_g = yes; then
3123 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003124 CFLAGS="-g -O2"
3125 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003126 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003127 fi
3128else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003129 if test "$GCC" = yes; then
3130 CFLAGS="-O2"
3131 else
3132 CFLAGS=
3133 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003134fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003135{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3136echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003137if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003138 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003139else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003140 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003141ac_save_CC=$CC
3142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003143/* confdefs.h. */
3144_ACEOF
3145cat confdefs.h >>conftest.$ac_ext
3146cat >>conftest.$ac_ext <<_ACEOF
3147/* end confdefs.h. */
3148#include <stdarg.h>
3149#include <stdio.h>
3150#include <sys/types.h>
3151#include <sys/stat.h>
3152/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3153struct buf { int x; };
3154FILE * (*rcsopen) (struct buf *, struct stat *, int);
3155static char *e (p, i)
3156 char **p;
3157 int i;
3158{
3159 return p[i];
3160}
3161static char *f (char * (*g) (char **, int), char **p, ...)
3162{
3163 char *s;
3164 va_list v;
3165 va_start (v,p);
3166 s = g (p, va_arg (v,int));
3167 va_end (v);
3168 return s;
3169}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003170
3171/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3172 function prototypes and stuff, but not '\xHH' hex character constants.
3173 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003174 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003175 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3176 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003177 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003178int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3179
Martin v. Löwiseba40652007-08-30 20:10:57 +00003180/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3181 inside strings and character constants. */
3182#define FOO(x) 'x'
3183int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3184
Skip Montanaro6dead952003-09-25 14:50:04 +00003185int test (int i, double x);
3186struct s1 {int (*f) (int a);};
3187struct s2 {int (*f) (double a);};
3188int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3189int argc;
3190char **argv;
3191int
3192main ()
3193{
3194return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3195 ;
3196 return 0;
3197}
3198_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003199for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3200 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003201do
3202 CC="$ac_save_CC $ac_arg"
3203 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204if { (ac_try="$ac_compile"
3205case "(($ac_try" in
3206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3207 *) ac_try_echo=$ac_try;;
3208esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003212 grep -v '^ *+' conftest.er1 >conftest.err
3213 rm -f conftest.er1
3214 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003216 (exit $ac_status); } && {
3217 test -z "$ac_c_werror_flag" ||
3218 test ! -s conftest.err
3219 } && test -s conftest.$ac_objext; then
3220 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003223sed 's/^/| /' conftest.$ac_ext >&5
3224
Martin v. Löwiseba40652007-08-30 20:10:57 +00003225
Skip Montanaro6dead952003-09-25 14:50:04 +00003226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227
3228rm -f core conftest.err conftest.$ac_objext
3229 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003230done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003231rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003232CC=$ac_save_CC
3233
3234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003235# AC_CACHE_VAL
3236case "x$ac_cv_prog_cc_c89" in
3237 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003238 { echo "$as_me:$LINENO: result: none needed" >&5
3239echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003240 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003241 { echo "$as_me:$LINENO: result: unsupported" >&5
3242echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003243 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003244 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003245 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3246echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003247esac
3248
Skip Montanaro6dead952003-09-25 14:50:04 +00003249
Martin v. Löwis11437992002-04-12 09:54:03 +00003250ac_ext=c
3251ac_cpp='$CPP $CPPFLAGS'
3252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3254ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003255
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003256
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003257
3258
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003259{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3260echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003261
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003263if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003265
3266 case $withval in
3267 no) with_cxx_main=no
3268 MAINCC='$(CC)';;
3269 yes) with_cxx_main=yes
3270 MAINCC='$(CXX)';;
3271 *) with_cxx_main=yes
3272 MAINCC=$withval
3273 if test -z "$CXX"
3274 then
3275 CXX=$withval
3276 fi;;
3277 esac
3278else
3279
3280 with_cxx_main=no
3281 MAINCC='$(CC)'
3282
Martin v. Löwiseba40652007-08-30 20:10:57 +00003283fi
3284
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003285{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3286echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003287
3288preset_cxx="$CXX"
3289if test -z "$CXX"
3290then
3291 case "$CC" in
3292 gcc) # Extract the first word of "g++", so it can be a program name with args.
3293set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003294{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3295echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003296if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003297 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003298else
3299 case $CXX in
3300 [\\/]* | ?:[\\/]*)
3301 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3302 ;;
3303 *)
3304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3305for as_dir in notfound
3306do
3307 IFS=$as_save_IFS
3308 test -z "$as_dir" && as_dir=.
3309 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003310 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 +00003311 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003312 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003313 break 2
3314 fi
3315done
3316done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003317IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003318
3319 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3320 ;;
3321esac
3322fi
3323CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003324if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003325 { echo "$as_me:$LINENO: result: $CXX" >&5
3326echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003328 { echo "$as_me:$LINENO: result: no" >&5
3329echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003331
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003332 ;;
3333 cc) # Extract the first word of "c++", so it can be a program name with args.
3334set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003335{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003337if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003338 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003339else
3340 case $CXX in
3341 [\\/]* | ?:[\\/]*)
3342 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3343 ;;
3344 *)
3345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3346for as_dir in notfound
3347do
3348 IFS=$as_save_IFS
3349 test -z "$as_dir" && as_dir=.
3350 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003351 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 +00003352 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003353 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003354 break 2
3355 fi
3356done
3357done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003358IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003359
3360 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3361 ;;
3362esac
3363fi
3364CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003365if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003366 { echo "$as_me:$LINENO: result: $CXX" >&5
3367echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003369 { echo "$as_me:$LINENO: result: no" >&5
3370echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003372
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003373 ;;
3374 esac
3375 if test "$CXX" = "notfound"
3376 then
3377 CXX=""
3378 fi
3379fi
3380if test -z "$CXX"
3381then
3382 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3383do
3384 # Extract the first word of "$ac_prog", so it can be a program name with args.
3385set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003386{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3387echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003388if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003389 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003390else
3391 if test -n "$CXX"; then
3392 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3393else
3394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3395for as_dir in $PATH
3396do
3397 IFS=$as_save_IFS
3398 test -z "$as_dir" && as_dir=.
3399 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003400 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 +00003401 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003402 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003403 break 2
3404 fi
3405done
3406done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003408
3409fi
3410fi
3411CXX=$ac_cv_prog_CXX
3412if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003413 { echo "$as_me:$LINENO: result: $CXX" >&5
3414echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003415else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003416 { echo "$as_me:$LINENO: result: no" >&5
3417echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003418fi
3419
Martin v. Löwiseba40652007-08-30 20:10:57 +00003420
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003421 test -n "$CXX" && break
3422done
3423test -n "$CXX" || CXX="notfound"
3424
3425 if test "$CXX" = "notfound"
3426 then
3427 CXX=""
3428 fi
3429fi
3430if test "$preset_cxx" != "$CXX"
3431then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003432 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003433
3434 By default, distutils will build C++ extension modules with \"$CXX\".
3435 If this is not intended, then set CXX on the configure command line.
3436 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003437echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003438
3439 By default, distutils will build C++ extension modules with \"$CXX\".
3440 If this is not intended, then set CXX on the configure command line.
3441 " >&2;}
3442fi
3443
3444
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003445# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003446
3447ac_ext=c
3448ac_cpp='$CPP $CPPFLAGS'
3449ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3450ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3451ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003452{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3453echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003454# On Suns, sometimes $CPP names a directory.
3455if test -n "$CPP" && test -d "$CPP"; then
3456 CPP=
3457fi
3458if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003460 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003461else
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 # Double quotes because CPP needs to be expanded
3463 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3464 do
3465 ac_preproc_ok=false
3466for ac_c_preproc_warn_flag in '' yes
3467do
3468 # Use a header file that comes with gcc, so configuring glibc
3469 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003470 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3471 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003472 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 # not just through cpp. "Syntax error" is here to catch this case.
3474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003475/* confdefs.h. */
3476_ACEOF
3477cat confdefs.h >>conftest.$ac_ext
3478cat >>conftest.$ac_ext <<_ACEOF
3479/* end confdefs.h. */
3480#ifdef __STDC__
3481# include <limits.h>
3482#else
3483# include <assert.h>
3484#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003485 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003486_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003487if { (ac_try="$ac_cpp conftest.$ac_ext"
3488case "(($ac_try" in
3489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3490 *) ac_try_echo=$ac_try;;
3491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003493 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003495 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 rm -f conftest.er1
3497 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003499 (exit $ac_status); } >/dev/null && {
3500 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3501 test ! -s conftest.err
3502 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003503 :
3504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003506sed 's/^/| /' conftest.$ac_ext >&5
3507
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 # Broken: fails on valid input.
3509continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003511
Martin v. Löwis11437992002-04-12 09:54:03 +00003512rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003513
Martin v. Löwiseba40652007-08-30 20:10:57 +00003514 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003515 # can be detected and how.
3516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003517/* confdefs.h. */
3518_ACEOF
3519cat confdefs.h >>conftest.$ac_ext
3520cat >>conftest.$ac_ext <<_ACEOF
3521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003522#include <ac_nonexistent.h>
3523_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003524if { (ac_try="$ac_cpp conftest.$ac_ext"
3525case "(($ac_try" in
3526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3527 *) ac_try_echo=$ac_try;;
3528esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003530 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003532 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003533 rm -f conftest.er1
3534 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003536 (exit $ac_status); } >/dev/null && {
3537 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3538 test ! -s conftest.err
3539 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 # Broken: success on invalid input.
3541continue
3542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003544sed 's/^/| /' conftest.$ac_ext >&5
3545
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 # Passes both tests.
3547ac_preproc_ok=:
3548break
3549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003550
Martin v. Löwis11437992002-04-12 09:54:03 +00003551rm -f conftest.err conftest.$ac_ext
3552
3553done
3554# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3555rm -f conftest.err conftest.$ac_ext
3556if $ac_preproc_ok; then
3557 break
3558fi
3559
3560 done
3561 ac_cv_prog_CPP=$CPP
3562
3563fi
3564 CPP=$ac_cv_prog_CPP
3565else
3566 ac_cv_prog_CPP=$CPP
3567fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003568{ echo "$as_me:$LINENO: result: $CPP" >&5
3569echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003570ac_preproc_ok=false
3571for ac_c_preproc_warn_flag in '' yes
3572do
3573 # Use a header file that comes with gcc, so configuring glibc
3574 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003575 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3576 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 # On the NeXT, cc -E runs the code through the compiler's parser,
3578 # not just through cpp. "Syntax error" is here to catch this case.
3579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003580/* confdefs.h. */
3581_ACEOF
3582cat confdefs.h >>conftest.$ac_ext
3583cat >>conftest.$ac_ext <<_ACEOF
3584/* end confdefs.h. */
3585#ifdef __STDC__
3586# include <limits.h>
3587#else
3588# include <assert.h>
3589#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003590 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003591_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592if { (ac_try="$ac_cpp conftest.$ac_ext"
3593case "(($ac_try" in
3594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3595 *) ac_try_echo=$ac_try;;
3596esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003598 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003600 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 rm -f conftest.er1
3602 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003604 (exit $ac_status); } >/dev/null && {
3605 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3606 test ! -s conftest.err
3607 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 :
3609else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003611sed 's/^/| /' conftest.$ac_ext >&5
3612
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 # Broken: fails on valid input.
3614continue
3615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003616
Martin v. Löwis11437992002-04-12 09:54:03 +00003617rm -f conftest.err conftest.$ac_ext
3618
Martin v. Löwiseba40652007-08-30 20:10:57 +00003619 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 # can be detected and how.
3621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003622/* confdefs.h. */
3623_ACEOF
3624cat confdefs.h >>conftest.$ac_ext
3625cat >>conftest.$ac_ext <<_ACEOF
3626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003627#include <ac_nonexistent.h>
3628_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003629if { (ac_try="$ac_cpp conftest.$ac_ext"
3630case "(($ac_try" in
3631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3632 *) ac_try_echo=$ac_try;;
3633esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003635 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003637 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 rm -f conftest.er1
3639 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003641 (exit $ac_status); } >/dev/null && {
3642 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3643 test ! -s conftest.err
3644 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 # Broken: success on invalid input.
3646continue
3647else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003649sed 's/^/| /' conftest.$ac_ext >&5
3650
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 # Passes both tests.
3652ac_preproc_ok=:
3653break
3654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003655
Martin v. Löwis11437992002-04-12 09:54:03 +00003656rm -f conftest.err conftest.$ac_ext
3657
3658done
3659# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3660rm -f conftest.err conftest.$ac_ext
3661if $ac_preproc_ok; then
3662 :
3663else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003664 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003665See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003666echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003667See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003668 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003669fi
3670
3671ac_ext=c
3672ac_cpp='$CPP $CPPFLAGS'
3673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3675ac_compiler_gnu=$ac_cv_c_compiler_gnu
3676
3677
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003678{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3679echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003680if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003681 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003682else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003683 # Extract the first word of "grep ggrep" to use in msg output
3684if test -z "$GREP"; then
3685set dummy grep ggrep; ac_prog_name=$2
3686if test "${ac_cv_path_GREP+set}" = set; then
3687 echo $ECHO_N "(cached) $ECHO_C" >&6
3688else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003689 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003690# Loop through the user's path and test for each of PROGNAME-LIST
3691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003692for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3693do
3694 IFS=$as_save_IFS
3695 test -z "$as_dir" && as_dir=.
3696 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003697 for ac_exec_ext in '' $ac_executable_extensions; do
3698 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3699 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3700 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003701 # Check for GNU $ac_path_GREP
3702case `"$ac_path_GREP" --version 2>&1` in
3703*GNU*)
3704 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3705*)
3706 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003707 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708 while :
3709 do
3710 cat "conftest.in" "conftest.in" >"conftest.tmp"
3711 mv "conftest.tmp" "conftest.in"
3712 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003713 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003714 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3715 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3716 ac_count=`expr $ac_count + 1`
3717 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3718 # Best one so far, save it but keep looking for a better one
3719 ac_cv_path_GREP="$ac_path_GREP"
3720 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003721 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003722 # 10*(2^10) chars as input seems more than enough
3723 test $ac_count -gt 10 && break
3724 done
3725 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3726esac
3727
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003728
3729 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003730 done
3731done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003732
3733done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003735
3736
3737fi
3738
3739GREP="$ac_cv_path_GREP"
3740if test -z "$GREP"; then
3741 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3742echo "$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 +00003743 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003744fi
3745
Martin v. Löwiseba40652007-08-30 20:10:57 +00003746else
3747 ac_cv_path_GREP=$GREP
3748fi
3749
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003750
Martin v. Löwiseba40652007-08-30 20:10:57 +00003751fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003752{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3753echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003754 GREP="$ac_cv_path_GREP"
3755
3756
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003757{ echo "$as_me:$LINENO: checking for egrep" >&5
3758echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003759if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003760 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003761else
3762 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3763 then ac_cv_path_EGREP="$GREP -E"
3764 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003765 # Extract the first word of "egrep" to use in msg output
3766if test -z "$EGREP"; then
3767set dummy egrep; ac_prog_name=$2
3768if test "${ac_cv_path_EGREP+set}" = set; then
3769 echo $ECHO_N "(cached) $ECHO_C" >&6
3770else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003771 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003772# Loop through the user's path and test for each of PROGNAME-LIST
3773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003774for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3775do
3776 IFS=$as_save_IFS
3777 test -z "$as_dir" && as_dir=.
3778 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003779 for ac_exec_ext in '' $ac_executable_extensions; do
3780 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3781 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3782 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783 # Check for GNU $ac_path_EGREP
3784case `"$ac_path_EGREP" --version 2>&1` in
3785*GNU*)
3786 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3787*)
3788 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003789 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790 while :
3791 do
3792 cat "conftest.in" "conftest.in" >"conftest.tmp"
3793 mv "conftest.tmp" "conftest.in"
3794 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003795 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003796 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3797 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3798 ac_count=`expr $ac_count + 1`
3799 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3800 # Best one so far, save it but keep looking for a better one
3801 ac_cv_path_EGREP="$ac_path_EGREP"
3802 ac_path_EGREP_max=$ac_count
3803 fi
3804 # 10*(2^10) chars as input seems more than enough
3805 test $ac_count -gt 10 && break
3806 done
3807 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3808esac
3809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003810
3811 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003812 done
3813done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003814
3815done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003816IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003817
3818
3819fi
3820
3821EGREP="$ac_cv_path_EGREP"
3822if test -z "$EGREP"; then
3823 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3824echo "$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 +00003825 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003826fi
3827
Martin v. Löwiseba40652007-08-30 20:10:57 +00003828else
3829 ac_cv_path_EGREP=$EGREP
3830fi
3831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003832
Martin v. Löwiseba40652007-08-30 20:10:57 +00003833 fi
3834fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003835{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3836echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003838
3839
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003840
3841{ echo "$as_me:$LINENO: checking for AIX" >&5
3842echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3843cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003844/* confdefs.h. */
3845_ACEOF
3846cat confdefs.h >>conftest.$ac_ext
3847cat >>conftest.$ac_ext <<_ACEOF
3848/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003849#ifdef _AIX
3850 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003851#endif
3852
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003853_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3855 $EGREP "yes" >/dev/null 2>&1; then
3856 { echo "$as_me:$LINENO: result: yes" >&5
3857echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003858cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003859#define _ALL_SOURCE 1
3860_ACEOF
3861
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003862else
3863 { echo "$as_me:$LINENO: result: no" >&5
3864echo "${ECHO_T}no" >&6; }
3865fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003866rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003867
3868
3869
3870# Check for unsupported systems
3871case $ac_sys_system/$ac_sys_release in
3872atheos*|Linux*/1*)
3873 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3874 echo See README for details.
3875 exit 1;;
3876esac
3877
3878
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003879{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3880echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003881
3882# Check whether --with-suffix was given.
3883if test "${with_suffix+set}" = set; then
3884 withval=$with_suffix;
3885 case $withval in
3886 no) EXEEXT=;;
3887 yes) EXEEXT=.exe;;
3888 *) EXEEXT=$withval;;
3889 esac
3890fi
3891
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003892{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3893echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003894
3895# Test whether we're running on a non-case-sensitive system, in which
3896# case we give a warning if no ext is given
3897
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003898{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3899echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003900if test ! -d CaseSensitiveTestDir; then
3901mkdir CaseSensitiveTestDir
3902fi
3903
3904if test -d casesensitivetestdir
3905then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003906 { echo "$as_me:$LINENO: result: yes" >&5
3907echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003908 BUILDEXEEXT=.exe
3909else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003910 { echo "$as_me:$LINENO: result: no" >&5
3911echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003912 BUILDEXEEXT=$EXEEXT
3913fi
3914rmdir CaseSensitiveTestDir
3915
3916case $MACHDEP in
3917bsdos*)
3918 case $CC in
3919 gcc) CC="$CC -D_HAVE_BSDI";;
3920 esac;;
3921esac
3922
3923case $ac_sys_system in
3924hp*|HP*)
3925 case $CC in
3926 cc|*/cc) CC="$CC -Ae";;
3927 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003928SunOS*)
3929 # Some functions have a prototype only with that define, e.g. confstr
3930
3931cat >>confdefs.h <<\_ACEOF
3932#define __EXTENSIONS__ 1
3933_ACEOF
3934
3935 ;;
3936esac
3937
3938
3939
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003940{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3941echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003942if test -z "$LIBRARY"
3943then
3944 LIBRARY='libpython$(VERSION).a'
3945fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003946{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3947echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003948
3949# LDLIBRARY is the name of the library to link against (as opposed to the
3950# name of the library into which to insert object files). BLDLIBRARY is also
3951# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3952# is blank as the main program is not linked directly against LDLIBRARY.
3953# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3954# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3955# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3956# DLLLIBRARY is the shared (i.e., DLL) library.
3957#
3958# RUNSHARED is used to run shared python without installed libraries
3959#
3960# INSTSONAME is the name of the shared library that will be use to install
3961# on the system - some systems like version suffix, others don't
3962
3963
3964
3965
3966
3967
3968LDLIBRARY="$LIBRARY"
3969BLDLIBRARY='$(LDLIBRARY)'
3970INSTSONAME='$(LDLIBRARY)'
3971DLLLIBRARY=''
3972LDLIBRARYDIR=''
3973RUNSHARED=''
3974
3975# LINKCC is the command that links the python executable -- default is $(CC).
3976# If CXX is set, and if it is needed to link a main function that was
3977# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3978# python might then depend on the C++ runtime
3979# This is altered for AIX in order to build the export list before
3980# linking.
3981
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003982{ echo "$as_me:$LINENO: checking LINKCC" >&5
3983echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003984if test -z "$LINKCC"
3985then
3986 LINKCC='$(PURIFY) $(MAINCC)'
3987 case $ac_sys_system in
3988 AIX*)
3989 exp_extra="\"\""
3990 if test $ac_sys_release -ge 5 -o \
3991 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3992 exp_extra="."
3993 fi
3994 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003995 QNX*)
3996 # qcc must be used because the other compilers do not
3997 # support -N.
3998 LINKCC=qcc;;
3999 esac
4000fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004001{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4002echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004003
4004# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4005# make sure we default having it set to "no": this is used by
4006# distutils.unixccompiler to know if it should add --enable-new-dtags
4007# to linker command lines, and failing to detect GNU ld simply results
4008# in the same bahaviour as before.
4009
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004010{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4011echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004012ac_prog=ld
4013if test "$GCC" = yes; then
4014 ac_prog=`$CC -print-prog-name=ld`
4015fi
4016case `"$ac_prog" -V 2>&1 < /dev/null` in
4017 *GNU*)
4018 GNULD=yes;;
4019 *)
4020 GNULD=no;;
4021esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004022{ echo "$as_me:$LINENO: result: $GNULD" >&5
4023echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004024
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004025{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4026echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004027# Check whether --enable-shared was given.
4028if test "${enable_shared+set}" = set; then
4029 enableval=$enable_shared;
4030fi
4031
4032
4033if test -z "$enable_shared"
4034then
4035 case $ac_sys_system in
4036 CYGWIN* | atheos*)
4037 enable_shared="yes";;
4038 *)
4039 enable_shared="no";;
4040 esac
4041fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004042{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4043echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004044
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004045{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4046echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004047# Check whether --enable-profiling was given.
4048if test "${enable_profiling+set}" = set; then
4049 enableval=$enable_profiling; ac_save_cc="$CC"
4050 CC="$CC -pg"
4051 if test "$cross_compiling" = yes; then
4052 ac_enable_profiling="no"
4053else
4054 cat >conftest.$ac_ext <<_ACEOF
4055/* confdefs.h. */
4056_ACEOF
4057cat confdefs.h >>conftest.$ac_ext
4058cat >>conftest.$ac_ext <<_ACEOF
4059/* end confdefs.h. */
4060int main() { return 0; }
4061_ACEOF
4062rm -f conftest$ac_exeext
4063if { (ac_try="$ac_link"
4064case "(($ac_try" in
4065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4066 *) ac_try_echo=$ac_try;;
4067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004069 (eval "$ac_link") 2>&5
4070 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4073 { (case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004078 (eval "$ac_try") 2>&5
4079 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004081 (exit $ac_status); }; }; then
4082 ac_enable_profiling="yes"
4083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004084 echo "$as_me: program exited with status $ac_status" >&5
4085echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004086sed 's/^/| /' conftest.$ac_ext >&5
4087
4088( exit $ac_status )
4089ac_enable_profiling="no"
4090fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4092fi
4093
4094
4095 CC="$ac_save_cc"
4096fi
4097
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004098{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4099echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004100
4101case "$ac_enable_profiling" in
4102 "yes")
4103 BASECFLAGS="-pg $BASECFLAGS"
4104 LDFLAGS="-pg $LDFLAGS"
4105 ;;
4106esac
4107
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004108{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4109echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004110
4111# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4112# library that we build, but we do not want to link against it (we
4113# will find it with a -framework option). For this reason there is an
4114# extra variable BLDLIBRARY against which Python and the extension
4115# modules are linked, BLDLIBRARY. This is normally the same as
4116# LDLIBRARY, but empty for MacOSX framework builds.
4117if test "$enable_framework"
4118then
4119 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4120 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4121 BLDLIBRARY=''
4122else
4123 BLDLIBRARY='$(LDLIBRARY)'
4124fi
4125
4126# Other platforms follow
4127if test $enable_shared = "yes"; then
4128
4129cat >>confdefs.h <<\_ACEOF
4130#define Py_ENABLE_SHARED 1
4131_ACEOF
4132
4133 case $ac_sys_system in
4134 BeOS*)
4135 LDLIBRARY='libpython$(VERSION).so'
4136 ;;
4137 CYGWIN*)
4138 LDLIBRARY='libpython$(VERSION).dll.a'
4139 DLLLIBRARY='libpython$(VERSION).dll'
4140 ;;
4141 SunOS*)
4142 LDLIBRARY='libpython$(VERSION).so'
4143 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4144 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4145 INSTSONAME="$LDLIBRARY".$SOVERSION
4146 ;;
4147 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4148 LDLIBRARY='libpython$(VERSION).so'
4149 BLDLIBRARY='-L. -lpython$(VERSION)'
4150 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4151 case $ac_sys_system in
4152 FreeBSD*)
4153 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4154 ;;
4155 esac
4156 INSTSONAME="$LDLIBRARY".$SOVERSION
4157 ;;
4158 hp*|HP*)
4159 case `uname -m` in
4160 ia64)
4161 LDLIBRARY='libpython$(VERSION).so'
4162 ;;
4163 *)
4164 LDLIBRARY='libpython$(VERSION).sl'
4165 ;;
4166 esac
4167 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4168 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4169 ;;
4170 OSF*)
4171 LDLIBRARY='libpython$(VERSION).so'
4172 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4173 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4174 ;;
4175 atheos*)
4176 LDLIBRARY='libpython$(VERSION).so'
4177 BLDLIBRARY='-L. -lpython$(VERSION)'
4178 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4179 ;;
4180 Darwin*)
4181 LDLIBRARY='libpython$(VERSION).dylib'
4182 BLDLIBRARY='-L. -lpython$(VERSION)'
4183 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4184 ;;
4185
4186 esac
4187else # shared is disabled
4188 case $ac_sys_system in
4189 CYGWIN*)
4190 BLDLIBRARY='$(LIBRARY)'
4191 LDLIBRARY='libpython$(VERSION).dll.a'
4192 ;;
4193 esac
4194fi
4195
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004196{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4197echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004198
4199if test -n "$ac_tool_prefix"; then
4200 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4201set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004202{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4203echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004204if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004205 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004206else
4207 if test -n "$RANLIB"; then
4208 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4209else
4210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4211for as_dir in $PATH
4212do
4213 IFS=$as_save_IFS
4214 test -z "$as_dir" && as_dir=.
4215 for ac_exec_ext in '' $ac_executable_extensions; do
4216 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4217 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004218 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004219 break 2
4220 fi
4221done
4222done
4223IFS=$as_save_IFS
4224
4225fi
4226fi
4227RANLIB=$ac_cv_prog_RANLIB
4228if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004229 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4230echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004231else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004232 { echo "$as_me:$LINENO: result: no" >&5
4233echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004234fi
4235
4236
4237fi
4238if test -z "$ac_cv_prog_RANLIB"; then
4239 ac_ct_RANLIB=$RANLIB
4240 # Extract the first word of "ranlib", so it can be a program name with args.
4241set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004242{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4243echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004244if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004245 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004246else
4247 if test -n "$ac_ct_RANLIB"; then
4248 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4249else
4250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4251for as_dir in $PATH
4252do
4253 IFS=$as_save_IFS
4254 test -z "$as_dir" && as_dir=.
4255 for ac_exec_ext in '' $ac_executable_extensions; do
4256 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4257 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004258 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004259 break 2
4260 fi
4261done
4262done
4263IFS=$as_save_IFS
4264
4265fi
4266fi
4267ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4268if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004269 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4270echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004271else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004272 { echo "$as_me:$LINENO: result: no" >&5
4273echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004274fi
4275
4276 if test "x$ac_ct_RANLIB" = x; then
4277 RANLIB=":"
4278 else
4279 case $cross_compiling:$ac_tool_warned in
4280yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004281{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4282whose name does not start with the host triplet. If you think this
4283configuration is useful to you, please write to autoconf@gnu.org." >&5
4284echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4285whose name does not start with the host triplet. If you think this
4286configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004287ac_tool_warned=yes ;;
4288esac
4289 RANLIB=$ac_ct_RANLIB
4290 fi
4291else
4292 RANLIB="$ac_cv_prog_RANLIB"
4293fi
4294
4295
4296for ac_prog in ar aal
4297do
4298 # Extract the first word of "$ac_prog", so it can be a program name with args.
4299set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004300{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4301echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004302if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004303 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004304else
4305 if test -n "$AR"; then
4306 ac_cv_prog_AR="$AR" # Let the user override the test.
4307else
4308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4309for as_dir in $PATH
4310do
4311 IFS=$as_save_IFS
4312 test -z "$as_dir" && as_dir=.
4313 for ac_exec_ext in '' $ac_executable_extensions; do
4314 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4315 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004316 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004317 break 2
4318 fi
4319done
4320done
4321IFS=$as_save_IFS
4322
4323fi
4324fi
4325AR=$ac_cv_prog_AR
4326if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004327 { echo "$as_me:$LINENO: result: $AR" >&5
4328echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004330 { echo "$as_me:$LINENO: result: no" >&5
4331echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004332fi
4333
4334
4335 test -n "$AR" && break
4336done
4337test -n "$AR" || AR="ar"
4338
4339
4340# tweak ARFLAGS only if the user didn't set it on the command line
4341
4342if test -z "$ARFLAGS"
4343then
4344 ARFLAGS="rc"
4345fi
4346
4347
4348# Extract the first word of "svnversion", so it can be a program name with args.
4349set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004350{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4351echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004352if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004353 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004354else
4355 if test -n "$SVNVERSION"; then
4356 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4357else
4358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4359for as_dir in $PATH
4360do
4361 IFS=$as_save_IFS
4362 test -z "$as_dir" && as_dir=.
4363 for ac_exec_ext in '' $ac_executable_extensions; do
4364 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4365 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004366 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004367 break 2
4368 fi
4369done
4370done
4371IFS=$as_save_IFS
4372
4373 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4374fi
4375fi
4376SVNVERSION=$ac_cv_prog_SVNVERSION
4377if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004378 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4379echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004380else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004381 { echo "$as_me:$LINENO: result: no" >&5
4382echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004383fi
4384
4385
4386if test $SVNVERSION = found
4387then
4388 SVNVERSION="svnversion \$(srcdir)"
4389else
4390 SVNVERSION="echo Unversioned directory"
4391fi
4392
4393case $MACHDEP in
4394bsdos*|hp*|HP*)
4395 # install -d does not work on BSDI or HP-UX
4396 if test -z "$INSTALL"
4397 then
4398 INSTALL="${srcdir}/install-sh -c"
4399 fi
4400esac
4401ac_aux_dir=
4402for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4403 if test -f "$ac_dir/install-sh"; then
4404 ac_aux_dir=$ac_dir
4405 ac_install_sh="$ac_aux_dir/install-sh -c"
4406 break
4407 elif test -f "$ac_dir/install.sh"; then
4408 ac_aux_dir=$ac_dir
4409 ac_install_sh="$ac_aux_dir/install.sh -c"
4410 break
4411 elif test -f "$ac_dir/shtool"; then
4412 ac_aux_dir=$ac_dir
4413 ac_install_sh="$ac_aux_dir/shtool install -c"
4414 break
4415 fi
4416done
4417if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004418 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4419echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004420 { (exit 1); exit 1; }; }
4421fi
4422
4423# These three variables are undocumented and unsupported,
4424# and are intended to be withdrawn in a future Autoconf release.
4425# They can cause serious problems if a builder's source tree is in a directory
4426# whose full name contains unusual characters.
4427ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4428ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4429ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4430
4431
4432# Find a good install program. We prefer a C program (faster),
4433# so one script is as good as another. But avoid the broken or
4434# incompatible versions:
4435# SysV /etc/install, /usr/sbin/install
4436# SunOS /usr/etc/install
4437# IRIX /sbin/install
4438# AIX /bin/install
4439# AmigaOS /C/install, which installs bootblocks on floppy discs
4440# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4441# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4442# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4443# OS/2's system install, which has a completely different semantic
4444# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004445{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4446echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004447if test -z "$INSTALL"; then
4448if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004449 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004450else
4451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4452for as_dir in $PATH
4453do
4454 IFS=$as_save_IFS
4455 test -z "$as_dir" && as_dir=.
4456 # Account for people who put trailing slashes in PATH elements.
4457case $as_dir/ in
4458 ./ | .// | /cC/* | \
4459 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4460 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4461 /usr/ucb/* ) ;;
4462 *)
4463 # OSF1 and SCO ODT 3.0 have their own names for install.
4464 # Don't use installbsd from OSF since it installs stuff as root
4465 # by default.
4466 for ac_prog in ginstall scoinst install; do
4467 for ac_exec_ext in '' $ac_executable_extensions; do
4468 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4469 if test $ac_prog = install &&
4470 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4471 # AIX install. It has an incompatible calling convention.
4472 :
4473 elif test $ac_prog = install &&
4474 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4475 # program-specific install script used by HP pwplus--don't use.
4476 :
4477 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004478 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4479 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004480 fi
4481 fi
4482 done
4483 done
4484 ;;
4485esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004486done
4487IFS=$as_save_IFS
4488
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004489
4490fi
4491 if test "${ac_cv_path_install+set}" = set; then
4492 INSTALL=$ac_cv_path_install
4493 else
4494 # As a last resort, use the slow shell script. Don't cache a
4495 # value for INSTALL within a source directory, because that will
4496 # break other packages using the cache if that directory is
4497 # removed, or if the value is a relative name.
4498 INSTALL=$ac_install_sh
4499 fi
4500fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004501{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4502echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004503
4504# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4505# It thinks the first close brace ends the variable substitution.
4506test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4507
4508test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4509
4510test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4511
4512
4513# Not every filesystem supports hard links
4514
4515if test -z "$LN" ; then
4516 case $ac_sys_system in
4517 BeOS*) LN="ln -s";;
4518 CYGWIN*) LN="ln -s";;
4519 atheos*) LN="ln -s";;
4520 *) LN=ln;;
4521 esac
4522fi
4523
4524# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004525{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4526echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004527
4528# Check whether --with-pydebug was given.
4529if test "${with_pydebug+set}" = set; then
4530 withval=$with_pydebug;
4531if test "$withval" != no
4532then
4533
4534cat >>confdefs.h <<\_ACEOF
4535#define Py_DEBUG 1
4536_ACEOF
4537
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004538 { echo "$as_me:$LINENO: result: yes" >&5
4539echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004540 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004541else { echo "$as_me:$LINENO: result: no" >&5
4542echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004543fi
4544else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004545 { echo "$as_me:$LINENO: result: no" >&5
4546echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004547fi
4548
4549
4550# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4551# merged with this chunk of code?
4552
4553# Optimizer/debugger flags
4554# ------------------------
4555# (The following bit of code is complicated enough - please keep things
4556# indented properly. Just pretend you're editing Python code. ;-)
4557
4558# There are two parallel sets of case statements below, one that checks to
4559# see if OPT was set and one that does BASECFLAGS setting based upon
4560# compiler and platform. BASECFLAGS tweaks need to be made even if the
4561# user set OPT.
4562
4563# tweak OPT based on compiler and platform, only if the user didn't set
4564# it on the command line
4565
4566if test -z "$OPT"
4567then
4568 case $GCC in
4569 yes)
4570 if test "$CC" != 'g++' ; then
4571 STRICT_PROTO="-Wstrict-prototypes"
4572 fi
4573 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4574 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4575 WRAP="-fwrapv"
4576 fi
4577 case $ac_cv_prog_cc_g in
4578 yes)
4579 if test "$Py_DEBUG" = 'true' ; then
4580 # Optimization messes up debuggers, so turn it off for
4581 # debug builds.
4582 OPT="-g -Wall $STRICT_PROTO"
4583 else
4584 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4585 fi
4586 ;;
4587 *)
4588 OPT="-O3 -Wall $STRICT_PROTO"
4589 ;;
4590 esac
4591 case $ac_sys_system in
4592 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4593 ;;
4594 esac
4595 ;;
4596
4597 *)
4598 OPT="-O"
4599 ;;
4600 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004601fi
4602
4603
4604
4605# The -arch flags for universal builds on OSX
4606UNIVERSAL_ARCH_FLAGS=
4607
4608
4609# tweak BASECFLAGS based on compiler and platform
4610case $GCC in
4611yes)
4612 # Python violates C99 rules, by casting between incompatible
4613 # pointer types. GCC may generate bad code as a result of that,
4614 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004615 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4616echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004617 ac_save_cc="$CC"
4618 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004619 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4620 echo $ECHO_N "(cached) $ECHO_C" >&6
4621else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004622 cat >conftest.$ac_ext <<_ACEOF
4623/* confdefs.h. */
4624_ACEOF
4625cat confdefs.h >>conftest.$ac_ext
4626cat >>conftest.$ac_ext <<_ACEOF
4627/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004628
4629int
4630main ()
4631{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004632int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004633 ;
4634 return 0;
4635}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004636_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004637rm -f conftest.$ac_objext
4638if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004639case "(($ac_try" in
4640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4641 *) ac_try_echo=$ac_try;;
4642esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004644 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004645 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004646 grep -v '^ *+' conftest.er1 >conftest.err
4647 rm -f conftest.er1
4648 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004650 (exit $ac_status); } && {
4651 test -z "$ac_c_werror_flag" ||
4652 test ! -s conftest.err
4653 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004654 ac_cv_no_strict_aliasing_ok=yes
4655else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004656 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004657sed 's/^/| /' conftest.$ac_ext >&5
4658
Gregory P. Smith373469a2009-11-01 21:03:38 +00004659 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004660fi
4661
Gregory P. Smith373469a2009-11-01 21:03:38 +00004662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004663fi
4664
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004665 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004666 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4667echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004668 if test $ac_cv_no_strict_aliasing_ok = yes
4669 then
4670 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4671 fi
4672
4673 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4674 # support. Without this, treatment of subnormals doesn't follow
4675 # the standard.
4676 case $ac_sys_machine in
4677 alpha*)
4678 BASECFLAGS="$BASECFLAGS -mieee"
4679 ;;
4680 esac
4681
4682 case $ac_sys_system in
4683 SCO_SV*)
4684 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4685 ;;
4686 # is there any other compiler on Darwin besides gcc?
4687 Darwin*)
4688 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4689 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004690 if test "${CC}" = gcc
4691 then
4692 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4693echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4694 case "${UNIVERSALSDK}" in
4695 */MacOSX10.4u.sdk)
4696 # Build using 10.4 SDK, force usage of gcc when the
4697 # compiler is gcc, otherwise the user will get very
4698 # confusing error messages when building on OSX 10.6
4699 CC=gcc-4.0
4700 CPP=cpp-4.0
4701 ;;
4702 esac
4703 { echo "$as_me:$LINENO: result: $CC" >&5
4704echo "${ECHO_T}$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004705 fi
4706
4707 # Calculate the right deployment target for this build.
4708 #
4709 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4710 if test ${cur_target} '>' 10.2; then
4711 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004712 if test ${enable_universalsdk}; then
4713 if test "${UNIVERSAL_ARCHS}" = "all"; then
4714 # Ensure that the default platform for a
4715 # 4-way universal build is OSX 10.5,
4716 # that's the first OS release where
4717 # 4-way builds make sense.
4718 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004719
4720 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4721 cur_target='10.5'
4722
4723 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4724 cur_target='10.5'
4725
4726 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4727 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004728 fi
4729 else
4730 if test `arch` = "i386"; then
4731 # On Intel macs default to a deployment
4732 # target of 10.4, that's the first OSX
4733 # release with Intel support.
4734 cur_target="10.4"
4735 fi
4736 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004737 fi
4738 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4739
4740 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4741 # environment with a value that is the same as what we'll use
4742 # in the Makefile to ensure that we'll get the same compiler
4743 # environment during configure and build time.
4744 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4745 export MACOSX_DEPLOYMENT_TARGET
4746 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4747
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004748 if test "${enable_universalsdk}"; then
4749 UNIVERSAL_ARCH_FLAGS=""
4750 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4751 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4752 ARCH_RUN_32BIT=""
4753 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4754
4755
4756 # You have to use different flags on various versions of
4757 # OSX to extract PPC code from an universal binary, basically
4758 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4759 # newer.
4760 # Because '-arch pp7400' works on OSX 10.5 or higher this
4761 # test is only present in the '32-bit' branch, all other
4762 # branches require OSX 10.5 to compile.
4763
4764 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4765echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4766 FN="test.$$"
4767 cat >${FN}.c <<-EOF
4768 int main() { return 0; }
4769EOF
4770 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4771 if test $? != 0 ; then
4772 rm ${FN} ${FN}.c
4773 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4774echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4775 else
4776 lipo -extract -output "${FN}.out" -arch ppc7400 "${FN}" 2>/dev/null
4777 if test $? != 0 ; then
4778 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4779 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4780echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4781 else
4782 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4783echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4784 fi
4785 rm -f ${FN} ${FN}.c ${FN}.out
4786 fi
4787
4788 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4789 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4790 LIPO_32BIT_FLAGS=""
4791 ARCH_RUN_32BIT="true"
4792
4793 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4794 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4795 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4796 ARCH_RUN_32BIT="arch -i386 -ppc"
4797
4798 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4799 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4800 LIPO_32BIT_FLAGS="-extract i386"
4801 ARCH_RUN_32BIT="arch -i386"
4802
4803 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4804 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4805 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4806 ARCH_RUN_32BIT="arch -i386 -ppc7400"
4807
4808 else
4809 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4810echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
4811 { (exit 1); exit 1; }; }
4812
4813 fi
4814
4815
4816 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4817 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4818 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4819 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4820 CPPFLAGS="-isysroot ${UNIVERSALSDK}"
4821 fi
4822
4823 fi
4824
4825
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004826 ;;
4827 OSF*)
4828 BASECFLAGS="$BASECFLAGS -mieee"
4829 ;;
4830 esac
4831 ;;
4832
4833*)
4834 case $ac_sys_system in
4835 OpenUNIX*|UnixWare*)
4836 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4837 ;;
4838 OSF*)
4839 BASECFLAGS="$BASECFLAGS -ieee -std"
4840 ;;
4841 SCO_SV*)
4842 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4843 ;;
4844 esac
4845 ;;
4846esac
4847
4848if test "$Py_DEBUG" = 'true'; then
4849 :
4850else
4851 OPT="-DNDEBUG $OPT"
4852fi
4853
4854if test "$ac_arch_flags"
4855then
4856 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4857fi
4858
4859# disable check for icc since it seems to pass, but generates a warning
4860if test "$CC" = icc
4861then
4862 ac_cv_opt_olimit_ok=no
4863fi
4864
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004865{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4866echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004867if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004868 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004869else
4870 ac_save_cc="$CC"
4871CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004872cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004873/* confdefs.h. */
4874_ACEOF
4875cat confdefs.h >>conftest.$ac_ext
4876cat >>conftest.$ac_ext <<_ACEOF
4877/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004878
4879int
4880main ()
4881{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004882int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004883 ;
4884 return 0;
4885}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004886_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004887rm -f conftest.$ac_objext
4888if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004889case "(($ac_try" in
4890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4891 *) ac_try_echo=$ac_try;;
4892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004894 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004895 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004896 grep -v '^ *+' conftest.er1 >conftest.err
4897 rm -f conftest.er1
4898 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004900 (exit $ac_status); } && {
4901 test -z "$ac_c_werror_flag" ||
4902 test ! -s conftest.err
4903 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004904 ac_cv_opt_olimit_ok=yes
4905else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004906 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004907sed 's/^/| /' conftest.$ac_ext >&5
4908
Gregory P. Smith373469a2009-11-01 21:03:38 +00004909 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004910fi
4911
Gregory P. Smith373469a2009-11-01 21:03:38 +00004912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004913CC="$ac_save_cc"
4914fi
4915
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004916{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4917echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004918if test $ac_cv_opt_olimit_ok = yes; then
4919 case $ac_sys_system in
4920 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4921 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4922 # environment?
4923 Darwin*)
4924 ;;
4925 *)
4926 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4927 ;;
4928 esac
4929else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004930 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4931echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004932 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004933 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004934else
4935 ac_save_cc="$CC"
4936 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004937 cat >conftest.$ac_ext <<_ACEOF
4938/* confdefs.h. */
4939_ACEOF
4940cat confdefs.h >>conftest.$ac_ext
4941cat >>conftest.$ac_ext <<_ACEOF
4942/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004943
4944int
4945main ()
4946{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004947int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004948 ;
4949 return 0;
4950}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004951_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004952rm -f conftest.$ac_objext
4953if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004954case "(($ac_try" in
4955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4956 *) ac_try_echo=$ac_try;;
4957esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004959 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004960 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004961 grep -v '^ *+' conftest.er1 >conftest.err
4962 rm -f conftest.er1
4963 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004965 (exit $ac_status); } && {
4966 test -z "$ac_c_werror_flag" ||
4967 test ! -s conftest.err
4968 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004969 ac_cv_olimit_ok=yes
4970else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004971 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004972sed 's/^/| /' conftest.$ac_ext >&5
4973
Gregory P. Smith373469a2009-11-01 21:03:38 +00004974 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004975fi
4976
Gregory P. Smith373469a2009-11-01 21:03:38 +00004977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004978 CC="$ac_save_cc"
4979fi
4980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004981 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4982echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004983 if test $ac_cv_olimit_ok = yes; then
4984 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4985 fi
4986fi
4987
4988# Check whether GCC supports PyArg_ParseTuple format
4989if test "$GCC" = "yes"
4990then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004991 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4992echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004993 save_CFLAGS=$CFLAGS
4994 CFLAGS="$CFLAGS -Werror"
4995 cat >conftest.$ac_ext <<_ACEOF
4996/* confdefs.h. */
4997_ACEOF
4998cat confdefs.h >>conftest.$ac_ext
4999cat >>conftest.$ac_ext <<_ACEOF
5000/* end confdefs.h. */
5001
5002 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5003
5004int
5005main ()
5006{
5007
5008 ;
5009 return 0;
5010}
5011_ACEOF
5012rm -f conftest.$ac_objext
5013if { (ac_try="$ac_compile"
5014case "(($ac_try" in
5015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5016 *) ac_try_echo=$ac_try;;
5017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005019 (eval "$ac_compile") 2>conftest.er1
5020 ac_status=$?
5021 grep -v '^ *+' conftest.er1 >conftest.err
5022 rm -f conftest.er1
5023 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005025 (exit $ac_status); } && {
5026 test -z "$ac_c_werror_flag" ||
5027 test ! -s conftest.err
5028 } && test -s conftest.$ac_objext; then
5029
5030cat >>confdefs.h <<\_ACEOF
5031#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5032_ACEOF
5033
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005034 { echo "$as_me:$LINENO: result: yes" >&5
5035echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005036else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005037 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005038sed 's/^/| /' conftest.$ac_ext >&5
5039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005040 { echo "$as_me:$LINENO: result: no" >&5
5041echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005042
5043fi
5044
5045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5046 CFLAGS=$save_CFLAGS
5047fi
5048
5049# On some compilers, pthreads are available without further options
5050# (e.g. MacOS X). On some of these systems, the compiler will not
5051# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5052# So we have to see first whether pthreads are available without
5053# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005054{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5055echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005056if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005057 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005058else
5059 if test "$cross_compiling" = yes; then
5060 ac_cv_pthread_is_default=no
5061else
5062 cat >conftest.$ac_ext <<_ACEOF
5063/* confdefs.h. */
5064_ACEOF
5065cat confdefs.h >>conftest.$ac_ext
5066cat >>conftest.$ac_ext <<_ACEOF
5067/* end confdefs.h. */
5068
5069#include <pthread.h>
5070
5071void* routine(void* p){return NULL;}
5072
5073int main(){
5074 pthread_t p;
5075 if(pthread_create(&p,NULL,routine,NULL)!=0)
5076 return 1;
5077 (void)pthread_detach(p);
5078 return 0;
5079}
5080
5081_ACEOF
5082rm -f conftest$ac_exeext
5083if { (ac_try="$ac_link"
5084case "(($ac_try" in
5085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5086 *) ac_try_echo=$ac_try;;
5087esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005089 (eval "$ac_link") 2>&5
5090 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005092 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5093 { (case "(($ac_try" in
5094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5095 *) ac_try_echo=$ac_try;;
5096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005098 (eval "$ac_try") 2>&5
5099 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005101 (exit $ac_status); }; }; then
5102
5103 ac_cv_pthread_is_default=yes
5104 ac_cv_kthread=no
5105 ac_cv_pthread=no
5106
5107else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005108 echo "$as_me: program exited with status $ac_status" >&5
5109echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005110sed 's/^/| /' conftest.$ac_ext >&5
5111
5112( exit $ac_status )
5113ac_cv_pthread_is_default=no
5114fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5116fi
5117
5118
5119
5120fi
5121
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005122{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5123echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005124
5125
5126if test $ac_cv_pthread_is_default = yes
5127then
5128 ac_cv_kpthread=no
5129else
5130# -Kpthread, if available, provides the right #defines
5131# and linker options to make pthread_create available
5132# Some compilers won't report that they do not support -Kpthread,
5133# so we need to run a program to see whether it really made the
5134# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005135{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5136echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005137if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005138 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005139else
5140 ac_save_cc="$CC"
5141CC="$CC -Kpthread"
5142if test "$cross_compiling" = yes; then
5143 ac_cv_kpthread=no
5144else
5145 cat >conftest.$ac_ext <<_ACEOF
5146/* confdefs.h. */
5147_ACEOF
5148cat confdefs.h >>conftest.$ac_ext
5149cat >>conftest.$ac_ext <<_ACEOF
5150/* end confdefs.h. */
5151
5152#include <pthread.h>
5153
5154void* routine(void* p){return NULL;}
5155
5156int main(){
5157 pthread_t p;
5158 if(pthread_create(&p,NULL,routine,NULL)!=0)
5159 return 1;
5160 (void)pthread_detach(p);
5161 return 0;
5162}
5163
5164_ACEOF
5165rm -f conftest$ac_exeext
5166if { (ac_try="$ac_link"
5167case "(($ac_try" in
5168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5169 *) ac_try_echo=$ac_try;;
5170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005172 (eval "$ac_link") 2>&5
5173 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005175 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5176 { (case "(($ac_try" in
5177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5178 *) ac_try_echo=$ac_try;;
5179esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005181 (eval "$ac_try") 2>&5
5182 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005184 (exit $ac_status); }; }; then
5185 ac_cv_kpthread=yes
5186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005187 echo "$as_me: program exited with status $ac_status" >&5
5188echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005189sed 's/^/| /' conftest.$ac_ext >&5
5190
5191( exit $ac_status )
5192ac_cv_kpthread=no
5193fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5195fi
5196
5197
5198CC="$ac_save_cc"
5199fi
5200
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005201{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5202echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005203fi
5204
5205if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5206then
5207# -Kthread, if available, provides the right #defines
5208# and linker options to make pthread_create available
5209# Some compilers won't report that they do not support -Kthread,
5210# so we need to run a program to see whether it really made the
5211# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005212{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5213echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005214if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005215 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005216else
5217 ac_save_cc="$CC"
5218CC="$CC -Kthread"
5219if test "$cross_compiling" = yes; then
5220 ac_cv_kthread=no
5221else
5222 cat >conftest.$ac_ext <<_ACEOF
5223/* confdefs.h. */
5224_ACEOF
5225cat confdefs.h >>conftest.$ac_ext
5226cat >>conftest.$ac_ext <<_ACEOF
5227/* end confdefs.h. */
5228
5229#include <pthread.h>
5230
5231void* routine(void* p){return NULL;}
5232
5233int main(){
5234 pthread_t p;
5235 if(pthread_create(&p,NULL,routine,NULL)!=0)
5236 return 1;
5237 (void)pthread_detach(p);
5238 return 0;
5239}
5240
5241_ACEOF
5242rm -f conftest$ac_exeext
5243if { (ac_try="$ac_link"
5244case "(($ac_try" in
5245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5246 *) ac_try_echo=$ac_try;;
5247esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005249 (eval "$ac_link") 2>&5
5250 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005252 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5253 { (case "(($ac_try" in
5254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5255 *) ac_try_echo=$ac_try;;
5256esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005258 (eval "$ac_try") 2>&5
5259 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005261 (exit $ac_status); }; }; then
5262 ac_cv_kthread=yes
5263else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005264 echo "$as_me: program exited with status $ac_status" >&5
5265echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005266sed 's/^/| /' conftest.$ac_ext >&5
5267
5268( exit $ac_status )
5269ac_cv_kthread=no
5270fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5272fi
5273
5274
5275CC="$ac_save_cc"
5276fi
5277
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005278{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5279echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005280fi
5281
5282if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5283then
5284# -pthread, if available, provides the right #defines
5285# and linker options to make pthread_create available
5286# Some compilers won't report that they do not support -pthread,
5287# so we need to run a program to see whether it really made the
5288# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005289{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5290echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005291if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005292 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005293else
5294 ac_save_cc="$CC"
5295CC="$CC -pthread"
5296if test "$cross_compiling" = yes; then
5297 ac_cv_pthread=no
5298else
5299 cat >conftest.$ac_ext <<_ACEOF
5300/* confdefs.h. */
5301_ACEOF
5302cat confdefs.h >>conftest.$ac_ext
5303cat >>conftest.$ac_ext <<_ACEOF
5304/* end confdefs.h. */
5305
5306#include <pthread.h>
5307
5308void* routine(void* p){return NULL;}
5309
5310int main(){
5311 pthread_t p;
5312 if(pthread_create(&p,NULL,routine,NULL)!=0)
5313 return 1;
5314 (void)pthread_detach(p);
5315 return 0;
5316}
5317
5318_ACEOF
5319rm -f conftest$ac_exeext
5320if { (ac_try="$ac_link"
5321case "(($ac_try" in
5322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5323 *) ac_try_echo=$ac_try;;
5324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326 (eval "$ac_link") 2>&5
5327 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005329 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5330 { (case "(($ac_try" in
5331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5332 *) ac_try_echo=$ac_try;;
5333esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005335 (eval "$ac_try") 2>&5
5336 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005338 (exit $ac_status); }; }; then
5339 ac_cv_pthread=yes
5340else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005341 echo "$as_me: program exited with status $ac_status" >&5
5342echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005343sed 's/^/| /' conftest.$ac_ext >&5
5344
5345( exit $ac_status )
5346ac_cv_pthread=no
5347fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5349fi
5350
5351
5352CC="$ac_save_cc"
5353fi
5354
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005355{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5356echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005357fi
5358
5359# If we have set a CC compiler flag for thread support then
5360# check if it works for CXX, too.
5361ac_cv_cxx_thread=no
5362if test ! -z "$CXX"
5363then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005364{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5365echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005366ac_save_cxx="$CXX"
5367
5368if test "$ac_cv_kpthread" = "yes"
5369then
5370 CXX="$CXX -Kpthread"
5371 ac_cv_cxx_thread=yes
5372elif test "$ac_cv_kthread" = "yes"
5373then
5374 CXX="$CXX -Kthread"
5375 ac_cv_cxx_thread=yes
5376elif test "$ac_cv_pthread" = "yes"
5377then
5378 CXX="$CXX -pthread"
5379 ac_cv_cxx_thread=yes
5380fi
5381
5382if test $ac_cv_cxx_thread = yes
5383then
5384 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5385 $CXX -c conftest.$ac_ext 2>&5
5386 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5387 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5388 then
5389 ac_cv_cxx_thread=yes
5390 else
5391 ac_cv_cxx_thread=no
5392 fi
5393 rm -fr conftest*
5394fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005395{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5396echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005397fi
5398CXX="$ac_save_cxx"
5399
5400
5401# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005402{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5403echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005404if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005405 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005406else
5407 cat >conftest.$ac_ext <<_ACEOF
5408/* confdefs.h. */
5409_ACEOF
5410cat confdefs.h >>conftest.$ac_ext
5411cat >>conftest.$ac_ext <<_ACEOF
5412/* end confdefs.h. */
5413#include <stdlib.h>
5414#include <stdarg.h>
5415#include <string.h>
5416#include <float.h>
5417
5418int
5419main ()
5420{
5421
5422 ;
5423 return 0;
5424}
5425_ACEOF
5426rm -f conftest.$ac_objext
5427if { (ac_try="$ac_compile"
5428case "(($ac_try" in
5429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5430 *) ac_try_echo=$ac_try;;
5431esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005433 (eval "$ac_compile") 2>conftest.er1
5434 ac_status=$?
5435 grep -v '^ *+' conftest.er1 >conftest.err
5436 rm -f conftest.er1
5437 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005439 (exit $ac_status); } && {
5440 test -z "$ac_c_werror_flag" ||
5441 test ! -s conftest.err
5442 } && test -s conftest.$ac_objext; then
5443 ac_cv_header_stdc=yes
5444else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005445 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005446sed 's/^/| /' conftest.$ac_ext >&5
5447
5448 ac_cv_header_stdc=no
5449fi
5450
5451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5452
5453if test $ac_cv_header_stdc = yes; then
5454 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5455 cat >conftest.$ac_ext <<_ACEOF
5456/* confdefs.h. */
5457_ACEOF
5458cat confdefs.h >>conftest.$ac_ext
5459cat >>conftest.$ac_ext <<_ACEOF
5460/* end confdefs.h. */
5461#include <string.h>
5462
5463_ACEOF
5464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5465 $EGREP "memchr" >/dev/null 2>&1; then
5466 :
5467else
5468 ac_cv_header_stdc=no
5469fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005470rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005471
5472fi
5473
5474if test $ac_cv_header_stdc = yes; then
5475 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5476 cat >conftest.$ac_ext <<_ACEOF
5477/* confdefs.h. */
5478_ACEOF
5479cat confdefs.h >>conftest.$ac_ext
5480cat >>conftest.$ac_ext <<_ACEOF
5481/* end confdefs.h. */
5482#include <stdlib.h>
5483
5484_ACEOF
5485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5486 $EGREP "free" >/dev/null 2>&1; then
5487 :
5488else
5489 ac_cv_header_stdc=no
5490fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005491rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492
5493fi
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5497 if test "$cross_compiling" = yes; then
5498 :
5499else
5500 cat >conftest.$ac_ext <<_ACEOF
5501/* confdefs.h. */
5502_ACEOF
5503cat confdefs.h >>conftest.$ac_ext
5504cat >>conftest.$ac_ext <<_ACEOF
5505/* end confdefs.h. */
5506#include <ctype.h>
5507#include <stdlib.h>
5508#if ((' ' & 0x0FF) == 0x020)
5509# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5510# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5511#else
5512# define ISLOWER(c) \
5513 (('a' <= (c) && (c) <= 'i') \
5514 || ('j' <= (c) && (c) <= 'r') \
5515 || ('s' <= (c) && (c) <= 'z'))
5516# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5517#endif
5518
5519#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5520int
5521main ()
5522{
5523 int i;
5524 for (i = 0; i < 256; i++)
5525 if (XOR (islower (i), ISLOWER (i))
5526 || toupper (i) != TOUPPER (i))
5527 return 2;
5528 return 0;
5529}
5530_ACEOF
5531rm -f conftest$ac_exeext
5532if { (ac_try="$ac_link"
5533case "(($ac_try" in
5534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5535 *) ac_try_echo=$ac_try;;
5536esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005538 (eval "$ac_link") 2>&5
5539 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005541 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5542 { (case "(($ac_try" in
5543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5544 *) ac_try_echo=$ac_try;;
5545esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005547 (eval "$ac_try") 2>&5
5548 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005550 (exit $ac_status); }; }; then
5551 :
5552else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005553 echo "$as_me: program exited with status $ac_status" >&5
5554echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005555sed 's/^/| /' conftest.$ac_ext >&5
5556
5557( exit $ac_status )
5558ac_cv_header_stdc=no
5559fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5561fi
5562
5563
5564fi
5565fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005566{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5567echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005568if test $ac_cv_header_stdc = yes; then
5569
5570cat >>confdefs.h <<\_ACEOF
5571#define STDC_HEADERS 1
5572_ACEOF
5573
5574fi
5575
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005576# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5587 inttypes.h stdint.h unistd.h
5588do
5589as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5590{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5591echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5592if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5593 echo $ECHO_N "(cached) $ECHO_C" >&6
5594else
5595 cat >conftest.$ac_ext <<_ACEOF
5596/* confdefs.h. */
5597_ACEOF
5598cat confdefs.h >>conftest.$ac_ext
5599cat >>conftest.$ac_ext <<_ACEOF
5600/* end confdefs.h. */
5601$ac_includes_default
5602
5603#include <$ac_header>
5604_ACEOF
5605rm -f conftest.$ac_objext
5606if { (ac_try="$ac_compile"
5607case "(($ac_try" in
5608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5609 *) ac_try_echo=$ac_try;;
5610esac
5611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5612 (eval "$ac_compile") 2>conftest.er1
5613 ac_status=$?
5614 grep -v '^ *+' conftest.er1 >conftest.err
5615 rm -f conftest.er1
5616 cat conftest.err >&5
5617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5618 (exit $ac_status); } && {
5619 test -z "$ac_c_werror_flag" ||
5620 test ! -s conftest.err
5621 } && test -s conftest.$ac_objext; then
5622 eval "$as_ac_Header=yes"
5623else
5624 echo "$as_me: failed program was:" >&5
5625sed 's/^/| /' conftest.$ac_ext >&5
5626
5627 eval "$as_ac_Header=no"
5628fi
5629
5630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5631fi
5632ac_res=`eval echo '${'$as_ac_Header'}'`
5633 { echo "$as_me:$LINENO: result: $ac_res" >&5
5634echo "${ECHO_T}$ac_res" >&6; }
5635if test `eval echo '${'$as_ac_Header'}'` = yes; then
5636 cat >>confdefs.h <<_ACEOF
5637#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5638_ACEOF
5639
5640fi
5641
5642done
5643
5644
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005645
Martin v. Löwis11437992002-04-12 09:54:03 +00005646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
Anthony Baxter8a560de2004-10-13 15:30:56 +00005681
Martin v. Löwisc3001752005-01-23 09:27:24 +00005682
Martin v. Löwis11017b12006-01-14 18:12:57 +00005683
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005684
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005685
5686
5687
5688
5689
5690
5691
5692
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005693
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005694
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005695
5696
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005697
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005698
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005699
5700
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005701for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5702fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005703ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005704shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005705unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005706sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5707sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005708sys/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 +00005709sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005710sys/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 +00005711sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005712bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005713do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005714as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005715if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005716 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5717echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005718if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005719 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005720fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005721ac_res=`eval echo '${'$as_ac_Header'}'`
5722 { echo "$as_me:$LINENO: result: $ac_res" >&5
5723echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005724else
Martin v. Löwis11437992002-04-12 09:54:03 +00005725 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005726{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5727echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005729/* confdefs.h. */
5730_ACEOF
5731cat confdefs.h >>conftest.$ac_ext
5732cat >>conftest.$ac_ext <<_ACEOF
5733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005734$ac_includes_default
5735#include <$ac_header>
5736_ACEOF
5737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005738if { (ac_try="$ac_compile"
5739case "(($ac_try" in
5740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5741 *) ac_try_echo=$ac_try;;
5742esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005746 grep -v '^ *+' conftest.er1 >conftest.err
5747 rm -f conftest.er1
5748 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005750 (exit $ac_status); } && {
5751 test -z "$ac_c_werror_flag" ||
5752 test ! -s conftest.err
5753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005754 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005757sed 's/^/| /' conftest.$ac_ext >&5
5758
Martin v. Löwiseba40652007-08-30 20:10:57 +00005759 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005761
5762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005763{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5764echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005765
5766# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005767{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5768echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005769cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005770/* confdefs.h. */
5771_ACEOF
5772cat confdefs.h >>conftest.$ac_ext
5773cat >>conftest.$ac_ext <<_ACEOF
5774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005775#include <$ac_header>
5776_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005777if { (ac_try="$ac_cpp conftest.$ac_ext"
5778case "(($ac_try" in
5779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5780 *) ac_try_echo=$ac_try;;
5781esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005783 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005784 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005785 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005786 rm -f conftest.er1
5787 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005789 (exit $ac_status); } >/dev/null && {
5790 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5791 test ! -s conftest.err
5792 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005793 ac_header_preproc=yes
5794else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005796sed 's/^/| /' conftest.$ac_ext >&5
5797
Martin v. Löwis11437992002-04-12 09:54:03 +00005798 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005800
Martin v. Löwis11437992002-04-12 09:54:03 +00005801rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005802{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5803echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005804
5805# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005806case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5807 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005808 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5809echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5810 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5811echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005812 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005813 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005814 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005815 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5816echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5817 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5818echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5819 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5820echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5821 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5822echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5823 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5824echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5825 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5826echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005827 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005828## -------------------------------------- ##
5829## Report this to http://bugs.python.org/ ##
5830## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005831_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005832 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005833 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005835{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5836echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005837if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005838 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005839else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005840 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005841fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005842ac_res=`eval echo '${'$as_ac_Header'}'`
5843 { echo "$as_me:$LINENO: result: $ac_res" >&5
5844echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005845
5846fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005847if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005848 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005849#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005850_ACEOF
5851
5852fi
5853
Guido van Rossum627b2d71993-12-24 10:39:16 +00005854done
5855
Martin v. Löwis11437992002-04-12 09:54:03 +00005856
5857
5858
5859
5860
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005861ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005862for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005863 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5864{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5865echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005866if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005867 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005868else
Martin v. Löwis11437992002-04-12 09:54:03 +00005869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005870/* confdefs.h. */
5871_ACEOF
5872cat confdefs.h >>conftest.$ac_ext
5873cat >>conftest.$ac_ext <<_ACEOF
5874/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005875#include <sys/types.h>
5876#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005877
Martin v. Löwis11437992002-04-12 09:54:03 +00005878int
5879main ()
5880{
5881if ((DIR *) 0)
5882return 0;
5883 ;
5884 return 0;
5885}
5886_ACEOF
5887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005888if { (ac_try="$ac_compile"
5889case "(($ac_try" in
5890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5891 *) ac_try_echo=$ac_try;;
5892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005896 grep -v '^ *+' conftest.er1 >conftest.err
5897 rm -f conftest.er1
5898 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005900 (exit $ac_status); } && {
5901 test -z "$ac_c_werror_flag" ||
5902 test ! -s conftest.err
5903 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005904 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005907sed 's/^/| /' conftest.$ac_ext >&5
5908
Martin v. Löwiseba40652007-08-30 20:10:57 +00005909 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005911
5912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005913fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005914ac_res=`eval echo '${'$as_ac_Header'}'`
5915 { echo "$as_me:$LINENO: result: $ac_res" >&5
5916echo "${ECHO_T}$ac_res" >&6; }
5917if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005918 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005919#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005920_ACEOF
5921
5922ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005923fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005924
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005925done
5926# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5927if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005928 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5929echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005930if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005932else
Martin v. Löwis11437992002-04-12 09:54:03 +00005933 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005935/* confdefs.h. */
5936_ACEOF
5937cat confdefs.h >>conftest.$ac_ext
5938cat >>conftest.$ac_ext <<_ACEOF
5939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005940
Martin v. Löwiseba40652007-08-30 20:10:57 +00005941/* Override any GCC internal prototype to avoid an error.
5942 Use char because int might match the return type of a GCC
5943 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005944#ifdef __cplusplus
5945extern "C"
5946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005947char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005948int
5949main ()
5950{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005951return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005952 ;
5953 return 0;
5954}
5955_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005956for ac_lib in '' dir; do
5957 if test -z "$ac_lib"; then
5958 ac_res="none required"
5959 else
5960 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005961 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005962 fi
5963 rm -f conftest.$ac_objext conftest$ac_exeext
5964if { (ac_try="$ac_link"
5965case "(($ac_try" in
5966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5967 *) ac_try_echo=$ac_try;;
5968esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005970 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005971 ac_status=$?
5972 grep -v '^ *+' conftest.er1 >conftest.err
5973 rm -f conftest.er1
5974 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005976 (exit $ac_status); } && {
5977 test -z "$ac_c_werror_flag" ||
5978 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005979 } && test -s conftest$ac_exeext &&
5980 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005981 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005982else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005983 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005984sed 's/^/| /' conftest.$ac_ext >&5
5985
Martin v. Löwiseba40652007-08-30 20:10:57 +00005986
Brett Cannon19fab762007-06-02 03:02:29 +00005987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005988
5989rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5990 conftest$ac_exeext
5991 if test "${ac_cv_search_opendir+set}" = set; then
5992 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005994done
5995if test "${ac_cv_search_opendir+set}" = set; then
5996 :
5997else
5998 ac_cv_search_opendir=no
5999fi
6000rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006001LIBS=$ac_func_search_save_LIBS
6002fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006003{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6004echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006005ac_res=$ac_cv_search_opendir
6006if test "$ac_res" != no; then
6007 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006009fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006010
Michael W. Hudson54241132001-12-07 15:38:26 +00006011else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006012 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
6013echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006014if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006015 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006016else
6017 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006019/* confdefs.h. */
6020_ACEOF
6021cat confdefs.h >>conftest.$ac_ext
6022cat >>conftest.$ac_ext <<_ACEOF
6023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006024
Martin v. Löwiseba40652007-08-30 20:10:57 +00006025/* Override any GCC internal prototype to avoid an error.
6026 Use char because int might match the return type of a GCC
6027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006028#ifdef __cplusplus
6029extern "C"
6030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006031char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006032int
6033main ()
6034{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006035return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006036 ;
6037 return 0;
6038}
6039_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006040for ac_lib in '' x; do
6041 if test -z "$ac_lib"; then
6042 ac_res="none required"
6043 else
6044 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006045 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006046 fi
6047 rm -f conftest.$ac_objext conftest$ac_exeext
6048if { (ac_try="$ac_link"
6049case "(($ac_try" in
6050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6051 *) ac_try_echo=$ac_try;;
6052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006054 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006055 ac_status=$?
6056 grep -v '^ *+' conftest.er1 >conftest.err
6057 rm -f conftest.er1
6058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006060 (exit $ac_status); } && {
6061 test -z "$ac_c_werror_flag" ||
6062 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006063 } && test -s conftest$ac_exeext &&
6064 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006065 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006066else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006067 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006068sed 's/^/| /' conftest.$ac_ext >&5
6069
Martin v. Löwiseba40652007-08-30 20:10:57 +00006070
Brett Cannon19fab762007-06-02 03:02:29 +00006071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006072
6073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6074 conftest$ac_exeext
6075 if test "${ac_cv_search_opendir+set}" = set; then
6076 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006078done
6079if test "${ac_cv_search_opendir+set}" = set; then
6080 :
6081else
6082 ac_cv_search_opendir=no
6083fi
6084rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006085LIBS=$ac_func_search_save_LIBS
6086fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006087{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6088echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006089ac_res=$ac_cv_search_opendir
6090if test "$ac_res" != no; then
6091 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006092
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006093fi
6094
6095fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006096
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006097{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6098echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099if test "${ac_cv_header_sys_types_h_makedev+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 +00006101else
6102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006103/* confdefs.h. */
6104_ACEOF
6105cat confdefs.h >>conftest.$ac_ext
6106cat >>conftest.$ac_ext <<_ACEOF
6107/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109int
6110main ()
6111{
6112return makedev(0, 0);
6113 ;
6114 return 0;
6115}
6116_ACEOF
6117rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006118if { (ac_try="$ac_link"
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_link") 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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006133 } && test -s conftest$ac_exeext &&
6134 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135 ac_cv_header_sys_types_h_makedev=yes
6136else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006138sed 's/^/| /' conftest.$ac_ext >&5
6139
Martin v. Löwiseba40652007-08-30 20:10:57 +00006140 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006142
6143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145
6146fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006147{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6148echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149
6150if test $ac_cv_header_sys_types_h_makedev = no; then
6151if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006152 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6153echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006154if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006155 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006157{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6158echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006159else
6160 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006161{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6162echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006164/* confdefs.h. */
6165_ACEOF
6166cat confdefs.h >>conftest.$ac_ext
6167cat >>conftest.$ac_ext <<_ACEOF
6168/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006169$ac_includes_default
6170#include <sys/mkdev.h>
6171_ACEOF
6172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006173if { (ac_try="$ac_compile"
6174case "(($ac_try" in
6175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6176 *) ac_try_echo=$ac_try;;
6177esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006181 grep -v '^ *+' conftest.er1 >conftest.err
6182 rm -f conftest.er1
6183 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006185 (exit $ac_status); } && {
6186 test -z "$ac_c_werror_flag" ||
6187 test ! -s conftest.err
6188 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189 ac_header_compiler=yes
6190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006192sed 's/^/| /' conftest.$ac_ext >&5
6193
Martin v. Löwiseba40652007-08-30 20:10:57 +00006194 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006196
6197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006198{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6199echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200
6201# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006202{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6203echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006205/* confdefs.h. */
6206_ACEOF
6207cat confdefs.h >>conftest.$ac_ext
6208cat >>conftest.$ac_ext <<_ACEOF
6209/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210#include <sys/mkdev.h>
6211_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006212if { (ac_try="$ac_cpp conftest.$ac_ext"
6213case "(($ac_try" in
6214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6215 *) ac_try_echo=$ac_try;;
6216esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006218 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006220 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221 rm -f conftest.er1
6222 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006224 (exit $ac_status); } >/dev/null && {
6225 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6226 test ! -s conftest.err
6227 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228 ac_header_preproc=yes
6229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006231sed 's/^/| /' conftest.$ac_ext >&5
6232
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006233 ac_header_preproc=no
6234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006235
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006237{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6238echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239
6240# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006241case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6242 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006243 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6244echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6245 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6246echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006247 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006248 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006249 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006250 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6251echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6252 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6253echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6254 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6255echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6256 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6257echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6258 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6259echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6260 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6261echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006262 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006263## -------------------------------------- ##
6264## Report this to http://bugs.python.org/ ##
6265## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006266_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006268 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006270{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6271echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006273 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274else
6275 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6276fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006277{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6278echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279
6280fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006281if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283cat >>confdefs.h <<\_ACEOF
6284#define MAJOR_IN_MKDEV 1
6285_ACEOF
6286
6287fi
6288
6289
6290
6291 if test $ac_cv_header_sys_mkdev_h = no; then
6292 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006293 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6294echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006296 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006298{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6299echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006300else
6301 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006302{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6303echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006305/* confdefs.h. */
6306_ACEOF
6307cat confdefs.h >>conftest.$ac_ext
6308cat >>conftest.$ac_ext <<_ACEOF
6309/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006310$ac_includes_default
6311#include <sys/sysmacros.h>
6312_ACEOF
6313rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006314if { (ac_try="$ac_compile"
6315case "(($ac_try" in
6316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6317 *) ac_try_echo=$ac_try;;
6318esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006320 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006322 grep -v '^ *+' conftest.er1 >conftest.err
6323 rm -f conftest.er1
6324 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006326 (exit $ac_status); } && {
6327 test -z "$ac_c_werror_flag" ||
6328 test ! -s conftest.err
6329 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006330 ac_header_compiler=yes
6331else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006333sed 's/^/| /' conftest.$ac_ext >&5
6334
Martin v. Löwiseba40652007-08-30 20:10:57 +00006335 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006337
6338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006339{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6340echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006341
6342# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006343{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6344echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006345cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006346/* confdefs.h. */
6347_ACEOF
6348cat confdefs.h >>conftest.$ac_ext
6349cat >>conftest.$ac_ext <<_ACEOF
6350/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006351#include <sys/sysmacros.h>
6352_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006353if { (ac_try="$ac_cpp conftest.$ac_ext"
6354case "(($ac_try" in
6355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6356 *) ac_try_echo=$ac_try;;
6357esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006359 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006360 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006361 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006362 rm -f conftest.er1
6363 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006365 (exit $ac_status); } >/dev/null && {
6366 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6367 test ! -s conftest.err
6368 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006369 ac_header_preproc=yes
6370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006372sed 's/^/| /' conftest.$ac_ext >&5
6373
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006374 ac_header_preproc=no
6375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006376
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006377rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006378{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6379echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006380
6381# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006382case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6383 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006384 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6385echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6386 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6387echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006388 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006389 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006390 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006391 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6392echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6393 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6394echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6395 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6396echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6397 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6398echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6399 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6400echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6401 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6402echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006403 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006404## -------------------------------------- ##
6405## Report this to http://bugs.python.org/ ##
6406## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006407_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006408 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006409 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006410esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006411{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6412echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006413if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006414 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006415else
6416 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6417fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006418{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6419echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006420
6421fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006422if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006423
6424cat >>confdefs.h <<\_ACEOF
6425#define MAJOR_IN_SYSMACROS 1
6426_ACEOF
6427
6428fi
6429
6430
6431 fi
6432fi
6433
Michael W. Hudson54241132001-12-07 15:38:26 +00006434
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006435# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006436
6437for ac_header in term.h
6438do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006439as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6440{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6441echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006442if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006443 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006444else
6445 cat >conftest.$ac_ext <<_ACEOF
6446/* confdefs.h. */
6447_ACEOF
6448cat confdefs.h >>conftest.$ac_ext
6449cat >>conftest.$ac_ext <<_ACEOF
6450/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006451
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006452#ifdef HAVE_CURSES_H
6453#include <curses.h>
6454#endif
6455
6456
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006457#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006458_ACEOF
6459rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006460if { (ac_try="$ac_compile"
6461case "(($ac_try" in
6462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6463 *) ac_try_echo=$ac_try;;
6464esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006467 ac_status=$?
6468 grep -v '^ *+' conftest.er1 >conftest.err
6469 rm -f conftest.er1
6470 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006472 (exit $ac_status); } && {
6473 test -z "$ac_c_werror_flag" ||
6474 test ! -s conftest.err
6475 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006476 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006477else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006478 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006479sed 's/^/| /' conftest.$ac_ext >&5
6480
Martin v. Löwiseba40652007-08-30 20:10:57 +00006481 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006483
6484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006485fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006486ac_res=`eval echo '${'$as_ac_Header'}'`
6487 { echo "$as_me:$LINENO: result: $ac_res" >&5
6488echo "${ECHO_T}$ac_res" >&6; }
6489if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006490 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006491#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006492_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006493
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006494fi
6495
6496done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006497
6498
Martin v. Löwis11017b12006-01-14 18:12:57 +00006499# On Linux, netlink.h requires asm/types.h
6500
6501for ac_header in linux/netlink.h
6502do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006503as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6504{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6505echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006506if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006507 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006508else
6509 cat >conftest.$ac_ext <<_ACEOF
6510/* confdefs.h. */
6511_ACEOF
6512cat confdefs.h >>conftest.$ac_ext
6513cat >>conftest.$ac_ext <<_ACEOF
6514/* end confdefs.h. */
6515
6516#ifdef HAVE_ASM_TYPES_H
6517#include <asm/types.h>
6518#endif
6519#ifdef HAVE_SYS_SOCKET_H
6520#include <sys/socket.h>
6521#endif
6522
6523
6524#include <$ac_header>
6525_ACEOF
6526rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006527if { (ac_try="$ac_compile"
6528case "(($ac_try" in
6529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6530 *) ac_try_echo=$ac_try;;
6531esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006534 ac_status=$?
6535 grep -v '^ *+' conftest.er1 >conftest.err
6536 rm -f conftest.er1
6537 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006539 (exit $ac_status); } && {
6540 test -z "$ac_c_werror_flag" ||
6541 test ! -s conftest.err
6542 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006543 eval "$as_ac_Header=yes"
6544else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006545 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006546sed 's/^/| /' conftest.$ac_ext >&5
6547
Martin v. Löwiseba40652007-08-30 20:10:57 +00006548 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006550
6551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006552fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006553ac_res=`eval echo '${'$as_ac_Header'}'`
6554 { echo "$as_me:$LINENO: result: $ac_res" >&5
6555echo "${ECHO_T}$ac_res" >&6; }
6556if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006557 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006558#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006559_ACEOF
6560
6561fi
6562
6563done
6564
6565
Guido van Rossum627b2d71993-12-24 10:39:16 +00006566# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006567was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006568{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6569echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006571/* confdefs.h. */
6572_ACEOF
6573cat confdefs.h >>conftest.$ac_ext
6574cat >>conftest.$ac_ext <<_ACEOF
6575/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006576#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006577
6578_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006580 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006581 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006582else
Martin v. Löwis11437992002-04-12 09:54:03 +00006583
6584
6585cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006586#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006587_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006588
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006589
Guido van Rossum627b2d71993-12-24 10:39:16 +00006590fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006591rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006592
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006593{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6594echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006595
Neal Norwitz11690112002-07-30 01:08:28 +00006596# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006597{ echo "$as_me:$LINENO: checking for makedev" >&5
6598echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006599cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006600/* confdefs.h. */
6601_ACEOF
6602cat confdefs.h >>conftest.$ac_ext
6603cat >>conftest.$ac_ext <<_ACEOF
6604/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006605#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006606int
6607main ()
6608{
6609 makedev(0, 0)
6610 ;
6611 return 0;
6612}
6613_ACEOF
6614rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006615if { (ac_try="$ac_link"
6616case "(($ac_try" in
6617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6618 *) ac_try_echo=$ac_try;;
6619esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006621 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006623 grep -v '^ *+' conftest.er1 >conftest.err
6624 rm -f conftest.er1
6625 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006627 (exit $ac_status); } && {
6628 test -z "$ac_c_werror_flag" ||
6629 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006630 } && test -s conftest$ac_exeext &&
6631 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006632 ac_cv_has_makedev=yes
6633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006635sed 's/^/| /' conftest.$ac_ext >&5
6636
Martin v. Löwiseba40652007-08-30 20:10:57 +00006637 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006639
6640rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006641 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006642if test "$ac_cv_has_makedev" = "no"; then
6643 # we didn't link, try if _OSF_SOURCE will allow us to link
6644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006645/* confdefs.h. */
6646_ACEOF
6647cat confdefs.h >>conftest.$ac_ext
6648cat >>conftest.$ac_ext <<_ACEOF
6649/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006650
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006651#define _OSF_SOURCE 1
6652#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006653
Neal Norwitz11690112002-07-30 01:08:28 +00006654int
6655main ()
6656{
6657 makedev(0, 0)
6658 ;
6659 return 0;
6660}
6661_ACEOF
6662rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006663if { (ac_try="$ac_link"
6664case "(($ac_try" in
6665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6666 *) ac_try_echo=$ac_try;;
6667esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006669 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006671 grep -v '^ *+' conftest.er1 >conftest.err
6672 rm -f conftest.er1
6673 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006675 (exit $ac_status); } && {
6676 test -z "$ac_c_werror_flag" ||
6677 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006678 } && test -s conftest$ac_exeext &&
6679 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006680 ac_cv_has_makedev=yes
6681else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006683sed 's/^/| /' conftest.$ac_ext >&5
6684
Martin v. Löwiseba40652007-08-30 20:10:57 +00006685 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687
6688rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006689 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006690 if test "$ac_cv_has_makedev" = "yes"; then
6691
6692cat >>confdefs.h <<\_ACEOF
6693#define _OSF_SOURCE 1
6694_ACEOF
6695
6696 fi
6697fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006698{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6699echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006700if test "$ac_cv_has_makedev" = "yes"; then
6701
6702cat >>confdefs.h <<\_ACEOF
6703#define HAVE_MAKEDEV 1
6704_ACEOF
6705
6706fi
6707
Martin v. Löwis399a6892002-10-04 10:22:02 +00006708# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6709# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6710# defined, but the compiler does not support pragma redefine_extname,
6711# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6712# structures (such as rlimit64) without declaring them. As a
6713# work-around, disable LFS on such configurations
6714
6715use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006716{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6717echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006719/* confdefs.h. */
6720_ACEOF
6721cat confdefs.h >>conftest.$ac_ext
6722cat >>conftest.$ac_ext <<_ACEOF
6723/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006724
6725#define _LARGEFILE_SOURCE 1
6726#define _FILE_OFFSET_BITS 64
6727#include <sys/resource.h>
6728
Martin v. Löwis399a6892002-10-04 10:22:02 +00006729int
6730main ()
6731{
6732struct rlimit foo;
6733 ;
6734 return 0;
6735}
6736_ACEOF
6737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006738if { (ac_try="$ac_compile"
6739case "(($ac_try" in
6740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6741 *) ac_try_echo=$ac_try;;
6742esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006746 grep -v '^ *+' conftest.er1 >conftest.err
6747 rm -f conftest.er1
6748 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750 (exit $ac_status); } && {
6751 test -z "$ac_c_werror_flag" ||
6752 test ! -s conftest.err
6753 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006754 sol_lfs_bug=no
6755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006757sed 's/^/| /' conftest.$ac_ext >&5
6758
Martin v. Löwiseba40652007-08-30 20:10:57 +00006759 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006761
6762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006763{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6764echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006765if test "$sol_lfs_bug" = "yes"; then
6766 use_lfs=no
6767fi
6768
6769if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006770# Two defines needed to enable largefile support on various platforms
6771# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006772
Martin v. Löwis11437992002-04-12 09:54:03 +00006773cat >>confdefs.h <<\_ACEOF
6774#define _LARGEFILE_SOURCE 1
6775_ACEOF
6776
6777
6778cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006779#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006780_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006781
Martin v. Löwis399a6892002-10-04 10:22:02 +00006782fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006783
Guido van Rossum84e7b241996-08-19 21:59:00 +00006784# Add some code to confdefs.h so that the test for off_t works on SCO
6785cat >> confdefs.h <<\EOF
6786#if defined(SCO_DS)
6787#undef _OFF_T
6788#endif
6789EOF
6790
Guido van Rossumef2255b2000-03-10 22:30:29 +00006791# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006792{ echo "$as_me:$LINENO: checking for mode_t" >&5
6793echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006794if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006795 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006796else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006797 cat >conftest.$ac_ext <<_ACEOF
6798/* confdefs.h. */
6799_ACEOF
6800cat confdefs.h >>conftest.$ac_ext
6801cat >>conftest.$ac_ext <<_ACEOF
6802/* end confdefs.h. */
6803$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006804typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006805int
6806main ()
6807{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006808if ((ac__type_new_ *) 0)
6809 return 0;
6810if (sizeof (ac__type_new_))
6811 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006812 ;
6813 return 0;
6814}
6815_ACEOF
6816rm -f conftest.$ac_objext
6817if { (ac_try="$ac_compile"
6818case "(($ac_try" in
6819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6820 *) ac_try_echo=$ac_try;;
6821esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006823 (eval "$ac_compile") 2>conftest.er1
6824 ac_status=$?
6825 grep -v '^ *+' conftest.er1 >conftest.err
6826 rm -f conftest.er1
6827 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006829 (exit $ac_status); } && {
6830 test -z "$ac_c_werror_flag" ||
6831 test ! -s conftest.err
6832 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006833 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006834else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006836sed 's/^/| /' conftest.$ac_ext >&5
6837
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006838 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006840
6841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006842fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006843{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6844echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6845if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006846 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006847else
Martin v. Löwis11437992002-04-12 09:54:03 +00006848
6849cat >>confdefs.h <<_ACEOF
6850#define mode_t int
6851_ACEOF
6852
6853fi
6854
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006855{ echo "$as_me:$LINENO: checking for off_t" >&5
6856echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006857if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006858 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006859else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006860 cat >conftest.$ac_ext <<_ACEOF
6861/* confdefs.h. */
6862_ACEOF
6863cat confdefs.h >>conftest.$ac_ext
6864cat >>conftest.$ac_ext <<_ACEOF
6865/* end confdefs.h. */
6866$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006867typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006868int
6869main ()
6870{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006871if ((ac__type_new_ *) 0)
6872 return 0;
6873if (sizeof (ac__type_new_))
6874 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006875 ;
6876 return 0;
6877}
6878_ACEOF
6879rm -f conftest.$ac_objext
6880if { (ac_try="$ac_compile"
6881case "(($ac_try" in
6882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6883 *) ac_try_echo=$ac_try;;
6884esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006886 (eval "$ac_compile") 2>conftest.er1
6887 ac_status=$?
6888 grep -v '^ *+' conftest.er1 >conftest.err
6889 rm -f conftest.er1
6890 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006892 (exit $ac_status); } && {
6893 test -z "$ac_c_werror_flag" ||
6894 test ! -s conftest.err
6895 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006896 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006899sed 's/^/| /' conftest.$ac_ext >&5
6900
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006901 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006903
6904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006905fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006906{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6907echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6908if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006909 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910else
Martin v. Löwis11437992002-04-12 09:54:03 +00006911
6912cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006913#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006914_ACEOF
6915
6916fi
6917
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006918{ echo "$as_me:$LINENO: checking for pid_t" >&5
6919echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006920if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006921 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006922else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006923 cat >conftest.$ac_ext <<_ACEOF
6924/* confdefs.h. */
6925_ACEOF
6926cat confdefs.h >>conftest.$ac_ext
6927cat >>conftest.$ac_ext <<_ACEOF
6928/* end confdefs.h. */
6929$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006930typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006931int
6932main ()
6933{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006934if ((ac__type_new_ *) 0)
6935 return 0;
6936if (sizeof (ac__type_new_))
6937 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006938 ;
6939 return 0;
6940}
6941_ACEOF
6942rm -f conftest.$ac_objext
6943if { (ac_try="$ac_compile"
6944case "(($ac_try" in
6945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6946 *) ac_try_echo=$ac_try;;
6947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006949 (eval "$ac_compile") 2>conftest.er1
6950 ac_status=$?
6951 grep -v '^ *+' conftest.er1 >conftest.err
6952 rm -f conftest.er1
6953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006955 (exit $ac_status); } && {
6956 test -z "$ac_c_werror_flag" ||
6957 test ! -s conftest.err
6958 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006959 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006962sed 's/^/| /' conftest.$ac_ext >&5
6963
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006964 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966
6967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006968fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006969{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6970echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6971if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006972 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006973else
Martin v. Löwis11437992002-04-12 09:54:03 +00006974
6975cat >>confdefs.h <<_ACEOF
6976#define pid_t int
6977_ACEOF
6978
6979fi
6980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006981{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6982echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006983if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006984 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006985else
6986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006987/* confdefs.h. */
6988_ACEOF
6989cat confdefs.h >>conftest.$ac_ext
6990cat >>conftest.$ac_ext <<_ACEOF
6991/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006992#include <sys/types.h>
6993#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006994
Martin v. Löwis11437992002-04-12 09:54:03 +00006995int
6996main ()
6997{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006998return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006999 ;
7000 return 0;
7001}
7002_ACEOF
7003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007004if { (ac_try="$ac_compile"
7005case "(($ac_try" in
7006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7007 *) ac_try_echo=$ac_try;;
7008esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007012 grep -v '^ *+' conftest.er1 >conftest.err
7013 rm -f conftest.er1
7014 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007016 (exit $ac_status); } && {
7017 test -z "$ac_c_werror_flag" ||
7018 test ! -s conftest.err
7019 } && test -s conftest.$ac_objext; then
7020 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007021else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007023sed 's/^/| /' conftest.$ac_ext >&5
7024
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007027
7028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007030{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7031echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007032
Martin v. Löwis11437992002-04-12 09:54:03 +00007033cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007034#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007035_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007036
Michael W. Hudson54241132001-12-07 15:38:26 +00007037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007038{ echo "$as_me:$LINENO: checking for size_t" >&5
7039echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007040if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007041 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007042else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007043 cat >conftest.$ac_ext <<_ACEOF
7044/* confdefs.h. */
7045_ACEOF
7046cat confdefs.h >>conftest.$ac_ext
7047cat >>conftest.$ac_ext <<_ACEOF
7048/* end confdefs.h. */
7049$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007050typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007051int
7052main ()
7053{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007054if ((ac__type_new_ *) 0)
7055 return 0;
7056if (sizeof (ac__type_new_))
7057 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007058 ;
7059 return 0;
7060}
7061_ACEOF
7062rm -f conftest.$ac_objext
7063if { (ac_try="$ac_compile"
7064case "(($ac_try" in
7065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7066 *) ac_try_echo=$ac_try;;
7067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007069 (eval "$ac_compile") 2>conftest.er1
7070 ac_status=$?
7071 grep -v '^ *+' conftest.er1 >conftest.err
7072 rm -f conftest.er1
7073 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007075 (exit $ac_status); } && {
7076 test -z "$ac_c_werror_flag" ||
7077 test ! -s conftest.err
7078 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007079 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007080else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007082sed 's/^/| /' conftest.$ac_ext >&5
7083
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007084 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007086
7087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007088fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007089{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7090echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7091if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007092 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007093else
Martin v. Löwis11437992002-04-12 09:54:03 +00007094
7095cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007096#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007097_ACEOF
7098
7099fi
7100
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007101{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7102echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007103if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007104 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007105else
7106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007107/* confdefs.h. */
7108_ACEOF
7109cat confdefs.h >>conftest.$ac_ext
7110cat >>conftest.$ac_ext <<_ACEOF
7111/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007112#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007113
7114_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007116 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007117 ac_cv_type_uid_t=yes
7118else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007119 ac_cv_type_uid_t=no
7120fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007121rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007122
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007123fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007124{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7125echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007126if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007127
Martin v. Löwis11437992002-04-12 09:54:03 +00007128cat >>confdefs.h <<\_ACEOF
7129#define uid_t int
7130_ACEOF
7131
7132
7133cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007134#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007135_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007136
7137fi
7138
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007139
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007140 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7141echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007142if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007143 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007144else
7145 ac_cv_c_uint32_t=no
7146 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7147 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7148 cat >conftest.$ac_ext <<_ACEOF
7149/* confdefs.h. */
7150_ACEOF
7151cat confdefs.h >>conftest.$ac_ext
7152cat >>conftest.$ac_ext <<_ACEOF
7153/* end confdefs.h. */
7154$ac_includes_default
7155int
7156main ()
7157{
7158static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7159test_array [0] = 0
7160
7161 ;
7162 return 0;
7163}
7164_ACEOF
7165rm -f conftest.$ac_objext
7166if { (ac_try="$ac_compile"
7167case "(($ac_try" in
7168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7169 *) ac_try_echo=$ac_try;;
7170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007172 (eval "$ac_compile") 2>conftest.er1
7173 ac_status=$?
7174 grep -v '^ *+' conftest.er1 >conftest.err
7175 rm -f conftest.er1
7176 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007178 (exit $ac_status); } && {
7179 test -z "$ac_c_werror_flag" ||
7180 test ! -s conftest.err
7181 } && test -s conftest.$ac_objext; then
7182 case $ac_type in
7183 uint32_t) ac_cv_c_uint32_t=yes ;;
7184 *) ac_cv_c_uint32_t=$ac_type ;;
7185esac
7186
7187else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007188 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007189sed 's/^/| /' conftest.$ac_ext >&5
7190
7191
7192fi
7193
7194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7195 test "$ac_cv_c_uint32_t" != no && break
7196 done
7197fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007198{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7199echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007200 case $ac_cv_c_uint32_t in #(
7201 no|yes) ;; #(
7202 *)
7203
7204cat >>confdefs.h <<\_ACEOF
7205#define _UINT32_T 1
7206_ACEOF
7207
7208
7209cat >>confdefs.h <<_ACEOF
7210#define uint32_t $ac_cv_c_uint32_t
7211_ACEOF
7212;;
7213 esac
7214
7215
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007216 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7217echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007218if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007219 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007220else
7221 ac_cv_c_uint64_t=no
7222 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7223 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7224 cat >conftest.$ac_ext <<_ACEOF
7225/* confdefs.h. */
7226_ACEOF
7227cat confdefs.h >>conftest.$ac_ext
7228cat >>conftest.$ac_ext <<_ACEOF
7229/* end confdefs.h. */
7230$ac_includes_default
7231int
7232main ()
7233{
7234static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7235test_array [0] = 0
7236
7237 ;
7238 return 0;
7239}
7240_ACEOF
7241rm -f conftest.$ac_objext
7242if { (ac_try="$ac_compile"
7243case "(($ac_try" in
7244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7245 *) ac_try_echo=$ac_try;;
7246esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007248 (eval "$ac_compile") 2>conftest.er1
7249 ac_status=$?
7250 grep -v '^ *+' conftest.er1 >conftest.err
7251 rm -f conftest.er1
7252 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007254 (exit $ac_status); } && {
7255 test -z "$ac_c_werror_flag" ||
7256 test ! -s conftest.err
7257 } && test -s conftest.$ac_objext; then
7258 case $ac_type in
7259 uint64_t) ac_cv_c_uint64_t=yes ;;
7260 *) ac_cv_c_uint64_t=$ac_type ;;
7261esac
7262
7263else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007264 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007265sed 's/^/| /' conftest.$ac_ext >&5
7266
7267
7268fi
7269
7270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7271 test "$ac_cv_c_uint64_t" != no && break
7272 done
7273fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007274{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7275echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007276 case $ac_cv_c_uint64_t in #(
7277 no|yes) ;; #(
7278 *)
7279
7280cat >>confdefs.h <<\_ACEOF
7281#define _UINT64_T 1
7282_ACEOF
7283
7284
7285cat >>confdefs.h <<_ACEOF
7286#define uint64_t $ac_cv_c_uint64_t
7287_ACEOF
7288;;
7289 esac
7290
7291
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007292 { echo "$as_me:$LINENO: checking for int32_t" >&5
7293echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007294if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007295 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007296else
7297 ac_cv_c_int32_t=no
7298 for ac_type in 'int32_t' 'int' 'long int' \
7299 'long long int' 'short int' 'signed char'; do
7300 cat >conftest.$ac_ext <<_ACEOF
7301/* confdefs.h. */
7302_ACEOF
7303cat confdefs.h >>conftest.$ac_ext
7304cat >>conftest.$ac_ext <<_ACEOF
7305/* end confdefs.h. */
7306$ac_includes_default
7307int
7308main ()
7309{
7310static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7311test_array [0] = 0
7312
7313 ;
7314 return 0;
7315}
7316_ACEOF
7317rm -f conftest.$ac_objext
7318if { (ac_try="$ac_compile"
7319case "(($ac_try" in
7320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7321 *) ac_try_echo=$ac_try;;
7322esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007324 (eval "$ac_compile") 2>conftest.er1
7325 ac_status=$?
7326 grep -v '^ *+' conftest.er1 >conftest.err
7327 rm -f conftest.er1
7328 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007330 (exit $ac_status); } && {
7331 test -z "$ac_c_werror_flag" ||
7332 test ! -s conftest.err
7333 } && test -s conftest.$ac_objext; then
7334 cat >conftest.$ac_ext <<_ACEOF
7335/* confdefs.h. */
7336_ACEOF
7337cat confdefs.h >>conftest.$ac_ext
7338cat >>conftest.$ac_ext <<_ACEOF
7339/* end confdefs.h. */
7340$ac_includes_default
7341int
7342main ()
7343{
7344static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007345 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007346test_array [0] = 0
7347
7348 ;
7349 return 0;
7350}
7351_ACEOF
7352rm -f conftest.$ac_objext
7353if { (ac_try="$ac_compile"
7354case "(($ac_try" in
7355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7356 *) ac_try_echo=$ac_try;;
7357esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007359 (eval "$ac_compile") 2>conftest.er1
7360 ac_status=$?
7361 grep -v '^ *+' conftest.er1 >conftest.err
7362 rm -f conftest.er1
7363 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007365 (exit $ac_status); } && {
7366 test -z "$ac_c_werror_flag" ||
7367 test ! -s conftest.err
7368 } && test -s conftest.$ac_objext; then
7369 :
7370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007371 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007372sed 's/^/| /' conftest.$ac_ext >&5
7373
7374 case $ac_type in
7375 int32_t) ac_cv_c_int32_t=yes ;;
7376 *) ac_cv_c_int32_t=$ac_type ;;
7377esac
7378
7379fi
7380
7381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7382else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007383 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007384sed 's/^/| /' conftest.$ac_ext >&5
7385
7386
7387fi
7388
7389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7390 test "$ac_cv_c_int32_t" != no && break
7391 done
7392fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007393{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7394echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007395 case $ac_cv_c_int32_t in #(
7396 no|yes) ;; #(
7397 *)
7398
7399cat >>confdefs.h <<_ACEOF
7400#define int32_t $ac_cv_c_int32_t
7401_ACEOF
7402;;
7403 esac
7404
7405
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007406 { echo "$as_me:$LINENO: checking for int64_t" >&5
7407echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007408if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007409 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007410else
7411 ac_cv_c_int64_t=no
7412 for ac_type in 'int64_t' 'int' 'long int' \
7413 'long long int' 'short int' 'signed char'; do
7414 cat >conftest.$ac_ext <<_ACEOF
7415/* confdefs.h. */
7416_ACEOF
7417cat confdefs.h >>conftest.$ac_ext
7418cat >>conftest.$ac_ext <<_ACEOF
7419/* end confdefs.h. */
7420$ac_includes_default
7421int
7422main ()
7423{
7424static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7425test_array [0] = 0
7426
7427 ;
7428 return 0;
7429}
7430_ACEOF
7431rm -f conftest.$ac_objext
7432if { (ac_try="$ac_compile"
7433case "(($ac_try" in
7434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7435 *) ac_try_echo=$ac_try;;
7436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007438 (eval "$ac_compile") 2>conftest.er1
7439 ac_status=$?
7440 grep -v '^ *+' conftest.er1 >conftest.err
7441 rm -f conftest.er1
7442 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007444 (exit $ac_status); } && {
7445 test -z "$ac_c_werror_flag" ||
7446 test ! -s conftest.err
7447 } && test -s conftest.$ac_objext; then
7448 cat >conftest.$ac_ext <<_ACEOF
7449/* confdefs.h. */
7450_ACEOF
7451cat confdefs.h >>conftest.$ac_ext
7452cat >>conftest.$ac_ext <<_ACEOF
7453/* end confdefs.h. */
7454$ac_includes_default
7455int
7456main ()
7457{
7458static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007459 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007460test_array [0] = 0
7461
7462 ;
7463 return 0;
7464}
7465_ACEOF
7466rm -f conftest.$ac_objext
7467if { (ac_try="$ac_compile"
7468case "(($ac_try" in
7469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7470 *) ac_try_echo=$ac_try;;
7471esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007473 (eval "$ac_compile") 2>conftest.er1
7474 ac_status=$?
7475 grep -v '^ *+' conftest.er1 >conftest.err
7476 rm -f conftest.er1
7477 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007479 (exit $ac_status); } && {
7480 test -z "$ac_c_werror_flag" ||
7481 test ! -s conftest.err
7482 } && test -s conftest.$ac_objext; then
7483 :
7484else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007485 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007486sed 's/^/| /' conftest.$ac_ext >&5
7487
7488 case $ac_type in
7489 int64_t) ac_cv_c_int64_t=yes ;;
7490 *) ac_cv_c_int64_t=$ac_type ;;
7491esac
7492
7493fi
7494
7495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7496else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007497 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007498sed 's/^/| /' conftest.$ac_ext >&5
7499
7500
7501fi
7502
7503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7504 test "$ac_cv_c_int64_t" != no && break
7505 done
7506fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007507{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7508echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007509 case $ac_cv_c_int64_t in #(
7510 no|yes) ;; #(
7511 *)
7512
7513cat >>confdefs.h <<_ACEOF
7514#define int64_t $ac_cv_c_int64_t
7515_ACEOF
7516;;
7517 esac
7518
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007519{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7520echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007521if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007522 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007523else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007524 cat >conftest.$ac_ext <<_ACEOF
7525/* confdefs.h. */
7526_ACEOF
7527cat confdefs.h >>conftest.$ac_ext
7528cat >>conftest.$ac_ext <<_ACEOF
7529/* end confdefs.h. */
7530$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007531typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007532int
7533main ()
7534{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007535if ((ac__type_new_ *) 0)
7536 return 0;
7537if (sizeof (ac__type_new_))
7538 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007539 ;
7540 return 0;
7541}
7542_ACEOF
7543rm -f conftest.$ac_objext
7544if { (ac_try="$ac_compile"
7545case "(($ac_try" in
7546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7547 *) ac_try_echo=$ac_try;;
7548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007550 (eval "$ac_compile") 2>conftest.er1
7551 ac_status=$?
7552 grep -v '^ *+' conftest.er1 >conftest.err
7553 rm -f conftest.er1
7554 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007556 (exit $ac_status); } && {
7557 test -z "$ac_c_werror_flag" ||
7558 test ! -s conftest.err
7559 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007560 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007561else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007562 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007563sed 's/^/| /' conftest.$ac_ext >&5
7564
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007565 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007567
7568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007569fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007570{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7571echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7572if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007573
7574cat >>confdefs.h <<\_ACEOF
7575#define HAVE_SSIZE_T 1
7576_ACEOF
7577
7578fi
7579
Jack Jansendd19cf82001-12-06 22:36:17 +00007580
Michael W. Hudson54241132001-12-07 15:38:26 +00007581# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007582# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007583{ echo "$as_me:$LINENO: checking for int" >&5
7584echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7585if test "${ac_cv_type_int+set}" = set; then
7586 echo $ECHO_N "(cached) $ECHO_C" >&6
7587else
7588 cat >conftest.$ac_ext <<_ACEOF
7589/* confdefs.h. */
7590_ACEOF
7591cat confdefs.h >>conftest.$ac_ext
7592cat >>conftest.$ac_ext <<_ACEOF
7593/* end confdefs.h. */
7594$ac_includes_default
7595typedef int ac__type_new_;
7596int
7597main ()
7598{
7599if ((ac__type_new_ *) 0)
7600 return 0;
7601if (sizeof (ac__type_new_))
7602 return 0;
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
7608if { (ac_try="$ac_compile"
7609case "(($ac_try" in
7610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7611 *) ac_try_echo=$ac_try;;
7612esac
7613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7614 (eval "$ac_compile") 2>conftest.er1
7615 ac_status=$?
7616 grep -v '^ *+' conftest.er1 >conftest.err
7617 rm -f conftest.er1
7618 cat conftest.err >&5
7619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7620 (exit $ac_status); } && {
7621 test -z "$ac_c_werror_flag" ||
7622 test ! -s conftest.err
7623 } && test -s conftest.$ac_objext; then
7624 ac_cv_type_int=yes
7625else
7626 echo "$as_me: failed program was:" >&5
7627sed 's/^/| /' conftest.$ac_ext >&5
7628
7629 ac_cv_type_int=no
7630fi
7631
7632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7633fi
7634{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7635echo "${ECHO_T}$ac_cv_type_int" >&6; }
7636
Martin v. Löwiseba40652007-08-30 20:10:57 +00007637# The cast to long int works around a bug in the HP C Compiler
7638# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7639# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7640# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007641{ echo "$as_me:$LINENO: checking size of int" >&5
7642echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007643if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007644 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007645else
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 if test "$cross_compiling" = yes; then
7647 # Depending upon the size, compute the lo and hi bounds.
7648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007649/* confdefs.h. */
7650_ACEOF
7651cat confdefs.h >>conftest.$ac_ext
7652cat >>conftest.$ac_ext <<_ACEOF
7653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007654$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007655 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007656int
7657main ()
7658{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007659static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007660test_array [0] = 0
7661
7662 ;
7663 return 0;
7664}
7665_ACEOF
7666rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007667if { (ac_try="$ac_compile"
7668case "(($ac_try" in
7669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7670 *) ac_try_echo=$ac_try;;
7671esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007675 grep -v '^ *+' conftest.er1 >conftest.err
7676 rm -f conftest.er1
7677 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007679 (exit $ac_status); } && {
7680 test -z "$ac_c_werror_flag" ||
7681 test ! -s conftest.err
7682 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 ac_lo=0 ac_mid=0
7684 while :; do
7685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007686/* confdefs.h. */
7687_ACEOF
7688cat confdefs.h >>conftest.$ac_ext
7689cat >>conftest.$ac_ext <<_ACEOF
7690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007691$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007692 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007693int
7694main ()
7695{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007696static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007697test_array [0] = 0
7698
7699 ;
7700 return 0;
7701}
7702_ACEOF
7703rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007704if { (ac_try="$ac_compile"
7705case "(($ac_try" in
7706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7707 *) ac_try_echo=$ac_try;;
7708esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007710 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007712 grep -v '^ *+' conftest.er1 >conftest.err
7713 rm -f conftest.er1
7714 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007716 (exit $ac_status); } && {
7717 test -z "$ac_c_werror_flag" ||
7718 test ! -s conftest.err
7719 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 ac_hi=$ac_mid; break
7721else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007723sed 's/^/| /' conftest.$ac_ext >&5
7724
Martin v. Löwiseba40652007-08-30 20:10:57 +00007725 ac_lo=`expr $ac_mid + 1`
7726 if test $ac_lo -le $ac_mid; then
7727 ac_lo= ac_hi=
7728 break
7729 fi
7730 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007732
7733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007734 done
7735else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007737sed 's/^/| /' conftest.$ac_ext >&5
7738
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007740/* confdefs.h. */
7741_ACEOF
7742cat confdefs.h >>conftest.$ac_ext
7743cat >>conftest.$ac_ext <<_ACEOF
7744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007745$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007746 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007747int
7748main ()
7749{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007750static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007751test_array [0] = 0
7752
7753 ;
7754 return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007758if { (ac_try="$ac_compile"
7759case "(($ac_try" in
7760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7761 *) ac_try_echo=$ac_try;;
7762esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007766 grep -v '^ *+' conftest.er1 >conftest.err
7767 rm -f conftest.er1
7768 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007770 (exit $ac_status); } && {
7771 test -z "$ac_c_werror_flag" ||
7772 test ! -s conftest.err
7773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 ac_hi=-1 ac_mid=-1
7775 while :; do
7776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007777/* confdefs.h. */
7778_ACEOF
7779cat confdefs.h >>conftest.$ac_ext
7780cat >>conftest.$ac_ext <<_ACEOF
7781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007782$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007783 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007784int
7785main ()
7786{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007787static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007788test_array [0] = 0
7789
7790 ;
7791 return 0;
7792}
7793_ACEOF
7794rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007795if { (ac_try="$ac_compile"
7796case "(($ac_try" in
7797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7798 *) ac_try_echo=$ac_try;;
7799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007801 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007803 grep -v '^ *+' conftest.er1 >conftest.err
7804 rm -f conftest.er1
7805 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007807 (exit $ac_status); } && {
7808 test -z "$ac_c_werror_flag" ||
7809 test ! -s conftest.err
7810 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 ac_lo=$ac_mid; break
7812else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007814sed 's/^/| /' conftest.$ac_ext >&5
7815
Martin v. Löwiseba40652007-08-30 20:10:57 +00007816 ac_hi=`expr '(' $ac_mid ')' - 1`
7817 if test $ac_mid -le $ac_hi; then
7818 ac_lo= ac_hi=
7819 break
7820 fi
7821 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007823
7824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007825 done
7826else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007828sed 's/^/| /' conftest.$ac_ext >&5
7829
Martin v. Löwiseba40652007-08-30 20:10:57 +00007830 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007831fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832
7833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007835
7836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007837# Binary search between lo and hi bounds.
7838while test "x$ac_lo" != "x$ac_hi"; do
7839 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007841/* confdefs.h. */
7842_ACEOF
7843cat confdefs.h >>conftest.$ac_ext
7844cat >>conftest.$ac_ext <<_ACEOF
7845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007846$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007847 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007848int
7849main ()
7850{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007851static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007852test_array [0] = 0
7853
7854 ;
7855 return 0;
7856}
7857_ACEOF
7858rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007859if { (ac_try="$ac_compile"
7860case "(($ac_try" in
7861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7862 *) ac_try_echo=$ac_try;;
7863esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007867 grep -v '^ *+' conftest.er1 >conftest.err
7868 rm -f conftest.er1
7869 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007871 (exit $ac_status); } && {
7872 test -z "$ac_c_werror_flag" ||
7873 test ! -s conftest.err
7874 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 ac_hi=$ac_mid
7876else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007878sed 's/^/| /' conftest.$ac_ext >&5
7879
Martin v. Löwiseba40652007-08-30 20:10:57 +00007880 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007882
7883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007884done
7885case $ac_lo in
7886?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007888 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007889See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007890echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007891See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007892 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007893 else
7894 ac_cv_sizeof_int=0
7895 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007896esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007897else
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007899/* confdefs.h. */
7900_ACEOF
7901cat confdefs.h >>conftest.$ac_ext
7902cat >>conftest.$ac_ext <<_ACEOF
7903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007904$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007905 typedef int ac__type_sizeof_;
7906static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7907static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007908#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007909#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007910int
7911main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007912{
Martin v. Löwis11437992002-04-12 09:54:03 +00007913
7914 FILE *f = fopen ("conftest.val", "w");
7915 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007916 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007917 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007919 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007920 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007921 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007922 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 }
7924 else
7925 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007926 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007927 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007929 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007930 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007931 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007932
7933 ;
7934 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007935}
Martin v. Löwis11437992002-04-12 09:54:03 +00007936_ACEOF
7937rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007938if { (ac_try="$ac_link"
7939case "(($ac_try" in
7940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7941 *) ac_try_echo=$ac_try;;
7942esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007944 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007945 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007948 { (case "(($ac_try" in
7949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7950 *) ac_try_echo=$ac_try;;
7951esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007953 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 (exit $ac_status); }; }; then
7957 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007958else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007959 echo "$as_me: program exited with status $ac_status" >&5
7960echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007961sed 's/^/| /' conftest.$ac_ext >&5
7962
Martin v. Löwis11437992002-04-12 09:54:03 +00007963( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007964if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007965 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007966See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007967echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007968See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007969 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007970 else
7971 ac_cv_sizeof_int=0
7972 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007974rm -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 +00007975fi
7976rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007977fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007978{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7979echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007980
7981
7982
Martin v. Löwis11437992002-04-12 09:54:03 +00007983cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007984#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007985_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007986
7987
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007988{ echo "$as_me:$LINENO: checking for long" >&5
7989echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7990if test "${ac_cv_type_long+set}" = set; then
7991 echo $ECHO_N "(cached) $ECHO_C" >&6
7992else
7993 cat >conftest.$ac_ext <<_ACEOF
7994/* confdefs.h. */
7995_ACEOF
7996cat confdefs.h >>conftest.$ac_ext
7997cat >>conftest.$ac_ext <<_ACEOF
7998/* end confdefs.h. */
7999$ac_includes_default
8000typedef long ac__type_new_;
8001int
8002main ()
8003{
8004if ((ac__type_new_ *) 0)
8005 return 0;
8006if (sizeof (ac__type_new_))
8007 return 0;
8008 ;
8009 return 0;
8010}
8011_ACEOF
8012rm -f conftest.$ac_objext
8013if { (ac_try="$ac_compile"
8014case "(($ac_try" in
8015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8016 *) ac_try_echo=$ac_try;;
8017esac
8018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8019 (eval "$ac_compile") 2>conftest.er1
8020 ac_status=$?
8021 grep -v '^ *+' conftest.er1 >conftest.err
8022 rm -f conftest.er1
8023 cat conftest.err >&5
8024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8025 (exit $ac_status); } && {
8026 test -z "$ac_c_werror_flag" ||
8027 test ! -s conftest.err
8028 } && test -s conftest.$ac_objext; then
8029 ac_cv_type_long=yes
8030else
8031 echo "$as_me: failed program was:" >&5
8032sed 's/^/| /' conftest.$ac_ext >&5
8033
8034 ac_cv_type_long=no
8035fi
8036
8037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8038fi
8039{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8040echo "${ECHO_T}$ac_cv_type_long" >&6; }
8041
Martin v. Löwiseba40652007-08-30 20:10:57 +00008042# The cast to long int works around a bug in the HP C Compiler
8043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8045# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008046{ echo "$as_me:$LINENO: checking size of long" >&5
8047echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008048if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008049 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008050else
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 if test "$cross_compiling" = yes; then
8052 # Depending upon the size, compute the lo and hi bounds.
8053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008054/* confdefs.h. */
8055_ACEOF
8056cat confdefs.h >>conftest.$ac_ext
8057cat >>conftest.$ac_ext <<_ACEOF
8058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008059$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008060 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008061int
8062main ()
8063{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008064static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008065test_array [0] = 0
8066
8067 ;
8068 return 0;
8069}
8070_ACEOF
8071rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008072if { (ac_try="$ac_compile"
8073case "(($ac_try" in
8074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8075 *) ac_try_echo=$ac_try;;
8076esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008080 grep -v '^ *+' conftest.er1 >conftest.err
8081 rm -f conftest.er1
8082 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008084 (exit $ac_status); } && {
8085 test -z "$ac_c_werror_flag" ||
8086 test ! -s conftest.err
8087 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 ac_lo=0 ac_mid=0
8089 while :; do
8090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008091/* confdefs.h. */
8092_ACEOF
8093cat confdefs.h >>conftest.$ac_ext
8094cat >>conftest.$ac_ext <<_ACEOF
8095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008096$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008097 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008098int
8099main ()
8100{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008101static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008102test_array [0] = 0
8103
8104 ;
8105 return 0;
8106}
8107_ACEOF
8108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008109if { (ac_try="$ac_compile"
8110case "(($ac_try" in
8111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8112 *) ac_try_echo=$ac_try;;
8113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008117 grep -v '^ *+' conftest.er1 >conftest.err
8118 rm -f conftest.er1
8119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008121 (exit $ac_status); } && {
8122 test -z "$ac_c_werror_flag" ||
8123 test ! -s conftest.err
8124 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 ac_hi=$ac_mid; break
8126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008128sed 's/^/| /' conftest.$ac_ext >&5
8129
Martin v. Löwiseba40652007-08-30 20:10:57 +00008130 ac_lo=`expr $ac_mid + 1`
8131 if test $ac_lo -le $ac_mid; then
8132 ac_lo= ac_hi=
8133 break
8134 fi
8135 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008137
8138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008139 done
8140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008142sed 's/^/| /' conftest.$ac_ext >&5
8143
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008145/* confdefs.h. */
8146_ACEOF
8147cat confdefs.h >>conftest.$ac_ext
8148cat >>conftest.$ac_ext <<_ACEOF
8149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008150$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008151 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008152int
8153main ()
8154{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008156test_array [0] = 0
8157
8158 ;
8159 return 0;
8160}
8161_ACEOF
8162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008163if { (ac_try="$ac_compile"
8164case "(($ac_try" in
8165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8166 *) ac_try_echo=$ac_try;;
8167esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008171 grep -v '^ *+' conftest.er1 >conftest.err
8172 rm -f conftest.er1
8173 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008175 (exit $ac_status); } && {
8176 test -z "$ac_c_werror_flag" ||
8177 test ! -s conftest.err
8178 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008179 ac_hi=-1 ac_mid=-1
8180 while :; do
8181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008182/* confdefs.h. */
8183_ACEOF
8184cat confdefs.h >>conftest.$ac_ext
8185cat >>conftest.$ac_ext <<_ACEOF
8186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008187$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008188 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008189int
8190main ()
8191{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008192static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008193test_array [0] = 0
8194
8195 ;
8196 return 0;
8197}
8198_ACEOF
8199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008200if { (ac_try="$ac_compile"
8201case "(($ac_try" in
8202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8203 *) ac_try_echo=$ac_try;;
8204esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008208 grep -v '^ *+' conftest.er1 >conftest.err
8209 rm -f conftest.er1
8210 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008212 (exit $ac_status); } && {
8213 test -z "$ac_c_werror_flag" ||
8214 test ! -s conftest.err
8215 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 ac_lo=$ac_mid; break
8217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008219sed 's/^/| /' conftest.$ac_ext >&5
8220
Martin v. Löwiseba40652007-08-30 20:10:57 +00008221 ac_hi=`expr '(' $ac_mid ')' - 1`
8222 if test $ac_mid -le $ac_hi; then
8223 ac_lo= ac_hi=
8224 break
8225 fi
8226 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008228
8229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 done
8231else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008233sed 's/^/| /' conftest.$ac_ext >&5
8234
Martin v. Löwiseba40652007-08-30 20:10:57 +00008235 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237
8238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008240
8241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008242# Binary search between lo and hi bounds.
8243while test "x$ac_lo" != "x$ac_hi"; do
8244 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008246/* confdefs.h. */
8247_ACEOF
8248cat confdefs.h >>conftest.$ac_ext
8249cat >>conftest.$ac_ext <<_ACEOF
8250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008251$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008252 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008253int
8254main ()
8255{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008256static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008257test_array [0] = 0
8258
8259 ;
8260 return 0;
8261}
8262_ACEOF
8263rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008264if { (ac_try="$ac_compile"
8265case "(($ac_try" in
8266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8267 *) ac_try_echo=$ac_try;;
8268esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008272 grep -v '^ *+' conftest.er1 >conftest.err
8273 rm -f conftest.er1
8274 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008276 (exit $ac_status); } && {
8277 test -z "$ac_c_werror_flag" ||
8278 test ! -s conftest.err
8279 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 ac_hi=$ac_mid
8281else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008283sed 's/^/| /' conftest.$ac_ext >&5
8284
Martin v. Löwiseba40652007-08-30 20:10:57 +00008285 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008287
8288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008289done
8290case $ac_lo in
8291?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008292'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008293 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008294See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008295echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008296See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008297 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008298 else
8299 ac_cv_sizeof_long=0
8300 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008301esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008302else
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008304/* confdefs.h. */
8305_ACEOF
8306cat confdefs.h >>conftest.$ac_ext
8307cat >>conftest.$ac_ext <<_ACEOF
8308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008309$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008310 typedef long ac__type_sizeof_;
8311static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8312static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008313#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008314#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008315int
8316main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008317{
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
8319 FILE *f = fopen ("conftest.val", "w");
8320 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008321 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008322 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008324 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008325 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008326 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008327 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008328 }
8329 else
8330 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008331 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008332 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008334 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008335 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008336 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008337
8338 ;
8339 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008340}
Martin v. Löwis11437992002-04-12 09:54:03 +00008341_ACEOF
8342rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008343if { (ac_try="$ac_link"
8344case "(($ac_try" in
8345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8346 *) ac_try_echo=$ac_try;;
8347esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008349 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008350 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008353 { (case "(($ac_try" in
8354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8355 *) ac_try_echo=$ac_try;;
8356esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008358 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 (exit $ac_status); }; }; then
8362 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008363else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008364 echo "$as_me: program exited with status $ac_status" >&5
8365echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008366sed 's/^/| /' conftest.$ac_ext >&5
8367
Martin v. Löwis11437992002-04-12 09:54:03 +00008368( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008369if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008370 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008371See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008372echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008373See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008374 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008375 else
8376 ac_cv_sizeof_long=0
8377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008379rm -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 +00008380fi
8381rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008382fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008383{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8384echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008385
8386
8387
Martin v. Löwis11437992002-04-12 09:54:03 +00008388cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008389#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008390_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008391
8392
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008393{ echo "$as_me:$LINENO: checking for void *" >&5
8394echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8395if test "${ac_cv_type_void_p+set}" = set; then
8396 echo $ECHO_N "(cached) $ECHO_C" >&6
8397else
8398 cat >conftest.$ac_ext <<_ACEOF
8399/* confdefs.h. */
8400_ACEOF
8401cat confdefs.h >>conftest.$ac_ext
8402cat >>conftest.$ac_ext <<_ACEOF
8403/* end confdefs.h. */
8404$ac_includes_default
8405typedef void * ac__type_new_;
8406int
8407main ()
8408{
8409if ((ac__type_new_ *) 0)
8410 return 0;
8411if (sizeof (ac__type_new_))
8412 return 0;
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext
8418if { (ac_try="$ac_compile"
8419case "(($ac_try" in
8420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8421 *) ac_try_echo=$ac_try;;
8422esac
8423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8424 (eval "$ac_compile") 2>conftest.er1
8425 ac_status=$?
8426 grep -v '^ *+' conftest.er1 >conftest.err
8427 rm -f conftest.er1
8428 cat conftest.err >&5
8429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8430 (exit $ac_status); } && {
8431 test -z "$ac_c_werror_flag" ||
8432 test ! -s conftest.err
8433 } && test -s conftest.$ac_objext; then
8434 ac_cv_type_void_p=yes
8435else
8436 echo "$as_me: failed program was:" >&5
8437sed 's/^/| /' conftest.$ac_ext >&5
8438
8439 ac_cv_type_void_p=no
8440fi
8441
8442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8443fi
8444{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8445echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8446
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447# The cast to long int works around a bug in the HP C Compiler
8448# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8449# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8450# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008451{ echo "$as_me:$LINENO: checking size of void *" >&5
8452echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008453if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008454 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008455else
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 if test "$cross_compiling" = yes; then
8457 # Depending upon the size, compute the lo and hi bounds.
8458cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008459/* confdefs.h. */
8460_ACEOF
8461cat confdefs.h >>conftest.$ac_ext
8462cat >>conftest.$ac_ext <<_ACEOF
8463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008464$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008465 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
8468{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008469static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008470test_array [0] = 0
8471
8472 ;
8473 return 0;
8474}
8475_ACEOF
8476rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008477if { (ac_try="$ac_compile"
8478case "(($ac_try" in
8479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8480 *) ac_try_echo=$ac_try;;
8481esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008485 grep -v '^ *+' conftest.er1 >conftest.err
8486 rm -f conftest.er1
8487 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008489 (exit $ac_status); } && {
8490 test -z "$ac_c_werror_flag" ||
8491 test ! -s conftest.err
8492 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 ac_lo=0 ac_mid=0
8494 while :; do
8495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008496/* confdefs.h. */
8497_ACEOF
8498cat confdefs.h >>conftest.$ac_ext
8499cat >>conftest.$ac_ext <<_ACEOF
8500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008501$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008502 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008503int
8504main ()
8505{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008506static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008507test_array [0] = 0
8508
8509 ;
8510 return 0;
8511}
8512_ACEOF
8513rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008514if { (ac_try="$ac_compile"
8515case "(($ac_try" in
8516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8517 *) ac_try_echo=$ac_try;;
8518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008522 grep -v '^ *+' conftest.er1 >conftest.err
8523 rm -f conftest.er1
8524 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008526 (exit $ac_status); } && {
8527 test -z "$ac_c_werror_flag" ||
8528 test ! -s conftest.err
8529 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ac_hi=$ac_mid; break
8531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008533sed 's/^/| /' conftest.$ac_ext >&5
8534
Martin v. Löwiseba40652007-08-30 20:10:57 +00008535 ac_lo=`expr $ac_mid + 1`
8536 if test $ac_lo -le $ac_mid; then
8537 ac_lo= ac_hi=
8538 break
8539 fi
8540 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008542
8543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 done
8545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008547sed 's/^/| /' conftest.$ac_ext >&5
8548
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008550/* confdefs.h. */
8551_ACEOF
8552cat confdefs.h >>conftest.$ac_ext
8553cat >>conftest.$ac_ext <<_ACEOF
8554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008555$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008556 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008557int
8558main ()
8559{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008560static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008561test_array [0] = 0
8562
8563 ;
8564 return 0;
8565}
8566_ACEOF
8567rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008568if { (ac_try="$ac_compile"
8569case "(($ac_try" in
8570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8571 *) ac_try_echo=$ac_try;;
8572esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008574 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008576 grep -v '^ *+' conftest.er1 >conftest.err
8577 rm -f conftest.er1
8578 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008580 (exit $ac_status); } && {
8581 test -z "$ac_c_werror_flag" ||
8582 test ! -s conftest.err
8583 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 ac_hi=-1 ac_mid=-1
8585 while :; do
8586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008587/* confdefs.h. */
8588_ACEOF
8589cat confdefs.h >>conftest.$ac_ext
8590cat >>conftest.$ac_ext <<_ACEOF
8591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008592$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008593 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008594int
8595main ()
8596{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008597static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008598test_array [0] = 0
8599
8600 ;
8601 return 0;
8602}
8603_ACEOF
8604rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008605if { (ac_try="$ac_compile"
8606case "(($ac_try" in
8607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8608 *) ac_try_echo=$ac_try;;
8609esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008613 grep -v '^ *+' conftest.er1 >conftest.err
8614 rm -f conftest.er1
8615 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008617 (exit $ac_status); } && {
8618 test -z "$ac_c_werror_flag" ||
8619 test ! -s conftest.err
8620 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 ac_lo=$ac_mid; break
8622else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008624sed 's/^/| /' conftest.$ac_ext >&5
8625
Martin v. Löwiseba40652007-08-30 20:10:57 +00008626 ac_hi=`expr '(' $ac_mid ')' - 1`
8627 if test $ac_mid -le $ac_hi; then
8628 ac_lo= ac_hi=
8629 break
8630 fi
8631 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008633
8634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 done
8636else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008638sed 's/^/| /' conftest.$ac_ext >&5
8639
Martin v. Löwiseba40652007-08-30 20:10:57 +00008640 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642
8643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008645
8646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008647# Binary search between lo and hi bounds.
8648while test "x$ac_lo" != "x$ac_hi"; do
8649 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008651/* confdefs.h. */
8652_ACEOF
8653cat confdefs.h >>conftest.$ac_ext
8654cat >>conftest.$ac_ext <<_ACEOF
8655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008656$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008657 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008658int
8659main ()
8660{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008661static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008662test_array [0] = 0
8663
8664 ;
8665 return 0;
8666}
8667_ACEOF
8668rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008669if { (ac_try="$ac_compile"
8670case "(($ac_try" in
8671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8672 *) ac_try_echo=$ac_try;;
8673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008677 grep -v '^ *+' conftest.er1 >conftest.err
8678 rm -f conftest.er1
8679 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008681 (exit $ac_status); } && {
8682 test -z "$ac_c_werror_flag" ||
8683 test ! -s conftest.err
8684 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 ac_hi=$ac_mid
8686else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008688sed 's/^/| /' conftest.$ac_ext >&5
8689
Martin v. Löwiseba40652007-08-30 20:10:57 +00008690 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692
8693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008694done
8695case $ac_lo in
8696?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008697'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008698 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008699See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008700echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008701See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008702 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008703 else
8704 ac_cv_sizeof_void_p=0
8705 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008706esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008707else
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008709/* confdefs.h. */
8710_ACEOF
8711cat confdefs.h >>conftest.$ac_ext
8712cat >>conftest.$ac_ext <<_ACEOF
8713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008714$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008715 typedef void * ac__type_sizeof_;
8716static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8717static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008718#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008719#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008720int
8721main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008722{
Martin v. Löwis11437992002-04-12 09:54:03 +00008723
8724 FILE *f = fopen ("conftest.val", "w");
8725 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008726 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008727 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008730 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008731 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008732 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 }
8734 else
8735 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008736 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008737 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008739 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008741 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008742
8743 ;
8744 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008745}
Martin v. Löwis11437992002-04-12 09:54:03 +00008746_ACEOF
8747rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008748if { (ac_try="$ac_link"
8749case "(($ac_try" in
8750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8751 *) ac_try_echo=$ac_try;;
8752esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008754 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008755 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008758 { (case "(($ac_try" in
8759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8760 *) ac_try_echo=$ac_try;;
8761esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008763 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 (exit $ac_status); }; }; then
8767 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008768else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008769 echo "$as_me: program exited with status $ac_status" >&5
8770echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008771sed 's/^/| /' conftest.$ac_ext >&5
8772
Martin v. Löwis11437992002-04-12 09:54:03 +00008773( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008774if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008775 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008776See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008777echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008778See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008779 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008780 else
8781 ac_cv_sizeof_void_p=0
8782 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008784rm -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 +00008785fi
8786rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008788{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8789echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008790
8791
8792
Martin v. Löwis11437992002-04-12 09:54:03 +00008793cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008794#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008795_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008796
8797
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008798{ echo "$as_me:$LINENO: checking for short" >&5
8799echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8800if test "${ac_cv_type_short+set}" = set; then
8801 echo $ECHO_N "(cached) $ECHO_C" >&6
8802else
8803 cat >conftest.$ac_ext <<_ACEOF
8804/* confdefs.h. */
8805_ACEOF
8806cat confdefs.h >>conftest.$ac_ext
8807cat >>conftest.$ac_ext <<_ACEOF
8808/* end confdefs.h. */
8809$ac_includes_default
8810typedef short ac__type_new_;
8811int
8812main ()
8813{
8814if ((ac__type_new_ *) 0)
8815 return 0;
8816if (sizeof (ac__type_new_))
8817 return 0;
8818 ;
8819 return 0;
8820}
8821_ACEOF
8822rm -f conftest.$ac_objext
8823if { (ac_try="$ac_compile"
8824case "(($ac_try" in
8825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8826 *) ac_try_echo=$ac_try;;
8827esac
8828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8829 (eval "$ac_compile") 2>conftest.er1
8830 ac_status=$?
8831 grep -v '^ *+' conftest.er1 >conftest.err
8832 rm -f conftest.er1
8833 cat conftest.err >&5
8834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8835 (exit $ac_status); } && {
8836 test -z "$ac_c_werror_flag" ||
8837 test ! -s conftest.err
8838 } && test -s conftest.$ac_objext; then
8839 ac_cv_type_short=yes
8840else
8841 echo "$as_me: failed program was:" >&5
8842sed 's/^/| /' conftest.$ac_ext >&5
8843
8844 ac_cv_type_short=no
8845fi
8846
8847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8848fi
8849{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8850echo "${ECHO_T}$ac_cv_type_short" >&6; }
8851
Martin v. Löwiseba40652007-08-30 20:10:57 +00008852# The cast to long int works around a bug in the HP C Compiler
8853# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8854# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8855# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008856{ echo "$as_me:$LINENO: checking size of short" >&5
8857echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008858if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008859 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008860else
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 if test "$cross_compiling" = yes; then
8862 # Depending upon the size, compute the lo and hi bounds.
8863cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008864/* confdefs.h. */
8865_ACEOF
8866cat confdefs.h >>conftest.$ac_ext
8867cat >>conftest.$ac_ext <<_ACEOF
8868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008869$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008870 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008871int
8872main ()
8873{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008874static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008875test_array [0] = 0
8876
8877 ;
8878 return 0;
8879}
8880_ACEOF
8881rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008882if { (ac_try="$ac_compile"
8883case "(($ac_try" in
8884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8885 *) ac_try_echo=$ac_try;;
8886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008890 grep -v '^ *+' conftest.er1 >conftest.err
8891 rm -f conftest.er1
8892 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008894 (exit $ac_status); } && {
8895 test -z "$ac_c_werror_flag" ||
8896 test ! -s conftest.err
8897 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ac_lo=0 ac_mid=0
8899 while :; do
8900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008901/* confdefs.h. */
8902_ACEOF
8903cat confdefs.h >>conftest.$ac_ext
8904cat >>conftest.$ac_ext <<_ACEOF
8905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008906$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008907 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008908int
8909main ()
8910{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008912test_array [0] = 0
8913
8914 ;
8915 return 0;
8916}
8917_ACEOF
8918rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008919if { (ac_try="$ac_compile"
8920case "(($ac_try" in
8921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8922 *) ac_try_echo=$ac_try;;
8923esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008927 grep -v '^ *+' conftest.er1 >conftest.err
8928 rm -f conftest.er1
8929 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008931 (exit $ac_status); } && {
8932 test -z "$ac_c_werror_flag" ||
8933 test ! -s conftest.err
8934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 ac_hi=$ac_mid; break
8936else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008938sed 's/^/| /' conftest.$ac_ext >&5
8939
Martin v. Löwiseba40652007-08-30 20:10:57 +00008940 ac_lo=`expr $ac_mid + 1`
8941 if test $ac_lo -le $ac_mid; then
8942 ac_lo= ac_hi=
8943 break
8944 fi
8945 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008947
8948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 done
8950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008952sed 's/^/| /' conftest.$ac_ext >&5
8953
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008955/* confdefs.h. */
8956_ACEOF
8957cat confdefs.h >>conftest.$ac_ext
8958cat >>conftest.$ac_ext <<_ACEOF
8959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008960$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008961 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008962int
8963main ()
8964{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008965static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008966test_array [0] = 0
8967
8968 ;
8969 return 0;
8970}
8971_ACEOF
8972rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008973if { (ac_try="$ac_compile"
8974case "(($ac_try" in
8975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8976 *) ac_try_echo=$ac_try;;
8977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008981 grep -v '^ *+' conftest.er1 >conftest.err
8982 rm -f conftest.er1
8983 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008985 (exit $ac_status); } && {
8986 test -z "$ac_c_werror_flag" ||
8987 test ! -s conftest.err
8988 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ac_hi=-1 ac_mid=-1
8990 while :; do
8991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008992/* confdefs.h. */
8993_ACEOF
8994cat confdefs.h >>conftest.$ac_ext
8995cat >>conftest.$ac_ext <<_ACEOF
8996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008997$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008998 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008999int
9000main ()
9001{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009002static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009003test_array [0] = 0
9004
9005 ;
9006 return 0;
9007}
9008_ACEOF
9009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009010if { (ac_try="$ac_compile"
9011case "(($ac_try" in
9012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9013 *) ac_try_echo=$ac_try;;
9014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009018 grep -v '^ *+' conftest.er1 >conftest.err
9019 rm -f conftest.er1
9020 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009022 (exit $ac_status); } && {
9023 test -z "$ac_c_werror_flag" ||
9024 test ! -s conftest.err
9025 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 ac_lo=$ac_mid; break
9027else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009029sed 's/^/| /' conftest.$ac_ext >&5
9030
Martin v. Löwiseba40652007-08-30 20:10:57 +00009031 ac_hi=`expr '(' $ac_mid ')' - 1`
9032 if test $ac_mid -le $ac_hi; then
9033 ac_lo= ac_hi=
9034 break
9035 fi
9036 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038
9039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 done
9041else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009043sed 's/^/| /' conftest.$ac_ext >&5
9044
Martin v. Löwiseba40652007-08-30 20:10:57 +00009045 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047
9048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009050
9051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009052# Binary search between lo and hi bounds.
9053while test "x$ac_lo" != "x$ac_hi"; do
9054 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009056/* confdefs.h. */
9057_ACEOF
9058cat confdefs.h >>conftest.$ac_ext
9059cat >>conftest.$ac_ext <<_ACEOF
9060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009061$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009062 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009063int
9064main ()
9065{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009066static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009067test_array [0] = 0
9068
9069 ;
9070 return 0;
9071}
9072_ACEOF
9073rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009074if { (ac_try="$ac_compile"
9075case "(($ac_try" in
9076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9077 *) ac_try_echo=$ac_try;;
9078esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009082 grep -v '^ *+' conftest.er1 >conftest.err
9083 rm -f conftest.er1
9084 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009086 (exit $ac_status); } && {
9087 test -z "$ac_c_werror_flag" ||
9088 test ! -s conftest.err
9089 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009090 ac_hi=$ac_mid
9091else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009093sed 's/^/| /' conftest.$ac_ext >&5
9094
Martin v. Löwiseba40652007-08-30 20:10:57 +00009095 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097
9098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009099done
9100case $ac_lo in
9101?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009102'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009103 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009104See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009105echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009106See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009107 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009108 else
9109 ac_cv_sizeof_short=0
9110 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009111esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009112else
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009114/* confdefs.h. */
9115_ACEOF
9116cat confdefs.h >>conftest.$ac_ext
9117cat >>conftest.$ac_ext <<_ACEOF
9118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009119$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009120 typedef short ac__type_sizeof_;
9121static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9122static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009123#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009124#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009125int
9126main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009127{
Martin v. Löwis11437992002-04-12 09:54:03 +00009128
9129 FILE *f = fopen ("conftest.val", "w");
9130 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009131 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009132 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009134 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009135 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009136 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009137 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 }
9139 else
9140 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009141 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009142 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009144 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009146 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009147
9148 ;
9149 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009150}
Martin v. Löwis11437992002-04-12 09:54:03 +00009151_ACEOF
9152rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009153if { (ac_try="$ac_link"
9154case "(($ac_try" in
9155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9156 *) ac_try_echo=$ac_try;;
9157esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009159 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009163 { (case "(($ac_try" in
9164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9165 *) ac_try_echo=$ac_try;;
9166esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009168 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 (exit $ac_status); }; }; then
9172 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009173else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009174 echo "$as_me: program exited with status $ac_status" >&5
9175echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009176sed 's/^/| /' conftest.$ac_ext >&5
9177
Martin v. Löwis11437992002-04-12 09:54:03 +00009178( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009179if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009180 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009181See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009182echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009183See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009184 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009185 else
9186 ac_cv_sizeof_short=0
9187 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009189rm -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 +00009190fi
9191rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009192fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009193{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9194echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009195
9196
9197
Martin v. Löwis11437992002-04-12 09:54:03 +00009198cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009199#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009200_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009201
9202
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009203{ echo "$as_me:$LINENO: checking for float" >&5
9204echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9205if test "${ac_cv_type_float+set}" = set; then
9206 echo $ECHO_N "(cached) $ECHO_C" >&6
9207else
9208 cat >conftest.$ac_ext <<_ACEOF
9209/* confdefs.h. */
9210_ACEOF
9211cat confdefs.h >>conftest.$ac_ext
9212cat >>conftest.$ac_ext <<_ACEOF
9213/* end confdefs.h. */
9214$ac_includes_default
9215typedef float ac__type_new_;
9216int
9217main ()
9218{
9219if ((ac__type_new_ *) 0)
9220 return 0;
9221if (sizeof (ac__type_new_))
9222 return 0;
9223 ;
9224 return 0;
9225}
9226_ACEOF
9227rm -f conftest.$ac_objext
9228if { (ac_try="$ac_compile"
9229case "(($ac_try" in
9230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9231 *) ac_try_echo=$ac_try;;
9232esac
9233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9234 (eval "$ac_compile") 2>conftest.er1
9235 ac_status=$?
9236 grep -v '^ *+' conftest.er1 >conftest.err
9237 rm -f conftest.er1
9238 cat conftest.err >&5
9239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9240 (exit $ac_status); } && {
9241 test -z "$ac_c_werror_flag" ||
9242 test ! -s conftest.err
9243 } && test -s conftest.$ac_objext; then
9244 ac_cv_type_float=yes
9245else
9246 echo "$as_me: failed program was:" >&5
9247sed 's/^/| /' conftest.$ac_ext >&5
9248
9249 ac_cv_type_float=no
9250fi
9251
9252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9253fi
9254{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9255echo "${ECHO_T}$ac_cv_type_float" >&6; }
9256
Martin v. Löwiseba40652007-08-30 20:10:57 +00009257# The cast to long int works around a bug in the HP C Compiler
9258# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9259# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9260# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009261{ echo "$as_me:$LINENO: checking size of float" >&5
9262echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009263if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009264 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009265else
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 if test "$cross_compiling" = yes; then
9267 # Depending upon the size, compute the lo and hi bounds.
9268cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009269/* confdefs.h. */
9270_ACEOF
9271cat confdefs.h >>conftest.$ac_ext
9272cat >>conftest.$ac_ext <<_ACEOF
9273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009274$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009275 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009276int
9277main ()
9278{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009279static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009280test_array [0] = 0
9281
9282 ;
9283 return 0;
9284}
9285_ACEOF
9286rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009287if { (ac_try="$ac_compile"
9288case "(($ac_try" in
9289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9290 *) ac_try_echo=$ac_try;;
9291esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009293 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009295 grep -v '^ *+' conftest.er1 >conftest.err
9296 rm -f conftest.er1
9297 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009299 (exit $ac_status); } && {
9300 test -z "$ac_c_werror_flag" ||
9301 test ! -s conftest.err
9302 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 ac_lo=0 ac_mid=0
9304 while :; do
9305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009306/* confdefs.h. */
9307_ACEOF
9308cat confdefs.h >>conftest.$ac_ext
9309cat >>conftest.$ac_ext <<_ACEOF
9310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009311$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009312 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009313int
9314main ()
9315{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009317test_array [0] = 0
9318
9319 ;
9320 return 0;
9321}
9322_ACEOF
9323rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009324if { (ac_try="$ac_compile"
9325case "(($ac_try" in
9326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9327 *) ac_try_echo=$ac_try;;
9328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009332 grep -v '^ *+' conftest.er1 >conftest.err
9333 rm -f conftest.er1
9334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009336 (exit $ac_status); } && {
9337 test -z "$ac_c_werror_flag" ||
9338 test ! -s conftest.err
9339 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 ac_hi=$ac_mid; break
9341else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009343sed 's/^/| /' conftest.$ac_ext >&5
9344
Martin v. Löwiseba40652007-08-30 20:10:57 +00009345 ac_lo=`expr $ac_mid + 1`
9346 if test $ac_lo -le $ac_mid; then
9347 ac_lo= ac_hi=
9348 break
9349 fi
9350 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009352
9353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 done
9355else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009357sed 's/^/| /' conftest.$ac_ext >&5
9358
Martin v. Löwiseba40652007-08-30 20:10:57 +00009359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009360/* confdefs.h. */
9361_ACEOF
9362cat confdefs.h >>conftest.$ac_ext
9363cat >>conftest.$ac_ext <<_ACEOF
9364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009365$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009366 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009367int
9368main ()
9369{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009370static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009371test_array [0] = 0
9372
9373 ;
9374 return 0;
9375}
9376_ACEOF
9377rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009378if { (ac_try="$ac_compile"
9379case "(($ac_try" in
9380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9381 *) ac_try_echo=$ac_try;;
9382esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009384 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009386 grep -v '^ *+' conftest.er1 >conftest.err
9387 rm -f conftest.er1
9388 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009390 (exit $ac_status); } && {
9391 test -z "$ac_c_werror_flag" ||
9392 test ! -s conftest.err
9393 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009394 ac_hi=-1 ac_mid=-1
9395 while :; do
9396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009397/* confdefs.h. */
9398_ACEOF
9399cat confdefs.h >>conftest.$ac_ext
9400cat >>conftest.$ac_ext <<_ACEOF
9401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009402$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009403 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009404int
9405main ()
9406{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009407static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009408test_array [0] = 0
9409
9410 ;
9411 return 0;
9412}
9413_ACEOF
9414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009415if { (ac_try="$ac_compile"
9416case "(($ac_try" in
9417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9418 *) ac_try_echo=$ac_try;;
9419esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009423 grep -v '^ *+' conftest.er1 >conftest.err
9424 rm -f conftest.er1
9425 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009427 (exit $ac_status); } && {
9428 test -z "$ac_c_werror_flag" ||
9429 test ! -s conftest.err
9430 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 ac_lo=$ac_mid; break
9432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009434sed 's/^/| /' conftest.$ac_ext >&5
9435
Martin v. Löwiseba40652007-08-30 20:10:57 +00009436 ac_hi=`expr '(' $ac_mid ')' - 1`
9437 if test $ac_mid -le $ac_hi; then
9438 ac_lo= ac_hi=
9439 break
9440 fi
9441 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009443
9444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 done
9446else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009448sed 's/^/| /' conftest.$ac_ext >&5
9449
Martin v. Löwiseba40652007-08-30 20:10:57 +00009450 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452
9453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009455
9456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009457# Binary search between lo and hi bounds.
9458while test "x$ac_lo" != "x$ac_hi"; do
9459 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009461/* confdefs.h. */
9462_ACEOF
9463cat confdefs.h >>conftest.$ac_ext
9464cat >>conftest.$ac_ext <<_ACEOF
9465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009466$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009467 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009468int
9469main ()
9470{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009471static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009472test_array [0] = 0
9473
9474 ;
9475 return 0;
9476}
9477_ACEOF
9478rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009479if { (ac_try="$ac_compile"
9480case "(($ac_try" in
9481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9482 *) ac_try_echo=$ac_try;;
9483esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009487 grep -v '^ *+' conftest.er1 >conftest.err
9488 rm -f conftest.er1
9489 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009491 (exit $ac_status); } && {
9492 test -z "$ac_c_werror_flag" ||
9493 test ! -s conftest.err
9494 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 ac_hi=$ac_mid
9496else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009498sed 's/^/| /' conftest.$ac_ext >&5
9499
Martin v. Löwiseba40652007-08-30 20:10:57 +00009500 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502
9503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009504done
9505case $ac_lo in
9506?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009508 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009509See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009510echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009511See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009512 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009513 else
9514 ac_cv_sizeof_float=0
9515 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009516esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009517else
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009519/* confdefs.h. */
9520_ACEOF
9521cat confdefs.h >>conftest.$ac_ext
9522cat >>conftest.$ac_ext <<_ACEOF
9523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009524$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009525 typedef float ac__type_sizeof_;
9526static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9527static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009528#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009529#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009530int
9531main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009532{
Martin v. Löwis11437992002-04-12 09:54:03 +00009533
9534 FILE *f = fopen ("conftest.val", "w");
9535 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009536 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009537 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009540 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009541 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009542 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 }
9544 else
9545 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009546 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009547 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009549 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009551 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009552
9553 ;
9554 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009555}
Martin v. Löwis11437992002-04-12 09:54:03 +00009556_ACEOF
9557rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009558if { (ac_try="$ac_link"
9559case "(($ac_try" in
9560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9561 *) ac_try_echo=$ac_try;;
9562esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009564 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009568 { (case "(($ac_try" in
9569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9570 *) ac_try_echo=$ac_try;;
9571esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009573 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 (exit $ac_status); }; }; then
9577 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009578else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009579 echo "$as_me: program exited with status $ac_status" >&5
9580echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009581sed 's/^/| /' conftest.$ac_ext >&5
9582
Martin v. Löwis11437992002-04-12 09:54:03 +00009583( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009584if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009585 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009586See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009587echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009588See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009589 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009590 else
9591 ac_cv_sizeof_float=0
9592 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009594rm -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 +00009595fi
9596rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009597fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009598{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9599echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009600
9601
9602
Martin v. Löwis11437992002-04-12 09:54:03 +00009603cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009604#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009605_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009606
9607
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009608{ echo "$as_me:$LINENO: checking for double" >&5
9609echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9610if test "${ac_cv_type_double+set}" = set; then
9611 echo $ECHO_N "(cached) $ECHO_C" >&6
9612else
9613 cat >conftest.$ac_ext <<_ACEOF
9614/* confdefs.h. */
9615_ACEOF
9616cat confdefs.h >>conftest.$ac_ext
9617cat >>conftest.$ac_ext <<_ACEOF
9618/* end confdefs.h. */
9619$ac_includes_default
9620typedef double ac__type_new_;
9621int
9622main ()
9623{
9624if ((ac__type_new_ *) 0)
9625 return 0;
9626if (sizeof (ac__type_new_))
9627 return 0;
9628 ;
9629 return 0;
9630}
9631_ACEOF
9632rm -f conftest.$ac_objext
9633if { (ac_try="$ac_compile"
9634case "(($ac_try" in
9635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9636 *) ac_try_echo=$ac_try;;
9637esac
9638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9639 (eval "$ac_compile") 2>conftest.er1
9640 ac_status=$?
9641 grep -v '^ *+' conftest.er1 >conftest.err
9642 rm -f conftest.er1
9643 cat conftest.err >&5
9644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9645 (exit $ac_status); } && {
9646 test -z "$ac_c_werror_flag" ||
9647 test ! -s conftest.err
9648 } && test -s conftest.$ac_objext; then
9649 ac_cv_type_double=yes
9650else
9651 echo "$as_me: failed program was:" >&5
9652sed 's/^/| /' conftest.$ac_ext >&5
9653
9654 ac_cv_type_double=no
9655fi
9656
9657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9658fi
9659{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9660echo "${ECHO_T}$ac_cv_type_double" >&6; }
9661
Martin v. Löwiseba40652007-08-30 20:10:57 +00009662# The cast to long int works around a bug in the HP C Compiler
9663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9665# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009666{ echo "$as_me:$LINENO: checking size of double" >&5
9667echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009668if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009669 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009670else
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 if test "$cross_compiling" = yes; then
9672 # Depending upon the size, compute the lo and hi bounds.
9673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* confdefs.h. */
9675_ACEOF
9676cat confdefs.h >>conftest.$ac_ext
9677cat >>conftest.$ac_ext <<_ACEOF
9678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009680 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009681int
9682main ()
9683{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009684static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009685test_array [0] = 0
9686
9687 ;
9688 return 0;
9689}
9690_ACEOF
9691rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009692if { (ac_try="$ac_compile"
9693case "(($ac_try" in
9694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9695 *) ac_try_echo=$ac_try;;
9696esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009698 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009700 grep -v '^ *+' conftest.er1 >conftest.err
9701 rm -f conftest.er1
9702 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009704 (exit $ac_status); } && {
9705 test -z "$ac_c_werror_flag" ||
9706 test ! -s conftest.err
9707 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_lo=0 ac_mid=0
9709 while :; do
9710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009711/* confdefs.h. */
9712_ACEOF
9713cat confdefs.h >>conftest.$ac_ext
9714cat >>conftest.$ac_ext <<_ACEOF
9715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009717 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009718int
9719main ()
9720{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009721static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009722test_array [0] = 0
9723
9724 ;
9725 return 0;
9726}
9727_ACEOF
9728rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009729if { (ac_try="$ac_compile"
9730case "(($ac_try" in
9731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9732 *) ac_try_echo=$ac_try;;
9733esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009737 grep -v '^ *+' conftest.er1 >conftest.err
9738 rm -f conftest.er1
9739 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009741 (exit $ac_status); } && {
9742 test -z "$ac_c_werror_flag" ||
9743 test ! -s conftest.err
9744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 ac_hi=$ac_mid; break
9746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009748sed 's/^/| /' conftest.$ac_ext >&5
9749
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750 ac_lo=`expr $ac_mid + 1`
9751 if test $ac_lo -le $ac_mid; then
9752 ac_lo= ac_hi=
9753 break
9754 fi
9755 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009757
9758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 done
9760else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009762sed 's/^/| /' conftest.$ac_ext >&5
9763
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009765/* confdefs.h. */
9766_ACEOF
9767cat confdefs.h >>conftest.$ac_ext
9768cat >>conftest.$ac_ext <<_ACEOF
9769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009770$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009771 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009772int
9773main ()
9774{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009775static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009776test_array [0] = 0
9777
9778 ;
9779 return 0;
9780}
9781_ACEOF
9782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783if { (ac_try="$ac_compile"
9784case "(($ac_try" in
9785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9786 *) ac_try_echo=$ac_try;;
9787esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009791 grep -v '^ *+' conftest.er1 >conftest.err
9792 rm -f conftest.er1
9793 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009795 (exit $ac_status); } && {
9796 test -z "$ac_c_werror_flag" ||
9797 test ! -s conftest.err
9798 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ac_hi=-1 ac_mid=-1
9800 while :; do
9801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009802/* confdefs.h. */
9803_ACEOF
9804cat confdefs.h >>conftest.$ac_ext
9805cat >>conftest.$ac_ext <<_ACEOF
9806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009807$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009808 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009809int
9810main ()
9811{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009812static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009813test_array [0] = 0
9814
9815 ;
9816 return 0;
9817}
9818_ACEOF
9819rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009820if { (ac_try="$ac_compile"
9821case "(($ac_try" in
9822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9823 *) ac_try_echo=$ac_try;;
9824esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009828 grep -v '^ *+' conftest.er1 >conftest.err
9829 rm -f conftest.er1
9830 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009832 (exit $ac_status); } && {
9833 test -z "$ac_c_werror_flag" ||
9834 test ! -s conftest.err
9835 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ac_lo=$ac_mid; break
9837else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009839sed 's/^/| /' conftest.$ac_ext >&5
9840
Martin v. Löwiseba40652007-08-30 20:10:57 +00009841 ac_hi=`expr '(' $ac_mid ')' - 1`
9842 if test $ac_mid -le $ac_hi; then
9843 ac_lo= ac_hi=
9844 break
9845 fi
9846 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009848
9849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 done
9851else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009853sed 's/^/| /' conftest.$ac_ext >&5
9854
Martin v. Löwiseba40652007-08-30 20:10:57 +00009855 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857
9858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009860
9861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009862# Binary search between lo and hi bounds.
9863while test "x$ac_lo" != "x$ac_hi"; do
9864 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009866/* confdefs.h. */
9867_ACEOF
9868cat confdefs.h >>conftest.$ac_ext
9869cat >>conftest.$ac_ext <<_ACEOF
9870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009871$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009872 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009873int
9874main ()
9875{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009876static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009877test_array [0] = 0
9878
9879 ;
9880 return 0;
9881}
9882_ACEOF
9883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009884if { (ac_try="$ac_compile"
9885case "(($ac_try" in
9886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9887 *) ac_try_echo=$ac_try;;
9888esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009892 grep -v '^ *+' conftest.er1 >conftest.err
9893 rm -f conftest.er1
9894 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009896 (exit $ac_status); } && {
9897 test -z "$ac_c_werror_flag" ||
9898 test ! -s conftest.err
9899 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 ac_hi=$ac_mid
9901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009903sed 's/^/| /' conftest.$ac_ext >&5
9904
Martin v. Löwiseba40652007-08-30 20:10:57 +00009905 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907
9908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009909done
9910case $ac_lo in
9911?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009913 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009914See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009915echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009916See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009917 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009918 else
9919 ac_cv_sizeof_double=0
9920 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009921esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009922else
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009924/* confdefs.h. */
9925_ACEOF
9926cat confdefs.h >>conftest.$ac_ext
9927cat >>conftest.$ac_ext <<_ACEOF
9928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009929$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009930 typedef double ac__type_sizeof_;
9931static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9932static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009933#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009934#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009935int
9936main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009937{
Martin v. Löwis11437992002-04-12 09:54:03 +00009938
9939 FILE *f = fopen ("conftest.val", "w");
9940 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009941 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009942 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009943 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009945 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009946 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009947 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009948 }
9949 else
9950 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009951 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009952 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009954 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009956 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009957
9958 ;
9959 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009960}
Martin v. Löwis11437992002-04-12 09:54:03 +00009961_ACEOF
9962rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009963if { (ac_try="$ac_link"
9964case "(($ac_try" in
9965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9966 *) ac_try_echo=$ac_try;;
9967esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009969 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009970 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009973 { (case "(($ac_try" in
9974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9975 *) ac_try_echo=$ac_try;;
9976esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009978 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009979 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 (exit $ac_status); }; }; then
9982 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009983else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009984 echo "$as_me: program exited with status $ac_status" >&5
9985echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009986sed 's/^/| /' conftest.$ac_ext >&5
9987
Martin v. Löwis11437992002-04-12 09:54:03 +00009988( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009989if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009990 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009991See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009992echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009993See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009994 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009995 else
9996 ac_cv_sizeof_double=0
9997 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009999rm -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 +000010000fi
10001rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010002fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010003{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10004echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010005
10006
10007
Martin v. Löwis11437992002-04-12 09:54:03 +000010008cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010009#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010010_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010011
10012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010013{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10014echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10015if test "${ac_cv_type_fpos_t+set}" = set; then
10016 echo $ECHO_N "(cached) $ECHO_C" >&6
10017else
10018 cat >conftest.$ac_ext <<_ACEOF
10019/* confdefs.h. */
10020_ACEOF
10021cat confdefs.h >>conftest.$ac_ext
10022cat >>conftest.$ac_ext <<_ACEOF
10023/* end confdefs.h. */
10024$ac_includes_default
10025typedef fpos_t ac__type_new_;
10026int
10027main ()
10028{
10029if ((ac__type_new_ *) 0)
10030 return 0;
10031if (sizeof (ac__type_new_))
10032 return 0;
10033 ;
10034 return 0;
10035}
10036_ACEOF
10037rm -f conftest.$ac_objext
10038if { (ac_try="$ac_compile"
10039case "(($ac_try" in
10040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10041 *) ac_try_echo=$ac_try;;
10042esac
10043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10044 (eval "$ac_compile") 2>conftest.er1
10045 ac_status=$?
10046 grep -v '^ *+' conftest.er1 >conftest.err
10047 rm -f conftest.er1
10048 cat conftest.err >&5
10049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10050 (exit $ac_status); } && {
10051 test -z "$ac_c_werror_flag" ||
10052 test ! -s conftest.err
10053 } && test -s conftest.$ac_objext; then
10054 ac_cv_type_fpos_t=yes
10055else
10056 echo "$as_me: failed program was:" >&5
10057sed 's/^/| /' conftest.$ac_ext >&5
10058
10059 ac_cv_type_fpos_t=no
10060fi
10061
10062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10063fi
10064{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10065echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10066
Martin v. Löwiseba40652007-08-30 20:10:57 +000010067# The cast to long int works around a bug in the HP C Compiler
10068# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10069# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10070# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010071{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10072echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010073if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010074 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010075else
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 if test "$cross_compiling" = yes; then
10077 # Depending upon the size, compute the lo and hi bounds.
10078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010079/* confdefs.h. */
10080_ACEOF
10081cat confdefs.h >>conftest.$ac_ext
10082cat >>conftest.$ac_ext <<_ACEOF
10083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010084$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010085 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010086int
10087main ()
10088{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010089static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010090test_array [0] = 0
10091
10092 ;
10093 return 0;
10094}
10095_ACEOF
10096rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010097if { (ac_try="$ac_compile"
10098case "(($ac_try" in
10099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10100 *) ac_try_echo=$ac_try;;
10101esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010105 grep -v '^ *+' conftest.er1 >conftest.err
10106 rm -f conftest.er1
10107 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010109 (exit $ac_status); } && {
10110 test -z "$ac_c_werror_flag" ||
10111 test ! -s conftest.err
10112 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ac_lo=0 ac_mid=0
10114 while :; do
10115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010116/* confdefs.h. */
10117_ACEOF
10118cat confdefs.h >>conftest.$ac_ext
10119cat >>conftest.$ac_ext <<_ACEOF
10120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010121$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010122 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010123int
10124main ()
10125{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010127test_array [0] = 0
10128
10129 ;
10130 return 0;
10131}
10132_ACEOF
10133rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010134if { (ac_try="$ac_compile"
10135case "(($ac_try" in
10136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10137 *) ac_try_echo=$ac_try;;
10138esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010142 grep -v '^ *+' conftest.er1 >conftest.err
10143 rm -f conftest.er1
10144 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010146 (exit $ac_status); } && {
10147 test -z "$ac_c_werror_flag" ||
10148 test ! -s conftest.err
10149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 ac_hi=$ac_mid; break
10151else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010153sed 's/^/| /' conftest.$ac_ext >&5
10154
Martin v. Löwiseba40652007-08-30 20:10:57 +000010155 ac_lo=`expr $ac_mid + 1`
10156 if test $ac_lo -le $ac_mid; then
10157 ac_lo= ac_hi=
10158 break
10159 fi
10160 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010162
10163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 done
10165else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010167sed 's/^/| /' conftest.$ac_ext >&5
10168
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010170/* confdefs.h. */
10171_ACEOF
10172cat confdefs.h >>conftest.$ac_ext
10173cat >>conftest.$ac_ext <<_ACEOF
10174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010175$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010176 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010177int
10178main ()
10179{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010180static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010181test_array [0] = 0
10182
10183 ;
10184 return 0;
10185}
10186_ACEOF
10187rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010188if { (ac_try="$ac_compile"
10189case "(($ac_try" in
10190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10191 *) ac_try_echo=$ac_try;;
10192esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010194 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010196 grep -v '^ *+' conftest.er1 >conftest.err
10197 rm -f conftest.er1
10198 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010200 (exit $ac_status); } && {
10201 test -z "$ac_c_werror_flag" ||
10202 test ! -s conftest.err
10203 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 ac_hi=-1 ac_mid=-1
10205 while :; do
10206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010207/* confdefs.h. */
10208_ACEOF
10209cat confdefs.h >>conftest.$ac_ext
10210cat >>conftest.$ac_ext <<_ACEOF
10211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010212$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010213 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010214int
10215main ()
10216{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010218test_array [0] = 0
10219
10220 ;
10221 return 0;
10222}
10223_ACEOF
10224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010225if { (ac_try="$ac_compile"
10226case "(($ac_try" in
10227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10228 *) ac_try_echo=$ac_try;;
10229esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010233 grep -v '^ *+' conftest.er1 >conftest.err
10234 rm -f conftest.er1
10235 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010237 (exit $ac_status); } && {
10238 test -z "$ac_c_werror_flag" ||
10239 test ! -s conftest.err
10240 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 ac_lo=$ac_mid; break
10242else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010244sed 's/^/| /' conftest.$ac_ext >&5
10245
Martin v. Löwiseba40652007-08-30 20:10:57 +000010246 ac_hi=`expr '(' $ac_mid ')' - 1`
10247 if test $ac_mid -le $ac_hi; then
10248 ac_lo= ac_hi=
10249 break
10250 fi
10251 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010253
10254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 done
10256else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010258sed 's/^/| /' conftest.$ac_ext >&5
10259
Martin v. Löwiseba40652007-08-30 20:10:57 +000010260 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262
10263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010265
10266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010267# Binary search between lo and hi bounds.
10268while test "x$ac_lo" != "x$ac_hi"; do
10269 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010271/* confdefs.h. */
10272_ACEOF
10273cat confdefs.h >>conftest.$ac_ext
10274cat >>conftest.$ac_ext <<_ACEOF
10275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010276$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010277 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010278int
10279main ()
10280{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010281static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010282test_array [0] = 0
10283
10284 ;
10285 return 0;
10286}
10287_ACEOF
10288rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010289if { (ac_try="$ac_compile"
10290case "(($ac_try" in
10291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10292 *) ac_try_echo=$ac_try;;
10293esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010297 grep -v '^ *+' conftest.er1 >conftest.err
10298 rm -f conftest.er1
10299 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010301 (exit $ac_status); } && {
10302 test -z "$ac_c_werror_flag" ||
10303 test ! -s conftest.err
10304 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 ac_hi=$ac_mid
10306else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010308sed 's/^/| /' conftest.$ac_ext >&5
10309
Martin v. Löwiseba40652007-08-30 20:10:57 +000010310 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010312
10313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010314done
10315case $ac_lo in
10316?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010317'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010318 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010319See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010320echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010321See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010322 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010323 else
10324 ac_cv_sizeof_fpos_t=0
10325 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010326esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010327else
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010329/* confdefs.h. */
10330_ACEOF
10331cat confdefs.h >>conftest.$ac_ext
10332cat >>conftest.$ac_ext <<_ACEOF
10333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010334$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010335 typedef fpos_t ac__type_sizeof_;
10336static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10337static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010338#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010339#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010340int
10341main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010342{
Martin v. Löwis11437992002-04-12 09:54:03 +000010343
10344 FILE *f = fopen ("conftest.val", "w");
10345 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010346 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010347 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010349 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010350 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010351 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010352 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 }
10354 else
10355 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010356 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010357 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010358 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010359 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010361 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
10363 ;
10364 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010365}
Martin v. Löwis11437992002-04-12 09:54:03 +000010366_ACEOF
10367rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010368if { (ac_try="$ac_link"
10369case "(($ac_try" in
10370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10371 *) ac_try_echo=$ac_try;;
10372esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010374 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010378 { (case "(($ac_try" in
10379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10380 *) ac_try_echo=$ac_try;;
10381esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010383 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 (exit $ac_status); }; }; then
10387 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010388else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010389 echo "$as_me: program exited with status $ac_status" >&5
10390echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010391sed 's/^/| /' conftest.$ac_ext >&5
10392
Martin v. Löwis11437992002-04-12 09:54:03 +000010393( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010394if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010395 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010396See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010397echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010398See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010399 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010400 else
10401 ac_cv_sizeof_fpos_t=0
10402 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010404rm -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 +000010405fi
10406rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010407fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010408{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10409echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010410
10411
10412
Martin v. Löwis11437992002-04-12 09:54:03 +000010413cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010414#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010415_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010416
Michael W. Hudson54241132001-12-07 15:38:26 +000010417
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010418{ echo "$as_me:$LINENO: checking for size_t" >&5
10419echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10420if test "${ac_cv_type_size_t+set}" = set; then
10421 echo $ECHO_N "(cached) $ECHO_C" >&6
10422else
10423 cat >conftest.$ac_ext <<_ACEOF
10424/* confdefs.h. */
10425_ACEOF
10426cat confdefs.h >>conftest.$ac_ext
10427cat >>conftest.$ac_ext <<_ACEOF
10428/* end confdefs.h. */
10429$ac_includes_default
10430typedef size_t ac__type_new_;
10431int
10432main ()
10433{
10434if ((ac__type_new_ *) 0)
10435 return 0;
10436if (sizeof (ac__type_new_))
10437 return 0;
10438 ;
10439 return 0;
10440}
10441_ACEOF
10442rm -f conftest.$ac_objext
10443if { (ac_try="$ac_compile"
10444case "(($ac_try" in
10445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10446 *) ac_try_echo=$ac_try;;
10447esac
10448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10449 (eval "$ac_compile") 2>conftest.er1
10450 ac_status=$?
10451 grep -v '^ *+' conftest.er1 >conftest.err
10452 rm -f conftest.er1
10453 cat conftest.err >&5
10454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455 (exit $ac_status); } && {
10456 test -z "$ac_c_werror_flag" ||
10457 test ! -s conftest.err
10458 } && test -s conftest.$ac_objext; then
10459 ac_cv_type_size_t=yes
10460else
10461 echo "$as_me: failed program was:" >&5
10462sed 's/^/| /' conftest.$ac_ext >&5
10463
10464 ac_cv_type_size_t=no
10465fi
10466
10467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10468fi
10469{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10470echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10471
Martin v. Löwiseba40652007-08-30 20:10:57 +000010472# The cast to long int works around a bug in the HP C Compiler
10473# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10474# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10475# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010476{ echo "$as_me:$LINENO: checking size of size_t" >&5
10477echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010478if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010479 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010480else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481 if test "$cross_compiling" = yes; then
10482 # Depending upon the size, compute the lo and hi bounds.
10483cat >conftest.$ac_ext <<_ACEOF
10484/* confdefs.h. */
10485_ACEOF
10486cat confdefs.h >>conftest.$ac_ext
10487cat >>conftest.$ac_ext <<_ACEOF
10488/* end confdefs.h. */
10489$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010490 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491int
10492main ()
10493{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010495test_array [0] = 0
10496
10497 ;
10498 return 0;
10499}
10500_ACEOF
10501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010502if { (ac_try="$ac_compile"
10503case "(($ac_try" in
10504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10505 *) ac_try_echo=$ac_try;;
10506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010509 ac_status=$?
10510 grep -v '^ *+' conftest.er1 >conftest.err
10511 rm -f conftest.er1
10512 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010514 (exit $ac_status); } && {
10515 test -z "$ac_c_werror_flag" ||
10516 test ! -s conftest.err
10517 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518 ac_lo=0 ac_mid=0
10519 while :; do
10520 cat >conftest.$ac_ext <<_ACEOF
10521/* confdefs.h. */
10522_ACEOF
10523cat confdefs.h >>conftest.$ac_ext
10524cat >>conftest.$ac_ext <<_ACEOF
10525/* end confdefs.h. */
10526$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010527 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528int
10529main ()
10530{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010531static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532test_array [0] = 0
10533
10534 ;
10535 return 0;
10536}
10537_ACEOF
10538rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010539if { (ac_try="$ac_compile"
10540case "(($ac_try" in
10541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10542 *) ac_try_echo=$ac_try;;
10543esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010546 ac_status=$?
10547 grep -v '^ *+' conftest.er1 >conftest.err
10548 rm -f conftest.er1
10549 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010551 (exit $ac_status); } && {
10552 test -z "$ac_c_werror_flag" ||
10553 test ! -s conftest.err
10554 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010555 ac_hi=$ac_mid; break
10556else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010557 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558sed 's/^/| /' conftest.$ac_ext >&5
10559
Martin v. Löwiseba40652007-08-30 20:10:57 +000010560 ac_lo=`expr $ac_mid + 1`
10561 if test $ac_lo -le $ac_mid; then
10562 ac_lo= ac_hi=
10563 break
10564 fi
10565 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010567
10568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569 done
10570else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010571 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572sed 's/^/| /' conftest.$ac_ext >&5
10573
Martin v. Löwiseba40652007-08-30 20:10:57 +000010574 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010575/* confdefs.h. */
10576_ACEOF
10577cat confdefs.h >>conftest.$ac_ext
10578cat >>conftest.$ac_ext <<_ACEOF
10579/* end confdefs.h. */
10580$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010581 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582int
10583main ()
10584{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010585static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586test_array [0] = 0
10587
10588 ;
10589 return 0;
10590}
10591_ACEOF
10592rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010593if { (ac_try="$ac_compile"
10594case "(($ac_try" in
10595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10596 *) ac_try_echo=$ac_try;;
10597esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010599 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600 ac_status=$?
10601 grep -v '^ *+' conftest.er1 >conftest.err
10602 rm -f conftest.er1
10603 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010605 (exit $ac_status); } && {
10606 test -z "$ac_c_werror_flag" ||
10607 test ! -s conftest.err
10608 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010609 ac_hi=-1 ac_mid=-1
10610 while :; do
10611 cat >conftest.$ac_ext <<_ACEOF
10612/* confdefs.h. */
10613_ACEOF
10614cat confdefs.h >>conftest.$ac_ext
10615cat >>conftest.$ac_ext <<_ACEOF
10616/* end confdefs.h. */
10617$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010618 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010619int
10620main ()
10621{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010623test_array [0] = 0
10624
10625 ;
10626 return 0;
10627}
10628_ACEOF
10629rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010630if { (ac_try="$ac_compile"
10631case "(($ac_try" in
10632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10633 *) ac_try_echo=$ac_try;;
10634esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010637 ac_status=$?
10638 grep -v '^ *+' conftest.er1 >conftest.err
10639 rm -f conftest.er1
10640 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010642 (exit $ac_status); } && {
10643 test -z "$ac_c_werror_flag" ||
10644 test ! -s conftest.err
10645 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646 ac_lo=$ac_mid; break
10647else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010648 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649sed 's/^/| /' conftest.$ac_ext >&5
10650
Martin v. Löwiseba40652007-08-30 20:10:57 +000010651 ac_hi=`expr '(' $ac_mid ')' - 1`
10652 if test $ac_mid -le $ac_hi; then
10653 ac_lo= ac_hi=
10654 break
10655 fi
10656 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010658
10659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660 done
10661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010662 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663sed 's/^/| /' conftest.$ac_ext >&5
10664
Martin v. Löwiseba40652007-08-30 20:10:57 +000010665 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010667
10668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010670
10671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672# Binary search between lo and hi bounds.
10673while test "x$ac_lo" != "x$ac_hi"; do
10674 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10675 cat >conftest.$ac_ext <<_ACEOF
10676/* confdefs.h. */
10677_ACEOF
10678cat confdefs.h >>conftest.$ac_ext
10679cat >>conftest.$ac_ext <<_ACEOF
10680/* end confdefs.h. */
10681$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010682 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010683int
10684main ()
10685{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010686static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687test_array [0] = 0
10688
10689 ;
10690 return 0;
10691}
10692_ACEOF
10693rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010694if { (ac_try="$ac_compile"
10695case "(($ac_try" in
10696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10697 *) ac_try_echo=$ac_try;;
10698esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010701 ac_status=$?
10702 grep -v '^ *+' conftest.er1 >conftest.err
10703 rm -f conftest.er1
10704 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010706 (exit $ac_status); } && {
10707 test -z "$ac_c_werror_flag" ||
10708 test ! -s conftest.err
10709 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710 ac_hi=$ac_mid
10711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010712 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010713sed 's/^/| /' conftest.$ac_ext >&5
10714
Martin v. Löwiseba40652007-08-30 20:10:57 +000010715 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010717
10718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719done
10720case $ac_lo in
10721?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010723 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010725echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010726See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010727 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010728 else
10729 ac_cv_sizeof_size_t=0
10730 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010731esac
10732else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010733 cat >conftest.$ac_ext <<_ACEOF
10734/* confdefs.h. */
10735_ACEOF
10736cat confdefs.h >>conftest.$ac_ext
10737cat >>conftest.$ac_ext <<_ACEOF
10738/* end confdefs.h. */
10739$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010740 typedef size_t ac__type_sizeof_;
10741static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10742static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010743#include <stdio.h>
10744#include <stdlib.h>
10745int
10746main ()
10747{
10748
10749 FILE *f = fopen ("conftest.val", "w");
10750 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010751 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010752 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010753 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010754 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010755 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010756 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010757 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010758 }
10759 else
10760 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010761 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010762 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010763 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010764 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010765 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010766 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010767
10768 ;
10769 return 0;
10770}
10771_ACEOF
10772rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010773if { (ac_try="$ac_link"
10774case "(($ac_try" in
10775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10776 *) ac_try_echo=$ac_try;;
10777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010779 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010780 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010782 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010783 { (case "(($ac_try" in
10784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10785 *) ac_try_echo=$ac_try;;
10786esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010788 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010789 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010791 (exit $ac_status); }; }; then
10792 ac_cv_sizeof_size_t=`cat conftest.val`
10793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010794 echo "$as_me: program exited with status $ac_status" >&5
10795echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010796sed 's/^/| /' conftest.$ac_ext >&5
10797
10798( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010799if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010800 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010801See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010802echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010803See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010804 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010805 else
10806 ac_cv_sizeof_size_t=0
10807 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010809rm -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 +000010810fi
10811rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010812fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010813{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10814echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010815
10816
10817
Martin v. Löwis18e16552006-02-15 17:27:45 +000010818cat >>confdefs.h <<_ACEOF
10819#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10820_ACEOF
10821
10822
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010823{ echo "$as_me:$LINENO: checking for pid_t" >&5
10824echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10825if test "${ac_cv_type_pid_t+set}" = set; then
10826 echo $ECHO_N "(cached) $ECHO_C" >&6
10827else
10828 cat >conftest.$ac_ext <<_ACEOF
10829/* confdefs.h. */
10830_ACEOF
10831cat confdefs.h >>conftest.$ac_ext
10832cat >>conftest.$ac_ext <<_ACEOF
10833/* end confdefs.h. */
10834$ac_includes_default
10835typedef pid_t ac__type_new_;
10836int
10837main ()
10838{
10839if ((ac__type_new_ *) 0)
10840 return 0;
10841if (sizeof (ac__type_new_))
10842 return 0;
10843 ;
10844 return 0;
10845}
10846_ACEOF
10847rm -f conftest.$ac_objext
10848if { (ac_try="$ac_compile"
10849case "(($ac_try" in
10850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10851 *) ac_try_echo=$ac_try;;
10852esac
10853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10854 (eval "$ac_compile") 2>conftest.er1
10855 ac_status=$?
10856 grep -v '^ *+' conftest.er1 >conftest.err
10857 rm -f conftest.er1
10858 cat conftest.err >&5
10859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10860 (exit $ac_status); } && {
10861 test -z "$ac_c_werror_flag" ||
10862 test ! -s conftest.err
10863 } && test -s conftest.$ac_objext; then
10864 ac_cv_type_pid_t=yes
10865else
10866 echo "$as_me: failed program was:" >&5
10867sed 's/^/| /' conftest.$ac_ext >&5
10868
10869 ac_cv_type_pid_t=no
10870fi
10871
10872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10873fi
10874{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10875echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10876
Christian Heimes951cc0f2008-01-31 23:08:23 +000010877# The cast to long int works around a bug in the HP C Compiler
10878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10880# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010881{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10882echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010883if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010884 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010885else
10886 if test "$cross_compiling" = yes; then
10887 # Depending upon the size, compute the lo and hi bounds.
10888cat >conftest.$ac_ext <<_ACEOF
10889/* confdefs.h. */
10890_ACEOF
10891cat confdefs.h >>conftest.$ac_ext
10892cat >>conftest.$ac_ext <<_ACEOF
10893/* end confdefs.h. */
10894$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010895 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010896int
10897main ()
10898{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010899static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010900test_array [0] = 0
10901
10902 ;
10903 return 0;
10904}
10905_ACEOF
10906rm -f conftest.$ac_objext
10907if { (ac_try="$ac_compile"
10908case "(($ac_try" in
10909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10910 *) ac_try_echo=$ac_try;;
10911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010913 (eval "$ac_compile") 2>conftest.er1
10914 ac_status=$?
10915 grep -v '^ *+' conftest.er1 >conftest.err
10916 rm -f conftest.er1
10917 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010919 (exit $ac_status); } && {
10920 test -z "$ac_c_werror_flag" ||
10921 test ! -s conftest.err
10922 } && test -s conftest.$ac_objext; then
10923 ac_lo=0 ac_mid=0
10924 while :; do
10925 cat >conftest.$ac_ext <<_ACEOF
10926/* confdefs.h. */
10927_ACEOF
10928cat confdefs.h >>conftest.$ac_ext
10929cat >>conftest.$ac_ext <<_ACEOF
10930/* end confdefs.h. */
10931$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010932 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010933int
10934main ()
10935{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010936static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010937test_array [0] = 0
10938
10939 ;
10940 return 0;
10941}
10942_ACEOF
10943rm -f conftest.$ac_objext
10944if { (ac_try="$ac_compile"
10945case "(($ac_try" in
10946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10947 *) ac_try_echo=$ac_try;;
10948esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010950 (eval "$ac_compile") 2>conftest.er1
10951 ac_status=$?
10952 grep -v '^ *+' conftest.er1 >conftest.err
10953 rm -f conftest.er1
10954 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010956 (exit $ac_status); } && {
10957 test -z "$ac_c_werror_flag" ||
10958 test ! -s conftest.err
10959 } && test -s conftest.$ac_objext; then
10960 ac_hi=$ac_mid; break
10961else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010962 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010963sed 's/^/| /' conftest.$ac_ext >&5
10964
10965 ac_lo=`expr $ac_mid + 1`
10966 if test $ac_lo -le $ac_mid; then
10967 ac_lo= ac_hi=
10968 break
10969 fi
10970 ac_mid=`expr 2 '*' $ac_mid + 1`
10971fi
10972
10973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10974 done
10975else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010976 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010977sed 's/^/| /' conftest.$ac_ext >&5
10978
10979 cat >conftest.$ac_ext <<_ACEOF
10980/* confdefs.h. */
10981_ACEOF
10982cat confdefs.h >>conftest.$ac_ext
10983cat >>conftest.$ac_ext <<_ACEOF
10984/* end confdefs.h. */
10985$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010986 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010987int
10988main ()
10989{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010990static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010991test_array [0] = 0
10992
10993 ;
10994 return 0;
10995}
10996_ACEOF
10997rm -f conftest.$ac_objext
10998if { (ac_try="$ac_compile"
10999case "(($ac_try" in
11000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11001 *) ac_try_echo=$ac_try;;
11002esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011004 (eval "$ac_compile") 2>conftest.er1
11005 ac_status=$?
11006 grep -v '^ *+' conftest.er1 >conftest.err
11007 rm -f conftest.er1
11008 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011010 (exit $ac_status); } && {
11011 test -z "$ac_c_werror_flag" ||
11012 test ! -s conftest.err
11013 } && test -s conftest.$ac_objext; then
11014 ac_hi=-1 ac_mid=-1
11015 while :; do
11016 cat >conftest.$ac_ext <<_ACEOF
11017/* confdefs.h. */
11018_ACEOF
11019cat confdefs.h >>conftest.$ac_ext
11020cat >>conftest.$ac_ext <<_ACEOF
11021/* end confdefs.h. */
11022$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011023 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011024int
11025main ()
11026{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011027static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011028test_array [0] = 0
11029
11030 ;
11031 return 0;
11032}
11033_ACEOF
11034rm -f conftest.$ac_objext
11035if { (ac_try="$ac_compile"
11036case "(($ac_try" in
11037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11038 *) ac_try_echo=$ac_try;;
11039esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011041 (eval "$ac_compile") 2>conftest.er1
11042 ac_status=$?
11043 grep -v '^ *+' conftest.er1 >conftest.err
11044 rm -f conftest.er1
11045 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011047 (exit $ac_status); } && {
11048 test -z "$ac_c_werror_flag" ||
11049 test ! -s conftest.err
11050 } && test -s conftest.$ac_objext; then
11051 ac_lo=$ac_mid; break
11052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011053 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011054sed 's/^/| /' conftest.$ac_ext >&5
11055
11056 ac_hi=`expr '(' $ac_mid ')' - 1`
11057 if test $ac_mid -le $ac_hi; then
11058 ac_lo= ac_hi=
11059 break
11060 fi
11061 ac_mid=`expr 2 '*' $ac_mid`
11062fi
11063
11064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11065 done
11066else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011067 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011068sed 's/^/| /' conftest.$ac_ext >&5
11069
11070 ac_lo= ac_hi=
11071fi
11072
11073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11074fi
11075
11076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11077# Binary search between lo and hi bounds.
11078while test "x$ac_lo" != "x$ac_hi"; do
11079 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11080 cat >conftest.$ac_ext <<_ACEOF
11081/* confdefs.h. */
11082_ACEOF
11083cat confdefs.h >>conftest.$ac_ext
11084cat >>conftest.$ac_ext <<_ACEOF
11085/* end confdefs.h. */
11086$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011087 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011088int
11089main ()
11090{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011091static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011092test_array [0] = 0
11093
11094 ;
11095 return 0;
11096}
11097_ACEOF
11098rm -f conftest.$ac_objext
11099if { (ac_try="$ac_compile"
11100case "(($ac_try" in
11101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11102 *) ac_try_echo=$ac_try;;
11103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011105 (eval "$ac_compile") 2>conftest.er1
11106 ac_status=$?
11107 grep -v '^ *+' conftest.er1 >conftest.err
11108 rm -f conftest.er1
11109 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011111 (exit $ac_status); } && {
11112 test -z "$ac_c_werror_flag" ||
11113 test ! -s conftest.err
11114 } && test -s conftest.$ac_objext; then
11115 ac_hi=$ac_mid
11116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011117 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011118sed 's/^/| /' conftest.$ac_ext >&5
11119
11120 ac_lo=`expr '(' $ac_mid ')' + 1`
11121fi
11122
11123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11124done
11125case $ac_lo in
11126?*) ac_cv_sizeof_pid_t=$ac_lo;;
11127'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011128 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011129See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011130echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011131See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011132 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011133 else
11134 ac_cv_sizeof_pid_t=0
11135 fi ;;
11136esac
11137else
11138 cat >conftest.$ac_ext <<_ACEOF
11139/* confdefs.h. */
11140_ACEOF
11141cat confdefs.h >>conftest.$ac_ext
11142cat >>conftest.$ac_ext <<_ACEOF
11143/* end confdefs.h. */
11144$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011145 typedef pid_t ac__type_sizeof_;
11146static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11147static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011148#include <stdio.h>
11149#include <stdlib.h>
11150int
11151main ()
11152{
11153
11154 FILE *f = fopen ("conftest.val", "w");
11155 if (! f)
11156 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011157 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011158 {
11159 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011160 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011161 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011162 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011163 }
11164 else
11165 {
11166 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011167 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011168 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011169 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011170 }
11171 return ferror (f) || fclose (f) != 0;
11172
11173 ;
11174 return 0;
11175}
11176_ACEOF
11177rm -f conftest$ac_exeext
11178if { (ac_try="$ac_link"
11179case "(($ac_try" in
11180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11181 *) ac_try_echo=$ac_try;;
11182esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011184 (eval "$ac_link") 2>&5
11185 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011187 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11188 { (case "(($ac_try" in
11189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11190 *) ac_try_echo=$ac_try;;
11191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011193 (eval "$ac_try") 2>&5
11194 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011196 (exit $ac_status); }; }; then
11197 ac_cv_sizeof_pid_t=`cat conftest.val`
11198else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011199 echo "$as_me: program exited with status $ac_status" >&5
11200echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011201sed 's/^/| /' conftest.$ac_ext >&5
11202
11203( exit $ac_status )
11204if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011205 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011206See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011207echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011208See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011209 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011210 else
11211 ac_cv_sizeof_pid_t=0
11212 fi
11213fi
11214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11215fi
11216rm -f conftest.val
11217fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011218{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11219echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011220
11221
11222
11223cat >>confdefs.h <<_ACEOF
11224#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11225_ACEOF
11226
11227
Michael W. Hudson54241132001-12-07 15:38:26 +000011228
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011229{ echo "$as_me:$LINENO: checking for long long support" >&5
11230echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011231have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011232cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011233/* confdefs.h. */
11234_ACEOF
11235cat confdefs.h >>conftest.$ac_ext
11236cat >>conftest.$ac_ext <<_ACEOF
11237/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011238
Martin v. Löwis11437992002-04-12 09:54:03 +000011239int
11240main ()
11241{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011242long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 ;
11244 return 0;
11245}
11246_ACEOF
11247rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011248if { (ac_try="$ac_compile"
11249case "(($ac_try" in
11250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11251 *) ac_try_echo=$ac_try;;
11252esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011256 grep -v '^ *+' conftest.er1 >conftest.err
11257 rm -f conftest.er1
11258 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011260 (exit $ac_status); } && {
11261 test -z "$ac_c_werror_flag" ||
11262 test ! -s conftest.err
11263 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011264
11265
11266cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011267#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011268_ACEOF
11269
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011270 have_long_long=yes
11271
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011274sed 's/^/| /' conftest.$ac_ext >&5
11275
Martin v. Löwiseba40652007-08-30 20:10:57 +000011276
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011278
11279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011280{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11281echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011282if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011283{ echo "$as_me:$LINENO: checking for long long" >&5
11284echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11285if test "${ac_cv_type_long_long+set}" = set; then
11286 echo $ECHO_N "(cached) $ECHO_C" >&6
11287else
11288 cat >conftest.$ac_ext <<_ACEOF
11289/* confdefs.h. */
11290_ACEOF
11291cat confdefs.h >>conftest.$ac_ext
11292cat >>conftest.$ac_ext <<_ACEOF
11293/* end confdefs.h. */
11294$ac_includes_default
11295typedef long long ac__type_new_;
11296int
11297main ()
11298{
11299if ((ac__type_new_ *) 0)
11300 return 0;
11301if (sizeof (ac__type_new_))
11302 return 0;
11303 ;
11304 return 0;
11305}
11306_ACEOF
11307rm -f conftest.$ac_objext
11308if { (ac_try="$ac_compile"
11309case "(($ac_try" in
11310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11311 *) ac_try_echo=$ac_try;;
11312esac
11313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11314 (eval "$ac_compile") 2>conftest.er1
11315 ac_status=$?
11316 grep -v '^ *+' conftest.er1 >conftest.err
11317 rm -f conftest.er1
11318 cat conftest.err >&5
11319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11320 (exit $ac_status); } && {
11321 test -z "$ac_c_werror_flag" ||
11322 test ! -s conftest.err
11323 } && test -s conftest.$ac_objext; then
11324 ac_cv_type_long_long=yes
11325else
11326 echo "$as_me: failed program was:" >&5
11327sed 's/^/| /' conftest.$ac_ext >&5
11328
11329 ac_cv_type_long_long=no
11330fi
11331
11332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11333fi
11334{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11335echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11336
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337# The cast to long int works around a bug in the HP C Compiler
11338# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11339# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11340# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011341{ echo "$as_me:$LINENO: checking size of long long" >&5
11342echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011343if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011344 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011345else
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 if test "$cross_compiling" = yes; then
11347 # Depending upon the size, compute the lo and hi bounds.
11348cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011349/* confdefs.h. */
11350_ACEOF
11351cat confdefs.h >>conftest.$ac_ext
11352cat >>conftest.$ac_ext <<_ACEOF
11353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011354$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011355 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011356int
11357main ()
11358{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011359static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011360test_array [0] = 0
11361
11362 ;
11363 return 0;
11364}
11365_ACEOF
11366rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011367if { (ac_try="$ac_compile"
11368case "(($ac_try" in
11369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11370 *) ac_try_echo=$ac_try;;
11371esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011373 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011374 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011375 grep -v '^ *+' conftest.er1 >conftest.err
11376 rm -f conftest.er1
11377 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011379 (exit $ac_status); } && {
11380 test -z "$ac_c_werror_flag" ||
11381 test ! -s conftest.err
11382 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ac_lo=0 ac_mid=0
11384 while :; do
11385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011386/* confdefs.h. */
11387_ACEOF
11388cat confdefs.h >>conftest.$ac_ext
11389cat >>conftest.$ac_ext <<_ACEOF
11390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011391$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011392 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011393int
11394main ()
11395{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011397test_array [0] = 0
11398
11399 ;
11400 return 0;
11401}
11402_ACEOF
11403rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011404if { (ac_try="$ac_compile"
11405case "(($ac_try" in
11406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11407 *) ac_try_echo=$ac_try;;
11408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011412 grep -v '^ *+' conftest.er1 >conftest.err
11413 rm -f conftest.er1
11414 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011416 (exit $ac_status); } && {
11417 test -z "$ac_c_werror_flag" ||
11418 test ! -s conftest.err
11419 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 ac_hi=$ac_mid; break
11421else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011423sed 's/^/| /' conftest.$ac_ext >&5
11424
Martin v. Löwiseba40652007-08-30 20:10:57 +000011425 ac_lo=`expr $ac_mid + 1`
11426 if test $ac_lo -le $ac_mid; then
11427 ac_lo= ac_hi=
11428 break
11429 fi
11430 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011432
11433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 done
11435else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011437sed 's/^/| /' conftest.$ac_ext >&5
11438
Martin v. Löwiseba40652007-08-30 20:10:57 +000011439 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011440/* confdefs.h. */
11441_ACEOF
11442cat confdefs.h >>conftest.$ac_ext
11443cat >>conftest.$ac_ext <<_ACEOF
11444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011445$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011446 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011447int
11448main ()
11449{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011450static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011451test_array [0] = 0
11452
11453 ;
11454 return 0;
11455}
11456_ACEOF
11457rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011458if { (ac_try="$ac_compile"
11459case "(($ac_try" in
11460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11461 *) ac_try_echo=$ac_try;;
11462esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011466 grep -v '^ *+' conftest.er1 >conftest.err
11467 rm -f conftest.er1
11468 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011470 (exit $ac_status); } && {
11471 test -z "$ac_c_werror_flag" ||
11472 test ! -s conftest.err
11473 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011474 ac_hi=-1 ac_mid=-1
11475 while :; do
11476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011477/* confdefs.h. */
11478_ACEOF
11479cat confdefs.h >>conftest.$ac_ext
11480cat >>conftest.$ac_ext <<_ACEOF
11481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011482$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011483 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011484int
11485main ()
11486{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011487static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011488test_array [0] = 0
11489
11490 ;
11491 return 0;
11492}
11493_ACEOF
11494rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011495if { (ac_try="$ac_compile"
11496case "(($ac_try" in
11497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11498 *) ac_try_echo=$ac_try;;
11499esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011503 grep -v '^ *+' conftest.er1 >conftest.err
11504 rm -f conftest.er1
11505 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011507 (exit $ac_status); } && {
11508 test -z "$ac_c_werror_flag" ||
11509 test ! -s conftest.err
11510 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 ac_lo=$ac_mid; break
11512else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011514sed 's/^/| /' conftest.$ac_ext >&5
11515
Martin v. Löwiseba40652007-08-30 20:10:57 +000011516 ac_hi=`expr '(' $ac_mid ')' - 1`
11517 if test $ac_mid -le $ac_hi; then
11518 ac_lo= ac_hi=
11519 break
11520 fi
11521 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011523
11524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 done
11526else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011528sed 's/^/| /' conftest.$ac_ext >&5
11529
Martin v. Löwiseba40652007-08-30 20:10:57 +000011530 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532
11533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011535
11536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011537# Binary search between lo and hi bounds.
11538while test "x$ac_lo" != "x$ac_hi"; do
11539 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011541/* confdefs.h. */
11542_ACEOF
11543cat confdefs.h >>conftest.$ac_ext
11544cat >>conftest.$ac_ext <<_ACEOF
11545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011546$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011547 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011548int
11549main ()
11550{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011551static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011552test_array [0] = 0
11553
11554 ;
11555 return 0;
11556}
11557_ACEOF
11558rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011559if { (ac_try="$ac_compile"
11560case "(($ac_try" in
11561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11562 *) ac_try_echo=$ac_try;;
11563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011567 grep -v '^ *+' conftest.er1 >conftest.err
11568 rm -f conftest.er1
11569 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011571 (exit $ac_status); } && {
11572 test -z "$ac_c_werror_flag" ||
11573 test ! -s conftest.err
11574 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 ac_hi=$ac_mid
11576else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011578sed 's/^/| /' conftest.$ac_ext >&5
11579
Martin v. Löwiseba40652007-08-30 20:10:57 +000011580 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011582
11583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011584done
11585case $ac_lo in
11586?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011587'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011588 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011589See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011590echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011591See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011592 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011593 else
11594 ac_cv_sizeof_long_long=0
11595 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011596esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011597else
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011599/* confdefs.h. */
11600_ACEOF
11601cat confdefs.h >>conftest.$ac_ext
11602cat >>conftest.$ac_ext <<_ACEOF
11603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011604$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011605 typedef long long ac__type_sizeof_;
11606static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11607static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011608#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011609#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011610int
11611main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011612{
Martin v. Löwis11437992002-04-12 09:54:03 +000011613
11614 FILE *f = fopen ("conftest.val", "w");
11615 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011616 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011617 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011618 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011620 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011621 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011622 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 }
11624 else
11625 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011626 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011627 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011628 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011629 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011631 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011632
11633 ;
11634 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011635}
Martin v. Löwis11437992002-04-12 09:54:03 +000011636_ACEOF
11637rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011638if { (ac_try="$ac_link"
11639case "(($ac_try" in
11640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11641 *) ac_try_echo=$ac_try;;
11642esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011644 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011645 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011647 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011648 { (case "(($ac_try" in
11649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11650 *) ac_try_echo=$ac_try;;
11651esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011653 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 (exit $ac_status); }; }; then
11657 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011658else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011659 echo "$as_me: program exited with status $ac_status" >&5
11660echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011661sed 's/^/| /' conftest.$ac_ext >&5
11662
Martin v. Löwis11437992002-04-12 09:54:03 +000011663( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011664if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011665 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011666See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011667echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011668See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011669 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011670 else
11671 ac_cv_sizeof_long_long=0
11672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011674rm -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 +000011675fi
11676rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011677fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011678{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11679echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011680
11681
11682
Martin v. Löwis11437992002-04-12 09:54:03 +000011683cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011684#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011685_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011686
Michael W. Hudson54241132001-12-07 15:38:26 +000011687
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011688fi
11689
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011690{ echo "$as_me:$LINENO: checking for long double support" >&5
11691echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011692have_long_double=no
11693cat >conftest.$ac_ext <<_ACEOF
11694/* confdefs.h. */
11695_ACEOF
11696cat confdefs.h >>conftest.$ac_ext
11697cat >>conftest.$ac_ext <<_ACEOF
11698/* end confdefs.h. */
11699
11700int
11701main ()
11702{
11703long double x; x = (long double)0.;
11704 ;
11705 return 0;
11706}
11707_ACEOF
11708rm -f conftest.$ac_objext
11709if { (ac_try="$ac_compile"
11710case "(($ac_try" in
11711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11712 *) ac_try_echo=$ac_try;;
11713esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011715 (eval "$ac_compile") 2>conftest.er1
11716 ac_status=$?
11717 grep -v '^ *+' conftest.er1 >conftest.err
11718 rm -f conftest.er1
11719 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011721 (exit $ac_status); } && {
11722 test -z "$ac_c_werror_flag" ||
11723 test ! -s conftest.err
11724 } && test -s conftest.$ac_objext; then
11725
11726
11727cat >>confdefs.h <<\_ACEOF
11728#define HAVE_LONG_DOUBLE 1
11729_ACEOF
11730
11731 have_long_double=yes
11732
11733else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011734 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011735sed 's/^/| /' conftest.$ac_ext >&5
11736
11737
11738fi
11739
11740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011741{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11742echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011743if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011744{ echo "$as_me:$LINENO: checking for long double" >&5
11745echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11746if test "${ac_cv_type_long_double+set}" = set; then
11747 echo $ECHO_N "(cached) $ECHO_C" >&6
11748else
11749 cat >conftest.$ac_ext <<_ACEOF
11750/* confdefs.h. */
11751_ACEOF
11752cat confdefs.h >>conftest.$ac_ext
11753cat >>conftest.$ac_ext <<_ACEOF
11754/* end confdefs.h. */
11755$ac_includes_default
11756typedef long double ac__type_new_;
11757int
11758main ()
11759{
11760if ((ac__type_new_ *) 0)
11761 return 0;
11762if (sizeof (ac__type_new_))
11763 return 0;
11764 ;
11765 return 0;
11766}
11767_ACEOF
11768rm -f conftest.$ac_objext
11769if { (ac_try="$ac_compile"
11770case "(($ac_try" in
11771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11772 *) ac_try_echo=$ac_try;;
11773esac
11774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11775 (eval "$ac_compile") 2>conftest.er1
11776 ac_status=$?
11777 grep -v '^ *+' conftest.er1 >conftest.err
11778 rm -f conftest.er1
11779 cat conftest.err >&5
11780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781 (exit $ac_status); } && {
11782 test -z "$ac_c_werror_flag" ||
11783 test ! -s conftest.err
11784 } && test -s conftest.$ac_objext; then
11785 ac_cv_type_long_double=yes
11786else
11787 echo "$as_me: failed program was:" >&5
11788sed 's/^/| /' conftest.$ac_ext >&5
11789
11790 ac_cv_type_long_double=no
11791fi
11792
11793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11794fi
11795{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11796echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11797
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011798# The cast to long int works around a bug in the HP C Compiler
11799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11801# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011802{ echo "$as_me:$LINENO: checking size of long double" >&5
11803echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011804if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011805 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011806else
11807 if test "$cross_compiling" = yes; then
11808 # Depending upon the size, compute the lo and hi bounds.
11809cat >conftest.$ac_ext <<_ACEOF
11810/* confdefs.h. */
11811_ACEOF
11812cat confdefs.h >>conftest.$ac_ext
11813cat >>conftest.$ac_ext <<_ACEOF
11814/* end confdefs.h. */
11815$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011816 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011817int
11818main ()
11819{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011821test_array [0] = 0
11822
11823 ;
11824 return 0;
11825}
11826_ACEOF
11827rm -f conftest.$ac_objext
11828if { (ac_try="$ac_compile"
11829case "(($ac_try" in
11830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11831 *) ac_try_echo=$ac_try;;
11832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011834 (eval "$ac_compile") 2>conftest.er1
11835 ac_status=$?
11836 grep -v '^ *+' conftest.er1 >conftest.err
11837 rm -f conftest.er1
11838 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011840 (exit $ac_status); } && {
11841 test -z "$ac_c_werror_flag" ||
11842 test ! -s conftest.err
11843 } && test -s conftest.$ac_objext; then
11844 ac_lo=0 ac_mid=0
11845 while :; do
11846 cat >conftest.$ac_ext <<_ACEOF
11847/* confdefs.h. */
11848_ACEOF
11849cat confdefs.h >>conftest.$ac_ext
11850cat >>conftest.$ac_ext <<_ACEOF
11851/* end confdefs.h. */
11852$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011853 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011854int
11855main ()
11856{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011857static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011858test_array [0] = 0
11859
11860 ;
11861 return 0;
11862}
11863_ACEOF
11864rm -f conftest.$ac_objext
11865if { (ac_try="$ac_compile"
11866case "(($ac_try" in
11867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11868 *) ac_try_echo=$ac_try;;
11869esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011871 (eval "$ac_compile") 2>conftest.er1
11872 ac_status=$?
11873 grep -v '^ *+' conftest.er1 >conftest.err
11874 rm -f conftest.er1
11875 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011877 (exit $ac_status); } && {
11878 test -z "$ac_c_werror_flag" ||
11879 test ! -s conftest.err
11880 } && test -s conftest.$ac_objext; then
11881 ac_hi=$ac_mid; break
11882else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011883 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011884sed 's/^/| /' conftest.$ac_ext >&5
11885
11886 ac_lo=`expr $ac_mid + 1`
11887 if test $ac_lo -le $ac_mid; then
11888 ac_lo= ac_hi=
11889 break
11890 fi
11891 ac_mid=`expr 2 '*' $ac_mid + 1`
11892fi
11893
11894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11895 done
11896else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011897 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011898sed 's/^/| /' conftest.$ac_ext >&5
11899
11900 cat >conftest.$ac_ext <<_ACEOF
11901/* confdefs.h. */
11902_ACEOF
11903cat confdefs.h >>conftest.$ac_ext
11904cat >>conftest.$ac_ext <<_ACEOF
11905/* end confdefs.h. */
11906$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011907 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011908int
11909main ()
11910{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011912test_array [0] = 0
11913
11914 ;
11915 return 0;
11916}
11917_ACEOF
11918rm -f conftest.$ac_objext
11919if { (ac_try="$ac_compile"
11920case "(($ac_try" in
11921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11922 *) ac_try_echo=$ac_try;;
11923esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011925 (eval "$ac_compile") 2>conftest.er1
11926 ac_status=$?
11927 grep -v '^ *+' conftest.er1 >conftest.err
11928 rm -f conftest.er1
11929 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011931 (exit $ac_status); } && {
11932 test -z "$ac_c_werror_flag" ||
11933 test ! -s conftest.err
11934 } && test -s conftest.$ac_objext; then
11935 ac_hi=-1 ac_mid=-1
11936 while :; do
11937 cat >conftest.$ac_ext <<_ACEOF
11938/* confdefs.h. */
11939_ACEOF
11940cat confdefs.h >>conftest.$ac_ext
11941cat >>conftest.$ac_ext <<_ACEOF
11942/* end confdefs.h. */
11943$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011944 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011945int
11946main ()
11947{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011948static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011949test_array [0] = 0
11950
11951 ;
11952 return 0;
11953}
11954_ACEOF
11955rm -f conftest.$ac_objext
11956if { (ac_try="$ac_compile"
11957case "(($ac_try" in
11958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11959 *) ac_try_echo=$ac_try;;
11960esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011962 (eval "$ac_compile") 2>conftest.er1
11963 ac_status=$?
11964 grep -v '^ *+' conftest.er1 >conftest.err
11965 rm -f conftest.er1
11966 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011968 (exit $ac_status); } && {
11969 test -z "$ac_c_werror_flag" ||
11970 test ! -s conftest.err
11971 } && test -s conftest.$ac_objext; then
11972 ac_lo=$ac_mid; break
11973else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011974 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011975sed 's/^/| /' conftest.$ac_ext >&5
11976
11977 ac_hi=`expr '(' $ac_mid ')' - 1`
11978 if test $ac_mid -le $ac_hi; then
11979 ac_lo= ac_hi=
11980 break
11981 fi
11982 ac_mid=`expr 2 '*' $ac_mid`
11983fi
11984
11985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11986 done
11987else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011988 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011989sed 's/^/| /' conftest.$ac_ext >&5
11990
11991 ac_lo= ac_hi=
11992fi
11993
11994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11995fi
11996
11997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11998# Binary search between lo and hi bounds.
11999while test "x$ac_lo" != "x$ac_hi"; do
12000 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12001 cat >conftest.$ac_ext <<_ACEOF
12002/* confdefs.h. */
12003_ACEOF
12004cat confdefs.h >>conftest.$ac_ext
12005cat >>conftest.$ac_ext <<_ACEOF
12006/* end confdefs.h. */
12007$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012008 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012009int
12010main ()
12011{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012012static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012013test_array [0] = 0
12014
12015 ;
12016 return 0;
12017}
12018_ACEOF
12019rm -f conftest.$ac_objext
12020if { (ac_try="$ac_compile"
12021case "(($ac_try" in
12022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12023 *) ac_try_echo=$ac_try;;
12024esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012026 (eval "$ac_compile") 2>conftest.er1
12027 ac_status=$?
12028 grep -v '^ *+' conftest.er1 >conftest.err
12029 rm -f conftest.er1
12030 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012032 (exit $ac_status); } && {
12033 test -z "$ac_c_werror_flag" ||
12034 test ! -s conftest.err
12035 } && test -s conftest.$ac_objext; then
12036 ac_hi=$ac_mid
12037else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012038 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012039sed 's/^/| /' conftest.$ac_ext >&5
12040
12041 ac_lo=`expr '(' $ac_mid ')' + 1`
12042fi
12043
12044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12045done
12046case $ac_lo in
12047?*) ac_cv_sizeof_long_double=$ac_lo;;
12048'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012049 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012050See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012051echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012052See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012053 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012054 else
12055 ac_cv_sizeof_long_double=0
12056 fi ;;
12057esac
12058else
12059 cat >conftest.$ac_ext <<_ACEOF
12060/* confdefs.h. */
12061_ACEOF
12062cat confdefs.h >>conftest.$ac_ext
12063cat >>conftest.$ac_ext <<_ACEOF
12064/* end confdefs.h. */
12065$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012066 typedef long double ac__type_sizeof_;
12067static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12068static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012069#include <stdio.h>
12070#include <stdlib.h>
12071int
12072main ()
12073{
12074
12075 FILE *f = fopen ("conftest.val", "w");
12076 if (! f)
12077 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012078 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012079 {
12080 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012081 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012082 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012083 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012084 }
12085 else
12086 {
12087 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012088 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012089 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012090 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012091 }
12092 return ferror (f) || fclose (f) != 0;
12093
12094 ;
12095 return 0;
12096}
12097_ACEOF
12098rm -f conftest$ac_exeext
12099if { (ac_try="$ac_link"
12100case "(($ac_try" in
12101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12102 *) ac_try_echo=$ac_try;;
12103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012105 (eval "$ac_link") 2>&5
12106 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12109 { (case "(($ac_try" in
12110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12111 *) ac_try_echo=$ac_try;;
12112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012114 (eval "$ac_try") 2>&5
12115 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012117 (exit $ac_status); }; }; then
12118 ac_cv_sizeof_long_double=`cat conftest.val`
12119else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012120 echo "$as_me: program exited with status $ac_status" >&5
12121echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012122sed 's/^/| /' conftest.$ac_ext >&5
12123
12124( exit $ac_status )
12125if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012126 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012127See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012128echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012129See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012130 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012131 else
12132 ac_cv_sizeof_long_double=0
12133 fi
12134fi
12135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12136fi
12137rm -f conftest.val
12138fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012139{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12140echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012141
12142
12143
12144cat >>confdefs.h <<_ACEOF
12145#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12146_ACEOF
12147
12148
12149fi
12150
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012151{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12152echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012153have_c99_bool=no
12154cat >conftest.$ac_ext <<_ACEOF
12155/* confdefs.h. */
12156_ACEOF
12157cat confdefs.h >>conftest.$ac_ext
12158cat >>conftest.$ac_ext <<_ACEOF
12159/* end confdefs.h. */
12160
12161int
12162main ()
12163{
12164_Bool x; x = (_Bool)0;
12165 ;
12166 return 0;
12167}
12168_ACEOF
12169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012170if { (ac_try="$ac_compile"
12171case "(($ac_try" in
12172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12173 *) ac_try_echo=$ac_try;;
12174esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012177 ac_status=$?
12178 grep -v '^ *+' conftest.er1 >conftest.err
12179 rm -f conftest.er1
12180 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012182 (exit $ac_status); } && {
12183 test -z "$ac_c_werror_flag" ||
12184 test ! -s conftest.err
12185 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012186
12187
12188cat >>confdefs.h <<\_ACEOF
12189#define HAVE_C99_BOOL 1
12190_ACEOF
12191
12192 have_c99_bool=yes
12193
12194else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012195 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012196sed 's/^/| /' conftest.$ac_ext >&5
12197
Martin v. Löwiseba40652007-08-30 20:10:57 +000012198
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012200
12201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012202{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12203echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012204if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012205{ echo "$as_me:$LINENO: checking for _Bool" >&5
12206echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12207if test "${ac_cv_type__Bool+set}" = set; then
12208 echo $ECHO_N "(cached) $ECHO_C" >&6
12209else
12210 cat >conftest.$ac_ext <<_ACEOF
12211/* confdefs.h. */
12212_ACEOF
12213cat confdefs.h >>conftest.$ac_ext
12214cat >>conftest.$ac_ext <<_ACEOF
12215/* end confdefs.h. */
12216$ac_includes_default
12217typedef _Bool ac__type_new_;
12218int
12219main ()
12220{
12221if ((ac__type_new_ *) 0)
12222 return 0;
12223if (sizeof (ac__type_new_))
12224 return 0;
12225 ;
12226 return 0;
12227}
12228_ACEOF
12229rm -f conftest.$ac_objext
12230if { (ac_try="$ac_compile"
12231case "(($ac_try" in
12232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12233 *) ac_try_echo=$ac_try;;
12234esac
12235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12236 (eval "$ac_compile") 2>conftest.er1
12237 ac_status=$?
12238 grep -v '^ *+' conftest.er1 >conftest.err
12239 rm -f conftest.er1
12240 cat conftest.err >&5
12241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12242 (exit $ac_status); } && {
12243 test -z "$ac_c_werror_flag" ||
12244 test ! -s conftest.err
12245 } && test -s conftest.$ac_objext; then
12246 ac_cv_type__Bool=yes
12247else
12248 echo "$as_me: failed program was:" >&5
12249sed 's/^/| /' conftest.$ac_ext >&5
12250
12251 ac_cv_type__Bool=no
12252fi
12253
12254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12255fi
12256{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12257echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12258
Martin v. Löwiseba40652007-08-30 20:10:57 +000012259# The cast to long int works around a bug in the HP C Compiler
12260# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12261# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12262# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012263{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12264echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012265if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012266 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012267else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012268 if test "$cross_compiling" = yes; then
12269 # Depending upon the size, compute the lo and hi bounds.
12270cat >conftest.$ac_ext <<_ACEOF
12271/* confdefs.h. */
12272_ACEOF
12273cat confdefs.h >>conftest.$ac_ext
12274cat >>conftest.$ac_ext <<_ACEOF
12275/* end confdefs.h. */
12276$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012277 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012278int
12279main ()
12280{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012281static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012282test_array [0] = 0
12283
12284 ;
12285 return 0;
12286}
12287_ACEOF
12288rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012289if { (ac_try="$ac_compile"
12290case "(($ac_try" in
12291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12292 *) ac_try_echo=$ac_try;;
12293esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012296 ac_status=$?
12297 grep -v '^ *+' conftest.er1 >conftest.err
12298 rm -f conftest.er1
12299 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012301 (exit $ac_status); } && {
12302 test -z "$ac_c_werror_flag" ||
12303 test ! -s conftest.err
12304 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012305 ac_lo=0 ac_mid=0
12306 while :; do
12307 cat >conftest.$ac_ext <<_ACEOF
12308/* confdefs.h. */
12309_ACEOF
12310cat confdefs.h >>conftest.$ac_ext
12311cat >>conftest.$ac_ext <<_ACEOF
12312/* end confdefs.h. */
12313$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012314 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012315int
12316main ()
12317{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012318static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012319test_array [0] = 0
12320
12321 ;
12322 return 0;
12323}
12324_ACEOF
12325rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012326if { (ac_try="$ac_compile"
12327case "(($ac_try" in
12328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12329 *) ac_try_echo=$ac_try;;
12330esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012333 ac_status=$?
12334 grep -v '^ *+' conftest.er1 >conftest.err
12335 rm -f conftest.er1
12336 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012338 (exit $ac_status); } && {
12339 test -z "$ac_c_werror_flag" ||
12340 test ! -s conftest.err
12341 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012342 ac_hi=$ac_mid; break
12343else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012344 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012345sed 's/^/| /' conftest.$ac_ext >&5
12346
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347 ac_lo=`expr $ac_mid + 1`
12348 if test $ac_lo -le $ac_mid; then
12349 ac_lo= ac_hi=
12350 break
12351 fi
12352 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012354
12355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012356 done
12357else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012358 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012359sed 's/^/| /' conftest.$ac_ext >&5
12360
Martin v. Löwiseba40652007-08-30 20:10:57 +000012361 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012362/* confdefs.h. */
12363_ACEOF
12364cat confdefs.h >>conftest.$ac_ext
12365cat >>conftest.$ac_ext <<_ACEOF
12366/* end confdefs.h. */
12367$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012368 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012369int
12370main ()
12371{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012372static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012373test_array [0] = 0
12374
12375 ;
12376 return 0;
12377}
12378_ACEOF
12379rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012380if { (ac_try="$ac_compile"
12381case "(($ac_try" in
12382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12383 *) ac_try_echo=$ac_try;;
12384esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012387 ac_status=$?
12388 grep -v '^ *+' conftest.er1 >conftest.err
12389 rm -f conftest.er1
12390 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012392 (exit $ac_status); } && {
12393 test -z "$ac_c_werror_flag" ||
12394 test ! -s conftest.err
12395 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012396 ac_hi=-1 ac_mid=-1
12397 while :; do
12398 cat >conftest.$ac_ext <<_ACEOF
12399/* confdefs.h. */
12400_ACEOF
12401cat confdefs.h >>conftest.$ac_ext
12402cat >>conftest.$ac_ext <<_ACEOF
12403/* end confdefs.h. */
12404$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012405 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012406int
12407main ()
12408{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012410test_array [0] = 0
12411
12412 ;
12413 return 0;
12414}
12415_ACEOF
12416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012417if { (ac_try="$ac_compile"
12418case "(($ac_try" in
12419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12420 *) ac_try_echo=$ac_try;;
12421esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012424 ac_status=$?
12425 grep -v '^ *+' conftest.er1 >conftest.err
12426 rm -f conftest.er1
12427 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012429 (exit $ac_status); } && {
12430 test -z "$ac_c_werror_flag" ||
12431 test ! -s conftest.err
12432 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012433 ac_lo=$ac_mid; break
12434else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012435 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012436sed 's/^/| /' conftest.$ac_ext >&5
12437
Martin v. Löwiseba40652007-08-30 20:10:57 +000012438 ac_hi=`expr '(' $ac_mid ')' - 1`
12439 if test $ac_mid -le $ac_hi; then
12440 ac_lo= ac_hi=
12441 break
12442 fi
12443 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012445
12446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012447 done
12448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012449 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012450sed 's/^/| /' conftest.$ac_ext >&5
12451
Martin v. Löwiseba40652007-08-30 20:10:57 +000012452 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454
12455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012457
12458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012459# Binary search between lo and hi bounds.
12460while test "x$ac_lo" != "x$ac_hi"; do
12461 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12462 cat >conftest.$ac_ext <<_ACEOF
12463/* confdefs.h. */
12464_ACEOF
12465cat confdefs.h >>conftest.$ac_ext
12466cat >>conftest.$ac_ext <<_ACEOF
12467/* end confdefs.h. */
12468$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012469 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012470int
12471main ()
12472{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012473static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012474test_array [0] = 0
12475
12476 ;
12477 return 0;
12478}
12479_ACEOF
12480rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012481if { (ac_try="$ac_compile"
12482case "(($ac_try" in
12483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12484 *) ac_try_echo=$ac_try;;
12485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012488 ac_status=$?
12489 grep -v '^ *+' conftest.er1 >conftest.err
12490 rm -f conftest.er1
12491 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012493 (exit $ac_status); } && {
12494 test -z "$ac_c_werror_flag" ||
12495 test ! -s conftest.err
12496 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012497 ac_hi=$ac_mid
12498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012499 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012500sed 's/^/| /' conftest.$ac_ext >&5
12501
Martin v. Löwiseba40652007-08-30 20:10:57 +000012502 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012504
12505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012506done
12507case $ac_lo in
12508?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012510 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012511See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012512echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012513See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012514 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515 else
12516 ac_cv_sizeof__Bool=0
12517 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012518esac
12519else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012520 cat >conftest.$ac_ext <<_ACEOF
12521/* confdefs.h. */
12522_ACEOF
12523cat confdefs.h >>conftest.$ac_ext
12524cat >>conftest.$ac_ext <<_ACEOF
12525/* end confdefs.h. */
12526$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012527 typedef _Bool ac__type_sizeof_;
12528static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12529static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012530#include <stdio.h>
12531#include <stdlib.h>
12532int
12533main ()
12534{
12535
12536 FILE *f = fopen ("conftest.val", "w");
12537 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012538 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012539 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012540 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012542 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012543 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012544 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012545 }
12546 else
12547 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012548 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012549 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012550 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012551 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012552 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012553 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012554
12555 ;
12556 return 0;
12557}
12558_ACEOF
12559rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012560if { (ac_try="$ac_link"
12561case "(($ac_try" in
12562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12563 *) ac_try_echo=$ac_try;;
12564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012566 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012567 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012569 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570 { (case "(($ac_try" in
12571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12572 *) ac_try_echo=$ac_try;;
12573esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012575 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012576 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012578 (exit $ac_status); }; }; then
12579 ac_cv_sizeof__Bool=`cat conftest.val`
12580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012581 echo "$as_me: program exited with status $ac_status" >&5
12582echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012583sed 's/^/| /' conftest.$ac_ext >&5
12584
12585( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012586if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012587 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012588See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012589echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012590See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012591 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012592 else
12593 ac_cv_sizeof__Bool=0
12594 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012596rm -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 +000012597fi
12598rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012599fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012600{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12601echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012602
12603
12604
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012605cat >>confdefs.h <<_ACEOF
12606#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12607_ACEOF
12608
12609
12610fi
12611
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012612{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12613echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012614if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012615 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012616else
12617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* confdefs.h. */
12619_ACEOF
12620cat confdefs.h >>conftest.$ac_ext
12621cat >>conftest.$ac_ext <<_ACEOF
12622/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012623#ifdef HAVE_STDINT_H
12624 #include <stdint.h>
12625 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012626
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012627typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012628int
12629main ()
12630{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012631if ((ac__type_new_ *) 0)
12632 return 0;
12633if (sizeof (ac__type_new_))
12634 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012635 ;
12636 return 0;
12637}
12638_ACEOF
12639rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012640if { (ac_try="$ac_compile"
12641case "(($ac_try" in
12642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12643 *) ac_try_echo=$ac_try;;
12644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012648 grep -v '^ *+' conftest.er1 >conftest.err
12649 rm -f conftest.er1
12650 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012652 (exit $ac_status); } && {
12653 test -z "$ac_c_werror_flag" ||
12654 test ! -s conftest.err
12655 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012656 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012657else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012659sed 's/^/| /' conftest.$ac_ext >&5
12660
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012661 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012663
12664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012665fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012666{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12667echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12668if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012669
12670cat >>confdefs.h <<_ACEOF
12671#define HAVE_UINTPTR_T 1
12672_ACEOF
12673
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012674{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12675echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12676if test "${ac_cv_type_uintptr_t+set}" = set; then
12677 echo $ECHO_N "(cached) $ECHO_C" >&6
12678else
12679 cat >conftest.$ac_ext <<_ACEOF
12680/* confdefs.h. */
12681_ACEOF
12682cat confdefs.h >>conftest.$ac_ext
12683cat >>conftest.$ac_ext <<_ACEOF
12684/* end confdefs.h. */
12685$ac_includes_default
12686typedef uintptr_t ac__type_new_;
12687int
12688main ()
12689{
12690if ((ac__type_new_ *) 0)
12691 return 0;
12692if (sizeof (ac__type_new_))
12693 return 0;
12694 ;
12695 return 0;
12696}
12697_ACEOF
12698rm -f conftest.$ac_objext
12699if { (ac_try="$ac_compile"
12700case "(($ac_try" in
12701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12702 *) ac_try_echo=$ac_try;;
12703esac
12704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12705 (eval "$ac_compile") 2>conftest.er1
12706 ac_status=$?
12707 grep -v '^ *+' conftest.er1 >conftest.err
12708 rm -f conftest.er1
12709 cat conftest.err >&5
12710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12711 (exit $ac_status); } && {
12712 test -z "$ac_c_werror_flag" ||
12713 test ! -s conftest.err
12714 } && test -s conftest.$ac_objext; then
12715 ac_cv_type_uintptr_t=yes
12716else
12717 echo "$as_me: failed program was:" >&5
12718sed 's/^/| /' conftest.$ac_ext >&5
12719
12720 ac_cv_type_uintptr_t=no
12721fi
12722
12723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12724fi
12725{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12726echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12727
Martin v. Löwiseba40652007-08-30 20:10:57 +000012728# The cast to long int works around a bug in the HP C Compiler
12729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12731# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012732{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12733echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012734if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012735 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012736else
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 if test "$cross_compiling" = yes; then
12738 # Depending upon the size, compute the lo and hi bounds.
12739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012740/* confdefs.h. */
12741_ACEOF
12742cat confdefs.h >>conftest.$ac_ext
12743cat >>conftest.$ac_ext <<_ACEOF
12744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012745$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012746 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012747int
12748main ()
12749{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012750static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012751test_array [0] = 0
12752
12753 ;
12754 return 0;
12755}
12756_ACEOF
12757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012758if { (ac_try="$ac_compile"
12759case "(($ac_try" in
12760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12761 *) ac_try_echo=$ac_try;;
12762esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012766 grep -v '^ *+' conftest.er1 >conftest.err
12767 rm -f conftest.er1
12768 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012770 (exit $ac_status); } && {
12771 test -z "$ac_c_werror_flag" ||
12772 test ! -s conftest.err
12773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012774 ac_lo=0 ac_mid=0
12775 while :; do
12776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012777/* confdefs.h. */
12778_ACEOF
12779cat confdefs.h >>conftest.$ac_ext
12780cat >>conftest.$ac_ext <<_ACEOF
12781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012782$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012783 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012784int
12785main ()
12786{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012787static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012788test_array [0] = 0
12789
12790 ;
12791 return 0;
12792}
12793_ACEOF
12794rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012795if { (ac_try="$ac_compile"
12796case "(($ac_try" in
12797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12798 *) ac_try_echo=$ac_try;;
12799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012801 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012803 grep -v '^ *+' conftest.er1 >conftest.err
12804 rm -f conftest.er1
12805 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012807 (exit $ac_status); } && {
12808 test -z "$ac_c_werror_flag" ||
12809 test ! -s conftest.err
12810 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 ac_hi=$ac_mid; break
12812else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012814sed 's/^/| /' conftest.$ac_ext >&5
12815
Martin v. Löwiseba40652007-08-30 20:10:57 +000012816 ac_lo=`expr $ac_mid + 1`
12817 if test $ac_lo -le $ac_mid; then
12818 ac_lo= ac_hi=
12819 break
12820 fi
12821 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012823
12824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 done
12826else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012828sed 's/^/| /' conftest.$ac_ext >&5
12829
Martin v. Löwiseba40652007-08-30 20:10:57 +000012830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012831/* confdefs.h. */
12832_ACEOF
12833cat confdefs.h >>conftest.$ac_ext
12834cat >>conftest.$ac_ext <<_ACEOF
12835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012836$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012837 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012838int
12839main ()
12840{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012841static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012842test_array [0] = 0
12843
12844 ;
12845 return 0;
12846}
12847_ACEOF
12848rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012849if { (ac_try="$ac_compile"
12850case "(($ac_try" in
12851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12852 *) ac_try_echo=$ac_try;;
12853esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012857 grep -v '^ *+' conftest.er1 >conftest.err
12858 rm -f conftest.er1
12859 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012861 (exit $ac_status); } && {
12862 test -z "$ac_c_werror_flag" ||
12863 test ! -s conftest.err
12864 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 ac_hi=-1 ac_mid=-1
12866 while :; do
12867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012868/* confdefs.h. */
12869_ACEOF
12870cat confdefs.h >>conftest.$ac_ext
12871cat >>conftest.$ac_ext <<_ACEOF
12872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012873$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012874 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012875int
12876main ()
12877{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012878static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012879test_array [0] = 0
12880
12881 ;
12882 return 0;
12883}
12884_ACEOF
12885rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012886if { (ac_try="$ac_compile"
12887case "(($ac_try" in
12888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12889 *) ac_try_echo=$ac_try;;
12890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012892 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012894 grep -v '^ *+' conftest.er1 >conftest.err
12895 rm -f conftest.er1
12896 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012898 (exit $ac_status); } && {
12899 test -z "$ac_c_werror_flag" ||
12900 test ! -s conftest.err
12901 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 ac_lo=$ac_mid; break
12903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012905sed 's/^/| /' conftest.$ac_ext >&5
12906
Martin v. Löwiseba40652007-08-30 20:10:57 +000012907 ac_hi=`expr '(' $ac_mid ')' - 1`
12908 if test $ac_mid -le $ac_hi; then
12909 ac_lo= ac_hi=
12910 break
12911 fi
12912 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012914
12915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 done
12917else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012919sed 's/^/| /' conftest.$ac_ext >&5
12920
Martin v. Löwiseba40652007-08-30 20:10:57 +000012921 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012923
12924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012926
12927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012928# Binary search between lo and hi bounds.
12929while test "x$ac_lo" != "x$ac_hi"; do
12930 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012932/* confdefs.h. */
12933_ACEOF
12934cat confdefs.h >>conftest.$ac_ext
12935cat >>conftest.$ac_ext <<_ACEOF
12936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012937$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012938 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012939int
12940main ()
12941{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012942static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012943test_array [0] = 0
12944
12945 ;
12946 return 0;
12947}
12948_ACEOF
12949rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012950if { (ac_try="$ac_compile"
12951case "(($ac_try" in
12952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12953 *) ac_try_echo=$ac_try;;
12954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012958 grep -v '^ *+' conftest.er1 >conftest.err
12959 rm -f conftest.er1
12960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012962 (exit $ac_status); } && {
12963 test -z "$ac_c_werror_flag" ||
12964 test ! -s conftest.err
12965 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 ac_hi=$ac_mid
12967else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012969sed 's/^/| /' conftest.$ac_ext >&5
12970
Martin v. Löwiseba40652007-08-30 20:10:57 +000012971 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012973
12974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012975done
12976case $ac_lo in
12977?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012979 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012980See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012981echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012982See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012983 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012984 else
12985 ac_cv_sizeof_uintptr_t=0
12986 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012987esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012988else
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012990/* confdefs.h. */
12991_ACEOF
12992cat confdefs.h >>conftest.$ac_ext
12993cat >>conftest.$ac_ext <<_ACEOF
12994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012995$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012996 typedef uintptr_t ac__type_sizeof_;
12997static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12998static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012999#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013000#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013001int
13002main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013003{
Martin v. Löwis11437992002-04-12 09:54:03 +000013004
13005 FILE *f = fopen ("conftest.val", "w");
13006 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013007 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013008 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013011 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013012 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013013 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 }
13015 else
13016 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013017 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013018 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013019 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013020 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013022 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013023
13024 ;
13025 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013026}
Martin v. Löwis11437992002-04-12 09:54:03 +000013027_ACEOF
13028rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013029if { (ac_try="$ac_link"
13030case "(($ac_try" in
13031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13032 *) ac_try_echo=$ac_try;;
13033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013035 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013039 { (case "(($ac_try" in
13040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13041 *) ac_try_echo=$ac_try;;
13042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013044 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013047 (exit $ac_status); }; }; then
13048 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013049else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013050 echo "$as_me: program exited with status $ac_status" >&5
13051echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013052sed 's/^/| /' conftest.$ac_ext >&5
13053
Martin v. Löwis11437992002-04-12 09:54:03 +000013054( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013055if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013056 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013057See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013058echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013059See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013060 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013061 else
13062 ac_cv_sizeof_uintptr_t=0
13063 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013065rm -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 +000013066fi
13067rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013068fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013069{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13070echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013071
13072
13073
Martin v. Löwis11437992002-04-12 09:54:03 +000013074cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013075#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013076_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013077
Michael W. Hudson54241132001-12-07 15:38:26 +000013078
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013079fi
13080
Martin v. Löwisebe26702006-10-02 14:55:51 +000013081
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013082{ echo "$as_me:$LINENO: checking for off_t" >&5
13083echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13084if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013086else
Martin v. Löwis11437992002-04-12 09:54:03 +000013087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013088/* confdefs.h. */
13089_ACEOF
13090cat confdefs.h >>conftest.$ac_ext
13091cat >>conftest.$ac_ext <<_ACEOF
13092/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013093
13094#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013095#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013096#endif
13097
13098
13099typedef off_t ac__type_new_;
13100int
13101main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013102{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013103if ((ac__type_new_ *) 0)
13104 return 0;
13105if (sizeof (ac__type_new_))
13106 return 0;
13107 ;
13108 return 0;
13109}
13110_ACEOF
13111rm -f conftest.$ac_objext
13112if { (ac_try="$ac_compile"
13113case "(($ac_try" in
13114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13115 *) ac_try_echo=$ac_try;;
13116esac
13117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13118 (eval "$ac_compile") 2>conftest.er1
13119 ac_status=$?
13120 grep -v '^ *+' conftest.er1 >conftest.err
13121 rm -f conftest.er1
13122 cat conftest.err >&5
13123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13124 (exit $ac_status); } && {
13125 test -z "$ac_c_werror_flag" ||
13126 test ! -s conftest.err
13127 } && test -s conftest.$ac_objext; then
13128 ac_cv_type_off_t=yes
13129else
13130 echo "$as_me: failed program was:" >&5
13131sed 's/^/| /' conftest.$ac_ext >&5
13132
13133 ac_cv_type_off_t=no
13134fi
13135
13136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13137fi
13138{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13139echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13140
13141# The cast to long int works around a bug in the HP C Compiler
13142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13144# This bug is HP SR number 8606223364.
13145{ echo "$as_me:$LINENO: checking size of off_t" >&5
13146echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13147if test "${ac_cv_sizeof_off_t+set}" = set; then
13148 echo $ECHO_N "(cached) $ECHO_C" >&6
13149else
13150 if test "$cross_compiling" = yes; then
13151 # Depending upon the size, compute the lo and hi bounds.
13152cat >conftest.$ac_ext <<_ACEOF
13153/* confdefs.h. */
13154_ACEOF
13155cat confdefs.h >>conftest.$ac_ext
13156cat >>conftest.$ac_ext <<_ACEOF
13157/* end confdefs.h. */
13158
13159#ifdef HAVE_SYS_TYPES_H
13160#include <sys/types.h>
13161#endif
13162
13163
13164 typedef off_t ac__type_sizeof_;
13165int
13166main ()
13167{
13168static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13169test_array [0] = 0
13170
13171 ;
13172 return 0;
13173}
13174_ACEOF
13175rm -f conftest.$ac_objext
13176if { (ac_try="$ac_compile"
13177case "(($ac_try" in
13178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13179 *) ac_try_echo=$ac_try;;
13180esac
13181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13182 (eval "$ac_compile") 2>conftest.er1
13183 ac_status=$?
13184 grep -v '^ *+' conftest.er1 >conftest.err
13185 rm -f conftest.er1
13186 cat conftest.err >&5
13187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13188 (exit $ac_status); } && {
13189 test -z "$ac_c_werror_flag" ||
13190 test ! -s conftest.err
13191 } && test -s conftest.$ac_objext; then
13192 ac_lo=0 ac_mid=0
13193 while :; do
13194 cat >conftest.$ac_ext <<_ACEOF
13195/* confdefs.h. */
13196_ACEOF
13197cat confdefs.h >>conftest.$ac_ext
13198cat >>conftest.$ac_ext <<_ACEOF
13199/* end confdefs.h. */
13200
13201#ifdef HAVE_SYS_TYPES_H
13202#include <sys/types.h>
13203#endif
13204
13205
13206 typedef off_t ac__type_sizeof_;
13207int
13208main ()
13209{
13210static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13211test_array [0] = 0
13212
13213 ;
13214 return 0;
13215}
13216_ACEOF
13217rm -f conftest.$ac_objext
13218if { (ac_try="$ac_compile"
13219case "(($ac_try" in
13220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13221 *) ac_try_echo=$ac_try;;
13222esac
13223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13224 (eval "$ac_compile") 2>conftest.er1
13225 ac_status=$?
13226 grep -v '^ *+' conftest.er1 >conftest.err
13227 rm -f conftest.er1
13228 cat conftest.err >&5
13229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13230 (exit $ac_status); } && {
13231 test -z "$ac_c_werror_flag" ||
13232 test ! -s conftest.err
13233 } && test -s conftest.$ac_objext; then
13234 ac_hi=$ac_mid; break
13235else
13236 echo "$as_me: failed program was:" >&5
13237sed 's/^/| /' conftest.$ac_ext >&5
13238
13239 ac_lo=`expr $ac_mid + 1`
13240 if test $ac_lo -le $ac_mid; then
13241 ac_lo= ac_hi=
13242 break
13243 fi
13244 ac_mid=`expr 2 '*' $ac_mid + 1`
13245fi
13246
13247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13248 done
13249else
13250 echo "$as_me: failed program was:" >&5
13251sed 's/^/| /' conftest.$ac_ext >&5
13252
13253 cat >conftest.$ac_ext <<_ACEOF
13254/* confdefs.h. */
13255_ACEOF
13256cat confdefs.h >>conftest.$ac_ext
13257cat >>conftest.$ac_ext <<_ACEOF
13258/* end confdefs.h. */
13259
13260#ifdef HAVE_SYS_TYPES_H
13261#include <sys/types.h>
13262#endif
13263
13264
13265 typedef off_t ac__type_sizeof_;
13266int
13267main ()
13268{
13269static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13270test_array [0] = 0
13271
13272 ;
13273 return 0;
13274}
13275_ACEOF
13276rm -f conftest.$ac_objext
13277if { (ac_try="$ac_compile"
13278case "(($ac_try" in
13279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13280 *) ac_try_echo=$ac_try;;
13281esac
13282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13283 (eval "$ac_compile") 2>conftest.er1
13284 ac_status=$?
13285 grep -v '^ *+' conftest.er1 >conftest.err
13286 rm -f conftest.er1
13287 cat conftest.err >&5
13288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13289 (exit $ac_status); } && {
13290 test -z "$ac_c_werror_flag" ||
13291 test ! -s conftest.err
13292 } && test -s conftest.$ac_objext; then
13293 ac_hi=-1 ac_mid=-1
13294 while :; do
13295 cat >conftest.$ac_ext <<_ACEOF
13296/* confdefs.h. */
13297_ACEOF
13298cat confdefs.h >>conftest.$ac_ext
13299cat >>conftest.$ac_ext <<_ACEOF
13300/* end confdefs.h. */
13301
13302#ifdef HAVE_SYS_TYPES_H
13303#include <sys/types.h>
13304#endif
13305
13306
13307 typedef off_t ac__type_sizeof_;
13308int
13309main ()
13310{
13311static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13312test_array [0] = 0
13313
13314 ;
13315 return 0;
13316}
13317_ACEOF
13318rm -f conftest.$ac_objext
13319if { (ac_try="$ac_compile"
13320case "(($ac_try" in
13321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13322 *) ac_try_echo=$ac_try;;
13323esac
13324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13325 (eval "$ac_compile") 2>conftest.er1
13326 ac_status=$?
13327 grep -v '^ *+' conftest.er1 >conftest.err
13328 rm -f conftest.er1
13329 cat conftest.err >&5
13330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13331 (exit $ac_status); } && {
13332 test -z "$ac_c_werror_flag" ||
13333 test ! -s conftest.err
13334 } && test -s conftest.$ac_objext; then
13335 ac_lo=$ac_mid; break
13336else
13337 echo "$as_me: failed program was:" >&5
13338sed 's/^/| /' conftest.$ac_ext >&5
13339
13340 ac_hi=`expr '(' $ac_mid ')' - 1`
13341 if test $ac_mid -le $ac_hi; then
13342 ac_lo= ac_hi=
13343 break
13344 fi
13345 ac_mid=`expr 2 '*' $ac_mid`
13346fi
13347
13348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13349 done
13350else
13351 echo "$as_me: failed program was:" >&5
13352sed 's/^/| /' conftest.$ac_ext >&5
13353
13354 ac_lo= ac_hi=
13355fi
13356
13357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13358fi
13359
13360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13361# Binary search between lo and hi bounds.
13362while test "x$ac_lo" != "x$ac_hi"; do
13363 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13364 cat >conftest.$ac_ext <<_ACEOF
13365/* confdefs.h. */
13366_ACEOF
13367cat confdefs.h >>conftest.$ac_ext
13368cat >>conftest.$ac_ext <<_ACEOF
13369/* end confdefs.h. */
13370
13371#ifdef HAVE_SYS_TYPES_H
13372#include <sys/types.h>
13373#endif
13374
13375
13376 typedef off_t ac__type_sizeof_;
13377int
13378main ()
13379{
13380static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13381test_array [0] = 0
13382
13383 ;
13384 return 0;
13385}
13386_ACEOF
13387rm -f conftest.$ac_objext
13388if { (ac_try="$ac_compile"
13389case "(($ac_try" in
13390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13391 *) ac_try_echo=$ac_try;;
13392esac
13393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13394 (eval "$ac_compile") 2>conftest.er1
13395 ac_status=$?
13396 grep -v '^ *+' conftest.er1 >conftest.err
13397 rm -f conftest.er1
13398 cat conftest.err >&5
13399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13400 (exit $ac_status); } && {
13401 test -z "$ac_c_werror_flag" ||
13402 test ! -s conftest.err
13403 } && test -s conftest.$ac_objext; then
13404 ac_hi=$ac_mid
13405else
13406 echo "$as_me: failed program was:" >&5
13407sed 's/^/| /' conftest.$ac_ext >&5
13408
13409 ac_lo=`expr '(' $ac_mid ')' + 1`
13410fi
13411
13412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13413done
13414case $ac_lo in
13415?*) ac_cv_sizeof_off_t=$ac_lo;;
13416'') if test "$ac_cv_type_off_t" = yes; then
13417 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13418See \`config.log' for more details." >&5
13419echo "$as_me: error: cannot compute sizeof (off_t)
13420See \`config.log' for more details." >&2;}
13421 { (exit 77); exit 77; }; }
13422 else
13423 ac_cv_sizeof_off_t=0
13424 fi ;;
13425esac
13426else
13427 cat >conftest.$ac_ext <<_ACEOF
13428/* confdefs.h. */
13429_ACEOF
13430cat confdefs.h >>conftest.$ac_ext
13431cat >>conftest.$ac_ext <<_ACEOF
13432/* end confdefs.h. */
13433
13434#ifdef HAVE_SYS_TYPES_H
13435#include <sys/types.h>
13436#endif
13437
13438
13439 typedef off_t ac__type_sizeof_;
13440static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13441static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13442#include <stdio.h>
13443#include <stdlib.h>
13444int
13445main ()
13446{
13447
13448 FILE *f = fopen ("conftest.val", "w");
13449 if (! f)
13450 return 1;
13451 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13452 {
13453 long int i = longval ();
13454 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13455 return 1;
13456 fprintf (f, "%ld\n", i);
13457 }
13458 else
13459 {
13460 unsigned long int i = ulongval ();
13461 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13462 return 1;
13463 fprintf (f, "%lu\n", i);
13464 }
13465 return ferror (f) || fclose (f) != 0;
13466
13467 ;
13468 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013469}
Martin v. Löwis11437992002-04-12 09:54:03 +000013470_ACEOF
13471rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013472if { (ac_try="$ac_link"
13473case "(($ac_try" in
13474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13475 *) ac_try_echo=$ac_try;;
13476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013478 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013479 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013482 { (case "(($ac_try" in
13483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13484 *) ac_try_echo=$ac_try;;
13485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013487 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013488 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013491 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013492else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013493 echo "$as_me: program exited with status $ac_status" >&5
13494echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013495sed 's/^/| /' conftest.$ac_ext >&5
13496
Martin v. Löwis11437992002-04-12 09:54:03 +000013497( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013498if test "$ac_cv_type_off_t" = yes; then
13499 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13500See \`config.log' for more details." >&5
13501echo "$as_me: error: cannot compute sizeof (off_t)
13502See \`config.log' for more details." >&2;}
13503 { (exit 77); exit 77; }; }
13504 else
13505 ac_cv_sizeof_off_t=0
13506 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013508rm -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 +000013509fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013510rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013511fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013512{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13513echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013514
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013515
13516
Martin v. Löwis11437992002-04-12 09:54:03 +000013517cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013518#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013519_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013520
Michael W. Hudson54241132001-12-07 15:38:26 +000013521
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013523{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13524echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013525if test "$have_long_long" = yes
13526then
13527if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013528 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013529
Martin v. Löwis11437992002-04-12 09:54:03 +000013530cat >>confdefs.h <<\_ACEOF
13531#define HAVE_LARGEFILE_SUPPORT 1
13532_ACEOF
13533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013534 { echo "$as_me:$LINENO: result: yes" >&5
13535echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013536else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013537 { echo "$as_me:$LINENO: result: no" >&5
13538echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013539fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013540else
13541 { echo "$as_me:$LINENO: result: no" >&5
13542echo "${ECHO_T}no" >&6; }
13543fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013544
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013545{ echo "$as_me:$LINENO: checking for time_t" >&5
13546echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13547if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013548 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013549else
Martin v. Löwis11437992002-04-12 09:54:03 +000013550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013551/* confdefs.h. */
13552_ACEOF
13553cat confdefs.h >>conftest.$ac_ext
13554cat >>conftest.$ac_ext <<_ACEOF
13555/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013556
13557#ifdef HAVE_SYS_TYPES_H
13558#include <sys/types.h>
13559#endif
13560#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013561#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013562#endif
13563
13564
13565typedef time_t ac__type_new_;
13566int
13567main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013568{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013569if ((ac__type_new_ *) 0)
13570 return 0;
13571if (sizeof (ac__type_new_))
13572 return 0;
13573 ;
13574 return 0;
13575}
13576_ACEOF
13577rm -f conftest.$ac_objext
13578if { (ac_try="$ac_compile"
13579case "(($ac_try" in
13580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13581 *) ac_try_echo=$ac_try;;
13582esac
13583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13584 (eval "$ac_compile") 2>conftest.er1
13585 ac_status=$?
13586 grep -v '^ *+' conftest.er1 >conftest.err
13587 rm -f conftest.er1
13588 cat conftest.err >&5
13589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13590 (exit $ac_status); } && {
13591 test -z "$ac_c_werror_flag" ||
13592 test ! -s conftest.err
13593 } && test -s conftest.$ac_objext; then
13594 ac_cv_type_time_t=yes
13595else
13596 echo "$as_me: failed program was:" >&5
13597sed 's/^/| /' conftest.$ac_ext >&5
13598
13599 ac_cv_type_time_t=no
13600fi
13601
13602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13603fi
13604{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13605echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13606
13607# The cast to long int works around a bug in the HP C Compiler
13608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13610# This bug is HP SR number 8606223364.
13611{ echo "$as_me:$LINENO: checking size of time_t" >&5
13612echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13613if test "${ac_cv_sizeof_time_t+set}" = set; then
13614 echo $ECHO_N "(cached) $ECHO_C" >&6
13615else
13616 if test "$cross_compiling" = yes; then
13617 # Depending upon the size, compute the lo and hi bounds.
13618cat >conftest.$ac_ext <<_ACEOF
13619/* confdefs.h. */
13620_ACEOF
13621cat confdefs.h >>conftest.$ac_ext
13622cat >>conftest.$ac_ext <<_ACEOF
13623/* end confdefs.h. */
13624
13625#ifdef HAVE_SYS_TYPES_H
13626#include <sys/types.h>
13627#endif
13628#ifdef HAVE_TIME_H
13629#include <time.h>
13630#endif
13631
13632
13633 typedef time_t ac__type_sizeof_;
13634int
13635main ()
13636{
13637static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13638test_array [0] = 0
13639
13640 ;
13641 return 0;
13642}
13643_ACEOF
13644rm -f conftest.$ac_objext
13645if { (ac_try="$ac_compile"
13646case "(($ac_try" in
13647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13648 *) ac_try_echo=$ac_try;;
13649esac
13650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13651 (eval "$ac_compile") 2>conftest.er1
13652 ac_status=$?
13653 grep -v '^ *+' conftest.er1 >conftest.err
13654 rm -f conftest.er1
13655 cat conftest.err >&5
13656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13657 (exit $ac_status); } && {
13658 test -z "$ac_c_werror_flag" ||
13659 test ! -s conftest.err
13660 } && test -s conftest.$ac_objext; then
13661 ac_lo=0 ac_mid=0
13662 while :; do
13663 cat >conftest.$ac_ext <<_ACEOF
13664/* confdefs.h. */
13665_ACEOF
13666cat confdefs.h >>conftest.$ac_ext
13667cat >>conftest.$ac_ext <<_ACEOF
13668/* end confdefs.h. */
13669
13670#ifdef HAVE_SYS_TYPES_H
13671#include <sys/types.h>
13672#endif
13673#ifdef HAVE_TIME_H
13674#include <time.h>
13675#endif
13676
13677
13678 typedef time_t ac__type_sizeof_;
13679int
13680main ()
13681{
13682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13683test_array [0] = 0
13684
13685 ;
13686 return 0;
13687}
13688_ACEOF
13689rm -f conftest.$ac_objext
13690if { (ac_try="$ac_compile"
13691case "(($ac_try" in
13692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13693 *) ac_try_echo=$ac_try;;
13694esac
13695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13696 (eval "$ac_compile") 2>conftest.er1
13697 ac_status=$?
13698 grep -v '^ *+' conftest.er1 >conftest.err
13699 rm -f conftest.er1
13700 cat conftest.err >&5
13701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13702 (exit $ac_status); } && {
13703 test -z "$ac_c_werror_flag" ||
13704 test ! -s conftest.err
13705 } && test -s conftest.$ac_objext; then
13706 ac_hi=$ac_mid; break
13707else
13708 echo "$as_me: failed program was:" >&5
13709sed 's/^/| /' conftest.$ac_ext >&5
13710
13711 ac_lo=`expr $ac_mid + 1`
13712 if test $ac_lo -le $ac_mid; then
13713 ac_lo= ac_hi=
13714 break
13715 fi
13716 ac_mid=`expr 2 '*' $ac_mid + 1`
13717fi
13718
13719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13720 done
13721else
13722 echo "$as_me: failed program was:" >&5
13723sed 's/^/| /' conftest.$ac_ext >&5
13724
13725 cat >conftest.$ac_ext <<_ACEOF
13726/* confdefs.h. */
13727_ACEOF
13728cat confdefs.h >>conftest.$ac_ext
13729cat >>conftest.$ac_ext <<_ACEOF
13730/* end confdefs.h. */
13731
13732#ifdef HAVE_SYS_TYPES_H
13733#include <sys/types.h>
13734#endif
13735#ifdef HAVE_TIME_H
13736#include <time.h>
13737#endif
13738
13739
13740 typedef time_t ac__type_sizeof_;
13741int
13742main ()
13743{
13744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13745test_array [0] = 0
13746
13747 ;
13748 return 0;
13749}
13750_ACEOF
13751rm -f conftest.$ac_objext
13752if { (ac_try="$ac_compile"
13753case "(($ac_try" in
13754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13755 *) ac_try_echo=$ac_try;;
13756esac
13757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13758 (eval "$ac_compile") 2>conftest.er1
13759 ac_status=$?
13760 grep -v '^ *+' conftest.er1 >conftest.err
13761 rm -f conftest.er1
13762 cat conftest.err >&5
13763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13764 (exit $ac_status); } && {
13765 test -z "$ac_c_werror_flag" ||
13766 test ! -s conftest.err
13767 } && test -s conftest.$ac_objext; then
13768 ac_hi=-1 ac_mid=-1
13769 while :; do
13770 cat >conftest.$ac_ext <<_ACEOF
13771/* confdefs.h. */
13772_ACEOF
13773cat confdefs.h >>conftest.$ac_ext
13774cat >>conftest.$ac_ext <<_ACEOF
13775/* end confdefs.h. */
13776
13777#ifdef HAVE_SYS_TYPES_H
13778#include <sys/types.h>
13779#endif
13780#ifdef HAVE_TIME_H
13781#include <time.h>
13782#endif
13783
13784
13785 typedef time_t ac__type_sizeof_;
13786int
13787main ()
13788{
13789static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13790test_array [0] = 0
13791
13792 ;
13793 return 0;
13794}
13795_ACEOF
13796rm -f conftest.$ac_objext
13797if { (ac_try="$ac_compile"
13798case "(($ac_try" in
13799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13800 *) ac_try_echo=$ac_try;;
13801esac
13802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13803 (eval "$ac_compile") 2>conftest.er1
13804 ac_status=$?
13805 grep -v '^ *+' conftest.er1 >conftest.err
13806 rm -f conftest.er1
13807 cat conftest.err >&5
13808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13809 (exit $ac_status); } && {
13810 test -z "$ac_c_werror_flag" ||
13811 test ! -s conftest.err
13812 } && test -s conftest.$ac_objext; then
13813 ac_lo=$ac_mid; break
13814else
13815 echo "$as_me: failed program was:" >&5
13816sed 's/^/| /' conftest.$ac_ext >&5
13817
13818 ac_hi=`expr '(' $ac_mid ')' - 1`
13819 if test $ac_mid -le $ac_hi; then
13820 ac_lo= ac_hi=
13821 break
13822 fi
13823 ac_mid=`expr 2 '*' $ac_mid`
13824fi
13825
13826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13827 done
13828else
13829 echo "$as_me: failed program was:" >&5
13830sed 's/^/| /' conftest.$ac_ext >&5
13831
13832 ac_lo= ac_hi=
13833fi
13834
13835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13836fi
13837
13838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13839# Binary search between lo and hi bounds.
13840while test "x$ac_lo" != "x$ac_hi"; do
13841 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13842 cat >conftest.$ac_ext <<_ACEOF
13843/* confdefs.h. */
13844_ACEOF
13845cat confdefs.h >>conftest.$ac_ext
13846cat >>conftest.$ac_ext <<_ACEOF
13847/* end confdefs.h. */
13848
13849#ifdef HAVE_SYS_TYPES_H
13850#include <sys/types.h>
13851#endif
13852#ifdef HAVE_TIME_H
13853#include <time.h>
13854#endif
13855
13856
13857 typedef time_t ac__type_sizeof_;
13858int
13859main ()
13860{
13861static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13862test_array [0] = 0
13863
13864 ;
13865 return 0;
13866}
13867_ACEOF
13868rm -f conftest.$ac_objext
13869if { (ac_try="$ac_compile"
13870case "(($ac_try" in
13871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13872 *) ac_try_echo=$ac_try;;
13873esac
13874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13875 (eval "$ac_compile") 2>conftest.er1
13876 ac_status=$?
13877 grep -v '^ *+' conftest.er1 >conftest.err
13878 rm -f conftest.er1
13879 cat conftest.err >&5
13880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881 (exit $ac_status); } && {
13882 test -z "$ac_c_werror_flag" ||
13883 test ! -s conftest.err
13884 } && test -s conftest.$ac_objext; then
13885 ac_hi=$ac_mid
13886else
13887 echo "$as_me: failed program was:" >&5
13888sed 's/^/| /' conftest.$ac_ext >&5
13889
13890 ac_lo=`expr '(' $ac_mid ')' + 1`
13891fi
13892
13893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13894done
13895case $ac_lo in
13896?*) ac_cv_sizeof_time_t=$ac_lo;;
13897'') if test "$ac_cv_type_time_t" = yes; then
13898 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13899See \`config.log' for more details." >&5
13900echo "$as_me: error: cannot compute sizeof (time_t)
13901See \`config.log' for more details." >&2;}
13902 { (exit 77); exit 77; }; }
13903 else
13904 ac_cv_sizeof_time_t=0
13905 fi ;;
13906esac
13907else
13908 cat >conftest.$ac_ext <<_ACEOF
13909/* confdefs.h. */
13910_ACEOF
13911cat confdefs.h >>conftest.$ac_ext
13912cat >>conftest.$ac_ext <<_ACEOF
13913/* end confdefs.h. */
13914
13915#ifdef HAVE_SYS_TYPES_H
13916#include <sys/types.h>
13917#endif
13918#ifdef HAVE_TIME_H
13919#include <time.h>
13920#endif
13921
13922
13923 typedef time_t ac__type_sizeof_;
13924static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13925static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13926#include <stdio.h>
13927#include <stdlib.h>
13928int
13929main ()
13930{
13931
13932 FILE *f = fopen ("conftest.val", "w");
13933 if (! f)
13934 return 1;
13935 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13936 {
13937 long int i = longval ();
13938 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13939 return 1;
13940 fprintf (f, "%ld\n", i);
13941 }
13942 else
13943 {
13944 unsigned long int i = ulongval ();
13945 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13946 return 1;
13947 fprintf (f, "%lu\n", i);
13948 }
13949 return ferror (f) || fclose (f) != 0;
13950
13951 ;
13952 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013953}
Martin v. Löwis11437992002-04-12 09:54:03 +000013954_ACEOF
13955rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013956if { (ac_try="$ac_link"
13957case "(($ac_try" in
13958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13959 *) ac_try_echo=$ac_try;;
13960esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013962 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013963 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013966 { (case "(($ac_try" in
13967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13968 *) ac_try_echo=$ac_try;;
13969esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013971 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013972 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013975 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013976else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013977 echo "$as_me: program exited with status $ac_status" >&5
13978echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013979sed 's/^/| /' conftest.$ac_ext >&5
13980
Martin v. Löwis11437992002-04-12 09:54:03 +000013981( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013982if test "$ac_cv_type_time_t" = yes; then
13983 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13984See \`config.log' for more details." >&5
13985echo "$as_me: error: cannot compute sizeof (time_t)
13986See \`config.log' for more details." >&2;}
13987 { (exit 77); exit 77; }; }
13988 else
13989 ac_cv_sizeof_time_t=0
13990 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992rm -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 +000013993fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013994rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013995fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013996{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13997echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013998
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013999
14000
Martin v. Löwis11437992002-04-12 09:54:03 +000014001cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014002#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014003_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014004
Michael W. Hudson54241132001-12-07 15:38:26 +000014005
14006
Trent Mick635f6fb2000-08-23 21:33:05 +000014007# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014008ac_save_cc="$CC"
14009if test "$ac_cv_kpthread" = "yes"
14010then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014011elif test "$ac_cv_kthread" = "yes"
14012then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014013elif test "$ac_cv_pthread" = "yes"
14014then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014015fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014016{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14017echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014018have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014019cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014020/* confdefs.h. */
14021_ACEOF
14022cat confdefs.h >>conftest.$ac_ext
14023cat >>conftest.$ac_ext <<_ACEOF
14024/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014025#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014026int
14027main ()
14028{
Guido van Rossum12580492000-09-24 16:47:19 +000014029pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 ;
14031 return 0;
14032}
14033_ACEOF
14034rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014035if { (ac_try="$ac_compile"
14036case "(($ac_try" in
14037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14038 *) ac_try_echo=$ac_try;;
14039esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014043 grep -v '^ *+' conftest.er1 >conftest.err
14044 rm -f conftest.er1
14045 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047 (exit $ac_status); } && {
14048 test -z "$ac_c_werror_flag" ||
14049 test ! -s conftest.err
14050 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014051 have_pthread_t=yes
14052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014054sed 's/^/| /' conftest.$ac_ext >&5
14055
Martin v. Löwiseba40652007-08-30 20:10:57 +000014056
Trent Mick635f6fb2000-08-23 21:33:05 +000014057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014058
14059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014060{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14061echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014062if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014063 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14064echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14065if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014066 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014067else
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014069/* confdefs.h. */
14070_ACEOF
14071cat confdefs.h >>conftest.$ac_ext
14072cat >>conftest.$ac_ext <<_ACEOF
14073/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014074
14075#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014076#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014077#endif
14078
14079
14080typedef pthread_t ac__type_new_;
14081int
14082main ()
14083{
14084if ((ac__type_new_ *) 0)
14085 return 0;
14086if (sizeof (ac__type_new_))
14087 return 0;
14088 ;
14089 return 0;
14090}
14091_ACEOF
14092rm -f conftest.$ac_objext
14093if { (ac_try="$ac_compile"
14094case "(($ac_try" in
14095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14096 *) ac_try_echo=$ac_try;;
14097esac
14098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14099 (eval "$ac_compile") 2>conftest.er1
14100 ac_status=$?
14101 grep -v '^ *+' conftest.er1 >conftest.err
14102 rm -f conftest.er1
14103 cat conftest.err >&5
14104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14105 (exit $ac_status); } && {
14106 test -z "$ac_c_werror_flag" ||
14107 test ! -s conftest.err
14108 } && test -s conftest.$ac_objext; then
14109 ac_cv_type_pthread_t=yes
14110else
14111 echo "$as_me: failed program was:" >&5
14112sed 's/^/| /' conftest.$ac_ext >&5
14113
14114 ac_cv_type_pthread_t=no
14115fi
14116
14117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14118fi
14119{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14120echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14121
14122# The cast to long int works around a bug in the HP C Compiler
14123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14125# This bug is HP SR number 8606223364.
14126{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14127echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14128if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14129 echo $ECHO_N "(cached) $ECHO_C" >&6
14130else
14131 if test "$cross_compiling" = yes; then
14132 # Depending upon the size, compute the lo and hi bounds.
14133cat >conftest.$ac_ext <<_ACEOF
14134/* confdefs.h. */
14135_ACEOF
14136cat confdefs.h >>conftest.$ac_ext
14137cat >>conftest.$ac_ext <<_ACEOF
14138/* end confdefs.h. */
14139
14140#ifdef HAVE_PTHREAD_H
14141#include <pthread.h>
14142#endif
14143
14144
14145 typedef pthread_t ac__type_sizeof_;
14146int
14147main ()
14148{
14149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14150test_array [0] = 0
14151
14152 ;
14153 return 0;
14154}
14155_ACEOF
14156rm -f conftest.$ac_objext
14157if { (ac_try="$ac_compile"
14158case "(($ac_try" in
14159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14160 *) ac_try_echo=$ac_try;;
14161esac
14162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14163 (eval "$ac_compile") 2>conftest.er1
14164 ac_status=$?
14165 grep -v '^ *+' conftest.er1 >conftest.err
14166 rm -f conftest.er1
14167 cat conftest.err >&5
14168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14169 (exit $ac_status); } && {
14170 test -z "$ac_c_werror_flag" ||
14171 test ! -s conftest.err
14172 } && test -s conftest.$ac_objext; then
14173 ac_lo=0 ac_mid=0
14174 while :; do
14175 cat >conftest.$ac_ext <<_ACEOF
14176/* confdefs.h. */
14177_ACEOF
14178cat confdefs.h >>conftest.$ac_ext
14179cat >>conftest.$ac_ext <<_ACEOF
14180/* end confdefs.h. */
14181
14182#ifdef HAVE_PTHREAD_H
14183#include <pthread.h>
14184#endif
14185
14186
14187 typedef pthread_t ac__type_sizeof_;
14188int
14189main ()
14190{
14191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14192test_array [0] = 0
14193
14194 ;
14195 return 0;
14196}
14197_ACEOF
14198rm -f conftest.$ac_objext
14199if { (ac_try="$ac_compile"
14200case "(($ac_try" in
14201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14202 *) ac_try_echo=$ac_try;;
14203esac
14204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14205 (eval "$ac_compile") 2>conftest.er1
14206 ac_status=$?
14207 grep -v '^ *+' conftest.er1 >conftest.err
14208 rm -f conftest.er1
14209 cat conftest.err >&5
14210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14211 (exit $ac_status); } && {
14212 test -z "$ac_c_werror_flag" ||
14213 test ! -s conftest.err
14214 } && test -s conftest.$ac_objext; then
14215 ac_hi=$ac_mid; break
14216else
14217 echo "$as_me: failed program was:" >&5
14218sed 's/^/| /' conftest.$ac_ext >&5
14219
14220 ac_lo=`expr $ac_mid + 1`
14221 if test $ac_lo -le $ac_mid; then
14222 ac_lo= ac_hi=
14223 break
14224 fi
14225 ac_mid=`expr 2 '*' $ac_mid + 1`
14226fi
14227
14228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14229 done
14230else
14231 echo "$as_me: failed program was:" >&5
14232sed 's/^/| /' conftest.$ac_ext >&5
14233
14234 cat >conftest.$ac_ext <<_ACEOF
14235/* confdefs.h. */
14236_ACEOF
14237cat confdefs.h >>conftest.$ac_ext
14238cat >>conftest.$ac_ext <<_ACEOF
14239/* end confdefs.h. */
14240
14241#ifdef HAVE_PTHREAD_H
14242#include <pthread.h>
14243#endif
14244
14245
14246 typedef pthread_t ac__type_sizeof_;
14247int
14248main ()
14249{
14250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14251test_array [0] = 0
14252
14253 ;
14254 return 0;
14255}
14256_ACEOF
14257rm -f conftest.$ac_objext
14258if { (ac_try="$ac_compile"
14259case "(($ac_try" in
14260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14261 *) ac_try_echo=$ac_try;;
14262esac
14263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14264 (eval "$ac_compile") 2>conftest.er1
14265 ac_status=$?
14266 grep -v '^ *+' conftest.er1 >conftest.err
14267 rm -f conftest.er1
14268 cat conftest.err >&5
14269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14270 (exit $ac_status); } && {
14271 test -z "$ac_c_werror_flag" ||
14272 test ! -s conftest.err
14273 } && test -s conftest.$ac_objext; then
14274 ac_hi=-1 ac_mid=-1
14275 while :; do
14276 cat >conftest.$ac_ext <<_ACEOF
14277/* confdefs.h. */
14278_ACEOF
14279cat confdefs.h >>conftest.$ac_ext
14280cat >>conftest.$ac_ext <<_ACEOF
14281/* end confdefs.h. */
14282
14283#ifdef HAVE_PTHREAD_H
14284#include <pthread.h>
14285#endif
14286
14287
14288 typedef pthread_t ac__type_sizeof_;
14289int
14290main ()
14291{
14292static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14293test_array [0] = 0
14294
14295 ;
14296 return 0;
14297}
14298_ACEOF
14299rm -f conftest.$ac_objext
14300if { (ac_try="$ac_compile"
14301case "(($ac_try" in
14302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14303 *) ac_try_echo=$ac_try;;
14304esac
14305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14306 (eval "$ac_compile") 2>conftest.er1
14307 ac_status=$?
14308 grep -v '^ *+' conftest.er1 >conftest.err
14309 rm -f conftest.er1
14310 cat conftest.err >&5
14311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14312 (exit $ac_status); } && {
14313 test -z "$ac_c_werror_flag" ||
14314 test ! -s conftest.err
14315 } && test -s conftest.$ac_objext; then
14316 ac_lo=$ac_mid; break
14317else
14318 echo "$as_me: failed program was:" >&5
14319sed 's/^/| /' conftest.$ac_ext >&5
14320
14321 ac_hi=`expr '(' $ac_mid ')' - 1`
14322 if test $ac_mid -le $ac_hi; then
14323 ac_lo= ac_hi=
14324 break
14325 fi
14326 ac_mid=`expr 2 '*' $ac_mid`
14327fi
14328
14329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14330 done
14331else
14332 echo "$as_me: failed program was:" >&5
14333sed 's/^/| /' conftest.$ac_ext >&5
14334
14335 ac_lo= ac_hi=
14336fi
14337
14338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14339fi
14340
14341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14342# Binary search between lo and hi bounds.
14343while test "x$ac_lo" != "x$ac_hi"; do
14344 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14345 cat >conftest.$ac_ext <<_ACEOF
14346/* confdefs.h. */
14347_ACEOF
14348cat confdefs.h >>conftest.$ac_ext
14349cat >>conftest.$ac_ext <<_ACEOF
14350/* end confdefs.h. */
14351
14352#ifdef HAVE_PTHREAD_H
14353#include <pthread.h>
14354#endif
14355
14356
14357 typedef pthread_t ac__type_sizeof_;
14358int
14359main ()
14360{
14361static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14362test_array [0] = 0
14363
14364 ;
14365 return 0;
14366}
14367_ACEOF
14368rm -f conftest.$ac_objext
14369if { (ac_try="$ac_compile"
14370case "(($ac_try" in
14371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14372 *) ac_try_echo=$ac_try;;
14373esac
14374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14375 (eval "$ac_compile") 2>conftest.er1
14376 ac_status=$?
14377 grep -v '^ *+' conftest.er1 >conftest.err
14378 rm -f conftest.er1
14379 cat conftest.err >&5
14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); } && {
14382 test -z "$ac_c_werror_flag" ||
14383 test ! -s conftest.err
14384 } && test -s conftest.$ac_objext; then
14385 ac_hi=$ac_mid
14386else
14387 echo "$as_me: failed program was:" >&5
14388sed 's/^/| /' conftest.$ac_ext >&5
14389
14390 ac_lo=`expr '(' $ac_mid ')' + 1`
14391fi
14392
14393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14394done
14395case $ac_lo in
14396?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14397'') if test "$ac_cv_type_pthread_t" = yes; then
14398 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14399See \`config.log' for more details." >&5
14400echo "$as_me: error: cannot compute sizeof (pthread_t)
14401See \`config.log' for more details." >&2;}
14402 { (exit 77); exit 77; }; }
14403 else
14404 ac_cv_sizeof_pthread_t=0
14405 fi ;;
14406esac
14407else
14408 cat >conftest.$ac_ext <<_ACEOF
14409/* confdefs.h. */
14410_ACEOF
14411cat confdefs.h >>conftest.$ac_ext
14412cat >>conftest.$ac_ext <<_ACEOF
14413/* end confdefs.h. */
14414
14415#ifdef HAVE_PTHREAD_H
14416#include <pthread.h>
14417#endif
14418
14419
14420 typedef pthread_t ac__type_sizeof_;
14421static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14422static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14423#include <stdio.h>
14424#include <stdlib.h>
14425int
14426main ()
14427{
14428
14429 FILE *f = fopen ("conftest.val", "w");
14430 if (! f)
14431 return 1;
14432 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14433 {
14434 long int i = longval ();
14435 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14436 return 1;
14437 fprintf (f, "%ld\n", i);
14438 }
14439 else
14440 {
14441 unsigned long int i = ulongval ();
14442 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14443 return 1;
14444 fprintf (f, "%lu\n", i);
14445 }
14446 return ferror (f) || fclose (f) != 0;
14447
14448 ;
14449 return 0;
14450}
Martin v. Löwis11437992002-04-12 09:54:03 +000014451_ACEOF
14452rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014453if { (ac_try="$ac_link"
14454case "(($ac_try" in
14455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14456 *) ac_try_echo=$ac_try;;
14457esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014459 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014460 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014463 { (case "(($ac_try" in
14464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14465 *) ac_try_echo=$ac_try;;
14466esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014468 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014472 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014474 echo "$as_me: program exited with status $ac_status" >&5
14475echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014476sed 's/^/| /' conftest.$ac_ext >&5
14477
Martin v. Löwis11437992002-04-12 09:54:03 +000014478( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014479if test "$ac_cv_type_pthread_t" = yes; then
14480 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14481See \`config.log' for more details." >&5
14482echo "$as_me: error: cannot compute sizeof (pthread_t)
14483See \`config.log' for more details." >&2;}
14484 { (exit 77); exit 77; }; }
14485 else
14486 ac_cv_sizeof_pthread_t=0
14487 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014489rm -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 +000014490fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014491rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014492fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014493{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014494echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014495
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014496
14497
Martin v. Löwis11437992002-04-12 09:54:03 +000014498cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014499#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014500_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014501
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014502
Trent Mick635f6fb2000-08-23 21:33:05 +000014503fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014504CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014505
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014506{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14507echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014508# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014509if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510 enableval=$enable_toolbox_glue;
14511fi
Jack Jansene578a632001-08-15 01:27:14 +000014512
14513
14514if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014515then
Jack Jansene578a632001-08-15 01:27:14 +000014516 case $ac_sys_system/$ac_sys_release in
14517 Darwin/*)
14518 enable_toolbox_glue="yes";;
14519 *)
14520 enable_toolbox_glue="no";;
14521 esac
14522fi
14523case "$enable_toolbox_glue" in
14524yes)
Jack Jansene578a632001-08-15 01:27:14 +000014525 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014526 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014527
14528cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014529#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014530_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014531
14532 ;;
14533*)
Jack Jansene578a632001-08-15 01:27:14 +000014534 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014535 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014536 ;;
14537esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014538{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14539echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014540
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014541
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014542
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014543case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014544 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014545 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14546 ;;
14547 Darwin/*)
14548 OTHER_LIBTOOL_OPT=""
14549 ;;
14550esac
14551
14552
Ronald Oussoren25967582009-09-06 10:00:26 +000014553ARCH_RUN_32BIT=""
14554
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014555case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014556 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014557 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14558 if test "${enable_universalsdk}"; then
14559 :
14560 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014561 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014562 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014563 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014564 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014565 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +000014566 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014567 if test ${gcc_version} '<' 4.0
14568 then
14569 LIBTOOL_CRUFT="-lcc_dynamic"
14570 else
14571 LIBTOOL_CRUFT=""
14572 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014573 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014574 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014575else
14576 cat >conftest.$ac_ext <<_ACEOF
14577/* confdefs.h. */
14578_ACEOF
14579cat confdefs.h >>conftest.$ac_ext
14580cat >>conftest.$ac_ext <<_ACEOF
14581/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014582
Ronald Oussoren25967582009-09-06 10:00:26 +000014583 #include <unistd.h>
14584 int main(int argc, char*argv[])
14585 {
14586 if (sizeof(long) == 4) {
14587 return 0;
14588 } else {
14589 return 1;
14590 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014591 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014592
Ronald Oussoren25967582009-09-06 10:00:26 +000014593_ACEOF
14594rm -f conftest$ac_exeext
14595if { (ac_try="$ac_link"
14596case "(($ac_try" in
14597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14598 *) ac_try_echo=$ac_try;;
14599esac
14600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14601 (eval "$ac_link") 2>&5
14602 ac_status=$?
14603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14605 { (case "(($ac_try" in
14606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14607 *) ac_try_echo=$ac_try;;
14608esac
14609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14610 (eval "$ac_try") 2>&5
14611 ac_status=$?
14612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14613 (exit $ac_status); }; }; then
14614 ac_osx_32bit=yes
14615else
14616 echo "$as_me: program exited with status $ac_status" >&5
14617echo "$as_me: failed program was:" >&5
14618sed 's/^/| /' conftest.$ac_ext >&5
14619
14620( exit $ac_status )
14621ac_osx_32bit=no
14622fi
14623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14624fi
14625
14626
14627
14628 if test "${ac_osx_32bit}" = "yes"; then
14629 case `arch` in
14630 i386)
14631 MACOSX_DEFAULT_ARCH="i386"
14632 ;;
14633 ppc)
14634 MACOSX_DEFAULT_ARCH="ppc"
14635 ;;
14636 *)
14637 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14638echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14639 { (exit 1); exit 1; }; }
14640 ;;
14641 esac
14642 else
14643 case `arch` in
14644 i386)
14645 MACOSX_DEFAULT_ARCH="x86_64"
14646 ;;
14647 ppc)
14648 MACOSX_DEFAULT_ARCH="ppc64"
14649 ;;
14650 *)
14651 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14652echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14653 { (exit 1); exit 1; }; }
14654 ;;
14655 esac
14656
14657 #ARCH_RUN_32BIT="true"
14658 fi
14659
14660 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014661 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014662 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014663esac
14664
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014665{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14666echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014667if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014668then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014669 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014670 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014671 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014672
Martin v. Löwis11437992002-04-12 09:54:03 +000014673cat >>confdefs.h <<\_ACEOF
14674#define WITH_NEXT_FRAMEWORK 1
14675_ACEOF
14676
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014677 { echo "$as_me:$LINENO: result: yes" >&5
14678echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014679 if test $enable_shared = "yes"
14680 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014681 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14682echo "$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 +000014683 { (exit 1); exit 1; }; }
14684 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014685else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014686 { echo "$as_me:$LINENO: result: no" >&5
14687echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014688fi
14689
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014690{ echo "$as_me:$LINENO: checking for dyld" >&5
14691echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014692case $ac_sys_system/$ac_sys_release in
14693 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014694
Martin v. Löwis11437992002-04-12 09:54:03 +000014695cat >>confdefs.h <<\_ACEOF
14696#define WITH_DYLD 1
14697_ACEOF
14698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014699 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14700echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014701 ;;
14702 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014703 { echo "$as_me:$LINENO: result: no" >&5
14704echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014705 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014706esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014707
Guido van Rossum0a516c91994-09-12 10:58:40 +000014708# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014709
Michael W. Hudson54241132001-12-07 15:38:26 +000014710
14711
14712
14713
Guido van Rossum0a516c91994-09-12 10:58:40 +000014714# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014715# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014716{ echo "$as_me:$LINENO: checking SO" >&5
14717echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014718if test -z "$SO"
14719then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014720 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014721 hp*|HP*)
14722 case `uname -m` in
14723 ia64) SO=.so;;
14724 *) SO=.sl;;
14725 esac
14726 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014727 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014728 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014729 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014730else
14731 # this might also be a termcap variable, see #610332
14732 echo
14733 echo '====================================================================='
14734 echo '+ +'
14735 echo '+ WARNING: You have set SO in your environment. +'
14736 echo '+ Do you really mean to change the extension for shared libraries? +'
14737 echo '+ Continuing in 10 seconds to let you to ponder. +'
14738 echo '+ +'
14739 echo '====================================================================='
14740 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014741fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014742{ echo "$as_me:$LINENO: result: $SO" >&5
14743echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014744
Ronald Oussoren79f90492009-01-02 10:44:46 +000014745
Neal Norwitz58e28882006-05-19 07:00:58 +000014746cat >>confdefs.h <<_ACEOF
14747#define SHLIB_EXT "$SO"
14748_ACEOF
14749
Guido van Rossum0a516c91994-09-12 10:58:40 +000014750# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014751# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014752# (Shared libraries in this instance are shared modules to be loaded into
14753# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014754{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14755echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014756if test -z "$LDSHARED"
14757then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014758 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014759 AIX*)
14760 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014761 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014762 ;;
14763 BeOS*)
14764 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014765 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014766 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014767 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014768 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014769 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014770 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014771 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014772 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014773 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014774 hp*|HP*)
14775 if test "$GCC" = "yes"
14776 then LDSHARED='$(CC) -shared'
14777 else LDSHARED='ld -b';
14778 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014779 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014780 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014781 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14782 if test "$enable_framework" ; then
14783 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014784 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14785 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014786 else
14787 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014788 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014789 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014790 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014791 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14792 if test "$enable_framework" ; then
14793 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014794 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14795 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014796 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014797 # No framework, use the Python app as bundle-loader
14798 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014799 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014800 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014801 Darwin/*)
14802 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14803 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014804
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014805 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014806 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014807 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014808 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014809 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014810 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14811 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014812 else
14813 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14814 if test "$enable_framework" ; then
14815 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014816 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14817 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014818 else
14819 # No framework, use the Python app as bundle-loader
14820 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14821 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14822 fi
14823 fi
14824 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014825 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014826 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014827 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014828 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014829 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014830 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014831 else
14832 LDSHARED="ld -Bshareable ${LDFLAGS}"
14833 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014834 OpenBSD*)
14835 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14836 then
14837 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14838 else
14839 case `uname -r` in
14840 [01].* | 2.[0-7] | 2.[0-7].*)
14841 LDSHARED="ld -Bshareable ${LDFLAGS}"
14842 ;;
14843 *)
14844 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14845 ;;
14846 esac
14847 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014848 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014849 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014850 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014851 then LDSHARED='$(CC) -shared'
14852 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014853 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014854 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014855 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014856 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014857 *) LDSHARED="ld";;
14858 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014859fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014860{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14861echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014862BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014863# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014864# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014865{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14866echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014867if test -z "$CCSHARED"
14868then
Guido van Rossum07397971997-04-29 21:49:50 +000014869 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014870 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014871 then CCSHARED="-fPIC";
14872 elif test `uname -p` = sparc;
14873 then CCSHARED="-xcode=pic32";
14874 else CCSHARED="-Kpic";
14875 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014876 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014877 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014878 else CCSHARED="+z";
14879 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014880 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014881 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014882 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014883 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014884 if test "$GCC" = "yes"
14885 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014886 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014887 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014888 SCO_SV*)
14889 if test "$GCC" = "yes"
14890 then CCSHARED="-fPIC"
14891 else CCSHARED="-Kpic -belf"
14892 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014893 IRIX*/6*) case $CC in
14894 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014895 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014896 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014897 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014898 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014899fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014900{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14901echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014902# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014903# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014904{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14905echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014906if test -z "$LINKFORSHARED"
14907then
Guido van Rossum07397971997-04-29 21:49:50 +000014908 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014909 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014910 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014911 LINKFORSHARED="-Wl,-E -Wl,+s";;
14912# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014913 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014914 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014915 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014917 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14918 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014919 # not used by the core itself but which needs to be in the core so
14920 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014921 # -prebind is no longer used, because it actually seems to give a
14922 # slowdown in stead of a speedup, maybe due to the large number of
14923 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014924
14925 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014926 if test "$enable_framework"
14927 then
Jack Jansenda49e192005-01-07 13:08:22 +000014928 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014929 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014930 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014931 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014932 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014933 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014934 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014935 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14936 then
14937 LINKFORSHARED="-Wl,--export-dynamic"
14938 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014939 SunOS/5*) case $CC in
14940 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014941 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014942 then
14943 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014944 fi;;
14945 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014946 CYGWIN*)
14947 if test $enable_shared = "no"
14948 then
14949 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14950 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014951 QNX*)
14952 # -Wl,-E causes the symbols to be added to the dynamic
14953 # symbol table so that they can be found when a module
14954 # is loaded. -N 2048K causes the stack size to be set
14955 # to 2048 kilobytes so that the stack doesn't overflow
14956 # when running test_compile.py.
14957 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014958 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014959fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014960{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14961echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014962
Michael W. Hudson54241132001-12-07 15:38:26 +000014963
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014964
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014965{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14966echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014967if test ! "$LIBRARY" = "$LDLIBRARY"
14968then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014969 case $ac_sys_system in
14970 CYGWIN*)
14971 # Cygwin needs CCSHARED when building extension DLLs
14972 # but not when building the interpreter DLL.
14973 CFLAGSFORSHARED='';;
14974 *)
14975 CFLAGSFORSHARED='$(CCSHARED)'
14976 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014977fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014978{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14979echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014980
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014981# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14982# library (with --enable-shared).
14983# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014984# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14985# if it is not required, since it creates a dependency of the shared library
14986# to LIBS. This, in turn, means that applications linking the shared libpython
14987# don't need to link LIBS explicitly. The default should be only changed
14988# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014989
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014990{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14991echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014992case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014993 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014994 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014995esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014996{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14997echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014998
14999
Guido van Rossum627b2d71993-12-24 10:39:16 +000015000# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000015001
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015002{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
15003echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015004if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015006else
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015008LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015010/* confdefs.h. */
15011_ACEOF
15012cat confdefs.h >>conftest.$ac_ext
15013cat >>conftest.$ac_ext <<_ACEOF
15014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015015
Martin v. Löwiseba40652007-08-30 20:10:57 +000015016/* Override any GCC internal prototype to avoid an error.
15017 Use char because int might match the return type of a GCC
15018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015019#ifdef __cplusplus
15020extern "C"
15021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015022char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015023int
15024main ()
15025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015026return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 ;
15028 return 0;
15029}
15030_ACEOF
15031rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015032if { (ac_try="$ac_link"
15033case "(($ac_try" in
15034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15035 *) ac_try_echo=$ac_try;;
15036esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015038 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015040 grep -v '^ *+' conftest.er1 >conftest.err
15041 rm -f conftest.er1
15042 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044 (exit $ac_status); } && {
15045 test -z "$ac_c_werror_flag" ||
15046 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015047 } && test -s conftest$ac_exeext &&
15048 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015050else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015052sed 's/^/| /' conftest.$ac_ext >&5
15053
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056
15057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015059LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015060fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015061{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15062echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15063if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015064 cat >>confdefs.h <<_ACEOF
15065#define HAVE_LIBDL 1
15066_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015067
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015068 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015069
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015070fi
15071 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015072
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015073{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15074echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015075if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015077else
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015079LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015081/* confdefs.h. */
15082_ACEOF
15083cat confdefs.h >>conftest.$ac_ext
15084cat >>conftest.$ac_ext <<_ACEOF
15085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015086
Martin v. Löwiseba40652007-08-30 20:10:57 +000015087/* Override any GCC internal prototype to avoid an error.
15088 Use char because int might match the return type of a GCC
15089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015090#ifdef __cplusplus
15091extern "C"
15092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015093char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015094int
15095main ()
15096{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015097return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015098 ;
15099 return 0;
15100}
15101_ACEOF
15102rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015103if { (ac_try="$ac_link"
15104case "(($ac_try" in
15105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15106 *) ac_try_echo=$ac_try;;
15107esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015109 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015111 grep -v '^ *+' conftest.er1 >conftest.err
15112 rm -f conftest.er1
15113 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015115 (exit $ac_status); } && {
15116 test -z "$ac_c_werror_flag" ||
15117 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015118 } && test -s conftest$ac_exeext &&
15119 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015121else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015123sed 's/^/| /' conftest.$ac_ext >&5
15124
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015127
15128rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015130LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015131fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015132{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15133echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15134if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 cat >>confdefs.h <<_ACEOF
15136#define HAVE_LIBDLD 1
15137_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015138
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015139 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015140
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015141fi
15142 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015143
Ronald Oussoren79f90492009-01-02 10:44:46 +000015144# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015145if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015146 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15147echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015148if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015149 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015150else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015151 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015152cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015153/* confdefs.h. */
15154_ACEOF
15155cat confdefs.h >>conftest.$ac_ext
15156cat >>conftest.$ac_ext <<_ACEOF
15157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015158
Martin v. Löwiseba40652007-08-30 20:10:57 +000015159/* Override any GCC internal prototype to avoid an error.
15160 Use char because int might match the return type of a GCC
15161 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015162#ifdef __cplusplus
15163extern "C"
15164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015165char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015166int
15167main ()
15168{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015169return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 ;
15171 return 0;
15172}
15173_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015174for ac_lib in '' pthread rt posix4; do
15175 if test -z "$ac_lib"; then
15176 ac_res="none required"
15177 else
15178 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015179 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180 fi
15181 rm -f conftest.$ac_objext conftest$ac_exeext
15182if { (ac_try="$ac_link"
15183case "(($ac_try" in
15184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15185 *) ac_try_echo=$ac_try;;
15186esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015188 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015189 ac_status=$?
15190 grep -v '^ *+' conftest.er1 >conftest.err
15191 rm -f conftest.er1
15192 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015194 (exit $ac_status); } && {
15195 test -z "$ac_c_werror_flag" ||
15196 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015197 } && test -s conftest$ac_exeext &&
15198 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015199 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015200else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015201 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015202sed 's/^/| /' conftest.$ac_ext >&5
15203
Martin v. Löwiseba40652007-08-30 20:10:57 +000015204
Brett Cannon19fab762007-06-02 03:02:29 +000015205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015206
15207rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15208 conftest$ac_exeext
15209 if test "${ac_cv_search_sem_init+set}" = set; then
15210 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212done
15213if test "${ac_cv_search_sem_init+set}" = set; then
15214 :
15215else
15216 ac_cv_search_sem_init=no
15217fi
15218rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015219LIBS=$ac_func_search_save_LIBS
15220fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015221{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15222echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015223ac_res=$ac_cv_search_sem_init
15224if test "$ac_res" != no; then
15225 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015226
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015227fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015228 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015229 # posix4 on Solaris 2.6
15230 # pthread (first!) on Linux
15231fi
15232
Martin v. Löwis19d17342003-06-14 21:03:05 +000015233# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015234{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15235echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015236if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015237 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015238else
15239 ac_check_lib_save_LIBS=$LIBS
15240LIBS="-lintl $LIBS"
15241cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015242/* confdefs.h. */
15243_ACEOF
15244cat confdefs.h >>conftest.$ac_ext
15245cat >>conftest.$ac_ext <<_ACEOF
15246/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015247
Martin v. Löwiseba40652007-08-30 20:10:57 +000015248/* Override any GCC internal prototype to avoid an error.
15249 Use char because int might match the return type of a GCC
15250 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015251#ifdef __cplusplus
15252extern "C"
15253#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015254char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015255int
15256main ()
15257{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015258return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015259 ;
15260 return 0;
15261}
15262_ACEOF
15263rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015264if { (ac_try="$ac_link"
15265case "(($ac_try" in
15266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15267 *) ac_try_echo=$ac_try;;
15268esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015270 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015272 grep -v '^ *+' conftest.er1 >conftest.err
15273 rm -f conftest.er1
15274 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276 (exit $ac_status); } && {
15277 test -z "$ac_c_werror_flag" ||
15278 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015279 } && test -s conftest$ac_exeext &&
15280 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015281 ac_cv_lib_intl_textdomain=yes
15282else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015284sed 's/^/| /' conftest.$ac_ext >&5
15285
Martin v. Löwiseba40652007-08-30 20:10:57 +000015286 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015288
15289rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015291LIBS=$ac_check_lib_save_LIBS
15292fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015293{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15294echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15295if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015296
15297cat >>confdefs.h <<\_ACEOF
15298#define WITH_LIBINTL 1
15299_ACEOF
15300
15301fi
15302
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015303
15304# checks for system dependent C++ extensions support
15305case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015306 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15307echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015309/* confdefs.h. */
15310_ACEOF
15311cat confdefs.h >>conftest.$ac_ext
15312cat >>conftest.$ac_ext <<_ACEOF
15313/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015314#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015315int
15316main ()
15317{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015318loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 ;
15320 return 0;
15321}
15322_ACEOF
15323rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015324if { (ac_try="$ac_link"
15325case "(($ac_try" in
15326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15327 *) ac_try_echo=$ac_try;;
15328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015330 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015332 grep -v '^ *+' conftest.er1 >conftest.err
15333 rm -f conftest.er1
15334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015336 (exit $ac_status); } && {
15337 test -z "$ac_c_werror_flag" ||
15338 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015339 } && test -s conftest$ac_exeext &&
15340 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015341
Martin v. Löwis11437992002-04-12 09:54:03 +000015342cat >>confdefs.h <<\_ACEOF
15343#define AIX_GENUINE_CPLUSPLUS 1
15344_ACEOF
15345
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015346 { echo "$as_me:$LINENO: result: yes" >&5
15347echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015348else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015350sed 's/^/| /' conftest.$ac_ext >&5
15351
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015352 { echo "$as_me:$LINENO: result: no" >&5
15353echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015355
15356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015358 *) ;;
15359esac
15360
Guido van Rossum70c7f481998-03-26 18:44:10 +000015361# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015362# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015363{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15364echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015365if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015366 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015367else
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015369LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015370cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015371/* confdefs.h. */
15372_ACEOF
15373cat confdefs.h >>conftest.$ac_ext
15374cat >>conftest.$ac_ext <<_ACEOF
15375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015376
Martin v. Löwiseba40652007-08-30 20:10:57 +000015377/* Override any GCC internal prototype to avoid an error.
15378 Use char because int might match the return type of a GCC
15379 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015380#ifdef __cplusplus
15381extern "C"
15382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015383char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015384int
15385main ()
15386{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015387return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015388 ;
15389 return 0;
15390}
15391_ACEOF
15392rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015393if { (ac_try="$ac_link"
15394case "(($ac_try" in
15395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15396 *) ac_try_echo=$ac_try;;
15397esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015399 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015401 grep -v '^ *+' conftest.er1 >conftest.err
15402 rm -f conftest.er1
15403 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015405 (exit $ac_status); } && {
15406 test -z "$ac_c_werror_flag" ||
15407 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015408 } && test -s conftest$ac_exeext &&
15409 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015411else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015413sed 's/^/| /' conftest.$ac_ext >&5
15414
Martin v. Löwiseba40652007-08-30 20:10:57 +000015415 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015417
15418rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015419 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015420LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015421fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015422{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15423echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15424if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015425 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015426fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015427 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015428{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15429echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015430if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015432else
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015434LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015435cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015436/* confdefs.h. */
15437_ACEOF
15438cat confdefs.h >>conftest.$ac_ext
15439cat >>conftest.$ac_ext <<_ACEOF
15440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015441
Martin v. Löwiseba40652007-08-30 20:10:57 +000015442/* Override any GCC internal prototype to avoid an error.
15443 Use char because int might match the return type of a GCC
15444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015445#ifdef __cplusplus
15446extern "C"
15447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015448char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015449int
15450main ()
15451{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015452return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 ;
15454 return 0;
15455}
15456_ACEOF
15457rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015458if { (ac_try="$ac_link"
15459case "(($ac_try" in
15460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15461 *) ac_try_echo=$ac_try;;
15462esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015464 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015466 grep -v '^ *+' conftest.er1 >conftest.err
15467 rm -f conftest.er1
15468 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015470 (exit $ac_status); } && {
15471 test -z "$ac_c_werror_flag" ||
15472 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015473 } && test -s conftest$ac_exeext &&
15474 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015476else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015478sed 's/^/| /' conftest.$ac_ext >&5
15479
Martin v. Löwiseba40652007-08-30 20:10:57 +000015480 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015482
15483rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015484 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015485LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015486fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015487{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15488echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15489if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015490 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015491fi
15492 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015493
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015494case "$ac_sys_system" in
15495BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015496{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15497echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015498if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015499 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015500else
Martin v. Löwis11437992002-04-12 09:54:03 +000015501 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015502LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015503cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015504/* confdefs.h. */
15505_ACEOF
15506cat confdefs.h >>conftest.$ac_ext
15507cat >>conftest.$ac_ext <<_ACEOF
15508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015509
Martin v. Löwiseba40652007-08-30 20:10:57 +000015510/* Override any GCC internal prototype to avoid an error.
15511 Use char because int might match the return type of a GCC
15512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015513#ifdef __cplusplus
15514extern "C"
15515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015516char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015517int
15518main ()
15519{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015520return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015521 ;
15522 return 0;
15523}
15524_ACEOF
15525rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015526if { (ac_try="$ac_link"
15527case "(($ac_try" in
15528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15529 *) ac_try_echo=$ac_try;;
15530esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015532 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015534 grep -v '^ *+' conftest.er1 >conftest.err
15535 rm -f conftest.er1
15536 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015538 (exit $ac_status); } && {
15539 test -z "$ac_c_werror_flag" ||
15540 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015541 } && test -s conftest$ac_exeext &&
15542 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015543 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015544else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015546sed 's/^/| /' conftest.$ac_ext >&5
15547
Martin v. Löwiseba40652007-08-30 20:10:57 +000015548 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015550
15551rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015553LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015554fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015555{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15556echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15557if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015558 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015559fi
15560 # BeOS
15561;;
15562esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015563
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015564{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15565echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015566
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015568if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015570{ echo "$as_me:$LINENO: result: $withval" >&5
15571echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015572LIBS="$withval $LIBS"
15573
15574else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015575 { echo "$as_me:$LINENO: result: no" >&5
15576echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577fi
15578
Guido van Rossum7f43da71994-08-01 12:15:30 +000015579
Benjamin Peterson2c196742009-12-31 03:17:18 +000015580# Check for use of the system expat library
15581{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15582echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15583
15584# Check whether --with-system_expat was given.
15585if test "${with_system_expat+set}" = set; then
15586 withval=$with_system_expat;
15587fi
15588
15589
15590{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15591echo "${ECHO_T}$with_system_expat" >&6; }
15592
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015593# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015594{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15595echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015596
Martin v. Löwiseba40652007-08-30 20:10:57 +000015597# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015598if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015599 withval=$with_system_ffi;
15600fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015601
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015602
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015603if test "$with_system_ffi" = "yes"; then
15604 if test -n "$ac_tool_prefix"; then
15605 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15606set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15607{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15608echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15609if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15610 echo $ECHO_N "(cached) $ECHO_C" >&6
15611else
15612 case $PKG_CONFIG in
15613 [\\/]* | ?:[\\/]*)
15614 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15615 ;;
15616 *)
15617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15618for as_dir in $PATH
15619do
15620 IFS=$as_save_IFS
15621 test -z "$as_dir" && as_dir=.
15622 for ac_exec_ext in '' $ac_executable_extensions; do
15623 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15624 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15625 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15626 break 2
15627 fi
15628done
15629done
15630IFS=$as_save_IFS
15631
15632 ;;
15633esac
15634fi
15635PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15636if test -n "$PKG_CONFIG"; then
15637 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15638echo "${ECHO_T}$PKG_CONFIG" >&6; }
15639else
15640 { echo "$as_me:$LINENO: result: no" >&5
15641echo "${ECHO_T}no" >&6; }
15642fi
15643
15644
15645fi
15646if test -z "$ac_cv_path_PKG_CONFIG"; then
15647 ac_pt_PKG_CONFIG=$PKG_CONFIG
15648 # Extract the first word of "pkg-config", so it can be a program name with args.
15649set dummy pkg-config; ac_word=$2
15650{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15651echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15652if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15653 echo $ECHO_N "(cached) $ECHO_C" >&6
15654else
15655 case $ac_pt_PKG_CONFIG in
15656 [\\/]* | ?:[\\/]*)
15657 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15658 ;;
15659 *)
15660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15661for as_dir in $PATH
15662do
15663 IFS=$as_save_IFS
15664 test -z "$as_dir" && as_dir=.
15665 for ac_exec_ext in '' $ac_executable_extensions; do
15666 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15667 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15668 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15669 break 2
15670 fi
15671done
15672done
15673IFS=$as_save_IFS
15674
15675 ;;
15676esac
15677fi
15678ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15679if test -n "$ac_pt_PKG_CONFIG"; then
15680 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15681echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15682else
15683 { echo "$as_me:$LINENO: result: no" >&5
15684echo "${ECHO_T}no" >&6; }
15685fi
15686
15687 if test "x$ac_pt_PKG_CONFIG" = x; then
15688 PKG_CONFIG=""
15689 else
15690 case $cross_compiling:$ac_tool_warned in
15691yes:)
15692{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15693whose name does not start with the host triplet. If you think this
15694configuration is useful to you, please write to autoconf@gnu.org." >&5
15695echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15696whose name does not start with the host triplet. If you think this
15697configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15698ac_tool_warned=yes ;;
15699esac
15700 PKG_CONFIG=$ac_pt_PKG_CONFIG
15701 fi
15702else
15703 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15704fi
15705
15706 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15707else
15708 LIBFFI_INCLUDEDIR=""
15709fi
15710
15711
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015712{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15713echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015714
Benjamin Peterson867475c2009-04-29 20:36:25 +000015715# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015716{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15717echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015718
15719# Check whether --with-dbmliborder was given.
15720if test "${with_dbmliborder+set}" = set; then
15721 withval=$with_dbmliborder;
15722if test x$with_dbmliborder = xyes
15723then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015724{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15725echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015726 { (exit 1); exit 1; }; }
15727else
15728 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15729 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15730 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015731 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15732echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015733 { (exit 1); exit 1; }; }
15734 fi
15735 done
15736fi
15737fi
15738
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015739{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15740echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015741
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015742# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015743
15744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015745{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15746echo $ECHO_N "checking for --with-signal-module... $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-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015749if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015750 withval=$with_signal_module;
15751fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015752
15753
15754if test -z "$with_signal_module"
15755then with_signal_module="yes"
15756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015757{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15758echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015759
15760if test "${with_signal_module}" = "yes"; then
15761 USE_SIGNAL_MODULE=""
15762 SIGNAL_OBJS=""
15763else
15764 USE_SIGNAL_MODULE="#"
15765 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15766fi
15767
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015768# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015769
Barry Warsawc0d24d82000-06-29 16:12:00 +000015770USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015771
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015772{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15773echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015774
Guido van Rossumec2f0731997-01-22 20:54:01 +000015775
Martin v. Löwiseba40652007-08-30 20:10:57 +000015776# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015777if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015778 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015779{ echo "$as_me:$LINENO: result: $withval" >&5
15780echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015781LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015782if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015783 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015784fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015785else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015786 { echo "$as_me:$LINENO: result: no" >&5
15787echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015788fi
15789
Martin v. Löwis11437992002-04-12 09:54:03 +000015790
15791# Templates for things AC_DEFINEd more than once.
15792# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015793
15794
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
15796
15797
15798
15799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015800{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15801echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015802
Martin v. Löwiseba40652007-08-30 20:10:57 +000015803# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015804if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015805 withval=$with_threads;
15806fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015807
15808
Barry Warsawc0d24d82000-06-29 16:12:00 +000015809# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015810
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015812if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015813 withval=$with_thread; with_threads=$with_thread
15814fi
15815
Barry Warsawc0d24d82000-06-29 16:12:00 +000015816
15817if test -z "$with_threads"
15818then with_threads="yes"
15819fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015820{ echo "$as_me:$LINENO: result: $with_threads" >&5
15821echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015822
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015823
Barry Warsawc0d24d82000-06-29 16:12:00 +000015824if test "$with_threads" = "no"
15825then
15826 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015827elif test "$ac_cv_pthread_is_default" = yes
15828then
Martin v. Löwis11437992002-04-12 09:54:03 +000015829 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015830#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015831_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015832
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015833 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015835#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015836_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015837
15838 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015839 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015840elif test "$ac_cv_kpthread" = "yes"
15841then
15842 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015843 if test "$ac_cv_cxx_thread" = "yes"; then
15844 CXX="$CXX -Kpthread"
15845 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015847#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015848_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015849
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015850 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015851 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015852elif test "$ac_cv_kthread" = "yes"
15853then
15854 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015855 if test "$ac_cv_cxx_thread" = "yes"; then
15856 CXX="$CXX -Kthread"
15857 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015858 cat >>confdefs.h <<\_ACEOF
15859#define WITH_THREAD 1
15860_ACEOF
15861
15862 posix_threads=yes
15863 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015864elif test "$ac_cv_pthread" = "yes"
15865then
15866 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015867 if test "$ac_cv_cxx_thread" = "yes"; then
15868 CXX="$CXX -pthread"
15869 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015870 cat >>confdefs.h <<\_ACEOF
15871#define WITH_THREAD 1
15872_ACEOF
15873
15874 posix_threads=yes
15875 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015876else
15877 if test ! -z "$with_threads" -a -d "$with_threads"
15878 then LDFLAGS="$LDFLAGS -L$with_threads"
15879 fi
15880 if test ! -z "$withval" -a -d "$withval"
15881 then LDFLAGS="$LDFLAGS -L$withval"
15882 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015883
15884 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015885 # define _POSIX_THREADS in unistd.h. Some apparently don't
15886 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015887 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15888echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015890/* confdefs.h. */
15891_ACEOF
15892cat confdefs.h >>conftest.$ac_ext
15893cat >>conftest.$ac_ext <<_ACEOF
15894/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015895
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015896#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015897#ifdef _POSIX_THREADS
15898yes
15899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015900
15901_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015902if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015903 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015904 unistd_defines_pthreads=yes
15905else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015906 unistd_defines_pthreads=no
15907fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000015908rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015909
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015910 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15911echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015912
Martin v. Löwis11437992002-04-12 09:54:03 +000015913 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015914#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015915_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015916
Martin v. Löwis11437992002-04-12 09:54:03 +000015917 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015918 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15919echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015920if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015921 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015922fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015923{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15924echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015925else
Martin v. Löwis11437992002-04-12 09:54:03 +000015926 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015927{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15928echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015929cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015930/* confdefs.h. */
15931_ACEOF
15932cat confdefs.h >>conftest.$ac_ext
15933cat >>conftest.$ac_ext <<_ACEOF
15934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015935$ac_includes_default
15936#include <cthreads.h>
15937_ACEOF
15938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015939if { (ac_try="$ac_compile"
15940case "(($ac_try" in
15941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15942 *) ac_try_echo=$ac_try;;
15943esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015947 grep -v '^ *+' conftest.er1 >conftest.err
15948 rm -f conftest.er1
15949 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015951 (exit $ac_status); } && {
15952 test -z "$ac_c_werror_flag" ||
15953 test ! -s conftest.err
15954 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 ac_header_compiler=yes
15956else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015958sed 's/^/| /' conftest.$ac_ext >&5
15959
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015962
15963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015964{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15965echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015966
15967# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015968{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15969echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015970cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015971/* confdefs.h. */
15972_ACEOF
15973cat confdefs.h >>conftest.$ac_ext
15974cat >>conftest.$ac_ext <<_ACEOF
15975/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015976#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015977_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015978if { (ac_try="$ac_cpp conftest.$ac_ext"
15979case "(($ac_try" in
15980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15981 *) ac_try_echo=$ac_try;;
15982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015984 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015986 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015987 rm -f conftest.er1
15988 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015990 (exit $ac_status); } >/dev/null && {
15991 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15992 test ! -s conftest.err
15993 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015994 ac_header_preproc=yes
15995else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015997sed 's/^/| /' conftest.$ac_ext >&5
15998
Martin v. Löwis11437992002-04-12 09:54:03 +000015999 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016001
Martin v. Löwis11437992002-04-12 09:54:03 +000016002rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016003{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16004echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016005
16006# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016007case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16008 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016009 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16010echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16011 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16012echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016013 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016014 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016015 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016016 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16017echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16018 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16019echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16020 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16021echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16022 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16023echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16024 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16025echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16026 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16027echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016028 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016029## -------------------------------------- ##
16030## Report this to http://bugs.python.org/ ##
16031## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016032_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016033 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016034 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016035esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016036{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16037echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016038if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016039 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016040else
16041 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016042fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016043{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16044echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016045
16046fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016047if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016048 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016049#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016050_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016051
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016053#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016054_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016055
Martin v. Löwis11437992002-04-12 09:54:03 +000016056
16057cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016058#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016059_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016060
16061 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016062 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016063else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016064
Martin v. Löwis11437992002-04-12 09:54:03 +000016065 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016066 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16067echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016068if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016069 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016070fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016071{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16072echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016073else
Martin v. Löwis11437992002-04-12 09:54:03 +000016074 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016075{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16076echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016078/* confdefs.h. */
16079_ACEOF
16080cat confdefs.h >>conftest.$ac_ext
16081cat >>conftest.$ac_ext <<_ACEOF
16082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016083$ac_includes_default
16084#include <mach/cthreads.h>
16085_ACEOF
16086rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016087if { (ac_try="$ac_compile"
16088case "(($ac_try" in
16089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16090 *) ac_try_echo=$ac_try;;
16091esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016095 grep -v '^ *+' conftest.er1 >conftest.err
16096 rm -f conftest.er1
16097 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016099 (exit $ac_status); } && {
16100 test -z "$ac_c_werror_flag" ||
16101 test ! -s conftest.err
16102 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016103 ac_header_compiler=yes
16104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016106sed 's/^/| /' conftest.$ac_ext >&5
16107
Martin v. Löwiseba40652007-08-30 20:10:57 +000016108 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016110
16111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016112{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16113echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016114
16115# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016116{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16117echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016119/* confdefs.h. */
16120_ACEOF
16121cat confdefs.h >>conftest.$ac_ext
16122cat >>conftest.$ac_ext <<_ACEOF
16123/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016124#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016125_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016126if { (ac_try="$ac_cpp conftest.$ac_ext"
16127case "(($ac_try" in
16128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16129 *) ac_try_echo=$ac_try;;
16130esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016133 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016134 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 rm -f conftest.er1
16136 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016138 (exit $ac_status); } >/dev/null && {
16139 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16140 test ! -s conftest.err
16141 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016142 ac_header_preproc=yes
16143else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016145sed 's/^/| /' conftest.$ac_ext >&5
16146
Martin v. Löwis11437992002-04-12 09:54:03 +000016147 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016149
Martin v. Löwis11437992002-04-12 09:54:03 +000016150rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016151{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16152echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016153
16154# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016155case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16156 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016157 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16158echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16159 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16160echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016161 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016162 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016163 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016164 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16165echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16166 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16167echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16168 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16169echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16170 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16171echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16172 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16173echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16174 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16175echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016176 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016177## -------------------------------------- ##
16178## Report this to http://bugs.python.org/ ##
16179## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016180_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016181 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016182 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016183esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016184{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16185echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016186if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016187 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016188else
16189 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016190fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016191{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16192echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016193
16194fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016195if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016197#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016198_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016199
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016201#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016202_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016203
Martin v. Löwis11437992002-04-12 09:54:03 +000016204
16205cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016206#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016207_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016208
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016209 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016210else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016211
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016212 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16213echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016214
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016216if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016217 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16218echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016219 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016220#define WITH_THREAD 1
16221_ACEOF
16222
16223
16224cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016225#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016226_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016227
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016228 LIBS="-lpth $LIBS"
16229 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016230else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016231 { echo "$as_me:$LINENO: result: no" >&5
16232echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016233
16234 # Just looking for pthread_create in libpthread is not enough:
16235 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16236 # So we really have to include pthread.h, and then link.
16237 _libs=$LIBS
16238 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016239 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16240echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016242/* confdefs.h. */
16243_ACEOF
16244cat confdefs.h >>conftest.$ac_ext
16245cat >>conftest.$ac_ext <<_ACEOF
16246/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016247#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016248
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016249void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016250int
16251main ()
16252{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016253
16254pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016255 ;
16256 return 0;
16257}
16258_ACEOF
16259rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016260if { (ac_try="$ac_link"
16261case "(($ac_try" in
16262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16263 *) ac_try_echo=$ac_try;;
16264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016268 grep -v '^ *+' conftest.er1 >conftest.err
16269 rm -f conftest.er1
16270 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016272 (exit $ac_status); } && {
16273 test -z "$ac_c_werror_flag" ||
16274 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016275 } && test -s conftest$ac_exeext &&
16276 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016277
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016278 { echo "$as_me:$LINENO: result: yes" >&5
16279echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016280 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016281#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016282_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016283
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016284 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016285 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016288sed 's/^/| /' conftest.$ac_ext >&5
16289
Martin v. Löwis11437992002-04-12 09:54:03 +000016290
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016291 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016292 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16293echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016294if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016295 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016296else
Martin v. Löwis11437992002-04-12 09:54:03 +000016297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016298/* confdefs.h. */
16299_ACEOF
16300cat confdefs.h >>conftest.$ac_ext
16301cat >>conftest.$ac_ext <<_ACEOF
16302/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016303/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16304 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16305#define pthread_detach innocuous_pthread_detach
16306
Guido van Rossumad678af1998-10-02 14:42:15 +000016307/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016308 which can conflict with char pthread_detach (); below.
16309 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016310 <limits.h> exists even on freestanding compilers. */
16311
16312#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016313# include <limits.h>
16314#else
16315# include <assert.h>
16316#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016317
16318#undef pthread_detach
16319
Martin v. Löwiseba40652007-08-30 20:10:57 +000016320/* Override any GCC internal prototype to avoid an error.
16321 Use char because int might match the return type of a GCC
16322 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016323#ifdef __cplusplus
16324extern "C"
16325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016326char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016327/* The GNU C library defines this for functions which it implements
16328 to always fail with ENOSYS. Some functions are actually named
16329 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016330#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016331choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016332#endif
16333
Skip Montanaro6dead952003-09-25 14:50:04 +000016334int
16335main ()
16336{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016337return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 ;
16339 return 0;
16340}
16341_ACEOF
16342rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016343if { (ac_try="$ac_link"
16344case "(($ac_try" in
16345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16346 *) ac_try_echo=$ac_try;;
16347esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016349 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016351 grep -v '^ *+' conftest.er1 >conftest.err
16352 rm -f conftest.er1
16353 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016355 (exit $ac_status); } && {
16356 test -z "$ac_c_werror_flag" ||
16357 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016358 } && test -s conftest$ac_exeext &&
16359 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016360 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016361else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016363sed 's/^/| /' conftest.$ac_ext >&5
16364
Martin v. Löwiseba40652007-08-30 20:10:57 +000016365 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016367
16368rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016369 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016370fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016371{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16372echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16373if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016375#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016376_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016377
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016378 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016379 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016380else
Guido van Rossumad678af1998-10-02 14:42:15 +000016381
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016382 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016383 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16384echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016385if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016386 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016387fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016388{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16389echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016390else
16391 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016392{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16393echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016395/* confdefs.h. */
16396_ACEOF
16397cat confdefs.h >>conftest.$ac_ext
16398cat >>conftest.$ac_ext <<_ACEOF
16399/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016400$ac_includes_default
16401#include <atheos/threads.h>
16402_ACEOF
16403rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404if { (ac_try="$ac_compile"
16405case "(($ac_try" in
16406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16407 *) ac_try_echo=$ac_try;;
16408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016412 grep -v '^ *+' conftest.er1 >conftest.err
16413 rm -f conftest.er1
16414 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016416 (exit $ac_status); } && {
16417 test -z "$ac_c_werror_flag" ||
16418 test ! -s conftest.err
16419 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016420 ac_header_compiler=yes
16421else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016423sed 's/^/| /' conftest.$ac_ext >&5
16424
Martin v. Löwiseba40652007-08-30 20:10:57 +000016425 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016427
16428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016429{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16430echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016431
16432# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016433{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16434echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016435cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016436/* confdefs.h. */
16437_ACEOF
16438cat confdefs.h >>conftest.$ac_ext
16439cat >>conftest.$ac_ext <<_ACEOF
16440/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016441#include <atheos/threads.h>
16442_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016443if { (ac_try="$ac_cpp conftest.$ac_ext"
16444case "(($ac_try" in
16445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16446 *) ac_try_echo=$ac_try;;
16447esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016449 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016450 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016451 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016452 rm -f conftest.er1
16453 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016455 (exit $ac_status); } >/dev/null && {
16456 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16457 test ! -s conftest.err
16458 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016459 ac_header_preproc=yes
16460else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016462sed 's/^/| /' conftest.$ac_ext >&5
16463
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016464 ac_header_preproc=no
16465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016466
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016467rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016468{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16469echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016470
16471# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016472case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16473 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016474 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16475echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16476 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16477echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016478 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016479 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016480 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016481 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16482echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16483 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16484echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16485 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16486echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16487 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16488echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16489 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16490echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16491 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16492echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016493 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016494## -------------------------------------- ##
16495## Report this to http://bugs.python.org/ ##
16496## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016497_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016498 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016499 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016500esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016501{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16502echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016503if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016504 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016505else
16506 ac_cv_header_atheos_threads_h=$ac_header_preproc
16507fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016508{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16509echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016510
16511fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016512if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016513 cat >>confdefs.h <<\_ACEOF
16514#define WITH_THREAD 1
16515_ACEOF
16516
16517
16518cat >>confdefs.h <<\_ACEOF
16519#define ATHEOS_THREADS 1
16520_ACEOF
16521
16522 THREADOBJ="Python/thread.o"
16523else
16524
Martin v. Löwis11437992002-04-12 09:54:03 +000016525 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016526 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16527echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016528if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016529 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016530fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016531{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16532echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016533else
Martin v. Löwis11437992002-04-12 09:54:03 +000016534 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016535{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16536echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016537cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016538/* confdefs.h. */
16539_ACEOF
16540cat confdefs.h >>conftest.$ac_ext
16541cat >>conftest.$ac_ext <<_ACEOF
16542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016543$ac_includes_default
16544#include <kernel/OS.h>
16545_ACEOF
16546rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016547if { (ac_try="$ac_compile"
16548case "(($ac_try" in
16549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16550 *) ac_try_echo=$ac_try;;
16551esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016555 grep -v '^ *+' conftest.er1 >conftest.err
16556 rm -f conftest.er1
16557 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016559 (exit $ac_status); } && {
16560 test -z "$ac_c_werror_flag" ||
16561 test ! -s conftest.err
16562 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016563 ac_header_compiler=yes
16564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016566sed 's/^/| /' conftest.$ac_ext >&5
16567
Martin v. Löwiseba40652007-08-30 20:10:57 +000016568 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016570
16571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016572{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16573echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016574
16575# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016576{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16577echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016578cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016579/* confdefs.h. */
16580_ACEOF
16581cat confdefs.h >>conftest.$ac_ext
16582cat >>conftest.$ac_ext <<_ACEOF
16583/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016584#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016585_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586if { (ac_try="$ac_cpp conftest.$ac_ext"
16587case "(($ac_try" in
16588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16589 *) ac_try_echo=$ac_try;;
16590esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016593 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016594 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016595 rm -f conftest.er1
16596 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016598 (exit $ac_status); } >/dev/null && {
16599 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16600 test ! -s conftest.err
16601 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016602 ac_header_preproc=yes
16603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016605sed 's/^/| /' conftest.$ac_ext >&5
16606
Martin v. Löwis11437992002-04-12 09:54:03 +000016607 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016609
Martin v. Löwis11437992002-04-12 09:54:03 +000016610rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016611{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16612echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016613
Martin v. Löwis11437992002-04-12 09:54:03 +000016614# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016615case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16616 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016617 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16618echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16619 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16620echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016621 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016622 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016623 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016624 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16625echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16626 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16627echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16628 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16629echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16630 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16631echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16632 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16633echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16634 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16635echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016636 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016637## -------------------------------------- ##
16638## Report this to http://bugs.python.org/ ##
16639## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016640_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016641 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016642 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016643esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016644{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16645echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016646if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016647 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016648else
16649 ac_cv_header_kernel_OS_h=$ac_header_preproc
16650fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016651{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16652echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016653
16654fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016655if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016656 cat >>confdefs.h <<\_ACEOF
16657#define WITH_THREAD 1
16658_ACEOF
16659
16660
16661cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016662#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016663_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016664
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016665 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016666else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016667
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016668 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16669echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016670if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016671 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016672else
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016674LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016676/* confdefs.h. */
16677_ACEOF
16678cat confdefs.h >>conftest.$ac_ext
16679cat >>conftest.$ac_ext <<_ACEOF
16680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016681
Martin v. Löwiseba40652007-08-30 20:10:57 +000016682/* Override any GCC internal prototype to avoid an error.
16683 Use char because int might match the return type of a GCC
16684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016685#ifdef __cplusplus
16686extern "C"
16687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016688char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016689int
16690main ()
16691{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016692return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016693 ;
16694 return 0;
16695}
16696_ACEOF
16697rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016698if { (ac_try="$ac_link"
16699case "(($ac_try" in
16700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16701 *) ac_try_echo=$ac_try;;
16702esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016704 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016706 grep -v '^ *+' conftest.er1 >conftest.err
16707 rm -f conftest.er1
16708 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016710 (exit $ac_status); } && {
16711 test -z "$ac_c_werror_flag" ||
16712 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016713 } && test -s conftest$ac_exeext &&
16714 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016715 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016716else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016718sed 's/^/| /' conftest.$ac_ext >&5
16719
Martin v. Löwiseba40652007-08-30 20:10:57 +000016720 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722
16723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016725LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016726fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016727{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16728echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16729if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016730 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016731#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016732_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016733
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016734 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016735 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016736 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016737else
Greg Steinadf63d62000-07-05 10:38:09 +000016738
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016739 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16740echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016741if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016742 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016743else
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016745LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016747/* confdefs.h. */
16748_ACEOF
16749cat confdefs.h >>conftest.$ac_ext
16750cat >>conftest.$ac_ext <<_ACEOF
16751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016752
Martin v. Löwiseba40652007-08-30 20:10:57 +000016753/* Override any GCC internal prototype to avoid an error.
16754 Use char because int might match the return type of a GCC
16755 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016756#ifdef __cplusplus
16757extern "C"
16758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016759char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016760int
16761main ()
16762{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016763return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016764 ;
16765 return 0;
16766}
16767_ACEOF
16768rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016769if { (ac_try="$ac_link"
16770case "(($ac_try" in
16771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16772 *) ac_try_echo=$ac_try;;
16773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016775 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016777 grep -v '^ *+' conftest.er1 >conftest.err
16778 rm -f conftest.er1
16779 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016781 (exit $ac_status); } && {
16782 test -z "$ac_c_werror_flag" ||
16783 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016784 } && test -s conftest$ac_exeext &&
16785 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016786 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016787else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016789sed 's/^/| /' conftest.$ac_ext >&5
16790
Martin v. Löwiseba40652007-08-30 20:10:57 +000016791 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016793
16794rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016796LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016797fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016798{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16799echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16800if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016802#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016803_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016804
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016805 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016806 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016807 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016808else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016810 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16811echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016812if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016813 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016814else
Martin v. Löwis11437992002-04-12 09:54:03 +000016815 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016816LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016817cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016818/* confdefs.h. */
16819_ACEOF
16820cat confdefs.h >>conftest.$ac_ext
16821cat >>conftest.$ac_ext <<_ACEOF
16822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016823
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824/* Override any GCC internal prototype to avoid an error.
16825 Use char because int might match the return type of a GCC
16826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016827#ifdef __cplusplus
16828extern "C"
16829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016830char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016831int
16832main ()
16833{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016834return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016835 ;
16836 return 0;
16837}
16838_ACEOF
16839rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016840if { (ac_try="$ac_link"
16841case "(($ac_try" in
16842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16843 *) ac_try_echo=$ac_try;;
16844esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016846 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016848 grep -v '^ *+' conftest.er1 >conftest.err
16849 rm -f conftest.er1
16850 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016852 (exit $ac_status); } && {
16853 test -z "$ac_c_werror_flag" ||
16854 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016855 } && test -s conftest$ac_exeext &&
16856 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016857 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016860sed 's/^/| /' conftest.$ac_ext >&5
16861
Martin v. Löwiseba40652007-08-30 20:10:57 +000016862 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016864
16865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016867LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016868fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016869{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16870echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16871if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016873#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016874_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016875
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016876 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016877 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016878 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016879else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016880
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016881 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16882echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016883if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016885else
Martin v. Löwis11437992002-04-12 09:54:03 +000016886 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016887LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016889/* confdefs.h. */
16890_ACEOF
16891cat confdefs.h >>conftest.$ac_ext
16892cat >>conftest.$ac_ext <<_ACEOF
16893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016894
Martin v. Löwiseba40652007-08-30 20:10:57 +000016895/* Override any GCC internal prototype to avoid an error.
16896 Use char because int might match the return type of a GCC
16897 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016898#ifdef __cplusplus
16899extern "C"
16900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016901char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016902int
16903main ()
16904{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016905return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 ;
16907 return 0;
16908}
16909_ACEOF
16910rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016911if { (ac_try="$ac_link"
16912case "(($ac_try" in
16913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16914 *) ac_try_echo=$ac_try;;
16915esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016917 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016919 grep -v '^ *+' conftest.er1 >conftest.err
16920 rm -f conftest.er1
16921 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016923 (exit $ac_status); } && {
16924 test -z "$ac_c_werror_flag" ||
16925 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016926 } && test -s conftest$ac_exeext &&
16927 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016928 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016929else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016931sed 's/^/| /' conftest.$ac_ext >&5
16932
Martin v. Löwiseba40652007-08-30 20:10:57 +000016933 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016935
16936rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016937 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016938LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016939fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016940{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16941echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16942if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016943 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016944#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016945_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016946
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016947 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016948 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016949 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016950else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016951
Martin v. Löwis130fb172001-07-19 11:00:41 +000016952 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016953fi
16954
Guido van Rossum627b2d71993-12-24 10:39:16 +000016955
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016956fi
16957
Guido van Rossum0be3e491997-05-22 20:33:33 +000016958fi
16959
Guido van Rossum49545951997-12-02 19:28:29 +000016960fi
16961
Guido van Rossumb93a8621998-05-07 13:27:32 +000016962fi
16963
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016964
Michael W. Hudson54241132001-12-07 15:38:26 +000016965fi
16966
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016967
16968fi
16969
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016971
16972rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016973 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016974fi
16975
Martin v. Löwis11437992002-04-12 09:54:03 +000016976fi
16977
16978
16979fi
16980
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016981
Michael W. Hudson54241132001-12-07 15:38:26 +000016982
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016983 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16984echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016985if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016987else
Martin v. Löwis11437992002-04-12 09:54:03 +000016988 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016989LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016991/* confdefs.h. */
16992_ACEOF
16993cat confdefs.h >>conftest.$ac_ext
16994cat >>conftest.$ac_ext <<_ACEOF
16995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016996
Martin v. Löwiseba40652007-08-30 20:10:57 +000016997/* Override any GCC internal prototype to avoid an error.
16998 Use char because int might match the return type of a GCC
16999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017000#ifdef __cplusplus
17001extern "C"
17002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017003char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017004int
17005main ()
17006{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017007return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017008 ;
17009 return 0;
17010}
17011_ACEOF
17012rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017013if { (ac_try="$ac_link"
17014case "(($ac_try" in
17015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17016 *) ac_try_echo=$ac_try;;
17017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017019 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017021 grep -v '^ *+' conftest.er1 >conftest.err
17022 rm -f conftest.er1
17023 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017025 (exit $ac_status); } && {
17026 test -z "$ac_c_werror_flag" ||
17027 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017028 } && test -s conftest$ac_exeext &&
17029 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017030 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017031else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017033sed 's/^/| /' conftest.$ac_ext >&5
17034
Martin v. Löwiseba40652007-08-30 20:10:57 +000017035 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017037
17038rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017039 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017040LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017041fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017042{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17043echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17044if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017046#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017047_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017048
Martin v. Löwis130fb172001-07-19 11:00:41 +000017049 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017050 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017051 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017052fi
17053
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017054
Neal Norwitza978ab02002-11-02 16:58:05 +000017055 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017056 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17057echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017058if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017059 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017060else
Martin v. Löwis11437992002-04-12 09:54:03 +000017061 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017062LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017063cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017064/* confdefs.h. */
17065_ACEOF
17066cat confdefs.h >>conftest.$ac_ext
17067cat >>conftest.$ac_ext <<_ACEOF
17068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017069
Martin v. Löwiseba40652007-08-30 20:10:57 +000017070/* Override any GCC internal prototype to avoid an error.
17071 Use char because int might match the return type of a GCC
17072 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017073#ifdef __cplusplus
17074extern "C"
17075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017076char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017077int
17078main ()
17079{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017080return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017081 ;
17082 return 0;
17083}
17084_ACEOF
17085rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017086if { (ac_try="$ac_link"
17087case "(($ac_try" in
17088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17089 *) ac_try_echo=$ac_try;;
17090esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017092 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017094 grep -v '^ *+' conftest.er1 >conftest.err
17095 rm -f conftest.er1
17096 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017098 (exit $ac_status); } && {
17099 test -z "$ac_c_werror_flag" ||
17100 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017101 } && test -s conftest$ac_exeext &&
17102 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017103 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017106sed 's/^/| /' conftest.$ac_ext >&5
17107
Martin v. Löwiseba40652007-08-30 20:10:57 +000017108 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017110
17111rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017112 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017113LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017114fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017115{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17116echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17117if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017118 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017119#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017120_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017121
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017122 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017123 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017124 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017125fi
17126
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017127 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017128
Martin v. Löwis130fb172001-07-19 11:00:41 +000017129 if test "$USE_THREAD_MODULE" != "#"
17130 then
17131 # If the above checks didn't disable threads, (at least) OSF1
17132 # needs this '-threads' argument during linking.
17133 case $ac_sys_system in
17134 OSF1) LDLAST=-threads;;
17135 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017136 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017137fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017138
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017139if test "$posix_threads" = "yes"; then
17140 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017141
17142cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017143#define _POSIX_THREADS 1
17144_ACEOF
17145
17146 fi
17147
17148 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17149 case $ac_sys_system/$ac_sys_release in
17150 SunOS/5.6)
17151cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017152#define HAVE_PTHREAD_DESTRUCTOR 1
17153_ACEOF
17154
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017155 ;;
17156 SunOS/5.8)
17157cat >>confdefs.h <<\_ACEOF
17158#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17159_ACEOF
17160
17161 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017162 AIX/5)
17163cat >>confdefs.h <<\_ACEOF
17164#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17165_ACEOF
17166
17167 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017168 esac
17169
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017170 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17171echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017172 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017173 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017174else
17175 if test "$cross_compiling" = yes; then
17176 ac_cv_pthread_system_supported=no
17177else
17178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017179/* confdefs.h. */
17180_ACEOF
17181cat confdefs.h >>conftest.$ac_ext
17182cat >>conftest.$ac_ext <<_ACEOF
17183/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017184#include <pthread.h>
17185 void *foo(void *parm) {
17186 return NULL;
17187 }
17188 main() {
17189 pthread_attr_t attr;
17190 pthread_t id;
17191 if (pthread_attr_init(&attr)) exit(-1);
17192 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17193 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17194 exit(0);
17195 }
17196_ACEOF
17197rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017198if { (ac_try="$ac_link"
17199case "(($ac_try" in
17200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17201 *) ac_try_echo=$ac_try;;
17202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017204 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017205 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017207 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017208 { (case "(($ac_try" in
17209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17210 *) ac_try_echo=$ac_try;;
17211esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017213 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017214 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017216 (exit $ac_status); }; }; then
17217 ac_cv_pthread_system_supported=yes
17218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017219 echo "$as_me: program exited with status $ac_status" >&5
17220echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017221sed 's/^/| /' conftest.$ac_ext >&5
17222
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017223( exit $ac_status )
17224ac_cv_pthread_system_supported=no
17225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017226rm -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 +000017227fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017228
Martin v. Löwiseba40652007-08-30 20:10:57 +000017229
17230
Guido van Rossum627b2d71993-12-24 10:39:16 +000017231fi
17232
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017233 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17234echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017235 if test "$ac_cv_pthread_system_supported" = "yes"; then
17236
17237cat >>confdefs.h <<\_ACEOF
17238#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17239_ACEOF
17240
17241 fi
17242
17243for ac_func in pthread_sigmask
17244do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017245as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17246{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17247echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017249 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017250else
17251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017252/* confdefs.h. */
17253_ACEOF
17254cat confdefs.h >>conftest.$ac_ext
17255cat >>conftest.$ac_ext <<_ACEOF
17256/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017257/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17258 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17259#define $ac_func innocuous_$ac_func
17260
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017261/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017262 which can conflict with char $ac_func (); below.
17263 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017264 <limits.h> exists even on freestanding compilers. */
17265
17266#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017267# include <limits.h>
17268#else
17269# include <assert.h>
17270#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017271
17272#undef $ac_func
17273
Martin v. Löwiseba40652007-08-30 20:10:57 +000017274/* Override any GCC internal prototype to avoid an error.
17275 Use char because int might match the return type of a GCC
17276 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017277#ifdef __cplusplus
17278extern "C"
17279#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017280char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017281/* The GNU C library defines this for functions which it implements
17282 to always fail with ENOSYS. Some functions are actually named
17283 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017284#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017285choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017286#endif
17287
Skip Montanaro6dead952003-09-25 14:50:04 +000017288int
17289main ()
17290{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017291return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017292 ;
17293 return 0;
17294}
17295_ACEOF
17296rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017297if { (ac_try="$ac_link"
17298case "(($ac_try" in
17299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17300 *) ac_try_echo=$ac_try;;
17301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017303 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017305 grep -v '^ *+' conftest.er1 >conftest.err
17306 rm -f conftest.er1
17307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017309 (exit $ac_status); } && {
17310 test -z "$ac_c_werror_flag" ||
17311 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017312 } && test -s conftest$ac_exeext &&
17313 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017314 eval "$as_ac_var=yes"
17315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017317sed 's/^/| /' conftest.$ac_ext >&5
17318
Martin v. Löwiseba40652007-08-30 20:10:57 +000017319 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017321
17322rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017324fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017325ac_res=`eval echo '${'$as_ac_var'}'`
17326 { echo "$as_me:$LINENO: result: $ac_res" >&5
17327echo "${ECHO_T}$ac_res" >&6; }
17328if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017329 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017330#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017331_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017332 case $ac_sys_system in
17333 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017334
Jason Tishlerfac083d2003-07-22 15:20:49 +000017335cat >>confdefs.h <<\_ACEOF
17336#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17337_ACEOF
17338
17339 ;;
17340 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017341fi
17342done
17343
17344fi
17345
17346
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017347# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017348
17349
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017350{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17351echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017352# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017353if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017354 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017355 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017356 { echo "$as_me:$LINENO: result: no" >&5
17357echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017358 ipv6=no
17359 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017360 *) { echo "$as_me:$LINENO: result: yes" >&5
17361echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017362 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017363#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017364_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017365
17366 ipv6=yes
17367 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017368 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017369else
Martin v. Löwis11437992002-04-12 09:54:03 +000017370
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017371 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017372 { echo "$as_me:$LINENO: result: no" >&5
17373echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017374 ipv6=no
17375
17376else
Martin v. Löwis11437992002-04-12 09:54:03 +000017377 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017378/* confdefs.h. */
17379_ACEOF
17380cat confdefs.h >>conftest.$ac_ext
17381cat >>conftest.$ac_ext <<_ACEOF
17382/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017383 /* AF_INET6 available check */
17384#include <sys/types.h>
17385#include <sys/socket.h>
17386main()
17387{
17388 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17389 exit(1);
17390 else
17391 exit(0);
17392}
17393
Martin v. Löwis11437992002-04-12 09:54:03 +000017394_ACEOF
17395rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017396if { (ac_try="$ac_link"
17397case "(($ac_try" in
17398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17399 *) ac_try_echo=$ac_try;;
17400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017402 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017405 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017406 { (case "(($ac_try" in
17407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17408 *) ac_try_echo=$ac_try;;
17409esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017411 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017414 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017415 { echo "$as_me:$LINENO: result: yes" >&5
17416echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017417 ipv6=yes
17418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017419 echo "$as_me: program exited with status $ac_status" >&5
17420echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017421sed 's/^/| /' conftest.$ac_ext >&5
17422
Martin v. Löwis11437992002-04-12 09:54:03 +000017423( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017424{ echo "$as_me:$LINENO: result: no" >&5
17425echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017426 ipv6=no
17427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017428rm -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 +000017429fi
17430
Martin v. Löwiseba40652007-08-30 20:10:57 +000017431
17432
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017433if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017434 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17435echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017437/* confdefs.h. */
17438_ACEOF
17439cat confdefs.h >>conftest.$ac_ext
17440cat >>conftest.$ac_ext <<_ACEOF
17441/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017442#include <sys/types.h>
17443#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017444int
17445main ()
17446{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017447struct sockaddr_in6 x;
17448x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017449 ;
17450 return 0;
17451}
17452_ACEOF
17453rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017454if { (ac_try="$ac_compile"
17455case "(($ac_try" in
17456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17457 *) ac_try_echo=$ac_try;;
17458esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017462 grep -v '^ *+' conftest.er1 >conftest.err
17463 rm -f conftest.er1
17464 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017466 (exit $ac_status); } && {
17467 test -z "$ac_c_werror_flag" ||
17468 test ! -s conftest.err
17469 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017470 { echo "$as_me:$LINENO: result: yes" >&5
17471echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017472 ipv6=yes
17473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017475sed 's/^/| /' conftest.$ac_ext >&5
17476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017477 { echo "$as_me:$LINENO: result: no" >&5
17478echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017479 ipv6=no
17480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017481
17482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017483fi
17484
17485if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017486 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017487#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017488_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017489
17490fi
17491
Martin v. Löwiseba40652007-08-30 20:10:57 +000017492fi
17493
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017494
17495ipv6type=unknown
17496ipv6lib=none
17497ipv6trylibc=no
17498
17499if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017500 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17501echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017502 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17503 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017504 case $i in
17505 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017506 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017507/* confdefs.h. */
17508_ACEOF
17509cat confdefs.h >>conftest.$ac_ext
17510cat >>conftest.$ac_ext <<_ACEOF
17511/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017512
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017513#include <netinet/in.h>
17514#ifdef IPV6_INRIA_VERSION
17515yes
17516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017517_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017519 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017520 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017521fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017522rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017523
17524 ;;
17525 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017527/* confdefs.h. */
17528_ACEOF
17529cat confdefs.h >>conftest.$ac_ext
17530cat >>conftest.$ac_ext <<_ACEOF
17531/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017532
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017533#include <netinet/in.h>
17534#ifdef __KAME__
17535yes
17536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017537_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017539 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017540 ipv6type=$i;
17541 ipv6lib=inet6
17542 ipv6libdir=/usr/local/v6/lib
17543 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017544fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017545rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017546
17547 ;;
17548 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017550/* confdefs.h. */
17551_ACEOF
17552cat confdefs.h >>conftest.$ac_ext
17553cat >>conftest.$ac_ext <<_ACEOF
17554/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017555
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017556#include <features.h>
17557#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17558yes
17559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017560_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017561if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017562 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017563 ipv6type=$i;
17564 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017565fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017566rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017567
17568 ;;
17569 linux-inet6)
17570 if test -d /usr/inet6; then
17571 ipv6type=$i
17572 ipv6lib=inet6
17573 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017574 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017575 fi
17576 ;;
17577 solaris)
17578 if test -f /etc/netconfig; then
17579 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17580 ipv6type=$i
17581 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017582 fi
17583 fi
17584 ;;
17585 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017587/* confdefs.h. */
17588_ACEOF
17589cat confdefs.h >>conftest.$ac_ext
17590cat >>conftest.$ac_ext <<_ACEOF
17591/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017592
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017593#include <sys/param.h>
17594#ifdef _TOSHIBA_INET6
17595yes
17596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017597_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017599 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017600 ipv6type=$i;
17601 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017602 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017603fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017604rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017605
17606 ;;
17607 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017608 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017609/* confdefs.h. */
17610_ACEOF
17611cat confdefs.h >>conftest.$ac_ext
17612cat >>conftest.$ac_ext <<_ACEOF
17613/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017614
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017615#include </usr/local/v6/include/sys/v6config.h>
17616#ifdef __V6D__
17617yes
17618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017619_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017620if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017621 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017622 ipv6type=$i;
17623 ipv6lib=v6;
17624 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017625 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017626fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017627rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017628
17629 ;;
17630 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017632/* confdefs.h. */
17633_ACEOF
17634cat confdefs.h >>conftest.$ac_ext
17635cat >>conftest.$ac_ext <<_ACEOF
17636/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017637
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017638#include <sys/param.h>
17639#ifdef _ZETA_MINAMI_INET6
17640yes
17641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017642_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017644 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017645 ipv6type=$i;
17646 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017647 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017648fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017649rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017650
17651 ;;
17652 esac
17653 if test "$ipv6type" != "unknown"; then
17654 break
17655 fi
17656 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017657 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17658echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017659fi
17660
17661if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17662 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17663 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17664 echo "using lib$ipv6lib"
17665 else
17666 if test $ipv6trylibc = "yes"; then
17667 echo "using libc"
17668 else
17669 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17670 echo "You need to fetch lib$ipv6lib.a from appropriate"
17671 echo 'ipv6 kit and compile beforehand.'
17672 exit 1
17673 fi
17674 fi
17675fi
17676
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017677{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17678echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017679cat >conftest.$ac_ext <<_ACEOF
17680/* confdefs.h. */
17681_ACEOF
17682cat confdefs.h >>conftest.$ac_ext
17683cat >>conftest.$ac_ext <<_ACEOF
17684/* end confdefs.h. */
17685#include <Carbon/Carbon.h>
17686int
17687main ()
17688{
17689FSIORefNum fRef = 0
17690 ;
17691 return 0;
17692}
17693_ACEOF
17694rm -f conftest.$ac_objext
17695if { (ac_try="$ac_compile"
17696case "(($ac_try" in
17697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17698 *) ac_try_echo=$ac_try;;
17699esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017701 (eval "$ac_compile") 2>conftest.er1
17702 ac_status=$?
17703 grep -v '^ *+' conftest.er1 >conftest.err
17704 rm -f conftest.er1
17705 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017707 (exit $ac_status); } && {
17708 test -z "$ac_c_werror_flag" ||
17709 test ! -s conftest.err
17710 } && test -s conftest.$ac_objext; then
17711
17712cat >>confdefs.h <<\_ACEOF
17713#define HAVE_OSX105_SDK 1
17714_ACEOF
17715
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017716 { echo "$as_me:$LINENO: result: yes" >&5
17717echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017719 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017720sed 's/^/| /' conftest.$ac_ext >&5
17721
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017722 { echo "$as_me:$LINENO: result: no" >&5
17723echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017724
17725fi
17726
17727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17728
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017729# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017730{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17731echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017732
Martin v. Löwiseba40652007-08-30 20:10:57 +000017733# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017734if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017735 withval=$with_doc_strings;
17736fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017737
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017738
17739if test -z "$with_doc_strings"
17740then with_doc_strings="yes"
17741fi
17742if test "$with_doc_strings" != "no"
17743then
17744
17745cat >>confdefs.h <<\_ACEOF
17746#define WITH_DOC_STRINGS 1
17747_ACEOF
17748
17749fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017750{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17751echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017752
Neil Schemenauera35c6882001-02-27 04:45:05 +000017753# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017754{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17755echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017756
Martin v. Löwiseba40652007-08-30 20:10:57 +000017757# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017758if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017759 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017760if test "$withval" != no
17761then
17762
17763cat >>confdefs.h <<\_ACEOF
17764#define WITH_TSC 1
17765_ACEOF
17766
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017767 { echo "$as_me:$LINENO: result: yes" >&5
17768echo "${ECHO_T}yes" >&6; }
17769else { echo "$as_me:$LINENO: result: no" >&5
17770echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017771fi
17772else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017773 { echo "$as_me:$LINENO: result: no" >&5
17774echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017775fi
17776
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017777
17778# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017779{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17780echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017781
Martin v. Löwiseba40652007-08-30 20:10:57 +000017782# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017783if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017784 withval=$with_pymalloc;
17785fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017786
Neil Schemenauera35c6882001-02-27 04:45:05 +000017787
Neil Schemenauer16c22972002-03-22 15:34:49 +000017788if test -z "$with_pymalloc"
17789then with_pymalloc="yes"
17790fi
17791if test "$with_pymalloc" != "no"
17792then
Martin v. Löwis11437992002-04-12 09:54:03 +000017793
17794cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017795#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017796_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017797
17798fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017799{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17800echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017801
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017802# Check for Valgrind support
17803{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17804echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17805
17806# Check whether --with-valgrind was given.
17807if test "${with_valgrind+set}" = set; then
17808 withval=$with_valgrind;
17809else
17810 with_valgrind=no
17811fi
17812
17813{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17814echo "${ECHO_T}$with_valgrind" >&6; }
17815if test "$with_valgrind" != no; then
17816 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17817 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17818echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17819if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17820 echo $ECHO_N "(cached) $ECHO_C" >&6
17821fi
17822{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17823echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17824else
17825 # Is the header compilable?
17826{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17827echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17828cat >conftest.$ac_ext <<_ACEOF
17829/* confdefs.h. */
17830_ACEOF
17831cat confdefs.h >>conftest.$ac_ext
17832cat >>conftest.$ac_ext <<_ACEOF
17833/* end confdefs.h. */
17834$ac_includes_default
17835#include <valgrind/valgrind.h>
17836_ACEOF
17837rm -f conftest.$ac_objext
17838if { (ac_try="$ac_compile"
17839case "(($ac_try" in
17840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17841 *) ac_try_echo=$ac_try;;
17842esac
17843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17844 (eval "$ac_compile") 2>conftest.er1
17845 ac_status=$?
17846 grep -v '^ *+' conftest.er1 >conftest.err
17847 rm -f conftest.er1
17848 cat conftest.err >&5
17849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17850 (exit $ac_status); } && {
17851 test -z "$ac_c_werror_flag" ||
17852 test ! -s conftest.err
17853 } && test -s conftest.$ac_objext; then
17854 ac_header_compiler=yes
17855else
17856 echo "$as_me: failed program was:" >&5
17857sed 's/^/| /' conftest.$ac_ext >&5
17858
17859 ac_header_compiler=no
17860fi
17861
17862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17863{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17864echo "${ECHO_T}$ac_header_compiler" >&6; }
17865
17866# Is the header present?
17867{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17868echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17869cat >conftest.$ac_ext <<_ACEOF
17870/* confdefs.h. */
17871_ACEOF
17872cat confdefs.h >>conftest.$ac_ext
17873cat >>conftest.$ac_ext <<_ACEOF
17874/* end confdefs.h. */
17875#include <valgrind/valgrind.h>
17876_ACEOF
17877if { (ac_try="$ac_cpp conftest.$ac_ext"
17878case "(($ac_try" in
17879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17880 *) ac_try_echo=$ac_try;;
17881esac
17882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17883 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17884 ac_status=$?
17885 grep -v '^ *+' conftest.er1 >conftest.err
17886 rm -f conftest.er1
17887 cat conftest.err >&5
17888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17889 (exit $ac_status); } >/dev/null && {
17890 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17891 test ! -s conftest.err
17892 }; then
17893 ac_header_preproc=yes
17894else
17895 echo "$as_me: failed program was:" >&5
17896sed 's/^/| /' conftest.$ac_ext >&5
17897
17898 ac_header_preproc=no
17899fi
17900
17901rm -f conftest.err conftest.$ac_ext
17902{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17903echo "${ECHO_T}$ac_header_preproc" >&6; }
17904
17905# So? What about this header?
17906case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17907 yes:no: )
17908 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17909echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17910 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17911echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17912 ac_header_preproc=yes
17913 ;;
17914 no:yes:* )
17915 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17916echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17917 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17918echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17919 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17920echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17921 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17922echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17923 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17924echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17925 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17926echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17927 ( cat <<\_ASBOX
17928## -------------------------------------- ##
17929## Report this to http://bugs.python.org/ ##
17930## -------------------------------------- ##
17931_ASBOX
17932 ) | sed "s/^/$as_me: WARNING: /" >&2
17933 ;;
17934esac
17935{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17936echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17937if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17938 echo $ECHO_N "(cached) $ECHO_C" >&6
17939else
17940 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17941fi
17942{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17943echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17944
17945fi
17946if test $ac_cv_header_valgrind_valgrind_h = yes; then
17947
17948cat >>confdefs.h <<\_ACEOF
17949#define WITH_VALGRIND 1
17950_ACEOF
17951
17952else
17953 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17954echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17955 { (exit 1); exit 1; }; }
17956
17957fi
17958
17959
17960fi
17961
Barry Warsawef82cd72000-06-30 16:21:01 +000017962# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017963{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17964echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017965
Martin v. Löwiseba40652007-08-30 20:10:57 +000017966# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017967if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017968 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017969if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017970then
17971
17972cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017973#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017974_ACEOF
17975
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017976 { echo "$as_me:$LINENO: result: yes" >&5
17977echo "${ECHO_T}yes" >&6; }
17978else { echo "$as_me:$LINENO: result: no" >&5
17979echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017980fi
17981else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017982 { echo "$as_me:$LINENO: result: no" >&5
17983echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017984fi
17985
Barry Warsawef82cd72000-06-30 16:21:01 +000017986
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017987# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017988
Guido van Rossum98935bf2001-09-05 19:13:16 +000017989DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017990
Guido van Rossume97ee181999-12-20 21:27:22 +000017991# the dlopen() function means we might want to use dynload_shlib.o. some
17992# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017993
Thomas Wouters3a584202000-08-05 23:28:51 +000017994for ac_func in dlopen
17995do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017996as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17997{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17998echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017999if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018000 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018001else
Martin v. Löwis11437992002-04-12 09:54:03 +000018002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018003/* confdefs.h. */
18004_ACEOF
18005cat confdefs.h >>conftest.$ac_ext
18006cat >>conftest.$ac_ext <<_ACEOF
18007/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018008/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18009 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18010#define $ac_func innocuous_$ac_func
18011
Guido van Rossume97ee181999-12-20 21:27:22 +000018012/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018013 which can conflict with char $ac_func (); below.
18014 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018015 <limits.h> exists even on freestanding compilers. */
18016
18017#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018018# include <limits.h>
18019#else
18020# include <assert.h>
18021#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018022
18023#undef $ac_func
18024
Martin v. Löwiseba40652007-08-30 20:10:57 +000018025/* Override any GCC internal prototype to avoid an error.
18026 Use char because int might match the return type of a GCC
18027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018028#ifdef __cplusplus
18029extern "C"
18030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018031char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018032/* The GNU C library defines this for functions which it implements
18033 to always fail with ENOSYS. Some functions are actually named
18034 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018035#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018036choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018037#endif
18038
Skip Montanaro6dead952003-09-25 14:50:04 +000018039int
18040main ()
18041{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018042return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018043 ;
18044 return 0;
18045}
18046_ACEOF
18047rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018048if { (ac_try="$ac_link"
18049case "(($ac_try" in
18050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18051 *) ac_try_echo=$ac_try;;
18052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018054 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018056 grep -v '^ *+' conftest.er1 >conftest.err
18057 rm -f conftest.er1
18058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018060 (exit $ac_status); } && {
18061 test -z "$ac_c_werror_flag" ||
18062 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018063 } && test -s conftest$ac_exeext &&
18064 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018065 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018066else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018068sed 's/^/| /' conftest.$ac_ext >&5
18069
Martin v. Löwiseba40652007-08-30 20:10:57 +000018070 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018072
18073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018074 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018075fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018076ac_res=`eval echo '${'$as_ac_var'}'`
18077 { echo "$as_me:$LINENO: result: $ac_res" >&5
18078echo "${ECHO_T}$ac_res" >&6; }
18079if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018080 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018081#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018082_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018083
Guido van Rossume97ee181999-12-20 21:27:22 +000018084fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018085done
Guido van Rossume97ee181999-12-20 21:27:22 +000018086
Michael W. Hudson54241132001-12-07 15:38:26 +000018087
Guido van Rossume97ee181999-12-20 21:27:22 +000018088# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18089# loading of modules.
18090
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018091{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18092echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018093if test -z "$DYNLOADFILE"
18094then
18095 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018096 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18097 if test "$ac_cv_func_dlopen" = yes
18098 then DYNLOADFILE="dynload_shlib.o"
18099 else DYNLOADFILE="dynload_aix.o"
18100 fi
18101 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018102 BeOS*) DYNLOADFILE="dynload_beos.o";;
18103 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018104 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18105 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018106 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018107 *)
18108 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18109 # out any dynamic loading
18110 if test "$ac_cv_func_dlopen" = yes
18111 then DYNLOADFILE="dynload_shlib.o"
18112 else DYNLOADFILE="dynload_stub.o"
18113 fi
18114 ;;
18115 esac
18116fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018117{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18118echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018119if test "$DYNLOADFILE" != "dynload_stub.o"
18120then
Martin v. Löwis11437992002-04-12 09:54:03 +000018121
18122cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018123#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018124_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018125
18126fi
18127
Neil Schemenauer4e425612001-06-19 15:44:15 +000018128# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18129
Michael W. Hudson54241132001-12-07 15:38:26 +000018130
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018131{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18132echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018133if test -z "$MACHDEP_OBJS"
18134then
Jack Jansene578a632001-08-15 01:27:14 +000018135 MACHDEP_OBJS=$extra_machdep_objs
18136else
18137 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018138fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018139{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18140echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018141
Guido van Rossum627b2d71993-12-24 10:39:16 +000018142# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
Martin v. Löwisd6320502004-08-12 13:45:08 +000018214
Martin v. Löwisc3001752005-01-23 09:27:24 +000018215
18216
Neal Norwitz05a45592006-03-20 06:30:08 +000018217
18218
Martin v. Löwis382abef2007-02-19 10:55:19 +000018219
18220
Christian Heimes36281872007-11-30 21:11:28 +000018221
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018222
18223
Jesse Noller355b1262009-04-02 00:03:28 +000018224
18225
18226
18227
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018241
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018242for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18243 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018244 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018245 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018246 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018247 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018248 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018249 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18250 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018251 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018252 setlocale setregid setreuid setresuid setresgid \
18253 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018254 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018255 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018256 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018257do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018258as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18259{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18260echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018261if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018262 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018263else
Martin v. Löwis11437992002-04-12 09:54:03 +000018264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018265/* confdefs.h. */
18266_ACEOF
18267cat confdefs.h >>conftest.$ac_ext
18268cat >>conftest.$ac_ext <<_ACEOF
18269/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018270/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18271 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18272#define $ac_func innocuous_$ac_func
18273
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018274/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018275 which can conflict with char $ac_func (); below.
18276 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018277 <limits.h> exists even on freestanding compilers. */
18278
18279#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018280# include <limits.h>
18281#else
18282# include <assert.h>
18283#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018284
18285#undef $ac_func
18286
Martin v. Löwiseba40652007-08-30 20:10:57 +000018287/* Override any GCC internal prototype to avoid an error.
18288 Use char because int might match the return type of a GCC
18289 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018290#ifdef __cplusplus
18291extern "C"
18292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018293char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018294/* The GNU C library defines this for functions which it implements
18295 to always fail with ENOSYS. Some functions are actually named
18296 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018297#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018298choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018299#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018300
Skip Montanaro6dead952003-09-25 14:50:04 +000018301int
18302main ()
18303{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018304return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018305 ;
18306 return 0;
18307}
18308_ACEOF
18309rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018310if { (ac_try="$ac_link"
18311case "(($ac_try" in
18312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18313 *) ac_try_echo=$ac_try;;
18314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018316 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018318 grep -v '^ *+' conftest.er1 >conftest.err
18319 rm -f conftest.er1
18320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018322 (exit $ac_status); } && {
18323 test -z "$ac_c_werror_flag" ||
18324 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018325 } && test -s conftest$ac_exeext &&
18326 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018327 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018328else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018330sed 's/^/| /' conftest.$ac_ext >&5
18331
Martin v. Löwiseba40652007-08-30 20:10:57 +000018332 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018334
18335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018336 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018337fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018338ac_res=`eval echo '${'$as_ac_var'}'`
18339 { echo "$as_me:$LINENO: result: $ac_res" >&5
18340echo "${ECHO_T}$ac_res" >&6; }
18341if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018342 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018343#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018344_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018345
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018346fi
18347done
18348
Michael W. Hudson54241132001-12-07 15:38:26 +000018349
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018350# For some functions, having a definition is not sufficient, since
18351# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018352{ echo "$as_me:$LINENO: checking for chroot" >&5
18353echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018354cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018355/* confdefs.h. */
18356_ACEOF
18357cat confdefs.h >>conftest.$ac_ext
18358cat >>conftest.$ac_ext <<_ACEOF
18359/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018360#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018361int
18362main ()
18363{
18364void *x=chroot
18365 ;
18366 return 0;
18367}
18368_ACEOF
18369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018370if { (ac_try="$ac_compile"
18371case "(($ac_try" in
18372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18373 *) ac_try_echo=$ac_try;;
18374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018378 grep -v '^ *+' conftest.er1 >conftest.err
18379 rm -f conftest.er1
18380 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018382 (exit $ac_status); } && {
18383 test -z "$ac_c_werror_flag" ||
18384 test ! -s conftest.err
18385 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018386
18387cat >>confdefs.h <<\_ACEOF
18388#define HAVE_CHROOT 1
18389_ACEOF
18390
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018391 { echo "$as_me:$LINENO: result: yes" >&5
18392echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018395sed 's/^/| /' conftest.$ac_ext >&5
18396
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018397 { echo "$as_me:$LINENO: result: no" >&5
18398echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018399
18400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018401
18402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018403{ echo "$as_me:$LINENO: checking for link" >&5
18404echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018405cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018406/* confdefs.h. */
18407_ACEOF
18408cat confdefs.h >>conftest.$ac_ext
18409cat >>conftest.$ac_ext <<_ACEOF
18410/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018411#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018412int
18413main ()
18414{
18415void *x=link
18416 ;
18417 return 0;
18418}
18419_ACEOF
18420rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018421if { (ac_try="$ac_compile"
18422case "(($ac_try" in
18423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18424 *) ac_try_echo=$ac_try;;
18425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018429 grep -v '^ *+' conftest.er1 >conftest.err
18430 rm -f conftest.er1
18431 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018433 (exit $ac_status); } && {
18434 test -z "$ac_c_werror_flag" ||
18435 test ! -s conftest.err
18436 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018437
18438cat >>confdefs.h <<\_ACEOF
18439#define HAVE_LINK 1
18440_ACEOF
18441
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018442 { echo "$as_me:$LINENO: result: yes" >&5
18443echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018444else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018446sed 's/^/| /' conftest.$ac_ext >&5
18447
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018448 { echo "$as_me:$LINENO: result: no" >&5
18449echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018450
18451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018452
18453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018454{ echo "$as_me:$LINENO: checking for symlink" >&5
18455echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018456cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018457/* confdefs.h. */
18458_ACEOF
18459cat confdefs.h >>conftest.$ac_ext
18460cat >>conftest.$ac_ext <<_ACEOF
18461/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018462#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018463int
18464main ()
18465{
18466void *x=symlink
18467 ;
18468 return 0;
18469}
18470_ACEOF
18471rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018472if { (ac_try="$ac_compile"
18473case "(($ac_try" in
18474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18475 *) ac_try_echo=$ac_try;;
18476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018480 grep -v '^ *+' conftest.er1 >conftest.err
18481 rm -f conftest.er1
18482 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018484 (exit $ac_status); } && {
18485 test -z "$ac_c_werror_flag" ||
18486 test ! -s conftest.err
18487 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018488
18489cat >>confdefs.h <<\_ACEOF
18490#define HAVE_SYMLINK 1
18491_ACEOF
18492
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018493 { echo "$as_me:$LINENO: result: yes" >&5
18494echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018495else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018497sed 's/^/| /' conftest.$ac_ext >&5
18498
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018499 { echo "$as_me:$LINENO: result: no" >&5
18500echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018501
18502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018503
18504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018505{ echo "$as_me:$LINENO: checking for fchdir" >&5
18506echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018508/* confdefs.h. */
18509_ACEOF
18510cat confdefs.h >>conftest.$ac_ext
18511cat >>conftest.$ac_ext <<_ACEOF
18512/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018513#include <unistd.h>
18514int
18515main ()
18516{
18517void *x=fchdir
18518 ;
18519 return 0;
18520}
18521_ACEOF
18522rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018523if { (ac_try="$ac_compile"
18524case "(($ac_try" in
18525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18526 *) ac_try_echo=$ac_try;;
18527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018529 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018531 grep -v '^ *+' conftest.er1 >conftest.err
18532 rm -f conftest.er1
18533 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018535 (exit $ac_status); } && {
18536 test -z "$ac_c_werror_flag" ||
18537 test ! -s conftest.err
18538 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018539
18540cat >>confdefs.h <<\_ACEOF
18541#define HAVE_FCHDIR 1
18542_ACEOF
18543
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018544 { echo "$as_me:$LINENO: result: yes" >&5
18545echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018548sed 's/^/| /' conftest.$ac_ext >&5
18549
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018550 { echo "$as_me:$LINENO: result: no" >&5
18551echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018552
18553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018554
18555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018556{ echo "$as_me:$LINENO: checking for fsync" >&5
18557echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018559/* confdefs.h. */
18560_ACEOF
18561cat confdefs.h >>conftest.$ac_ext
18562cat >>conftest.$ac_ext <<_ACEOF
18563/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018564#include <unistd.h>
18565int
18566main ()
18567{
18568void *x=fsync
18569 ;
18570 return 0;
18571}
18572_ACEOF
18573rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018574if { (ac_try="$ac_compile"
18575case "(($ac_try" in
18576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18577 *) ac_try_echo=$ac_try;;
18578esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018582 grep -v '^ *+' conftest.er1 >conftest.err
18583 rm -f conftest.er1
18584 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018586 (exit $ac_status); } && {
18587 test -z "$ac_c_werror_flag" ||
18588 test ! -s conftest.err
18589 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018590
18591cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018592#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018593_ACEOF
18594
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018595 { echo "$as_me:$LINENO: result: yes" >&5
18596echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018597else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018599sed 's/^/| /' conftest.$ac_ext >&5
18600
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018601 { echo "$as_me:$LINENO: result: no" >&5
18602echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018603
18604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018605
18606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018607{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18608echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018610/* confdefs.h. */
18611_ACEOF
18612cat confdefs.h >>conftest.$ac_ext
18613cat >>conftest.$ac_ext <<_ACEOF
18614/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018615#include <unistd.h>
18616int
18617main ()
18618{
18619void *x=fdatasync
18620 ;
18621 return 0;
18622}
18623_ACEOF
18624rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018625if { (ac_try="$ac_compile"
18626case "(($ac_try" in
18627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18628 *) ac_try_echo=$ac_try;;
18629esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018633 grep -v '^ *+' conftest.er1 >conftest.err
18634 rm -f conftest.er1
18635 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018637 (exit $ac_status); } && {
18638 test -z "$ac_c_werror_flag" ||
18639 test ! -s conftest.err
18640 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018641
18642cat >>confdefs.h <<\_ACEOF
18643#define HAVE_FDATASYNC 1
18644_ACEOF
18645
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018646 { echo "$as_me:$LINENO: result: yes" >&5
18647echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018648else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018650sed 's/^/| /' conftest.$ac_ext >&5
18651
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018652 { echo "$as_me:$LINENO: result: no" >&5
18653echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018654
18655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018656
18657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018658{ echo "$as_me:$LINENO: checking for epoll" >&5
18659echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018660cat >conftest.$ac_ext <<_ACEOF
18661/* confdefs.h. */
18662_ACEOF
18663cat confdefs.h >>conftest.$ac_ext
18664cat >>conftest.$ac_ext <<_ACEOF
18665/* end confdefs.h. */
18666#include <sys/epoll.h>
18667int
18668main ()
18669{
18670void *x=epoll_create
18671 ;
18672 return 0;
18673}
18674_ACEOF
18675rm -f conftest.$ac_objext
18676if { (ac_try="$ac_compile"
18677case "(($ac_try" in
18678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18679 *) ac_try_echo=$ac_try;;
18680esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018682 (eval "$ac_compile") 2>conftest.er1
18683 ac_status=$?
18684 grep -v '^ *+' conftest.er1 >conftest.err
18685 rm -f conftest.er1
18686 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018688 (exit $ac_status); } && {
18689 test -z "$ac_c_werror_flag" ||
18690 test ! -s conftest.err
18691 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018692
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018693cat >>confdefs.h <<\_ACEOF
18694#define HAVE_EPOLL 1
18695_ACEOF
18696
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018697 { echo "$as_me:$LINENO: result: yes" >&5
18698echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018700 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018701sed 's/^/| /' conftest.$ac_ext >&5
18702
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018703 { echo "$as_me:$LINENO: result: no" >&5
18704echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018705
18706fi
18707
18708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018709{ echo "$as_me:$LINENO: checking for kqueue" >&5
18710echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018711cat >conftest.$ac_ext <<_ACEOF
18712/* confdefs.h. */
18713_ACEOF
18714cat confdefs.h >>conftest.$ac_ext
18715cat >>conftest.$ac_ext <<_ACEOF
18716/* end confdefs.h. */
18717
18718#include <sys/types.h>
18719#include <sys/event.h>
18720
18721int
18722main ()
18723{
18724int x=kqueue()
18725 ;
18726 return 0;
18727}
18728_ACEOF
18729rm -f conftest.$ac_objext
18730if { (ac_try="$ac_compile"
18731case "(($ac_try" in
18732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18733 *) ac_try_echo=$ac_try;;
18734esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018736 (eval "$ac_compile") 2>conftest.er1
18737 ac_status=$?
18738 grep -v '^ *+' conftest.er1 >conftest.err
18739 rm -f conftest.er1
18740 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018742 (exit $ac_status); } && {
18743 test -z "$ac_c_werror_flag" ||
18744 test ! -s conftest.err
18745 } && test -s conftest.$ac_objext; then
18746
18747cat >>confdefs.h <<\_ACEOF
18748#define HAVE_KQUEUE 1
18749_ACEOF
18750
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018751 { echo "$as_me:$LINENO: result: yes" >&5
18752echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018753else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018754 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018755sed 's/^/| /' conftest.$ac_ext >&5
18756
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018757 { echo "$as_me:$LINENO: result: no" >&5
18758echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018759
18760fi
18761
18762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018763# On some systems (eg. FreeBSD 5), we would find a definition of the
18764# functions ctermid_r, setgroups in the library, but no prototype
18765# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18766# address to avoid compiler warnings and potential miscompilations
18767# because of the missing prototypes.
18768
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018769{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18770echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +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öwisd5843682002-11-21 20:41:28 +000018777
18778#include "confdefs.h"
18779#include <stdio.h>
18780
Martin v. Löwisd5843682002-11-21 20:41:28 +000018781int
18782main ()
18783{
18784void* p = ctermid_r
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öwisd5843682002-11-21 20:41:28 +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öwisd5843682002-11-21 20:41:28 +000018806
18807cat >>confdefs.h <<\_ACEOF
18808#define HAVE_CTERMID_R 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öwisd5843682002-11-21 20:41:28 +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öwisd5843682002-11-21 20:41:28 +000018819
18820fi
Martin v. Löwisd5843682002-11-21 20:41:28 +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 flock" >&5
18825echo $ECHO_N "checking for flock... $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 <sys/file.h>
18835
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018836int
18837main ()
18838{
18839void* p = flock
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_FLOCK 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öwisf26d63b2003-03-30 17:23:49 +000018876
Martin v. Löwiseba40652007-08-30 20:10:57 +000018877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18878
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018879{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18880echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018881cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018882/* confdefs.h. */
18883_ACEOF
18884cat confdefs.h >>conftest.$ac_ext
18885cat >>conftest.$ac_ext <<_ACEOF
18886/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018887
18888#include "confdefs.h"
18889#include <unistd.h>
18890
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018891int
18892main ()
18893{
18894void* p = getpagesize
18895 ;
18896 return 0;
18897}
18898_ACEOF
18899rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018900if { (ac_try="$ac_compile"
18901case "(($ac_try" in
18902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18903 *) ac_try_echo=$ac_try;;
18904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018908 grep -v '^ *+' conftest.er1 >conftest.err
18909 rm -f conftest.er1
18910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018912 (exit $ac_status); } && {
18913 test -z "$ac_c_werror_flag" ||
18914 test ! -s conftest.err
18915 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018916
18917cat >>confdefs.h <<\_ACEOF
18918#define HAVE_GETPAGESIZE 1
18919_ACEOF
18920
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018921 { echo "$as_me:$LINENO: result: yes" >&5
18922echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018923else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018925sed 's/^/| /' conftest.$ac_ext >&5
18926
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018927 { echo "$as_me:$LINENO: result: no" >&5
18928echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018929
18930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018931
18932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018933
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018934for ac_prog in true
18935do
18936 # Extract the first word of "$ac_prog", so it can be a program name with args.
18937set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018938{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18939echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018940if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018941 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018942else
18943 if test -n "$TRUE"; then
18944 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18945else
18946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18947for as_dir in $PATH
18948do
18949 IFS=$as_save_IFS
18950 test -z "$as_dir" && as_dir=.
18951 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018952 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 +000018953 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018954 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018955 break 2
18956 fi
18957done
18958done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018960
18961fi
18962fi
18963TRUE=$ac_cv_prog_TRUE
18964if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018965 { echo "$as_me:$LINENO: result: $TRUE" >&5
18966echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018967else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018968 { echo "$as_me:$LINENO: result: no" >&5
18969echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018970fi
18971
Martin v. Löwiseba40652007-08-30 20:10:57 +000018972
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018973 test -n "$TRUE" && break
18974done
18975test -n "$TRUE" || TRUE="/bin/true"
18976
18977
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018978{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18979echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018980if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018981 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018982else
18983 ac_check_lib_save_LIBS=$LIBS
18984LIBS="-lc $LIBS"
18985cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018986/* confdefs.h. */
18987_ACEOF
18988cat confdefs.h >>conftest.$ac_ext
18989cat >>conftest.$ac_ext <<_ACEOF
18990/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018991
Martin v. Löwiseba40652007-08-30 20:10:57 +000018992/* Override any GCC internal prototype to avoid an error.
18993 Use char because int might match the return type of a GCC
18994 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018995#ifdef __cplusplus
18996extern "C"
18997#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018998char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018999int
19000main ()
19001{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019002return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019003 ;
19004 return 0;
19005}
19006_ACEOF
19007rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019008if { (ac_try="$ac_link"
19009case "(($ac_try" in
19010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19011 *) ac_try_echo=$ac_try;;
19012esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019014 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019016 grep -v '^ *+' conftest.er1 >conftest.err
19017 rm -f conftest.er1
19018 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019020 (exit $ac_status); } && {
19021 test -z "$ac_c_werror_flag" ||
19022 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019023 } && test -s conftest$ac_exeext &&
19024 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019025 ac_cv_lib_c_inet_aton=yes
19026else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019028sed 's/^/| /' conftest.$ac_ext >&5
19029
Martin v. Löwiseba40652007-08-30 20:10:57 +000019030 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019032
19033rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019035LIBS=$ac_check_lib_save_LIBS
19036fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019037{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19038echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19039if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019040 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019041else
19042
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019043{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19044echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019045if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019046 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019047else
19048 ac_check_lib_save_LIBS=$LIBS
19049LIBS="-lresolv $LIBS"
19050cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019051/* confdefs.h. */
19052_ACEOF
19053cat confdefs.h >>conftest.$ac_ext
19054cat >>conftest.$ac_ext <<_ACEOF
19055/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019056
Martin v. Löwiseba40652007-08-30 20:10:57 +000019057/* Override any GCC internal prototype to avoid an error.
19058 Use char because int might match the return type of a GCC
19059 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019060#ifdef __cplusplus
19061extern "C"
19062#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019063char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019064int
19065main ()
19066{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019067return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019068 ;
19069 return 0;
19070}
19071_ACEOF
19072rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019073if { (ac_try="$ac_link"
19074case "(($ac_try" in
19075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19076 *) ac_try_echo=$ac_try;;
19077esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019079 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019081 grep -v '^ *+' conftest.er1 >conftest.err
19082 rm -f conftest.er1
19083 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019085 (exit $ac_status); } && {
19086 test -z "$ac_c_werror_flag" ||
19087 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019088 } && test -s conftest$ac_exeext &&
19089 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019090 ac_cv_lib_resolv_inet_aton=yes
19091else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019093sed 's/^/| /' conftest.$ac_ext >&5
19094
Martin v. Löwiseba40652007-08-30 20:10:57 +000019095 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019097
19098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019099 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019100LIBS=$ac_check_lib_save_LIBS
19101fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019102{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19103echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19104if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019105 cat >>confdefs.h <<_ACEOF
19106#define HAVE_LIBRESOLV 1
19107_ACEOF
19108
19109 LIBS="-lresolv $LIBS"
19110
19111fi
19112
19113
19114fi
19115
19116
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019117# On Tru64, chflags seems to be present, but calling it will
19118# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019119{ echo "$as_me:$LINENO: checking for chflags" >&5
19120echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019121if test "${ac_cv_have_chflags+set}" = set; then
19122 echo $ECHO_N "(cached) $ECHO_C" >&6
19123else
19124 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019125 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019126else
19127 cat >conftest.$ac_ext <<_ACEOF
19128/* confdefs.h. */
19129_ACEOF
19130cat confdefs.h >>conftest.$ac_ext
19131cat >>conftest.$ac_ext <<_ACEOF
19132/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019133[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019134#include <sys/stat.h>
19135#include <unistd.h>
19136int main(int argc, char*argv[])
19137{
19138 if(chflags(argv[0], 0) != 0)
19139 return 1;
19140 return 0;
19141}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019142]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019143_ACEOF
19144rm -f conftest$ac_exeext
19145if { (ac_try="$ac_link"
19146case "(($ac_try" in
19147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19148 *) ac_try_echo=$ac_try;;
19149esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019151 (eval "$ac_link") 2>&5
19152 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019154 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19155 { (case "(($ac_try" in
19156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19157 *) ac_try_echo=$ac_try;;
19158esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019160 (eval "$ac_try") 2>&5
19161 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019163 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019164 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019165else
19166 echo "$as_me: program exited with status $ac_status" >&5
19167echo "$as_me: failed program was:" >&5
19168sed 's/^/| /' conftest.$ac_ext >&5
19169
19170( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019171ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019172fi
19173rm -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 +000019174fi
19175
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019176
19177
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019178fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019179{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19180echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019181if test "$ac_cv_have_chflags" = cross ; then
19182 { echo "$as_me:$LINENO: checking for chflags" >&5
19183echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19184if test "${ac_cv_func_chflags+set}" = set; then
19185 echo $ECHO_N "(cached) $ECHO_C" >&6
19186else
19187 cat >conftest.$ac_ext <<_ACEOF
19188/* confdefs.h. */
19189_ACEOF
19190cat confdefs.h >>conftest.$ac_ext
19191cat >>conftest.$ac_ext <<_ACEOF
19192/* end confdefs.h. */
19193/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19194 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19195#define chflags innocuous_chflags
19196
19197/* System header to define __stub macros and hopefully few prototypes,
19198 which can conflict with char chflags (); below.
19199 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19200 <limits.h> exists even on freestanding compilers. */
19201
19202#ifdef __STDC__
19203# include <limits.h>
19204#else
19205# include <assert.h>
19206#endif
19207
19208#undef chflags
19209
19210/* Override any GCC internal prototype to avoid an error.
19211 Use char because int might match the return type of a GCC
19212 builtin and then its argument prototype would still apply. */
19213#ifdef __cplusplus
19214extern "C"
19215#endif
19216char chflags ();
19217/* The GNU C library defines this for functions which it implements
19218 to always fail with ENOSYS. Some functions are actually named
19219 something starting with __ and the normal name is an alias. */
19220#if defined __stub_chflags || defined __stub___chflags
19221choke me
19222#endif
19223
19224int
19225main ()
19226{
19227return chflags ();
19228 ;
19229 return 0;
19230}
19231_ACEOF
19232rm -f conftest.$ac_objext conftest$ac_exeext
19233if { (ac_try="$ac_link"
19234case "(($ac_try" in
19235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19236 *) ac_try_echo=$ac_try;;
19237esac
19238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19239 (eval "$ac_link") 2>conftest.er1
19240 ac_status=$?
19241 grep -v '^ *+' conftest.er1 >conftest.err
19242 rm -f conftest.er1
19243 cat conftest.err >&5
19244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19245 (exit $ac_status); } && {
19246 test -z "$ac_c_werror_flag" ||
19247 test ! -s conftest.err
19248 } && test -s conftest$ac_exeext &&
19249 $as_test_x conftest$ac_exeext; then
19250 ac_cv_func_chflags=yes
19251else
19252 echo "$as_me: failed program was:" >&5
19253sed 's/^/| /' conftest.$ac_ext >&5
19254
19255 ac_cv_func_chflags=no
19256fi
19257
19258rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19259 conftest$ac_exeext conftest.$ac_ext
19260fi
19261{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19262echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19263if test $ac_cv_func_chflags = yes; then
19264 ac_cv_have_chflags="yes"
19265else
19266 ac_cv_have_chflags="no"
19267fi
19268
19269fi
19270if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019271
19272cat >>confdefs.h <<\_ACEOF
19273#define HAVE_CHFLAGS 1
19274_ACEOF
19275
19276fi
19277
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019278{ echo "$as_me:$LINENO: checking for lchflags" >&5
19279echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019280if test "${ac_cv_have_lchflags+set}" = set; then
19281 echo $ECHO_N "(cached) $ECHO_C" >&6
19282else
19283 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019284 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019285else
19286 cat >conftest.$ac_ext <<_ACEOF
19287/* confdefs.h. */
19288_ACEOF
19289cat confdefs.h >>conftest.$ac_ext
19290cat >>conftest.$ac_ext <<_ACEOF
19291/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019292[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019293#include <sys/stat.h>
19294#include <unistd.h>
19295int main(int argc, char*argv[])
19296{
19297 if(lchflags(argv[0], 0) != 0)
19298 return 1;
19299 return 0;
19300}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019301]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019302_ACEOF
19303rm -f conftest$ac_exeext
19304if { (ac_try="$ac_link"
19305case "(($ac_try" in
19306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19307 *) ac_try_echo=$ac_try;;
19308esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019310 (eval "$ac_link") 2>&5
19311 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019313 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19314 { (case "(($ac_try" in
19315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19316 *) ac_try_echo=$ac_try;;
19317esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019319 (eval "$ac_try") 2>&5
19320 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019322 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019323 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019324else
19325 echo "$as_me: program exited with status $ac_status" >&5
19326echo "$as_me: failed program was:" >&5
19327sed 's/^/| /' conftest.$ac_ext >&5
19328
19329( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019330ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019331fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19333fi
19334
19335
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019336
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019337fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019338{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19339echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019340if test "$ac_cv_have_lchflags" = cross ; then
19341 { echo "$as_me:$LINENO: checking for lchflags" >&5
19342echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19343if test "${ac_cv_func_lchflags+set}" = set; then
19344 echo $ECHO_N "(cached) $ECHO_C" >&6
19345else
19346 cat >conftest.$ac_ext <<_ACEOF
19347/* confdefs.h. */
19348_ACEOF
19349cat confdefs.h >>conftest.$ac_ext
19350cat >>conftest.$ac_ext <<_ACEOF
19351/* end confdefs.h. */
19352/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19353 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19354#define lchflags innocuous_lchflags
19355
19356/* System header to define __stub macros and hopefully few prototypes,
19357 which can conflict with char lchflags (); below.
19358 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19359 <limits.h> exists even on freestanding compilers. */
19360
19361#ifdef __STDC__
19362# include <limits.h>
19363#else
19364# include <assert.h>
19365#endif
19366
19367#undef lchflags
19368
19369/* Override any GCC internal prototype to avoid an error.
19370 Use char because int might match the return type of a GCC
19371 builtin and then its argument prototype would still apply. */
19372#ifdef __cplusplus
19373extern "C"
19374#endif
19375char lchflags ();
19376/* The GNU C library defines this for functions which it implements
19377 to always fail with ENOSYS. Some functions are actually named
19378 something starting with __ and the normal name is an alias. */
19379#if defined __stub_lchflags || defined __stub___lchflags
19380choke me
19381#endif
19382
19383int
19384main ()
19385{
19386return lchflags ();
19387 ;
19388 return 0;
19389}
19390_ACEOF
19391rm -f conftest.$ac_objext conftest$ac_exeext
19392if { (ac_try="$ac_link"
19393case "(($ac_try" in
19394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19395 *) ac_try_echo=$ac_try;;
19396esac
19397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19398 (eval "$ac_link") 2>conftest.er1
19399 ac_status=$?
19400 grep -v '^ *+' conftest.er1 >conftest.err
19401 rm -f conftest.er1
19402 cat conftest.err >&5
19403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19404 (exit $ac_status); } && {
19405 test -z "$ac_c_werror_flag" ||
19406 test ! -s conftest.err
19407 } && test -s conftest$ac_exeext &&
19408 $as_test_x conftest$ac_exeext; then
19409 ac_cv_func_lchflags=yes
19410else
19411 echo "$as_me: failed program was:" >&5
19412sed 's/^/| /' conftest.$ac_ext >&5
19413
19414 ac_cv_func_lchflags=no
19415fi
19416
19417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19418 conftest$ac_exeext conftest.$ac_ext
19419fi
19420{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19421echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19422if test $ac_cv_func_lchflags = yes; then
19423 ac_cv_have_lchflags="yes"
19424else
19425 ac_cv_have_lchflags="no"
19426fi
19427
19428fi
19429if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019430
19431cat >>confdefs.h <<\_ACEOF
19432#define HAVE_LCHFLAGS 1
19433_ACEOF
19434
19435fi
19436
Ronald Oussorenf8752642006-07-06 10:13:35 +000019437case $ac_sys_system/$ac_sys_release in
19438Darwin/*)
19439 _CUR_CFLAGS="${CFLAGS}"
19440 _CUR_LDFLAGS="${LDFLAGS}"
19441 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19442 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19443 ;;
19444esac
19445
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019446{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19447echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019448if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019449 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019450else
19451 ac_check_lib_save_LIBS=$LIBS
19452LIBS="-lz $LIBS"
19453cat >conftest.$ac_ext <<_ACEOF
19454/* confdefs.h. */
19455_ACEOF
19456cat confdefs.h >>conftest.$ac_ext
19457cat >>conftest.$ac_ext <<_ACEOF
19458/* end confdefs.h. */
19459
Martin v. Löwiseba40652007-08-30 20:10:57 +000019460/* Override any GCC internal prototype to avoid an error.
19461 Use char because int might match the return type of a GCC
19462 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019463#ifdef __cplusplus
19464extern "C"
19465#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019466char inflateCopy ();
19467int
19468main ()
19469{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019470return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019471 ;
19472 return 0;
19473}
19474_ACEOF
19475rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019476if { (ac_try="$ac_link"
19477case "(($ac_try" in
19478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19479 *) ac_try_echo=$ac_try;;
19480esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019482 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019483 ac_status=$?
19484 grep -v '^ *+' conftest.er1 >conftest.err
19485 rm -f conftest.er1
19486 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019488 (exit $ac_status); } && {
19489 test -z "$ac_c_werror_flag" ||
19490 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019491 } && test -s conftest$ac_exeext &&
19492 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019493 ac_cv_lib_z_inflateCopy=yes
19494else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019495 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019496sed 's/^/| /' conftest.$ac_ext >&5
19497
Martin v. Löwiseba40652007-08-30 20:10:57 +000019498 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019500
19501rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019502 conftest$ac_exeext conftest.$ac_ext
19503LIBS=$ac_check_lib_save_LIBS
19504fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019505{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19506echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19507if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019508
19509cat >>confdefs.h <<\_ACEOF
19510#define HAVE_ZLIB_COPY 1
19511_ACEOF
19512
19513fi
19514
19515
Ronald Oussorenf8752642006-07-06 10:13:35 +000019516case $ac_sys_system/$ac_sys_release in
19517Darwin/*)
19518 CFLAGS="${_CUR_CFLAGS}"
19519 LDFLAGS="${_CUR_LDFLAGS}"
19520 ;;
19521esac
19522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019523{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19524echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019525cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019526/* confdefs.h. */
19527_ACEOF
19528cat confdefs.h >>conftest.$ac_ext
19529cat >>conftest.$ac_ext <<_ACEOF
19530/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019531
19532#include "confdefs.h"
19533#include <netdb.h>
19534
Martin v. Löwise9416172003-05-03 10:12:45 +000019535int
19536main ()
19537{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019538void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019539 ;
19540 return 0;
19541}
19542_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019543rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019544if { (ac_try="$ac_link"
19545case "(($ac_try" in
19546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19547 *) ac_try_echo=$ac_try;;
19548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019550 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019552 grep -v '^ *+' conftest.er1 >conftest.err
19553 rm -f conftest.er1
19554 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019556 (exit $ac_status); } && {
19557 test -z "$ac_c_werror_flag" ||
19558 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019559 } && test -s conftest$ac_exeext &&
19560 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019561
19562cat >>confdefs.h <<\_ACEOF
19563#define HAVE_HSTRERROR 1
19564_ACEOF
19565
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019566 { echo "$as_me:$LINENO: result: yes" >&5
19567echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019568else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019570sed 's/^/| /' conftest.$ac_ext >&5
19571
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019572 { echo "$as_me:$LINENO: result: no" >&5
19573echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019574
19575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019576
19577rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019578 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019579
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019580{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19581echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019582cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019583/* confdefs.h. */
19584_ACEOF
19585cat confdefs.h >>conftest.$ac_ext
19586cat >>conftest.$ac_ext <<_ACEOF
19587/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019588
19589#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019590#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019591#include <sys/socket.h>
19592#include <netinet/in.h>
19593#include <arpa/inet.h>
19594
Martin v. Löwise9416172003-05-03 10:12:45 +000019595int
19596main ()
19597{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019598void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019599 ;
19600 return 0;
19601}
19602_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019603rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019604if { (ac_try="$ac_link"
19605case "(($ac_try" in
19606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19607 *) ac_try_echo=$ac_try;;
19608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019610 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019612 grep -v '^ *+' conftest.er1 >conftest.err
19613 rm -f conftest.er1
19614 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019616 (exit $ac_status); } && {
19617 test -z "$ac_c_werror_flag" ||
19618 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019619 } && test -s conftest$ac_exeext &&
19620 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019621
19622cat >>confdefs.h <<\_ACEOF
19623#define HAVE_INET_ATON 1
19624_ACEOF
19625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019626 { echo "$as_me:$LINENO: result: yes" >&5
19627echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019628else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019630sed 's/^/| /' conftest.$ac_ext >&5
19631
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019632 { echo "$as_me:$LINENO: result: no" >&5
19633echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019634
19635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019636
19637rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019638 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019639
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019640{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19641echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019643/* confdefs.h. */
19644_ACEOF
19645cat confdefs.h >>conftest.$ac_ext
19646cat >>conftest.$ac_ext <<_ACEOF
19647/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019648
19649#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019650#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019651#include <sys/socket.h>
19652#include <netinet/in.h>
19653#include <arpa/inet.h>
19654
Martin v. Löwise9416172003-05-03 10:12:45 +000019655int
19656main ()
19657{
19658void* p = inet_pton
19659 ;
19660 return 0;
19661}
19662_ACEOF
19663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019664if { (ac_try="$ac_compile"
19665case "(($ac_try" in
19666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19667 *) ac_try_echo=$ac_try;;
19668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019672 grep -v '^ *+' conftest.er1 >conftest.err
19673 rm -f conftest.er1
19674 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019676 (exit $ac_status); } && {
19677 test -z "$ac_c_werror_flag" ||
19678 test ! -s conftest.err
19679 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019680
19681cat >>confdefs.h <<\_ACEOF
19682#define HAVE_INET_PTON 1
19683_ACEOF
19684
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019685 { echo "$as_me:$LINENO: result: yes" >&5
19686echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019687else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019689sed 's/^/| /' conftest.$ac_ext >&5
19690
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019691 { echo "$as_me:$LINENO: result: no" >&5
19692echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019693
19694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019695
19696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019697
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019698# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019699{ echo "$as_me:$LINENO: checking for setgroups" >&5
19700echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019702/* confdefs.h. */
19703_ACEOF
19704cat confdefs.h >>conftest.$ac_ext
19705cat >>conftest.$ac_ext <<_ACEOF
19706/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019707
19708#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019709#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019710#ifdef HAVE_GRP_H
19711#include <grp.h>
19712#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019713
Martin v. Löwisd5843682002-11-21 20:41:28 +000019714int
19715main ()
19716{
19717void* p = setgroups
19718 ;
19719 return 0;
19720}
19721_ACEOF
19722rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019723if { (ac_try="$ac_compile"
19724case "(($ac_try" in
19725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19726 *) ac_try_echo=$ac_try;;
19727esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019731 grep -v '^ *+' conftest.er1 >conftest.err
19732 rm -f conftest.er1
19733 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019735 (exit $ac_status); } && {
19736 test -z "$ac_c_werror_flag" ||
19737 test ! -s conftest.err
19738 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019739
19740cat >>confdefs.h <<\_ACEOF
19741#define HAVE_SETGROUPS 1
19742_ACEOF
19743
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019744 { echo "$as_me:$LINENO: result: yes" >&5
19745echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019748sed 's/^/| /' conftest.$ac_ext >&5
19749
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019750 { echo "$as_me:$LINENO: result: no" >&5
19751echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019752
19753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019754
19755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019756
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019757# check for openpty and forkpty
19758
Martin v. Löwis11437992002-04-12 09:54:03 +000019759
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019760for ac_func in openpty
19761do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019762as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19763{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19764echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019765if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019766 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019767else
Martin v. Löwis11437992002-04-12 09:54:03 +000019768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019769/* confdefs.h. */
19770_ACEOF
19771cat confdefs.h >>conftest.$ac_ext
19772cat >>conftest.$ac_ext <<_ACEOF
19773/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019774/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19775 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19776#define $ac_func innocuous_$ac_func
19777
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019778/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019779 which can conflict with char $ac_func (); below.
19780 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019781 <limits.h> exists even on freestanding compilers. */
19782
19783#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019784# include <limits.h>
19785#else
19786# include <assert.h>
19787#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019788
19789#undef $ac_func
19790
Martin v. Löwiseba40652007-08-30 20:10:57 +000019791/* Override any GCC internal prototype to avoid an error.
19792 Use char because int might match the return type of a GCC
19793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019794#ifdef __cplusplus
19795extern "C"
19796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019797char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019798/* The GNU C library defines this for functions which it implements
19799 to always fail with ENOSYS. Some functions are actually named
19800 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019801#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019802choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019803#endif
19804
Skip Montanaro6dead952003-09-25 14:50:04 +000019805int
19806main ()
19807{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019808return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019809 ;
19810 return 0;
19811}
19812_ACEOF
19813rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019814if { (ac_try="$ac_link"
19815case "(($ac_try" in
19816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19817 *) ac_try_echo=$ac_try;;
19818esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019820 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019822 grep -v '^ *+' conftest.er1 >conftest.err
19823 rm -f conftest.er1
19824 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019826 (exit $ac_status); } && {
19827 test -z "$ac_c_werror_flag" ||
19828 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019829 } && test -s conftest$ac_exeext &&
19830 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019831 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019832else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019834sed 's/^/| /' conftest.$ac_ext >&5
19835
Martin v. Löwiseba40652007-08-30 20:10:57 +000019836 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019838
19839rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019840 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019841fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019842ac_res=`eval echo '${'$as_ac_var'}'`
19843 { echo "$as_me:$LINENO: result: $ac_res" >&5
19844echo "${ECHO_T}$ac_res" >&6; }
19845if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019846 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019847#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019848_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019849
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019850else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019851 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19852echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019853if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019854 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019855else
Martin v. Löwis11437992002-04-12 09:54:03 +000019856 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019857LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019859/* confdefs.h. */
19860_ACEOF
19861cat confdefs.h >>conftest.$ac_ext
19862cat >>conftest.$ac_ext <<_ACEOF
19863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019864
Martin v. Löwiseba40652007-08-30 20:10:57 +000019865/* Override any GCC internal prototype to avoid an error.
19866 Use char because int might match the return type of a GCC
19867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019868#ifdef __cplusplus
19869extern "C"
19870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019871char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019872int
19873main ()
19874{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019875return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019876 ;
19877 return 0;
19878}
19879_ACEOF
19880rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019881if { (ac_try="$ac_link"
19882case "(($ac_try" in
19883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19884 *) ac_try_echo=$ac_try;;
19885esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019887 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019889 grep -v '^ *+' conftest.er1 >conftest.err
19890 rm -f conftest.er1
19891 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019893 (exit $ac_status); } && {
19894 test -z "$ac_c_werror_flag" ||
19895 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019896 } && test -s conftest$ac_exeext &&
19897 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019898 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019901sed 's/^/| /' conftest.$ac_ext >&5
19902
Martin v. Löwiseba40652007-08-30 20:10:57 +000019903 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019905
19906rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019907 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019908LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019910{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19911echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19912if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019913 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019914#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019915_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019916 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019917else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019918 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19919echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019920if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019921 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019922else
19923 ac_check_lib_save_LIBS=$LIBS
19924LIBS="-lbsd $LIBS"
19925cat >conftest.$ac_ext <<_ACEOF
19926/* confdefs.h. */
19927_ACEOF
19928cat confdefs.h >>conftest.$ac_ext
19929cat >>conftest.$ac_ext <<_ACEOF
19930/* end confdefs.h. */
19931
Martin v. Löwiseba40652007-08-30 20:10:57 +000019932/* Override any GCC internal prototype to avoid an error.
19933 Use char because int might match the return type of a GCC
19934 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019935#ifdef __cplusplus
19936extern "C"
19937#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019938char openpty ();
19939int
19940main ()
19941{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019942return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019943 ;
19944 return 0;
19945}
19946_ACEOF
19947rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019948if { (ac_try="$ac_link"
19949case "(($ac_try" in
19950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19951 *) ac_try_echo=$ac_try;;
19952esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019954 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019955 ac_status=$?
19956 grep -v '^ *+' conftest.er1 >conftest.err
19957 rm -f conftest.er1
19958 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019960 (exit $ac_status); } && {
19961 test -z "$ac_c_werror_flag" ||
19962 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019963 } && test -s conftest$ac_exeext &&
19964 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019965 ac_cv_lib_bsd_openpty=yes
19966else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019967 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019968sed 's/^/| /' conftest.$ac_ext >&5
19969
Martin v. Löwiseba40652007-08-30 20:10:57 +000019970 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019972
19973rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019974 conftest$ac_exeext conftest.$ac_ext
19975LIBS=$ac_check_lib_save_LIBS
19976fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019977{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19978echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19979if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019980 cat >>confdefs.h <<\_ACEOF
19981#define HAVE_OPENPTY 1
19982_ACEOF
19983 LIBS="$LIBS -lbsd"
19984fi
19985
19986
19987fi
19988
Fred Drake8cef4cf2000-06-28 16:40:38 +000019989
19990fi
19991done
19992
Martin v. Löwis11437992002-04-12 09:54:03 +000019993
Fred Drake8cef4cf2000-06-28 16:40:38 +000019994for ac_func in forkpty
19995do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019996as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19997{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19998echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019999if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020000 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020001else
Martin v. Löwis11437992002-04-12 09:54:03 +000020002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020003/* confdefs.h. */
20004_ACEOF
20005cat confdefs.h >>conftest.$ac_ext
20006cat >>conftest.$ac_ext <<_ACEOF
20007/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020008/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20009 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20010#define $ac_func innocuous_$ac_func
20011
Fred Drake8cef4cf2000-06-28 16:40:38 +000020012/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020013 which can conflict with char $ac_func (); below.
20014 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020015 <limits.h> exists even on freestanding compilers. */
20016
20017#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020018# include <limits.h>
20019#else
20020# include <assert.h>
20021#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020022
20023#undef $ac_func
20024
Martin v. Löwiseba40652007-08-30 20:10:57 +000020025/* Override any GCC internal prototype to avoid an error.
20026 Use char because int might match the return type of a GCC
20027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020028#ifdef __cplusplus
20029extern "C"
20030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020031char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020032/* The GNU C library defines this for functions which it implements
20033 to always fail with ENOSYS. Some functions are actually named
20034 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020035#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020036choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020037#endif
20038
Skip Montanaro6dead952003-09-25 14:50:04 +000020039int
20040main ()
20041{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020042return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020043 ;
20044 return 0;
20045}
20046_ACEOF
20047rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020048if { (ac_try="$ac_link"
20049case "(($ac_try" in
20050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20051 *) ac_try_echo=$ac_try;;
20052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020054 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020056 grep -v '^ *+' conftest.er1 >conftest.err
20057 rm -f conftest.er1
20058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020060 (exit $ac_status); } && {
20061 test -z "$ac_c_werror_flag" ||
20062 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020063 } && test -s conftest$ac_exeext &&
20064 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020065 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020066else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020068sed 's/^/| /' conftest.$ac_ext >&5
20069
Martin v. Löwiseba40652007-08-30 20:10:57 +000020070 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072
20073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020074 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020075fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020076ac_res=`eval echo '${'$as_ac_var'}'`
20077 { echo "$as_me:$LINENO: result: $ac_res" >&5
20078echo "${ECHO_T}$ac_res" >&6; }
20079if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020080 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020081#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020082_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020083
Fred Drake8cef4cf2000-06-28 16:40:38 +000020084else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020085 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20086echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020087if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020088 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020089else
Martin v. Löwis11437992002-04-12 09:54:03 +000020090 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020091LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020092cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020093/* confdefs.h. */
20094_ACEOF
20095cat confdefs.h >>conftest.$ac_ext
20096cat >>conftest.$ac_ext <<_ACEOF
20097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020098
Martin v. Löwiseba40652007-08-30 20:10:57 +000020099/* Override any GCC internal prototype to avoid an error.
20100 Use char because int might match the return type of a GCC
20101 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020102#ifdef __cplusplus
20103extern "C"
20104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020105char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020106int
20107main ()
20108{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020109return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020110 ;
20111 return 0;
20112}
20113_ACEOF
20114rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020115if { (ac_try="$ac_link"
20116case "(($ac_try" in
20117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20118 *) ac_try_echo=$ac_try;;
20119esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020121 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020123 grep -v '^ *+' conftest.er1 >conftest.err
20124 rm -f conftest.er1
20125 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020127 (exit $ac_status); } && {
20128 test -z "$ac_c_werror_flag" ||
20129 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020130 } && test -s conftest$ac_exeext &&
20131 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020132 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020135sed 's/^/| /' conftest.$ac_ext >&5
20136
Martin v. Löwiseba40652007-08-30 20:10:57 +000020137 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020139
20140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020141 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020142LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020143fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020144{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20145echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20146if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020147 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020148#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020149_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020150 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020151else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020152 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20153echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020154if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020155 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020156else
20157 ac_check_lib_save_LIBS=$LIBS
20158LIBS="-lbsd $LIBS"
20159cat >conftest.$ac_ext <<_ACEOF
20160/* confdefs.h. */
20161_ACEOF
20162cat confdefs.h >>conftest.$ac_ext
20163cat >>conftest.$ac_ext <<_ACEOF
20164/* end confdefs.h. */
20165
Martin v. Löwiseba40652007-08-30 20:10:57 +000020166/* Override any GCC internal prototype to avoid an error.
20167 Use char because int might match the return type of a GCC
20168 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020169#ifdef __cplusplus
20170extern "C"
20171#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020172char forkpty ();
20173int
20174main ()
20175{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020176return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020177 ;
20178 return 0;
20179}
20180_ACEOF
20181rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020182if { (ac_try="$ac_link"
20183case "(($ac_try" in
20184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20185 *) ac_try_echo=$ac_try;;
20186esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020188 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020189 ac_status=$?
20190 grep -v '^ *+' conftest.er1 >conftest.err
20191 rm -f conftest.er1
20192 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020194 (exit $ac_status); } && {
20195 test -z "$ac_c_werror_flag" ||
20196 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020197 } && test -s conftest$ac_exeext &&
20198 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020199 ac_cv_lib_bsd_forkpty=yes
20200else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020201 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020202sed 's/^/| /' conftest.$ac_ext >&5
20203
Martin v. Löwiseba40652007-08-30 20:10:57 +000020204 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020206
20207rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020208 conftest$ac_exeext conftest.$ac_ext
20209LIBS=$ac_check_lib_save_LIBS
20210fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020211{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20212echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20213if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020214 cat >>confdefs.h <<\_ACEOF
20215#define HAVE_FORKPTY 1
20216_ACEOF
20217 LIBS="$LIBS -lbsd"
20218fi
20219
20220
20221fi
20222
Fred Drake8cef4cf2000-06-28 16:40:38 +000020223
20224fi
20225done
20226
Jack Jansendd19cf82001-12-06 22:36:17 +000020227
Brett Cannonaa5778d2008-03-18 04:09:00 +000020228# Stuff for expat.
20229
20230for ac_func in memmove
20231do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020232as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20233{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20234echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020235if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020236 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020237else
20238 cat >conftest.$ac_ext <<_ACEOF
20239/* confdefs.h. */
20240_ACEOF
20241cat confdefs.h >>conftest.$ac_ext
20242cat >>conftest.$ac_ext <<_ACEOF
20243/* end confdefs.h. */
20244/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20245 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20246#define $ac_func innocuous_$ac_func
20247
20248/* System header to define __stub macros and hopefully few prototypes,
20249 which can conflict with char $ac_func (); below.
20250 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20251 <limits.h> exists even on freestanding compilers. */
20252
20253#ifdef __STDC__
20254# include <limits.h>
20255#else
20256# include <assert.h>
20257#endif
20258
20259#undef $ac_func
20260
20261/* Override any GCC internal prototype to avoid an error.
20262 Use char because int might match the return type of a GCC
20263 builtin and then its argument prototype would still apply. */
20264#ifdef __cplusplus
20265extern "C"
20266#endif
20267char $ac_func ();
20268/* The GNU C library defines this for functions which it implements
20269 to always fail with ENOSYS. Some functions are actually named
20270 something starting with __ and the normal name is an alias. */
20271#if defined __stub_$ac_func || defined __stub___$ac_func
20272choke me
20273#endif
20274
20275int
20276main ()
20277{
20278return $ac_func ();
20279 ;
20280 return 0;
20281}
20282_ACEOF
20283rm -f conftest.$ac_objext conftest$ac_exeext
20284if { (ac_try="$ac_link"
20285case "(($ac_try" in
20286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20287 *) ac_try_echo=$ac_try;;
20288esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020290 (eval "$ac_link") 2>conftest.er1
20291 ac_status=$?
20292 grep -v '^ *+' conftest.er1 >conftest.err
20293 rm -f conftest.er1
20294 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020296 (exit $ac_status); } && {
20297 test -z "$ac_c_werror_flag" ||
20298 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020299 } && test -s conftest$ac_exeext &&
20300 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020301 eval "$as_ac_var=yes"
20302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020303 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020304sed 's/^/| /' conftest.$ac_ext >&5
20305
20306 eval "$as_ac_var=no"
20307fi
20308
20309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20310 conftest$ac_exeext conftest.$ac_ext
20311fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020312ac_res=`eval echo '${'$as_ac_var'}'`
20313 { echo "$as_me:$LINENO: result: $ac_res" >&5
20314echo "${ECHO_T}$ac_res" >&6; }
20315if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020316 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020317#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020318_ACEOF
20319
20320fi
20321done
20322
20323
Michael W. Hudson54241132001-12-07 15:38:26 +000020324# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020325
20326
20327
20328
20329
20330
Fred Drake8cef4cf2000-06-28 16:40:38 +000020331for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20332do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020333as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20334{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20335echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020336if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020337 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020338else
Martin v. Löwis11437992002-04-12 09:54:03 +000020339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020340/* confdefs.h. */
20341_ACEOF
20342cat confdefs.h >>conftest.$ac_ext
20343cat >>conftest.$ac_ext <<_ACEOF
20344/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020345/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20346 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20347#define $ac_func innocuous_$ac_func
20348
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020349/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020350 which can conflict with char $ac_func (); below.
20351 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020352 <limits.h> exists even on freestanding compilers. */
20353
20354#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020355# include <limits.h>
20356#else
20357# include <assert.h>
20358#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020359
20360#undef $ac_func
20361
Martin v. Löwiseba40652007-08-30 20:10:57 +000020362/* Override any GCC internal prototype to avoid an error.
20363 Use char because int might match the return type of a GCC
20364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020365#ifdef __cplusplus
20366extern "C"
20367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020368char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020369/* The GNU C library defines this for functions which it implements
20370 to always fail with ENOSYS. Some functions are actually named
20371 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020372#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020373choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020374#endif
20375
Skip Montanaro6dead952003-09-25 14:50:04 +000020376int
20377main ()
20378{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020379return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020380 ;
20381 return 0;
20382}
20383_ACEOF
20384rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020385if { (ac_try="$ac_link"
20386case "(($ac_try" in
20387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20388 *) ac_try_echo=$ac_try;;
20389esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020391 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020393 grep -v '^ *+' conftest.er1 >conftest.err
20394 rm -f conftest.er1
20395 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020397 (exit $ac_status); } && {
20398 test -z "$ac_c_werror_flag" ||
20399 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020400 } && test -s conftest$ac_exeext &&
20401 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020402 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020405sed 's/^/| /' conftest.$ac_ext >&5
20406
Martin v. Löwiseba40652007-08-30 20:10:57 +000020407 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020409
20410rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020411 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020412fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020413ac_res=`eval echo '${'$as_ac_var'}'`
20414 { echo "$as_me:$LINENO: result: $ac_res" >&5
20415echo "${ECHO_T}$ac_res" >&6; }
20416if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020417 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020418#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020419_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020420
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020421fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020422done
20423
Michael W. Hudson54241132001-12-07 15:38:26 +000020424
Martin v. Löwis11437992002-04-12 09:54:03 +000020425
20426
20427
Brett Cannonaa5778d2008-03-18 04:09:00 +000020428for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020429do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020430as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20431{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20432echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020433if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020434 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020435else
Martin v. Löwis11437992002-04-12 09:54:03 +000020436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020437/* confdefs.h. */
20438_ACEOF
20439cat confdefs.h >>conftest.$ac_ext
20440cat >>conftest.$ac_ext <<_ACEOF
20441/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020442/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20443 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20444#define $ac_func innocuous_$ac_func
20445
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020446/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020447 which can conflict with char $ac_func (); below.
20448 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020449 <limits.h> exists even on freestanding compilers. */
20450
20451#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020452# include <limits.h>
20453#else
20454# include <assert.h>
20455#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020456
20457#undef $ac_func
20458
Martin v. Löwiseba40652007-08-30 20:10:57 +000020459/* Override any GCC internal prototype to avoid an error.
20460 Use char because int might match the return type of a GCC
20461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020462#ifdef __cplusplus
20463extern "C"
20464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020465char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020466/* The GNU C library defines this for functions which it implements
20467 to always fail with ENOSYS. Some functions are actually named
20468 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020469#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020470choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020471#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020472
Skip Montanaro6dead952003-09-25 14:50:04 +000020473int
20474main ()
20475{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020476return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020477 ;
20478 return 0;
20479}
20480_ACEOF
20481rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020482if { (ac_try="$ac_link"
20483case "(($ac_try" in
20484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20485 *) ac_try_echo=$ac_try;;
20486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020488 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020490 grep -v '^ *+' conftest.er1 >conftest.err
20491 rm -f conftest.er1
20492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020494 (exit $ac_status); } && {
20495 test -z "$ac_c_werror_flag" ||
20496 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020497 } && test -s conftest$ac_exeext &&
20498 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020499 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020502sed 's/^/| /' conftest.$ac_ext >&5
20503
Martin v. Löwiseba40652007-08-30 20:10:57 +000020504 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020506
20507rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020509fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020510ac_res=`eval echo '${'$as_ac_var'}'`
20511 { echo "$as_me:$LINENO: result: $ac_res" >&5
20512echo "${ECHO_T}$ac_res" >&6; }
20513if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020514 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020515#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020516_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020517
Martin v. Löwis1142de32002-03-29 16:28:31 +000020518else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020519 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020520 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020521 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20522 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020523esac
20524
Martin v. Löwis1142de32002-03-29 16:28:31 +000020525fi
20526done
20527
20528
Martin v. Löwis11437992002-04-12 09:54:03 +000020529
Martin v. Löwis1142de32002-03-29 16:28:31 +000020530for ac_func in getpgrp
20531do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020532as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20533{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20534echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020536 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020537else
Martin v. Löwis11437992002-04-12 09:54:03 +000020538 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020539/* confdefs.h. */
20540_ACEOF
20541cat confdefs.h >>conftest.$ac_ext
20542cat >>conftest.$ac_ext <<_ACEOF
20543/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020544/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20545 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20546#define $ac_func innocuous_$ac_func
20547
Martin v. Löwis1142de32002-03-29 16:28:31 +000020548/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020549 which can conflict with char $ac_func (); below.
20550 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020551 <limits.h> exists even on freestanding compilers. */
20552
20553#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020554# include <limits.h>
20555#else
20556# include <assert.h>
20557#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020558
20559#undef $ac_func
20560
Martin v. Löwiseba40652007-08-30 20:10:57 +000020561/* Override any GCC internal prototype to avoid an error.
20562 Use char because int might match the return type of a GCC
20563 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020564#ifdef __cplusplus
20565extern "C"
20566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020567char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020568/* The GNU C library defines this for functions which it implements
20569 to always fail with ENOSYS. Some functions are actually named
20570 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020571#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020572choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020573#endif
20574
Skip Montanaro6dead952003-09-25 14:50:04 +000020575int
20576main ()
20577{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020578return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020579 ;
20580 return 0;
20581}
20582_ACEOF
20583rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020584if { (ac_try="$ac_link"
20585case "(($ac_try" in
20586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20587 *) ac_try_echo=$ac_try;;
20588esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020590 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020592 grep -v '^ *+' conftest.er1 >conftest.err
20593 rm -f conftest.er1
20594 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020596 (exit $ac_status); } && {
20597 test -z "$ac_c_werror_flag" ||
20598 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020599 } && test -s conftest$ac_exeext &&
20600 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020601 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +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 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020608
20609rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020610 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020611fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020612ac_res=`eval echo '${'$as_ac_var'}'`
20613 { echo "$as_me:$LINENO: result: $ac_res" >&5
20614echo "${ECHO_T}$ac_res" >&6; }
20615if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020616 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020617#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020618_ACEOF
20619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020620/* confdefs.h. */
20621_ACEOF
20622cat confdefs.h >>conftest.$ac_ext
20623cat >>conftest.$ac_ext <<_ACEOF
20624/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020625#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020626int
20627main ()
20628{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020629getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020630 ;
20631 return 0;
20632}
20633_ACEOF
20634rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020635if { (ac_try="$ac_compile"
20636case "(($ac_try" in
20637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20638 *) ac_try_echo=$ac_try;;
20639esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020643 grep -v '^ *+' conftest.er1 >conftest.err
20644 rm -f conftest.er1
20645 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020647 (exit $ac_status); } && {
20648 test -z "$ac_c_werror_flag" ||
20649 test ! -s conftest.err
20650 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020651
20652cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020653#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020654_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020655
Martin v. Löwis11437992002-04-12 09:54:03 +000020656
Guido van Rossumf78abae1997-01-21 22:02:36 +000020657else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020659sed 's/^/| /' conftest.$ac_ext >&5
20660
Martin v. Löwiseba40652007-08-30 20:10:57 +000020661
Guido van Rossum627b2d71993-12-24 10:39:16 +000020662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020663
20664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020665
Guido van Rossum627b2d71993-12-24 10:39:16 +000020666fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020667done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020668
Jack Jansen150753c2003-03-29 22:07:47 +000020669
20670for ac_func in setpgrp
20671do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020672as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20673{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20674echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020675if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020677else
Martin v. Löwis11437992002-04-12 09:54:03 +000020678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020679/* confdefs.h. */
20680_ACEOF
20681cat confdefs.h >>conftest.$ac_ext
20682cat >>conftest.$ac_ext <<_ACEOF
20683/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020684/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20685 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20686#define $ac_func innocuous_$ac_func
20687
Jack Jansen150753c2003-03-29 22:07:47 +000020688/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020689 which can conflict with char $ac_func (); below.
20690 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020691 <limits.h> exists even on freestanding compilers. */
20692
20693#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020694# include <limits.h>
20695#else
20696# include <assert.h>
20697#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020698
20699#undef $ac_func
20700
Martin v. Löwiseba40652007-08-30 20:10:57 +000020701/* Override any GCC internal prototype to avoid an error.
20702 Use char because int might match the return type of a GCC
20703 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020704#ifdef __cplusplus
20705extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020706#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020707char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020708/* The GNU C library defines this for functions which it implements
20709 to always fail with ENOSYS. Some functions are actually named
20710 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020711#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020712choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020713#endif
20714
Skip Montanaro6dead952003-09-25 14:50:04 +000020715int
20716main ()
20717{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020718return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020719 ;
20720 return 0;
20721}
20722_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020723rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020724if { (ac_try="$ac_link"
20725case "(($ac_try" in
20726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20727 *) ac_try_echo=$ac_try;;
20728esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020730 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020732 grep -v '^ *+' conftest.er1 >conftest.err
20733 rm -f conftest.er1
20734 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020736 (exit $ac_status); } && {
20737 test -z "$ac_c_werror_flag" ||
20738 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020739 } && test -s conftest$ac_exeext &&
20740 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020741 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020742else
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 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020748
20749rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020750 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020751fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020752ac_res=`eval echo '${'$as_ac_var'}'`
20753 { echo "$as_me:$LINENO: result: $ac_res" >&5
20754echo "${ECHO_T}$ac_res" >&6; }
20755if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020756 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020757#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020758_ACEOF
20759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020760/* confdefs.h. */
20761_ACEOF
20762cat confdefs.h >>conftest.$ac_ext
20763cat >>conftest.$ac_ext <<_ACEOF
20764/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020765#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020766int
20767main ()
20768{
20769setpgrp(0,0);
20770 ;
20771 return 0;
20772}
20773_ACEOF
20774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020775if { (ac_try="$ac_compile"
20776case "(($ac_try" in
20777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20778 *) ac_try_echo=$ac_try;;
20779esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020781 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020783 grep -v '^ *+' conftest.er1 >conftest.err
20784 rm -f conftest.er1
20785 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020787 (exit $ac_status); } && {
20788 test -z "$ac_c_werror_flag" ||
20789 test ! -s conftest.err
20790 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020791
20792cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020793#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020794_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020795
Jack Jansen150753c2003-03-29 22:07:47 +000020796
20797else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020799sed 's/^/| /' conftest.$ac_ext >&5
20800
Martin v. Löwiseba40652007-08-30 20:10:57 +000020801
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020803
20804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020805
20806fi
20807done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020808
Martin v. Löwis11437992002-04-12 09:54:03 +000020809
Thomas Wouters3a584202000-08-05 23:28:51 +000020810for ac_func in gettimeofday
20811do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020812as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20813{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20814echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020815if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020816 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020817else
Martin v. Löwis11437992002-04-12 09:54:03 +000020818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020819/* confdefs.h. */
20820_ACEOF
20821cat confdefs.h >>conftest.$ac_ext
20822cat >>conftest.$ac_ext <<_ACEOF
20823/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020824/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20825 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20826#define $ac_func innocuous_$ac_func
20827
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020828/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020829 which can conflict with char $ac_func (); below.
20830 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020831 <limits.h> exists even on freestanding compilers. */
20832
20833#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020834# include <limits.h>
20835#else
20836# include <assert.h>
20837#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020838
20839#undef $ac_func
20840
Martin v. Löwiseba40652007-08-30 20:10:57 +000020841/* Override any GCC internal prototype to avoid an error.
20842 Use char because int might match the return type of a GCC
20843 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020844#ifdef __cplusplus
20845extern "C"
20846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020847char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020848/* The GNU C library defines this for functions which it implements
20849 to always fail with ENOSYS. Some functions are actually named
20850 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020851#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020852choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020853#endif
20854
Skip Montanaro6dead952003-09-25 14:50:04 +000020855int
20856main ()
20857{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020858return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020859 ;
20860 return 0;
20861}
20862_ACEOF
20863rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020864if { (ac_try="$ac_link"
20865case "(($ac_try" in
20866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20867 *) ac_try_echo=$ac_try;;
20868esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020870 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020872 grep -v '^ *+' conftest.er1 >conftest.err
20873 rm -f conftest.er1
20874 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020876 (exit $ac_status); } && {
20877 test -z "$ac_c_werror_flag" ||
20878 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020879 } && test -s conftest$ac_exeext &&
20880 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020881 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020882else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020884sed 's/^/| /' conftest.$ac_ext >&5
20885
Martin v. Löwiseba40652007-08-30 20:10:57 +000020886 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020888
20889rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020890 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020891fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020892ac_res=`eval echo '${'$as_ac_var'}'`
20893 { echo "$as_me:$LINENO: result: $ac_res" >&5
20894echo "${ECHO_T}$ac_res" >&6; }
20895if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020896 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020897#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020898_ACEOF
20899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020900/* confdefs.h. */
20901_ACEOF
20902cat confdefs.h >>conftest.$ac_ext
20903cat >>conftest.$ac_ext <<_ACEOF
20904/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020905#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020906int
20907main ()
20908{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020909gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020910 ;
20911 return 0;
20912}
20913_ACEOF
20914rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020915if { (ac_try="$ac_compile"
20916case "(($ac_try" in
20917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20918 *) ac_try_echo=$ac_try;;
20919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020923 grep -v '^ *+' conftest.er1 >conftest.err
20924 rm -f conftest.er1
20925 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020927 (exit $ac_status); } && {
20928 test -z "$ac_c_werror_flag" ||
20929 test ! -s conftest.err
20930 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020931 :
20932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020934sed 's/^/| /' conftest.$ac_ext >&5
20935
Martin v. Löwis11437992002-04-12 09:54:03 +000020936
20937cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020938#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020939_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020940
Martin v. Löwis11437992002-04-12 09:54:03 +000020941
Guido van Rossum627b2d71993-12-24 10:39:16 +000020942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020943
20944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020945
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020946fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020947done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020948
Michael W. Hudson54241132001-12-07 15:38:26 +000020949
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020950{ echo "$as_me:$LINENO: checking for major" >&5
20951echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020952cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020953/* confdefs.h. */
20954_ACEOF
20955cat confdefs.h >>conftest.$ac_ext
20956cat >>conftest.$ac_ext <<_ACEOF
20957/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020958
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020959#if defined(MAJOR_IN_MKDEV)
20960#include <sys/mkdev.h>
20961#elif defined(MAJOR_IN_SYSMACROS)
20962#include <sys/sysmacros.h>
20963#else
20964#include <sys/types.h>
20965#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020966
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020967int
20968main ()
20969{
20970
20971 makedev(major(0),minor(0));
20972
20973 ;
20974 return 0;
20975}
20976_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020977rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020978if { (ac_try="$ac_link"
20979case "(($ac_try" in
20980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20981 *) ac_try_echo=$ac_try;;
20982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020984 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020986 grep -v '^ *+' conftest.er1 >conftest.err
20987 rm -f conftest.er1
20988 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020990 (exit $ac_status); } && {
20991 test -z "$ac_c_werror_flag" ||
20992 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020993 } && test -s conftest$ac_exeext &&
20994 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020995
20996
20997cat >>confdefs.h <<\_ACEOF
20998#define HAVE_DEVICE_MACROS 1
20999_ACEOF
21000
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021001 { echo "$as_me:$LINENO: result: yes" >&5
21002echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021003
21004else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021006sed 's/^/| /' conftest.$ac_ext >&5
21007
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021008
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021009 { echo "$as_me:$LINENO: result: no" >&5
21010echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021011
21012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021013
21014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021015 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021016
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021017# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021018# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021019{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21020echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021022/* confdefs.h. */
21023_ACEOF
21024cat confdefs.h >>conftest.$ac_ext
21025cat >>conftest.$ac_ext <<_ACEOF
21026/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021027
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021028#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021029#include <sys/socket.h>
21030#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021031#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021032
Martin v. Löwis11437992002-04-12 09:54:03 +000021033int
21034main ()
21035{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021036getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021037 ;
21038 return 0;
21039}
21040_ACEOF
21041rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021042if { (ac_try="$ac_link"
21043case "(($ac_try" in
21044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21045 *) ac_try_echo=$ac_try;;
21046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021048 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021050 grep -v '^ *+' conftest.er1 >conftest.err
21051 rm -f conftest.er1
21052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021054 (exit $ac_status); } && {
21055 test -z "$ac_c_werror_flag" ||
21056 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021057 } && test -s conftest$ac_exeext &&
21058 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021059 have_getaddrinfo=yes
21060else
21061 echo "$as_me: failed program was:" >&5
21062sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021063
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021064 have_getaddrinfo=no
21065fi
21066
21067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21068 conftest$ac_exeext conftest.$ac_ext
21069{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21070echo "${ECHO_T}$have_getaddrinfo" >&6; }
21071if test $have_getaddrinfo = yes
21072then
21073 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021074echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021075 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21076 echo $ECHO_N "(cached) $ECHO_C" >&6
21077else
21078 if test "$cross_compiling" = yes; then
21079 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021080else
Martin v. Löwis11437992002-04-12 09:54:03 +000021081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021082/* confdefs.h. */
21083_ACEOF
21084cat confdefs.h >>conftest.$ac_ext
21085cat >>conftest.$ac_ext <<_ACEOF
21086/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021087
21088#include <sys/types.h>
21089#include <netdb.h>
21090#include <string.h>
21091#include <sys/socket.h>
21092#include <netinet/in.h>
21093
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021094int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021095{
21096 int passive, gaierr, inet4 = 0, inet6 = 0;
21097 struct addrinfo hints, *ai, *aitop;
21098 char straddr[INET6_ADDRSTRLEN], strport[16];
21099
21100 for (passive = 0; passive <= 1; passive++) {
21101 memset(&hints, 0, sizeof(hints));
21102 hints.ai_family = AF_UNSPEC;
21103 hints.ai_flags = passive ? AI_PASSIVE : 0;
21104 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021105 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021106 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21107 (void)gai_strerror(gaierr);
21108 goto bad;
21109 }
21110 for (ai = aitop; ai; ai = ai->ai_next) {
21111 if (ai->ai_addr == NULL ||
21112 ai->ai_addrlen == 0 ||
21113 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21114 straddr, sizeof(straddr), strport, sizeof(strport),
21115 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21116 goto bad;
21117 }
21118 switch (ai->ai_family) {
21119 case AF_INET:
21120 if (strcmp(strport, "54321") != 0) {
21121 goto bad;
21122 }
21123 if (passive) {
21124 if (strcmp(straddr, "0.0.0.0") != 0) {
21125 goto bad;
21126 }
21127 } else {
21128 if (strcmp(straddr, "127.0.0.1") != 0) {
21129 goto bad;
21130 }
21131 }
21132 inet4++;
21133 break;
21134 case AF_INET6:
21135 if (strcmp(strport, "54321") != 0) {
21136 goto bad;
21137 }
21138 if (passive) {
21139 if (strcmp(straddr, "::") != 0) {
21140 goto bad;
21141 }
21142 } else {
21143 if (strcmp(straddr, "::1") != 0) {
21144 goto bad;
21145 }
21146 }
21147 inet6++;
21148 break;
21149 case AF_UNSPEC:
21150 goto bad;
21151 break;
21152 default:
21153 /* another family support? */
21154 break;
21155 }
21156 }
21157 }
21158
21159 if (!(inet4 == 0 || inet4 == 2))
21160 goto bad;
21161 if (!(inet6 == 0 || inet6 == 2))
21162 goto bad;
21163
21164 if (aitop)
21165 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021166 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021167
21168 bad:
21169 if (aitop)
21170 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021171 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021172}
21173
Martin v. Löwis11437992002-04-12 09:54:03 +000021174_ACEOF
21175rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021176if { (ac_try="$ac_link"
21177case "(($ac_try" in
21178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21179 *) ac_try_echo=$ac_try;;
21180esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021182 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021183 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021185 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021186 { (case "(($ac_try" in
21187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21188 *) ac_try_echo=$ac_try;;
21189esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021191 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021192 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021194 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021195 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021196else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021197 echo "$as_me: program exited with status $ac_status" >&5
21198echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021199sed 's/^/| /' conftest.$ac_ext >&5
21200
Martin v. Löwis11437992002-04-12 09:54:03 +000021201( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021202ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021204rm -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 +000021205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021206
21207
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021208fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021209
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021211
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021212if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021213then
21214 if test $ipv6 = yes
21215 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021216 echo 'Fatal: You must get working getaddrinfo() function.'
21217 echo ' or you can specify "--disable-ipv6"'.
21218 exit 1
21219 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021220else
Martin v. Löwis11437992002-04-12 09:54:03 +000021221
21222cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021223#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021224_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021225
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021226fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021227
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021228for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021229do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021230as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21231{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21232echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021234 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021235else
Martin v. Löwis11437992002-04-12 09:54:03 +000021236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021237/* confdefs.h. */
21238_ACEOF
21239cat confdefs.h >>conftest.$ac_ext
21240cat >>conftest.$ac_ext <<_ACEOF
21241/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021242/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21243 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21244#define $ac_func innocuous_$ac_func
21245
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021246/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021247 which can conflict with char $ac_func (); below.
21248 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021249 <limits.h> exists even on freestanding compilers. */
21250
21251#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021252# include <limits.h>
21253#else
21254# include <assert.h>
21255#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021256
21257#undef $ac_func
21258
Martin v. Löwiseba40652007-08-30 20:10:57 +000021259/* Override any GCC internal prototype to avoid an error.
21260 Use char because int might match the return type of a GCC
21261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021262#ifdef __cplusplus
21263extern "C"
21264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021265char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021266/* The GNU C library defines this for functions which it implements
21267 to always fail with ENOSYS. Some functions are actually named
21268 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021269#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021270choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021271#endif
21272
Skip Montanaro6dead952003-09-25 14:50:04 +000021273int
21274main ()
21275{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021276return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021277 ;
21278 return 0;
21279}
21280_ACEOF
21281rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021282if { (ac_try="$ac_link"
21283case "(($ac_try" in
21284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21285 *) ac_try_echo=$ac_try;;
21286esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021288 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021290 grep -v '^ *+' conftest.er1 >conftest.err
21291 rm -f conftest.er1
21292 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021294 (exit $ac_status); } && {
21295 test -z "$ac_c_werror_flag" ||
21296 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021297 } && test -s conftest$ac_exeext &&
21298 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021299 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021300else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021302sed 's/^/| /' conftest.$ac_ext >&5
21303
Martin v. Löwiseba40652007-08-30 20:10:57 +000021304 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021306
21307rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021308 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021309fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021310ac_res=`eval echo '${'$as_ac_var'}'`
21311 { echo "$as_me:$LINENO: result: $ac_res" >&5
21312echo "${ECHO_T}$ac_res" >&6; }
21313if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021314 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021315#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021316_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021317
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021318fi
21319done
21320
Michael W. Hudson54241132001-12-07 15:38:26 +000021321
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021322# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021323{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21324echo $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 +000021325if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021327else
Martin v. Löwis11437992002-04-12 09:54:03 +000021328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021329/* confdefs.h. */
21330_ACEOF
21331cat confdefs.h >>conftest.$ac_ext
21332cat >>conftest.$ac_ext <<_ACEOF
21333/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021334#include <sys/types.h>
21335#include <sys/time.h>
21336#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021337
Martin v. Löwis11437992002-04-12 09:54:03 +000021338int
21339main ()
21340{
21341if ((struct tm *) 0)
21342return 0;
21343 ;
21344 return 0;
21345}
21346_ACEOF
21347rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021348if { (ac_try="$ac_compile"
21349case "(($ac_try" in
21350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21351 *) ac_try_echo=$ac_try;;
21352esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021354 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021356 grep -v '^ *+' conftest.er1 >conftest.err
21357 rm -f conftest.er1
21358 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021360 (exit $ac_status); } && {
21361 test -z "$ac_c_werror_flag" ||
21362 test ! -s conftest.err
21363 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021364 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021365else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021367sed 's/^/| /' conftest.$ac_ext >&5
21368
Martin v. Löwiseba40652007-08-30 20:10:57 +000021369 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021371
21372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021373fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021374{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21375echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021376if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021377
21378cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021379#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021380_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021381
21382fi
21383
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021384{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21385echo $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 +000021386if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021387 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021388else
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021390/* confdefs.h. */
21391_ACEOF
21392cat confdefs.h >>conftest.$ac_ext
21393cat >>conftest.$ac_ext <<_ACEOF
21394/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021395#include <sys/types.h>
21396#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021397
Martin v. Löwis11437992002-04-12 09:54:03 +000021398int
21399main ()
21400{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021401struct tm tm;
21402 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021403 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021404 ;
21405 return 0;
21406}
21407_ACEOF
21408rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021409if { (ac_try="$ac_compile"
21410case "(($ac_try" in
21411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21412 *) ac_try_echo=$ac_try;;
21413esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021417 grep -v '^ *+' conftest.er1 >conftest.err
21418 rm -f conftest.er1
21419 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021421 (exit $ac_status); } && {
21422 test -z "$ac_c_werror_flag" ||
21423 test ! -s conftest.err
21424 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021425 ac_cv_struct_tm=time.h
21426else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021428sed 's/^/| /' conftest.$ac_ext >&5
21429
Martin v. Löwiseba40652007-08-30 20:10:57 +000021430 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021432
21433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021434fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021435{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21436echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021437if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021438
21439cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021440#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021441_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021442
21443fi
21444
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021445{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21446echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021447if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021449else
Martin v. Löwis11437992002-04-12 09:54:03 +000021450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021451/* confdefs.h. */
21452_ACEOF
21453cat confdefs.h >>conftest.$ac_ext
21454cat >>conftest.$ac_ext <<_ACEOF
21455/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021456#include <sys/types.h>
21457#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021458
21459
Martin v. Löwis11437992002-04-12 09:54:03 +000021460int
21461main ()
21462{
21463static struct tm ac_aggr;
21464if (ac_aggr.tm_zone)
21465return 0;
21466 ;
21467 return 0;
21468}
21469_ACEOF
21470rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021471if { (ac_try="$ac_compile"
21472case "(($ac_try" in
21473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21474 *) ac_try_echo=$ac_try;;
21475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021479 grep -v '^ *+' conftest.er1 >conftest.err
21480 rm -f conftest.er1
21481 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021483 (exit $ac_status); } && {
21484 test -z "$ac_c_werror_flag" ||
21485 test ! -s conftest.err
21486 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021487 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021490sed 's/^/| /' conftest.$ac_ext >&5
21491
Martin v. Löwiseba40652007-08-30 20:10:57 +000021492 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021493/* confdefs.h. */
21494_ACEOF
21495cat confdefs.h >>conftest.$ac_ext
21496cat >>conftest.$ac_ext <<_ACEOF
21497/* end confdefs.h. */
21498#include <sys/types.h>
21499#include <$ac_cv_struct_tm>
21500
21501
21502int
21503main ()
21504{
21505static struct tm ac_aggr;
21506if (sizeof ac_aggr.tm_zone)
21507return 0;
21508 ;
21509 return 0;
21510}
21511_ACEOF
21512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021513if { (ac_try="$ac_compile"
21514case "(($ac_try" in
21515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21516 *) ac_try_echo=$ac_try;;
21517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021519 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021521 grep -v '^ *+' conftest.er1 >conftest.err
21522 rm -f conftest.er1
21523 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021525 (exit $ac_status); } && {
21526 test -z "$ac_c_werror_flag" ||
21527 test ! -s conftest.err
21528 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021529 ac_cv_member_struct_tm_tm_zone=yes
21530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021532sed 's/^/| /' conftest.$ac_ext >&5
21533
Martin v. Löwiseba40652007-08-30 20:10:57 +000021534 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021536
21537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021539
21540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021541fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021542{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21543echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21544if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021545
21546cat >>confdefs.h <<_ACEOF
21547#define HAVE_STRUCT_TM_TM_ZONE 1
21548_ACEOF
21549
21550
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021551fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021552
Martin v. Löwis11437992002-04-12 09:54:03 +000021553if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21554
21555cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021556#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021557_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021558
21559else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021560 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21561echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021562if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021563 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021564else
21565 cat >conftest.$ac_ext <<_ACEOF
21566/* confdefs.h. */
21567_ACEOF
21568cat confdefs.h >>conftest.$ac_ext
21569cat >>conftest.$ac_ext <<_ACEOF
21570/* end confdefs.h. */
21571#include <time.h>
21572
21573int
21574main ()
21575{
21576#ifndef tzname
21577 (void) tzname;
21578#endif
21579
21580 ;
21581 return 0;
21582}
21583_ACEOF
21584rm -f conftest.$ac_objext
21585if { (ac_try="$ac_compile"
21586case "(($ac_try" in
21587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21588 *) ac_try_echo=$ac_try;;
21589esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021591 (eval "$ac_compile") 2>conftest.er1
21592 ac_status=$?
21593 grep -v '^ *+' conftest.er1 >conftest.err
21594 rm -f conftest.er1
21595 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021597 (exit $ac_status); } && {
21598 test -z "$ac_c_werror_flag" ||
21599 test ! -s conftest.err
21600 } && test -s conftest.$ac_objext; then
21601 ac_cv_have_decl_tzname=yes
21602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021603 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021604sed 's/^/| /' conftest.$ac_ext >&5
21605
21606 ac_cv_have_decl_tzname=no
21607fi
21608
21609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21610fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021611{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21612echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21613if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021614
21615cat >>confdefs.h <<_ACEOF
21616#define HAVE_DECL_TZNAME 1
21617_ACEOF
21618
21619
21620else
21621 cat >>confdefs.h <<_ACEOF
21622#define HAVE_DECL_TZNAME 0
21623_ACEOF
21624
21625
21626fi
21627
21628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021629 { echo "$as_me:$LINENO: checking for tzname" >&5
21630echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021631if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021632 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021633else
Martin v. Löwis11437992002-04-12 09:54:03 +000021634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021635/* confdefs.h. */
21636_ACEOF
21637cat confdefs.h >>conftest.$ac_ext
21638cat >>conftest.$ac_ext <<_ACEOF
21639/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021640#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021641#if !HAVE_DECL_TZNAME
21642extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021644
Martin v. Löwis11437992002-04-12 09:54:03 +000021645int
21646main ()
21647{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021648return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021649 ;
21650 return 0;
21651}
21652_ACEOF
21653rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021654if { (ac_try="$ac_link"
21655case "(($ac_try" in
21656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21657 *) ac_try_echo=$ac_try;;
21658esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021660 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021662 grep -v '^ *+' conftest.er1 >conftest.err
21663 rm -f conftest.er1
21664 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021666 (exit $ac_status); } && {
21667 test -z "$ac_c_werror_flag" ||
21668 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021669 } && test -s conftest$ac_exeext &&
21670 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021671 ac_cv_var_tzname=yes
21672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021674sed 's/^/| /' conftest.$ac_ext >&5
21675
Martin v. Löwiseba40652007-08-30 20:10:57 +000021676 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021678
21679rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021680 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021681fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021682{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21683echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021684 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021685
21686cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021687#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021688_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021689
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021690 fi
21691fi
21692
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021693{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21694echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021695if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021696 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021697else
21698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021699/* confdefs.h. */
21700_ACEOF
21701cat confdefs.h >>conftest.$ac_ext
21702cat >>conftest.$ac_ext <<_ACEOF
21703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021704$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021705int
21706main ()
21707{
21708static struct stat ac_aggr;
21709if (ac_aggr.st_rdev)
21710return 0;
21711 ;
21712 return 0;
21713}
21714_ACEOF
21715rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021716if { (ac_try="$ac_compile"
21717case "(($ac_try" in
21718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21719 *) ac_try_echo=$ac_try;;
21720esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021722 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021724 grep -v '^ *+' conftest.er1 >conftest.err
21725 rm -f conftest.er1
21726 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021728 (exit $ac_status); } && {
21729 test -z "$ac_c_werror_flag" ||
21730 test ! -s conftest.err
21731 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021732 ac_cv_member_struct_stat_st_rdev=yes
21733else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021735sed 's/^/| /' conftest.$ac_ext >&5
21736
Martin v. Löwiseba40652007-08-30 20:10:57 +000021737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021738/* confdefs.h. */
21739_ACEOF
21740cat confdefs.h >>conftest.$ac_ext
21741cat >>conftest.$ac_ext <<_ACEOF
21742/* end confdefs.h. */
21743$ac_includes_default
21744int
21745main ()
21746{
21747static struct stat ac_aggr;
21748if (sizeof ac_aggr.st_rdev)
21749return 0;
21750 ;
21751 return 0;
21752}
21753_ACEOF
21754rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021755if { (ac_try="$ac_compile"
21756case "(($ac_try" in
21757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21758 *) ac_try_echo=$ac_try;;
21759esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021761 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021763 grep -v '^ *+' conftest.er1 >conftest.err
21764 rm -f conftest.er1
21765 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021767 (exit $ac_status); } && {
21768 test -z "$ac_c_werror_flag" ||
21769 test ! -s conftest.err
21770 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021771 ac_cv_member_struct_stat_st_rdev=yes
21772else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021774sed 's/^/| /' conftest.$ac_ext >&5
21775
Martin v. Löwiseba40652007-08-30 20:10:57 +000021776 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021778
21779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021781
21782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021783fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021784{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21785echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21786if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021787
21788cat >>confdefs.h <<_ACEOF
21789#define HAVE_STRUCT_STAT_ST_RDEV 1
21790_ACEOF
21791
21792
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021793fi
21794
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021795{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21796echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021797if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021798 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021799else
Martin v. Löwis11437992002-04-12 09:54:03 +000021800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021801/* confdefs.h. */
21802_ACEOF
21803cat confdefs.h >>conftest.$ac_ext
21804cat >>conftest.$ac_ext <<_ACEOF
21805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021806$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021807int
21808main ()
21809{
21810static struct stat ac_aggr;
21811if (ac_aggr.st_blksize)
21812return 0;
21813 ;
21814 return 0;
21815}
21816_ACEOF
21817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021818if { (ac_try="$ac_compile"
21819case "(($ac_try" in
21820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21821 *) ac_try_echo=$ac_try;;
21822esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021826 grep -v '^ *+' conftest.er1 >conftest.err
21827 rm -f conftest.er1
21828 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021830 (exit $ac_status); } && {
21831 test -z "$ac_c_werror_flag" ||
21832 test ! -s conftest.err
21833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021834 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021835else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021837sed 's/^/| /' conftest.$ac_ext >&5
21838
Martin v. Löwiseba40652007-08-30 20:10:57 +000021839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021840/* confdefs.h. */
21841_ACEOF
21842cat confdefs.h >>conftest.$ac_ext
21843cat >>conftest.$ac_ext <<_ACEOF
21844/* end confdefs.h. */
21845$ac_includes_default
21846int
21847main ()
21848{
21849static struct stat ac_aggr;
21850if (sizeof ac_aggr.st_blksize)
21851return 0;
21852 ;
21853 return 0;
21854}
21855_ACEOF
21856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021857if { (ac_try="$ac_compile"
21858case "(($ac_try" in
21859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21860 *) ac_try_echo=$ac_try;;
21861esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021863 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021865 grep -v '^ *+' conftest.er1 >conftest.err
21866 rm -f conftest.er1
21867 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021869 (exit $ac_status); } && {
21870 test -z "$ac_c_werror_flag" ||
21871 test ! -s conftest.err
21872 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021873 ac_cv_member_struct_stat_st_blksize=yes
21874else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021876sed 's/^/| /' conftest.$ac_ext >&5
21877
Martin v. Löwiseba40652007-08-30 20:10:57 +000021878 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021880
21881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021883
21884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021885fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021886{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21887echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21888if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021889
Martin v. Löwis11437992002-04-12 09:54:03 +000021890cat >>confdefs.h <<_ACEOF
21891#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21892_ACEOF
21893
21894
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021895fi
21896
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021897{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21898echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021899if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021900 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021901else
21902 cat >conftest.$ac_ext <<_ACEOF
21903/* confdefs.h. */
21904_ACEOF
21905cat confdefs.h >>conftest.$ac_ext
21906cat >>conftest.$ac_ext <<_ACEOF
21907/* end confdefs.h. */
21908$ac_includes_default
21909int
21910main ()
21911{
21912static struct stat ac_aggr;
21913if (ac_aggr.st_flags)
21914return 0;
21915 ;
21916 return 0;
21917}
21918_ACEOF
21919rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021920if { (ac_try="$ac_compile"
21921case "(($ac_try" in
21922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21923 *) ac_try_echo=$ac_try;;
21924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021926 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021927 ac_status=$?
21928 grep -v '^ *+' conftest.er1 >conftest.err
21929 rm -f conftest.er1
21930 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021932 (exit $ac_status); } && {
21933 test -z "$ac_c_werror_flag" ||
21934 test ! -s conftest.err
21935 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021936 ac_cv_member_struct_stat_st_flags=yes
21937else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021938 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021939sed 's/^/| /' conftest.$ac_ext >&5
21940
Martin v. Löwiseba40652007-08-30 20:10:57 +000021941 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021942/* confdefs.h. */
21943_ACEOF
21944cat confdefs.h >>conftest.$ac_ext
21945cat >>conftest.$ac_ext <<_ACEOF
21946/* end confdefs.h. */
21947$ac_includes_default
21948int
21949main ()
21950{
21951static struct stat ac_aggr;
21952if (sizeof ac_aggr.st_flags)
21953return 0;
21954 ;
21955 return 0;
21956}
21957_ACEOF
21958rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021959if { (ac_try="$ac_compile"
21960case "(($ac_try" in
21961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21962 *) ac_try_echo=$ac_try;;
21963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021965 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021966 ac_status=$?
21967 grep -v '^ *+' conftest.er1 >conftest.err
21968 rm -f conftest.er1
21969 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021971 (exit $ac_status); } && {
21972 test -z "$ac_c_werror_flag" ||
21973 test ! -s conftest.err
21974 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021975 ac_cv_member_struct_stat_st_flags=yes
21976else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021977 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021978sed 's/^/| /' conftest.$ac_ext >&5
21979
Martin v. Löwiseba40652007-08-30 20:10:57 +000021980 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021982
21983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021985
21986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021987fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021988{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21989echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21990if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021991
21992cat >>confdefs.h <<_ACEOF
21993#define HAVE_STRUCT_STAT_ST_FLAGS 1
21994_ACEOF
21995
21996
21997fi
21998
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021999{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22000echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022001if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022002 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022003else
22004 cat >conftest.$ac_ext <<_ACEOF
22005/* confdefs.h. */
22006_ACEOF
22007cat confdefs.h >>conftest.$ac_ext
22008cat >>conftest.$ac_ext <<_ACEOF
22009/* end confdefs.h. */
22010$ac_includes_default
22011int
22012main ()
22013{
22014static struct stat ac_aggr;
22015if (ac_aggr.st_gen)
22016return 0;
22017 ;
22018 return 0;
22019}
22020_ACEOF
22021rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022022if { (ac_try="$ac_compile"
22023case "(($ac_try" in
22024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22025 *) ac_try_echo=$ac_try;;
22026esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022029 ac_status=$?
22030 grep -v '^ *+' conftest.er1 >conftest.err
22031 rm -f conftest.er1
22032 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022034 (exit $ac_status); } && {
22035 test -z "$ac_c_werror_flag" ||
22036 test ! -s conftest.err
22037 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022038 ac_cv_member_struct_stat_st_gen=yes
22039else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022040 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022041sed 's/^/| /' conftest.$ac_ext >&5
22042
Martin v. Löwiseba40652007-08-30 20:10:57 +000022043 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022044/* confdefs.h. */
22045_ACEOF
22046cat confdefs.h >>conftest.$ac_ext
22047cat >>conftest.$ac_ext <<_ACEOF
22048/* end confdefs.h. */
22049$ac_includes_default
22050int
22051main ()
22052{
22053static struct stat ac_aggr;
22054if (sizeof ac_aggr.st_gen)
22055return 0;
22056 ;
22057 return 0;
22058}
22059_ACEOF
22060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022061if { (ac_try="$ac_compile"
22062case "(($ac_try" in
22063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22064 *) ac_try_echo=$ac_try;;
22065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022068 ac_status=$?
22069 grep -v '^ *+' conftest.er1 >conftest.err
22070 rm -f conftest.er1
22071 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022073 (exit $ac_status); } && {
22074 test -z "$ac_c_werror_flag" ||
22075 test ! -s conftest.err
22076 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022077 ac_cv_member_struct_stat_st_gen=yes
22078else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022079 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022080sed 's/^/| /' conftest.$ac_ext >&5
22081
Martin v. Löwiseba40652007-08-30 20:10:57 +000022082 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022084
22085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022087
22088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022089fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022090{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22091echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22092if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022093
22094cat >>confdefs.h <<_ACEOF
22095#define HAVE_STRUCT_STAT_ST_GEN 1
22096_ACEOF
22097
22098
22099fi
22100
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022101{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22102echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022103if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022104 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022105else
22106 cat >conftest.$ac_ext <<_ACEOF
22107/* confdefs.h. */
22108_ACEOF
22109cat confdefs.h >>conftest.$ac_ext
22110cat >>conftest.$ac_ext <<_ACEOF
22111/* end confdefs.h. */
22112$ac_includes_default
22113int
22114main ()
22115{
22116static struct stat ac_aggr;
22117if (ac_aggr.st_birthtime)
22118return 0;
22119 ;
22120 return 0;
22121}
22122_ACEOF
22123rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022124if { (ac_try="$ac_compile"
22125case "(($ac_try" in
22126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22127 *) ac_try_echo=$ac_try;;
22128esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022130 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022131 ac_status=$?
22132 grep -v '^ *+' conftest.er1 >conftest.err
22133 rm -f conftest.er1
22134 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022136 (exit $ac_status); } && {
22137 test -z "$ac_c_werror_flag" ||
22138 test ! -s conftest.err
22139 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022140 ac_cv_member_struct_stat_st_birthtime=yes
22141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022142 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022143sed 's/^/| /' conftest.$ac_ext >&5
22144
Martin v. Löwiseba40652007-08-30 20:10:57 +000022145 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022146/* confdefs.h. */
22147_ACEOF
22148cat confdefs.h >>conftest.$ac_ext
22149cat >>conftest.$ac_ext <<_ACEOF
22150/* end confdefs.h. */
22151$ac_includes_default
22152int
22153main ()
22154{
22155static struct stat ac_aggr;
22156if (sizeof ac_aggr.st_birthtime)
22157return 0;
22158 ;
22159 return 0;
22160}
22161_ACEOF
22162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022163if { (ac_try="$ac_compile"
22164case "(($ac_try" in
22165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22166 *) ac_try_echo=$ac_try;;
22167esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022170 ac_status=$?
22171 grep -v '^ *+' conftest.er1 >conftest.err
22172 rm -f conftest.er1
22173 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022175 (exit $ac_status); } && {
22176 test -z "$ac_c_werror_flag" ||
22177 test ! -s conftest.err
22178 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022179 ac_cv_member_struct_stat_st_birthtime=yes
22180else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022181 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022182sed 's/^/| /' conftest.$ac_ext >&5
22183
Martin v. Löwiseba40652007-08-30 20:10:57 +000022184 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022186
22187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022189
22190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022191fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022192{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22193echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22194if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022195
22196cat >>confdefs.h <<_ACEOF
22197#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22198_ACEOF
22199
22200
22201fi
22202
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022203{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22204echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022205if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022206 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022207else
Martin v. Löwis11437992002-04-12 09:54:03 +000022208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022209/* confdefs.h. */
22210_ACEOF
22211cat confdefs.h >>conftest.$ac_ext
22212cat >>conftest.$ac_ext <<_ACEOF
22213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022214$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022215int
22216main ()
22217{
22218static struct stat ac_aggr;
22219if (ac_aggr.st_blocks)
22220return 0;
22221 ;
22222 return 0;
22223}
22224_ACEOF
22225rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022226if { (ac_try="$ac_compile"
22227case "(($ac_try" in
22228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22229 *) ac_try_echo=$ac_try;;
22230esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022234 grep -v '^ *+' conftest.er1 >conftest.err
22235 rm -f conftest.er1
22236 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022238 (exit $ac_status); } && {
22239 test -z "$ac_c_werror_flag" ||
22240 test ! -s conftest.err
22241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022242 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022243else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022245sed 's/^/| /' conftest.$ac_ext >&5
22246
Martin v. Löwiseba40652007-08-30 20:10:57 +000022247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022248/* confdefs.h. */
22249_ACEOF
22250cat confdefs.h >>conftest.$ac_ext
22251cat >>conftest.$ac_ext <<_ACEOF
22252/* end confdefs.h. */
22253$ac_includes_default
22254int
22255main ()
22256{
22257static struct stat ac_aggr;
22258if (sizeof ac_aggr.st_blocks)
22259return 0;
22260 ;
22261 return 0;
22262}
22263_ACEOF
22264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022265if { (ac_try="$ac_compile"
22266case "(($ac_try" in
22267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22268 *) ac_try_echo=$ac_try;;
22269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022271 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022273 grep -v '^ *+' conftest.er1 >conftest.err
22274 rm -f conftest.er1
22275 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022277 (exit $ac_status); } && {
22278 test -z "$ac_c_werror_flag" ||
22279 test ! -s conftest.err
22280 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022281 ac_cv_member_struct_stat_st_blocks=yes
22282else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022284sed 's/^/| /' conftest.$ac_ext >&5
22285
Martin v. Löwiseba40652007-08-30 20:10:57 +000022286 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022288
22289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022291
22292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022293fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022294{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22295echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22296if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022297
Martin v. Löwis11437992002-04-12 09:54:03 +000022298cat >>confdefs.h <<_ACEOF
22299#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22300_ACEOF
22301
22302
22303cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022304#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022305_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022306
22307else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022308 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022309 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022310 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22311 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022312esac
22313
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022314fi
22315
Michael W. Hudson54241132001-12-07 15:38:26 +000022316
Martin v. Löwis11437992002-04-12 09:54:03 +000022317
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022318{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22319echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022320if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022322else
Martin v. Löwis11437992002-04-12 09:54:03 +000022323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022324/* confdefs.h. */
22325_ACEOF
22326cat confdefs.h >>conftest.$ac_ext
22327cat >>conftest.$ac_ext <<_ACEOF
22328/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022329#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022330int
22331main ()
22332{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022333return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022334 ;
22335 return 0;
22336}
22337_ACEOF
22338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022339if { (ac_try="$ac_compile"
22340case "(($ac_try" in
22341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22342 *) ac_try_echo=$ac_try;;
22343esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022347 grep -v '^ *+' conftest.er1 >conftest.err
22348 rm -f conftest.er1
22349 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022351 (exit $ac_status); } && {
22352 test -z "$ac_c_werror_flag" ||
22353 test ! -s conftest.err
22354 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022355 ac_cv_header_time_altzone=yes
22356else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022358sed 's/^/| /' conftest.$ac_ext >&5
22359
Martin v. Löwiseba40652007-08-30 20:10:57 +000022360 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022361fi
22362
Martin v. Löwiseba40652007-08-30 20:10:57 +000022363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22364fi
22365
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022366{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22367echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022368if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022369
22370cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022371#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022372_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022373
22374fi
22375
Guido van Rossumda88dad1995-01-26 00:46:29 +000022376was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022377{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22378echo $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 +000022379cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022380/* confdefs.h. */
22381_ACEOF
22382cat confdefs.h >>conftest.$ac_ext
22383cat >>conftest.$ac_ext <<_ACEOF
22384/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022385
22386#include <sys/types.h>
22387#include <sys/select.h>
22388#include <sys/time.h>
22389
Martin v. Löwis11437992002-04-12 09:54:03 +000022390int
22391main ()
22392{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022393;
Martin v. Löwis11437992002-04-12 09:54:03 +000022394 ;
22395 return 0;
22396}
22397_ACEOF
22398rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022399if { (ac_try="$ac_compile"
22400case "(($ac_try" in
22401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22402 *) ac_try_echo=$ac_try;;
22403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022407 grep -v '^ *+' conftest.er1 >conftest.err
22408 rm -f conftest.er1
22409 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022411 (exit $ac_status); } && {
22412 test -z "$ac_c_werror_flag" ||
22413 test ! -s conftest.err
22414 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022415
22416
22417cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022418#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022419_ACEOF
22420
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022421 was_it_defined=yes
22422
Guido van Rossumf78abae1997-01-21 22:02:36 +000022423else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022425sed 's/^/| /' conftest.$ac_ext >&5
22426
Brett Cannon19fab762007-06-02 03:02:29 +000022427
Martin v. Löwiseba40652007-08-30 20:10:57 +000022428fi
22429
22430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022431{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22432echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022433
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022434{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22435echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022436if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022437 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022438else
Martin v. Löwis11437992002-04-12 09:54:03 +000022439 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022440/* confdefs.h. */
22441_ACEOF
22442cat confdefs.h >>conftest.$ac_ext
22443cat >>conftest.$ac_ext <<_ACEOF
22444/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022445
22446# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022447int
22448main ()
22449{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022450struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022451 ;
22452 return 0;
22453}
22454_ACEOF
22455rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456if { (ac_try="$ac_compile"
22457case "(($ac_try" in
22458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22459 *) ac_try_echo=$ac_try;;
22460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022462 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022464 grep -v '^ *+' conftest.er1 >conftest.err
22465 rm -f conftest.er1
22466 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022468 (exit $ac_status); } && {
22469 test -z "$ac_c_werror_flag" ||
22470 test ! -s conftest.err
22471 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022472 ac_cv_struct_addrinfo=yes
22473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022475sed 's/^/| /' conftest.$ac_ext >&5
22476
Martin v. Löwiseba40652007-08-30 20:10:57 +000022477 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022478fi
22479
Martin v. Löwiseba40652007-08-30 20:10:57 +000022480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22481fi
22482
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022483{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22484echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022485if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022486
22487cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022488#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022489_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022490
22491fi
22492
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022493{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22494echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022495if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022496 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022497else
Martin v. Löwis11437992002-04-12 09:54:03 +000022498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022499/* confdefs.h. */
22500_ACEOF
22501cat confdefs.h >>conftest.$ac_ext
22502cat >>conftest.$ac_ext <<_ACEOF
22503/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022504
22505# include <sys/types.h>
22506# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022507int
22508main ()
22509{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022510struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022511 ;
22512 return 0;
22513}
22514_ACEOF
22515rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022516if { (ac_try="$ac_compile"
22517case "(($ac_try" in
22518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22519 *) ac_try_echo=$ac_try;;
22520esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022522 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022524 grep -v '^ *+' conftest.er1 >conftest.err
22525 rm -f conftest.er1
22526 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022528 (exit $ac_status); } && {
22529 test -z "$ac_c_werror_flag" ||
22530 test ! -s conftest.err
22531 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022532 ac_cv_struct_sockaddr_storage=yes
22533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022535sed 's/^/| /' conftest.$ac_ext >&5
22536
Martin v. Löwiseba40652007-08-30 20:10:57 +000022537 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022538fi
22539
Martin v. Löwiseba40652007-08-30 20:10:57 +000022540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22541fi
22542
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022543{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22544echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022545if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022546
22547cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022548#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022549_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022550
22551fi
22552
Guido van Rossum627b2d71993-12-24 10:39:16 +000022553# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022554
Michael W. Hudson54241132001-12-07 15:38:26 +000022555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022556{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22557echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022558if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022559 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022560else
Martin v. Löwis11437992002-04-12 09:54:03 +000022561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022562/* confdefs.h. */
22563_ACEOF
22564cat confdefs.h >>conftest.$ac_ext
22565cat >>conftest.$ac_ext <<_ACEOF
22566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022567$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022568int
22569main ()
22570{
22571static int test_array [1 - 2 * !(((char) -1) < 0)];
22572test_array [0] = 0
22573
22574 ;
22575 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022576}
Martin v. Löwis11437992002-04-12 09:54:03 +000022577_ACEOF
22578rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022579if { (ac_try="$ac_compile"
22580case "(($ac_try" in
22581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22582 *) ac_try_echo=$ac_try;;
22583esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022587 grep -v '^ *+' conftest.er1 >conftest.err
22588 rm -f conftest.er1
22589 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022591 (exit $ac_status); } && {
22592 test -z "$ac_c_werror_flag" ||
22593 test ! -s conftest.err
22594 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022595 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022596else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022598sed 's/^/| /' conftest.$ac_ext >&5
22599
Martin v. Löwiseba40652007-08-30 20:10:57 +000022600 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022602
22603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022604fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022605{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22606echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022607if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022608 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022609#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022610_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022611
22612fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022613
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022614{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22615echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022616if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022617 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022618else
22619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022620/* confdefs.h. */
22621_ACEOF
22622cat confdefs.h >>conftest.$ac_ext
22623cat >>conftest.$ac_ext <<_ACEOF
22624/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022625
Martin v. Löwis11437992002-04-12 09:54:03 +000022626int
22627main ()
22628{
22629/* FIXME: Include the comments suggested by Paul. */
22630#ifndef __cplusplus
22631 /* Ultrix mips cc rejects this. */
22632 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022633 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022634 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022635 char const *const *pcpcc;
22636 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022637 /* NEC SVR4.0.2 mips cc rejects this. */
22638 struct point {int x, y;};
22639 static struct point const zero = {0,0};
22640 /* AIX XL C 1.02.0.0 rejects this.
22641 It does not let you subtract one const X* pointer from another in
22642 an arm of an if-expression whose if-part is not a constant
22643 expression */
22644 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022645 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022646 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022647 ++pcpcc;
22648 ppc = (char**) pcpcc;
22649 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022650 { /* SCO 3.2v4 cc rejects this. */
22651 char *t;
22652 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022653
Martin v. Löwis11437992002-04-12 09:54:03 +000022654 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022655 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022656 }
22657 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22658 int x[] = {25, 17};
22659 const int *foo = &x[0];
22660 ++foo;
22661 }
22662 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22663 typedef const int *iptr;
22664 iptr p = 0;
22665 ++p;
22666 }
22667 { /* AIX XL C 1.02.0.0 rejects this saying
22668 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22669 struct s { int j; const int *ap[3]; };
22670 struct s *b; b->j = 5;
22671 }
22672 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22673 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022674 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022675 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022677#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022678
Martin v. Löwis11437992002-04-12 09:54:03 +000022679 ;
22680 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022681}
Martin v. Löwis11437992002-04-12 09:54:03 +000022682_ACEOF
22683rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022684if { (ac_try="$ac_compile"
22685case "(($ac_try" in
22686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22687 *) ac_try_echo=$ac_try;;
22688esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022692 grep -v '^ *+' conftest.er1 >conftest.err
22693 rm -f conftest.er1
22694 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022696 (exit $ac_status); } && {
22697 test -z "$ac_c_werror_flag" ||
22698 test ! -s conftest.err
22699 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022700 ac_cv_c_const=yes
22701else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022703sed 's/^/| /' conftest.$ac_ext >&5
22704
Martin v. Löwiseba40652007-08-30 20:10:57 +000022705 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022707
22708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022709fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022710{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22711echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022712if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022713
22714cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022715#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022716_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022717
22718fi
22719
Michael W. Hudson54241132001-12-07 15:38:26 +000022720
Guido van Rossumda88dad1995-01-26 00:46:29 +000022721works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022722{ echo "$as_me:$LINENO: checking for working volatile" >&5
22723echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022724cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022725/* confdefs.h. */
22726_ACEOF
22727cat confdefs.h >>conftest.$ac_ext
22728cat >>conftest.$ac_ext <<_ACEOF
22729/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022730
Martin v. Löwis11437992002-04-12 09:54:03 +000022731int
22732main ()
22733{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022734volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022735 ;
22736 return 0;
22737}
22738_ACEOF
22739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022740if { (ac_try="$ac_compile"
22741case "(($ac_try" in
22742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22743 *) ac_try_echo=$ac_try;;
22744esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022748 grep -v '^ *+' conftest.er1 >conftest.err
22749 rm -f conftest.er1
22750 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022752 (exit $ac_status); } && {
22753 test -z "$ac_c_werror_flag" ||
22754 test ! -s conftest.err
22755 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022756 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022757else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022759sed 's/^/| /' conftest.$ac_ext >&5
22760
Martin v. Löwis11437992002-04-12 09:54:03 +000022761
22762cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022763#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022764_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022765
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022766
Guido van Rossum627b2d71993-12-24 10:39:16 +000022767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022768
22769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022770{ echo "$as_me:$LINENO: result: $works" >&5
22771echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022772
Guido van Rossumda88dad1995-01-26 00:46:29 +000022773works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022774{ echo "$as_me:$LINENO: checking for working signed char" >&5
22775echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022777/* confdefs.h. */
22778_ACEOF
22779cat confdefs.h >>conftest.$ac_ext
22780cat >>conftest.$ac_ext <<_ACEOF
22781/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022782
Martin v. Löwis11437992002-04-12 09:54:03 +000022783int
22784main ()
22785{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022786signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022787 ;
22788 return 0;
22789}
22790_ACEOF
22791rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022792if { (ac_try="$ac_compile"
22793case "(($ac_try" in
22794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22795 *) ac_try_echo=$ac_try;;
22796esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022800 grep -v '^ *+' conftest.er1 >conftest.err
22801 rm -f conftest.er1
22802 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022804 (exit $ac_status); } && {
22805 test -z "$ac_c_werror_flag" ||
22806 test ! -s conftest.err
22807 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022808 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022809else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022811sed 's/^/| /' conftest.$ac_ext >&5
22812
Martin v. Löwis11437992002-04-12 09:54:03 +000022813
22814cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022815#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022816_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022817
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022818
Guido van Rossum7f43da71994-08-01 12:15:30 +000022819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022820
22821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022822{ echo "$as_me:$LINENO: result: $works" >&5
22823echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022824
Guido van Rossumda88dad1995-01-26 00:46:29 +000022825have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022826{ echo "$as_me:$LINENO: checking for prototypes" >&5
22827echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022829/* confdefs.h. */
22830_ACEOF
22831cat confdefs.h >>conftest.$ac_ext
22832cat >>conftest.$ac_ext <<_ACEOF
22833/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022834int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022835int
22836main ()
22837{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022838return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022839 ;
22840 return 0;
22841}
22842_ACEOF
22843rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022844if { (ac_try="$ac_compile"
22845case "(($ac_try" in
22846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22847 *) ac_try_echo=$ac_try;;
22848esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022852 grep -v '^ *+' conftest.er1 >conftest.err
22853 rm -f conftest.er1
22854 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022856 (exit $ac_status); } && {
22857 test -z "$ac_c_werror_flag" ||
22858 test ! -s conftest.err
22859 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022860
22861
22862cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022863#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022864_ACEOF
22865
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022866 have_prototypes=yes
22867
Guido van Rossumf78abae1997-01-21 22:02:36 +000022868else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022870sed 's/^/| /' conftest.$ac_ext >&5
22871
Martin v. Löwiseba40652007-08-30 20:10:57 +000022872
Guido van Rossum7f43da71994-08-01 12:15:30 +000022873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022874
22875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022876{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22877echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022878
Guido van Rossumda88dad1995-01-26 00:46:29 +000022879works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022880{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22881echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022882cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022883/* confdefs.h. */
22884_ACEOF
22885cat confdefs.h >>conftest.$ac_ext
22886cat >>conftest.$ac_ext <<_ACEOF
22887/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022888
22889#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022890int foo(int x, ...) {
22891 va_list va;
22892 va_start(va, x);
22893 va_arg(va, int);
22894 va_arg(va, char *);
22895 va_arg(va, double);
22896 return 0;
22897}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022898
Martin v. Löwis11437992002-04-12 09:54:03 +000022899int
22900main ()
22901{
Guido van Rossum90eea071996-08-30 20:58:57 +000022902return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022903 ;
22904 return 0;
22905}
22906_ACEOF
22907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022908if { (ac_try="$ac_compile"
22909case "(($ac_try" in
22910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22911 *) ac_try_echo=$ac_try;;
22912esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022916 grep -v '^ *+' conftest.er1 >conftest.err
22917 rm -f conftest.er1
22918 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022920 (exit $ac_status); } && {
22921 test -z "$ac_c_werror_flag" ||
22922 test ! -s conftest.err
22923 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022924
22925
22926cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022927#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022928_ACEOF
22929
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022930 works=yes
22931
Guido van Rossumf78abae1997-01-21 22:02:36 +000022932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022934sed 's/^/| /' conftest.$ac_ext >&5
22935
Martin v. Löwiseba40652007-08-30 20:10:57 +000022936
Guido van Rossum627b2d71993-12-24 10:39:16 +000022937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022938
22939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022940{ echo "$as_me:$LINENO: result: $works" >&5
22941echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022942
Martin v. Löwisd6320502004-08-12 13:45:08 +000022943# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022944{ echo "$as_me:$LINENO: checking for socketpair" >&5
22945echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022946cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022947/* confdefs.h. */
22948_ACEOF
22949cat confdefs.h >>conftest.$ac_ext
22950cat >>conftest.$ac_ext <<_ACEOF
22951/* end confdefs.h. */
22952
22953#include <sys/types.h>
22954#include <sys/socket.h>
22955
22956int
22957main ()
22958{
22959void *x=socketpair
22960 ;
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öwisd6320502004-08-12 13:45:08 +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
Martin v. Löwisd6320502004-08-12 13:45:08 +000022981
22982cat >>confdefs.h <<\_ACEOF
22983#define HAVE_SOCKETPAIR 1
22984_ACEOF
22985
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022986 { echo "$as_me:$LINENO: result: yes" >&5
22987echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022989 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +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öwisd6320502004-08-12 13:45:08 +000022994
22995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022996
22997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022998
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022999# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023000{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23001echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023002cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023003/* confdefs.h. */
23004_ACEOF
23005cat confdefs.h >>conftest.$ac_ext
23006cat >>conftest.$ac_ext <<_ACEOF
23007/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023008#include <sys/types.h>
23009#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023010int
23011main ()
23012{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023013struct sockaddr x;
23014x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023015 ;
23016 return 0;
23017}
23018_ACEOF
23019rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023020if { (ac_try="$ac_compile"
23021case "(($ac_try" in
23022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23023 *) ac_try_echo=$ac_try;;
23024esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023028 grep -v '^ *+' conftest.er1 >conftest.err
23029 rm -f conftest.er1
23030 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023032 (exit $ac_status); } && {
23033 test -z "$ac_c_werror_flag" ||
23034 test ! -s conftest.err
23035 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023036 { echo "$as_me:$LINENO: result: yes" >&5
23037echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023038
23039cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023040#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023041_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023042
23043else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023045sed 's/^/| /' conftest.$ac_ext >&5
23046
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023047 { echo "$as_me:$LINENO: result: no" >&5
23048echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023050
23051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023052
Guido van Rossumda88dad1995-01-26 00:46:29 +000023053va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023054{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23055echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023056cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023057/* confdefs.h. */
23058_ACEOF
23059cat confdefs.h >>conftest.$ac_ext
23060cat >>conftest.$ac_ext <<_ACEOF
23061/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023062
23063#ifdef HAVE_STDARG_PROTOTYPES
23064#include <stdarg.h>
23065#else
23066#include <varargs.h>
23067#endif
23068
Martin v. Löwis11437992002-04-12 09:54:03 +000023069int
23070main ()
23071{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023072va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023073 ;
23074 return 0;
23075}
23076_ACEOF
23077rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023078if { (ac_try="$ac_compile"
23079case "(($ac_try" in
23080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23081 *) ac_try_echo=$ac_try;;
23082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023084 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023086 grep -v '^ *+' conftest.er1 >conftest.err
23087 rm -f conftest.er1
23088 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023090 (exit $ac_status); } && {
23091 test -z "$ac_c_werror_flag" ||
23092 test ! -s conftest.err
23093 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023094 :
23095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023097sed 's/^/| /' conftest.$ac_ext >&5
23098
Martin v. Löwis11437992002-04-12 09:54:03 +000023099
23100
23101cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023102#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023103_ACEOF
23104
Guido van Rossumda88dad1995-01-26 00:46:29 +000023105 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023106
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023108
23109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023110{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23111echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023112
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023113# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023114
23115
23116
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023117{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23118echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023119if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023120 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023121else
Martin v. Löwis11437992002-04-12 09:54:03 +000023122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023123/* confdefs.h. */
23124_ACEOF
23125cat confdefs.h >>conftest.$ac_ext
23126cat >>conftest.$ac_ext <<_ACEOF
23127/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023128/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23129 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23130#define gethostbyname_r innocuous_gethostbyname_r
23131
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023132/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023133 which can conflict with char gethostbyname_r (); below.
23134 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023135 <limits.h> exists even on freestanding compilers. */
23136
23137#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023138# include <limits.h>
23139#else
23140# include <assert.h>
23141#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023142
23143#undef gethostbyname_r
23144
Martin v. Löwiseba40652007-08-30 20:10:57 +000023145/* Override any GCC internal prototype to avoid an error.
23146 Use char because int might match the return type of a GCC
23147 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023148#ifdef __cplusplus
23149extern "C"
23150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023151char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023152/* The GNU C library defines this for functions which it implements
23153 to always fail with ENOSYS. Some functions are actually named
23154 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023155#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023156choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023157#endif
23158
Skip Montanaro6dead952003-09-25 14:50:04 +000023159int
23160main ()
23161{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023162return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023163 ;
23164 return 0;
23165}
23166_ACEOF
23167rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023168if { (ac_try="$ac_link"
23169case "(($ac_try" in
23170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23171 *) ac_try_echo=$ac_try;;
23172esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023174 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023176 grep -v '^ *+' conftest.er1 >conftest.err
23177 rm -f conftest.er1
23178 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023180 (exit $ac_status); } && {
23181 test -z "$ac_c_werror_flag" ||
23182 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023183 } && test -s conftest$ac_exeext &&
23184 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023185 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023188sed 's/^/| /' conftest.$ac_ext >&5
23189
Martin v. Löwiseba40652007-08-30 20:10:57 +000023190 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023192
23193rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023194 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023195fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023196{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23197echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23198if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023199
Martin v. Löwis11437992002-04-12 09:54:03 +000023200 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023201#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023202_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023203
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023204 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23205echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023206 OLD_CFLAGS=$CFLAGS
23207 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023209/* confdefs.h. */
23210_ACEOF
23211cat confdefs.h >>conftest.$ac_ext
23212cat >>conftest.$ac_ext <<_ACEOF
23213/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023214
23215# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023216
Martin v. Löwis11437992002-04-12 09:54:03 +000023217int
23218main ()
23219{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023220
23221 char *name;
23222 struct hostent *he, *res;
23223 char buffer[2048];
23224 int buflen = 2048;
23225 int h_errnop;
23226
23227 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023228
23229 ;
23230 return 0;
23231}
23232_ACEOF
23233rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023234if { (ac_try="$ac_compile"
23235case "(($ac_try" in
23236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23237 *) ac_try_echo=$ac_try;;
23238esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023240 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023242 grep -v '^ *+' conftest.er1 >conftest.err
23243 rm -f conftest.er1
23244 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023246 (exit $ac_status); } && {
23247 test -z "$ac_c_werror_flag" ||
23248 test ! -s conftest.err
23249 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023250
23251 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023252#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023253_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023254
Martin v. Löwis11437992002-04-12 09:54:03 +000023255
23256cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023257#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023258_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023259
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023260 { echo "$as_me:$LINENO: result: yes" >&5
23261echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023262
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023263else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023265sed 's/^/| /' conftest.$ac_ext >&5
23266
Martin v. Löwis11437992002-04-12 09:54:03 +000023267
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023268 { echo "$as_me:$LINENO: result: no" >&5
23269echo "${ECHO_T}no" >&6; }
23270 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23271echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023273/* confdefs.h. */
23274_ACEOF
23275cat confdefs.h >>conftest.$ac_ext
23276cat >>conftest.$ac_ext <<_ACEOF
23277/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023278
23279# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023280
Martin v. Löwis11437992002-04-12 09:54:03 +000023281int
23282main ()
23283{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023284
23285 char *name;
23286 struct hostent *he;
23287 char buffer[2048];
23288 int buflen = 2048;
23289 int h_errnop;
23290
23291 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023292
23293 ;
23294 return 0;
23295}
23296_ACEOF
23297rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023298if { (ac_try="$ac_compile"
23299case "(($ac_try" in
23300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23301 *) ac_try_echo=$ac_try;;
23302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023304 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023306 grep -v '^ *+' conftest.er1 >conftest.err
23307 rm -f conftest.er1
23308 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023310 (exit $ac_status); } && {
23311 test -z "$ac_c_werror_flag" ||
23312 test ! -s conftest.err
23313 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023314
23315 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023316#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023317_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023318
Martin v. Löwis11437992002-04-12 09:54:03 +000023319
23320cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023321#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023322_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023323
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023324 { echo "$as_me:$LINENO: result: yes" >&5
23325echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023329sed 's/^/| /' conftest.$ac_ext >&5
23330
Martin v. Löwis11437992002-04-12 09:54:03 +000023331
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023332 { echo "$as_me:$LINENO: result: no" >&5
23333echo "${ECHO_T}no" >&6; }
23334 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23335echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023337/* confdefs.h. */
23338_ACEOF
23339cat confdefs.h >>conftest.$ac_ext
23340cat >>conftest.$ac_ext <<_ACEOF
23341/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023342
23343# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023344
Martin v. Löwis11437992002-04-12 09:54:03 +000023345int
23346main ()
23347{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023348
23349 char *name;
23350 struct hostent *he;
23351 struct hostent_data data;
23352
23353 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023354
23355 ;
23356 return 0;
23357}
23358_ACEOF
23359rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023360if { (ac_try="$ac_compile"
23361case "(($ac_try" in
23362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23363 *) ac_try_echo=$ac_try;;
23364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023368 grep -v '^ *+' conftest.er1 >conftest.err
23369 rm -f conftest.er1
23370 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023372 (exit $ac_status); } && {
23373 test -z "$ac_c_werror_flag" ||
23374 test ! -s conftest.err
23375 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023376
23377 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023378#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023379_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023380
Martin v. Löwis11437992002-04-12 09:54:03 +000023381
23382cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023383#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023384_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023385
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023386 { echo "$as_me:$LINENO: result: yes" >&5
23387echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023388
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023391sed 's/^/| /' conftest.$ac_ext >&5
23392
Martin v. Löwis11437992002-04-12 09:54:03 +000023393
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023394 { echo "$as_me:$LINENO: result: no" >&5
23395echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023396
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023398
23399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023400
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023402
23403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023404
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406
23407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023408 CFLAGS=$OLD_CFLAGS
23409
23410else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023411
Martin v. Löwis11437992002-04-12 09:54:03 +000023412
23413for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023414do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023415as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23416{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23417echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023418if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023419 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023420else
Martin v. Löwis11437992002-04-12 09:54:03 +000023421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023422/* confdefs.h. */
23423_ACEOF
23424cat confdefs.h >>conftest.$ac_ext
23425cat >>conftest.$ac_ext <<_ACEOF
23426/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023427/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23428 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23429#define $ac_func innocuous_$ac_func
23430
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023431/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023432 which can conflict with char $ac_func (); below.
23433 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023434 <limits.h> exists even on freestanding compilers. */
23435
23436#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023437# include <limits.h>
23438#else
23439# include <assert.h>
23440#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023441
23442#undef $ac_func
23443
Martin v. Löwiseba40652007-08-30 20:10:57 +000023444/* Override any GCC internal prototype to avoid an error.
23445 Use char because int might match the return type of a GCC
23446 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023447#ifdef __cplusplus
23448extern "C"
23449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023450char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023451/* The GNU C library defines this for functions which it implements
23452 to always fail with ENOSYS. Some functions are actually named
23453 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023454#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023455choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023456#endif
23457
Skip Montanaro6dead952003-09-25 14:50:04 +000023458int
23459main ()
23460{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023461return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023462 ;
23463 return 0;
23464}
23465_ACEOF
23466rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023467if { (ac_try="$ac_link"
23468case "(($ac_try" in
23469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23470 *) ac_try_echo=$ac_try;;
23471esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023473 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023475 grep -v '^ *+' conftest.er1 >conftest.err
23476 rm -f conftest.er1
23477 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023479 (exit $ac_status); } && {
23480 test -z "$ac_c_werror_flag" ||
23481 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023482 } && test -s conftest$ac_exeext &&
23483 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023484 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023485else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023487sed 's/^/| /' conftest.$ac_ext >&5
23488
Martin v. Löwiseba40652007-08-30 20:10:57 +000023489 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023491
23492rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023493 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023494fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023495ac_res=`eval echo '${'$as_ac_var'}'`
23496 { echo "$as_me:$LINENO: result: $ac_res" >&5
23497echo "${ECHO_T}$ac_res" >&6; }
23498if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023499 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023500#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023501_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023502
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023503fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023504done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023505
Michael W. Hudson54241132001-12-07 15:38:26 +000023506
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023507fi
23508
Michael W. Hudson54241132001-12-07 15:38:26 +000023509
23510
23511
23512
23513
23514
Guido van Rossum627b2d71993-12-24 10:39:16 +000023515# checks for system services
23516# (none yet)
23517
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023518# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023519{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23520echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023521if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023522 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023523else
Martin v. Löwis11437992002-04-12 09:54:03 +000023524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023525/* confdefs.h. */
23526_ACEOF
23527cat confdefs.h >>conftest.$ac_ext
23528cat >>conftest.$ac_ext <<_ACEOF
23529/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023530/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23531 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23532#define __fpu_control innocuous___fpu_control
23533
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023534/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023535 which can conflict with char __fpu_control (); below.
23536 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023537 <limits.h> exists even on freestanding compilers. */
23538
23539#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023540# include <limits.h>
23541#else
23542# include <assert.h>
23543#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023544
23545#undef __fpu_control
23546
Martin v. Löwiseba40652007-08-30 20:10:57 +000023547/* Override any GCC internal prototype to avoid an error.
23548 Use char because int might match the return type of a GCC
23549 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023550#ifdef __cplusplus
23551extern "C"
23552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023553char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023554/* The GNU C library defines this for functions which it implements
23555 to always fail with ENOSYS. Some functions are actually named
23556 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023557#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023558choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023559#endif
23560
Skip Montanaro6dead952003-09-25 14:50:04 +000023561int
23562main ()
23563{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023564return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023565 ;
23566 return 0;
23567}
23568_ACEOF
23569rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023570if { (ac_try="$ac_link"
23571case "(($ac_try" in
23572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23573 *) ac_try_echo=$ac_try;;
23574esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023576 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023578 grep -v '^ *+' conftest.er1 >conftest.err
23579 rm -f conftest.er1
23580 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023582 (exit $ac_status); } && {
23583 test -z "$ac_c_werror_flag" ||
23584 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023585 } && test -s conftest$ac_exeext &&
23586 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023587 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023588else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023590sed 's/^/| /' conftest.$ac_ext >&5
23591
Martin v. Löwiseba40652007-08-30 20:10:57 +000023592 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023594
23595rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023596 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023597fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023598{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23599echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23600if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023601 :
23602else
Martin v. Löwis11437992002-04-12 09:54:03 +000023603
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023604{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23605echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023606if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023607 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023608else
Martin v. Löwis11437992002-04-12 09:54:03 +000023609 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023610LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023612/* confdefs.h. */
23613_ACEOF
23614cat confdefs.h >>conftest.$ac_ext
23615cat >>conftest.$ac_ext <<_ACEOF
23616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023617
Martin v. Löwiseba40652007-08-30 20:10:57 +000023618/* Override any GCC internal prototype to avoid an error.
23619 Use char because int might match the return type of a GCC
23620 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023621#ifdef __cplusplus
23622extern "C"
23623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023624char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023625int
23626main ()
23627{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023628return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023629 ;
23630 return 0;
23631}
23632_ACEOF
23633rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023634if { (ac_try="$ac_link"
23635case "(($ac_try" in
23636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23637 *) ac_try_echo=$ac_try;;
23638esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023640 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023642 grep -v '^ *+' conftest.er1 >conftest.err
23643 rm -f conftest.er1
23644 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023646 (exit $ac_status); } && {
23647 test -z "$ac_c_werror_flag" ||
23648 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023649 } && test -s conftest$ac_exeext &&
23650 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023651 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023652else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023654sed 's/^/| /' conftest.$ac_ext >&5
23655
Martin v. Löwiseba40652007-08-30 20:10:57 +000023656 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023658
23659rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023661LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023662fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023663{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23664echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23665if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023666 cat >>confdefs.h <<_ACEOF
23667#define HAVE_LIBIEEE 1
23668_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023669
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023670 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023671
Guido van Rossum627b2d71993-12-24 10:39:16 +000023672fi
23673
Michael W. Hudson54241132001-12-07 15:38:26 +000023674
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023675fi
23676
Michael W. Hudson54241132001-12-07 15:38:26 +000023677
Guido van Rossum7f253911997-05-09 02:42:48 +000023678# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023679{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23680echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023681
Martin v. Löwiseba40652007-08-30 20:10:57 +000023682# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023683if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023684 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023685if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023686then
23687
23688cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023689#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023690_ACEOF
23691
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023692 { echo "$as_me:$LINENO: result: yes" >&5
23693echo "${ECHO_T}yes" >&6; }
23694else { echo "$as_me:$LINENO: result: no" >&5
23695echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023696fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023697else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023698 { echo "$as_me:$LINENO: result: no" >&5
23699echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023700fi
23701
Guido van Rossum7f253911997-05-09 02:42:48 +000023702
Guido van Rossum7f43da71994-08-01 12:15:30 +000023703# check for --with-libm=...
23704
Guido van Rossum563e7081996-09-10 18:20:48 +000023705case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023706Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023707BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023708*) LIBM=-lm
23709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023710{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23711echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023712
Martin v. Löwiseba40652007-08-30 20:10:57 +000023713# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023714if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023715 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023716if test "$withval" = no
23717then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023718 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23719echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023720elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023721then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023722 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23723echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23724else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23725echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023726 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023727fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023728else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023729 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23730echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023731fi
23732
Guido van Rossum7f43da71994-08-01 12:15:30 +000023733
23734# check for --with-libc=...
23735
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023736{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23737echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023738
Martin v. Löwiseba40652007-08-30 20:10:57 +000023739# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023740if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023741 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023742if test "$withval" = no
23743then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023744 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23745echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023746elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023747then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023748 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23749echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23750else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23751echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023752 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023753fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023754else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023755 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23756echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023757fi
23758
Guido van Rossum7f43da71994-08-01 12:15:30 +000023759
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023760# **************************************************
23761# * Check for various properties of floating point *
23762# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023763
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023764{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23765echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23766if test "${ac_cv_little_endian_double+set}" = set; then
23767 echo $ECHO_N "(cached) $ECHO_C" >&6
23768else
23769
23770if test "$cross_compiling" = yes; then
23771 ac_cv_little_endian_double=no
23772else
23773 cat >conftest.$ac_ext <<_ACEOF
23774/* confdefs.h. */
23775_ACEOF
23776cat confdefs.h >>conftest.$ac_ext
23777cat >>conftest.$ac_ext <<_ACEOF
23778/* end confdefs.h. */
23779
23780#include <string.h>
23781int main() {
23782 double x = 9006104071832581.0;
23783 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23784 return 0;
23785 else
23786 return 1;
23787}
23788
23789_ACEOF
23790rm -f conftest$ac_exeext
23791if { (ac_try="$ac_link"
23792case "(($ac_try" in
23793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23794 *) ac_try_echo=$ac_try;;
23795esac
23796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23797 (eval "$ac_link") 2>&5
23798 ac_status=$?
23799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23801 { (case "(($ac_try" in
23802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23803 *) ac_try_echo=$ac_try;;
23804esac
23805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23806 (eval "$ac_try") 2>&5
23807 ac_status=$?
23808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23809 (exit $ac_status); }; }; then
23810 ac_cv_little_endian_double=yes
23811else
23812 echo "$as_me: program exited with status $ac_status" >&5
23813echo "$as_me: failed program was:" >&5
23814sed 's/^/| /' conftest.$ac_ext >&5
23815
23816( exit $ac_status )
23817ac_cv_little_endian_double=no
23818fi
23819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23820fi
23821
23822
23823fi
23824
23825{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23826echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23827if test "$ac_cv_little_endian_double" = yes
23828then
23829
23830cat >>confdefs.h <<\_ACEOF
23831#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23832_ACEOF
23833
23834fi
23835
23836{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23837echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23838if test "${ac_cv_big_endian_double+set}" = set; then
23839 echo $ECHO_N "(cached) $ECHO_C" >&6
23840else
23841
23842if test "$cross_compiling" = yes; then
23843 ac_cv_big_endian_double=no
23844else
23845 cat >conftest.$ac_ext <<_ACEOF
23846/* confdefs.h. */
23847_ACEOF
23848cat confdefs.h >>conftest.$ac_ext
23849cat >>conftest.$ac_ext <<_ACEOF
23850/* end confdefs.h. */
23851
23852#include <string.h>
23853int main() {
23854 double x = 9006104071832581.0;
23855 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23856 return 0;
23857 else
23858 return 1;
23859}
23860
23861_ACEOF
23862rm -f conftest$ac_exeext
23863if { (ac_try="$ac_link"
23864case "(($ac_try" in
23865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23866 *) ac_try_echo=$ac_try;;
23867esac
23868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23869 (eval "$ac_link") 2>&5
23870 ac_status=$?
23871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23872 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23873 { (case "(($ac_try" in
23874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23875 *) ac_try_echo=$ac_try;;
23876esac
23877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23878 (eval "$ac_try") 2>&5
23879 ac_status=$?
23880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23881 (exit $ac_status); }; }; then
23882 ac_cv_big_endian_double=yes
23883else
23884 echo "$as_me: program exited with status $ac_status" >&5
23885echo "$as_me: failed program was:" >&5
23886sed 's/^/| /' conftest.$ac_ext >&5
23887
23888( exit $ac_status )
23889ac_cv_big_endian_double=no
23890fi
23891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23892fi
23893
23894
23895fi
23896
23897{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23898echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23899if test "$ac_cv_big_endian_double" = yes
23900then
23901
23902cat >>confdefs.h <<\_ACEOF
23903#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23904_ACEOF
23905
23906fi
23907
23908# Some ARM platforms use a mixed-endian representation for doubles.
23909# While Python doesn't currently have full support for these platforms
23910# (see e.g., issue 1762561), we can at least make sure that float <-> string
23911# conversions work.
23912{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23913echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23914if test "${ac_cv_mixed_endian_double+set}" = set; then
23915 echo $ECHO_N "(cached) $ECHO_C" >&6
23916else
23917
23918if test "$cross_compiling" = yes; then
23919 ac_cv_mixed_endian_double=no
23920else
23921 cat >conftest.$ac_ext <<_ACEOF
23922/* confdefs.h. */
23923_ACEOF
23924cat confdefs.h >>conftest.$ac_ext
23925cat >>conftest.$ac_ext <<_ACEOF
23926/* end confdefs.h. */
23927
23928#include <string.h>
23929int main() {
23930 double x = 9006104071832581.0;
23931 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23932 return 0;
23933 else
23934 return 1;
23935}
23936
23937_ACEOF
23938rm -f conftest$ac_exeext
23939if { (ac_try="$ac_link"
23940case "(($ac_try" in
23941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23942 *) ac_try_echo=$ac_try;;
23943esac
23944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23945 (eval "$ac_link") 2>&5
23946 ac_status=$?
23947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23948 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23949 { (case "(($ac_try" in
23950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23951 *) ac_try_echo=$ac_try;;
23952esac
23953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23954 (eval "$ac_try") 2>&5
23955 ac_status=$?
23956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23957 (exit $ac_status); }; }; then
23958 ac_cv_mixed_endian_double=yes
23959else
23960 echo "$as_me: program exited with status $ac_status" >&5
23961echo "$as_me: failed program was:" >&5
23962sed 's/^/| /' conftest.$ac_ext >&5
23963
23964( exit $ac_status )
23965ac_cv_mixed_endian_double=no
23966fi
23967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23968fi
23969
23970
23971fi
23972
23973{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23974echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
23975if test "$ac_cv_mixed_endian_double" = yes
23976then
23977
23978cat >>confdefs.h <<\_ACEOF
23979#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23980_ACEOF
23981
23982fi
23983
23984# The short float repr introduced in Python 3.1 requires the
23985# correctly-rounded string <-> double conversion functions from
23986# Python/dtoa.c, which in turn require that the FPU uses 53-bit
23987# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000023988# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023989# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000023990
23991# This inline assembler syntax may also work for suncc and icc,
23992# so we try it on all platforms.
23993
23994{ 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 +000023995echo $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 +000023996cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023997/* confdefs.h. */
23998_ACEOF
23999cat confdefs.h >>conftest.$ac_ext
24000cat >>conftest.$ac_ext <<_ACEOF
24001/* end confdefs.h. */
24002
24003int
24004main ()
24005{
24006
Mark Dickinsona548dee2009-11-15 13:12:43 +000024007 unsigned short cw;
24008 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24009 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024010
24011 ;
24012 return 0;
24013}
24014_ACEOF
24015rm -f conftest.$ac_objext
24016if { (ac_try="$ac_compile"
24017case "(($ac_try" in
24018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24019 *) ac_try_echo=$ac_try;;
24020esac
24021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24022 (eval "$ac_compile") 2>conftest.er1
24023 ac_status=$?
24024 grep -v '^ *+' conftest.er1 >conftest.err
24025 rm -f conftest.er1
24026 cat conftest.err >&5
24027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24028 (exit $ac_status); } && {
24029 test -z "$ac_c_werror_flag" ||
24030 test ! -s conftest.err
24031 } && test -s conftest.$ac_objext; then
24032 have_gcc_asm_for_x87=yes
24033else
24034 echo "$as_me: failed program was:" >&5
24035sed 's/^/| /' conftest.$ac_ext >&5
24036
24037 have_gcc_asm_for_x87=no
24038fi
24039
24040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024041{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024042echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024043if test "$have_gcc_asm_for_x87" = yes
24044then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024045
24046cat >>confdefs.h <<\_ACEOF
24047#define HAVE_GCC_ASM_FOR_X87 1
24048_ACEOF
24049
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024050fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024051
Mark Dickinson04b27232009-01-04 12:29:36 +000024052# Detect whether system arithmetic is subject to x87-style double
24053# rounding issues. The result of this test has little meaning on non
24054# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24055# mode is round-to-nearest and double rounding issues are present, and
24056# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024057{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24058echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024059# $BASECFLAGS may affect the result
24060ac_save_cc="$CC"
24061CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024062if test "$cross_compiling" = yes; then
24063 ac_cv_x87_double_rounding=no
24064else
24065 cat >conftest.$ac_ext <<_ACEOF
24066/* confdefs.h. */
24067_ACEOF
24068cat confdefs.h >>conftest.$ac_ext
24069cat >>conftest.$ac_ext <<_ACEOF
24070/* end confdefs.h. */
24071
24072#include <stdlib.h>
24073#include <math.h>
24074int main() {
24075 volatile double x, y, z;
24076 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24077 x = 0.99999999999999989; /* 1-2**-53 */
24078 y = 1./x;
24079 if (y != 1.)
24080 exit(0);
24081 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24082 x = 1e16;
24083 y = 2.99999;
24084 z = x + y;
24085 if (z != 1e16+4.)
24086 exit(0);
24087 /* both tests show evidence of double rounding */
24088 exit(1);
24089}
24090
24091_ACEOF
24092rm -f conftest$ac_exeext
24093if { (ac_try="$ac_link"
24094case "(($ac_try" in
24095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24096 *) ac_try_echo=$ac_try;;
24097esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024099 (eval "$ac_link") 2>&5
24100 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024102 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24103 { (case "(($ac_try" in
24104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24105 *) ac_try_echo=$ac_try;;
24106esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024108 (eval "$ac_try") 2>&5
24109 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024111 (exit $ac_status); }; }; then
24112 ac_cv_x87_double_rounding=no
24113else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024114 echo "$as_me: program exited with status $ac_status" >&5
24115echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024116sed 's/^/| /' conftest.$ac_ext >&5
24117
24118( exit $ac_status )
24119ac_cv_x87_double_rounding=yes
24120fi
24121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24122fi
24123
24124
Mark Dickinson99abd142009-10-24 13:44:16 +000024125CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024126{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24127echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024128if test "$ac_cv_x87_double_rounding" = yes
24129then
24130
24131cat >>confdefs.h <<\_ACEOF
24132#define X87_DOUBLE_ROUNDING 1
24133_ACEOF
24134
24135fi
24136
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024137# ************************************
24138# * Check for mathematical functions *
24139# ************************************
24140
24141LIBS_SAVE=$LIBS
24142LIBS="$LIBS $LIBM"
24143
Mark Dickinson265d7382008-04-21 22:32:24 +000024144# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24145# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024146{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24147echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024148if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024149 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024150else
24151
24152if test "$cross_compiling" = yes; then
24153 ac_cv_tanh_preserves_zero_sign=no
24154else
24155 cat >conftest.$ac_ext <<_ACEOF
24156/* confdefs.h. */
24157_ACEOF
24158cat confdefs.h >>conftest.$ac_ext
24159cat >>conftest.$ac_ext <<_ACEOF
24160/* end confdefs.h. */
24161
24162#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024163#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024164int main() {
24165 /* return 0 if either negative zeros don't exist
24166 on this platform or if negative zeros exist
24167 and tanh(-0.) == -0. */
24168 if (atan2(0., -1.) == atan2(-0., -1.) ||
24169 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24170 else exit(1);
24171}
24172
24173_ACEOF
24174rm -f conftest$ac_exeext
24175if { (ac_try="$ac_link"
24176case "(($ac_try" in
24177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24178 *) ac_try_echo=$ac_try;;
24179esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024181 (eval "$ac_link") 2>&5
24182 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024184 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24185 { (case "(($ac_try" in
24186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24187 *) ac_try_echo=$ac_try;;
24188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024190 (eval "$ac_try") 2>&5
24191 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024193 (exit $ac_status); }; }; then
24194 ac_cv_tanh_preserves_zero_sign=yes
24195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024196 echo "$as_me: program exited with status $ac_status" >&5
24197echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024198sed 's/^/| /' conftest.$ac_ext >&5
24199
24200( exit $ac_status )
24201ac_cv_tanh_preserves_zero_sign=no
24202fi
24203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24204fi
24205
24206
24207fi
24208
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024209{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24210echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024211if test "$ac_cv_tanh_preserves_zero_sign" = yes
24212then
24213
24214cat >>confdefs.h <<\_ACEOF
24215#define TANH_PRESERVES_ZERO_SIGN 1
24216_ACEOF
24217
24218fi
24219
Martin v. Löwis11437992002-04-12 09:54:03 +000024220
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024221
Michael W. Hudson54241132001-12-07 15:38:26 +000024222
Christian Heimes0a8143f2007-12-18 23:22:54 +000024223
24224
24225
24226
24227
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024228
Mark Dickinson65898e02009-09-05 10:27:00 +000024229for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24230do
24231as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24232{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24233echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24234if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24235 echo $ECHO_N "(cached) $ECHO_C" >&6
24236else
24237 cat >conftest.$ac_ext <<_ACEOF
24238/* confdefs.h. */
24239_ACEOF
24240cat confdefs.h >>conftest.$ac_ext
24241cat >>conftest.$ac_ext <<_ACEOF
24242/* end confdefs.h. */
24243/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24244 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24245#define $ac_func innocuous_$ac_func
24246
24247/* System header to define __stub macros and hopefully few prototypes,
24248 which can conflict with char $ac_func (); below.
24249 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24250 <limits.h> exists even on freestanding compilers. */
24251
24252#ifdef __STDC__
24253# include <limits.h>
24254#else
24255# include <assert.h>
24256#endif
24257
24258#undef $ac_func
24259
24260/* Override any GCC internal prototype to avoid an error.
24261 Use char because int might match the return type of a GCC
24262 builtin and then its argument prototype would still apply. */
24263#ifdef __cplusplus
24264extern "C"
24265#endif
24266char $ac_func ();
24267/* The GNU C library defines this for functions which it implements
24268 to always fail with ENOSYS. Some functions are actually named
24269 something starting with __ and the normal name is an alias. */
24270#if defined __stub_$ac_func || defined __stub___$ac_func
24271choke me
24272#endif
24273
24274int
24275main ()
24276{
24277return $ac_func ();
24278 ;
24279 return 0;
24280}
24281_ACEOF
24282rm -f conftest.$ac_objext conftest$ac_exeext
24283if { (ac_try="$ac_link"
24284case "(($ac_try" in
24285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24286 *) ac_try_echo=$ac_try;;
24287esac
24288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24289 (eval "$ac_link") 2>conftest.er1
24290 ac_status=$?
24291 grep -v '^ *+' conftest.er1 >conftest.err
24292 rm -f conftest.er1
24293 cat conftest.err >&5
24294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24295 (exit $ac_status); } && {
24296 test -z "$ac_c_werror_flag" ||
24297 test ! -s conftest.err
24298 } && test -s conftest$ac_exeext &&
24299 $as_test_x conftest$ac_exeext; then
24300 eval "$as_ac_var=yes"
24301else
24302 echo "$as_me: failed program was:" >&5
24303sed 's/^/| /' conftest.$ac_ext >&5
24304
24305 eval "$as_ac_var=no"
24306fi
24307
24308rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24309 conftest$ac_exeext conftest.$ac_ext
24310fi
24311ac_res=`eval echo '${'$as_ac_var'}'`
24312 { echo "$as_me:$LINENO: result: $ac_res" >&5
24313echo "${ECHO_T}$ac_res" >&6; }
24314if test `eval echo '${'$as_ac_var'}'` = yes; then
24315 cat >>confdefs.h <<_ACEOF
24316#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24317_ACEOF
24318
24319fi
24320done
24321
24322
24323
24324
24325
24326
24327for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024328do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024329as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24330{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24331echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024332if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024333 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024334else
24335 cat >conftest.$ac_ext <<_ACEOF
24336/* confdefs.h. */
24337_ACEOF
24338cat confdefs.h >>conftest.$ac_ext
24339cat >>conftest.$ac_ext <<_ACEOF
24340/* end confdefs.h. */
24341/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24342 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24343#define $ac_func innocuous_$ac_func
24344
24345/* System header to define __stub macros and hopefully few prototypes,
24346 which can conflict with char $ac_func (); below.
24347 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24348 <limits.h> exists even on freestanding compilers. */
24349
24350#ifdef __STDC__
24351# include <limits.h>
24352#else
24353# include <assert.h>
24354#endif
24355
24356#undef $ac_func
24357
24358/* Override any GCC internal prototype to avoid an error.
24359 Use char because int might match the return type of a GCC
24360 builtin and then its argument prototype would still apply. */
24361#ifdef __cplusplus
24362extern "C"
24363#endif
24364char $ac_func ();
24365/* The GNU C library defines this for functions which it implements
24366 to always fail with ENOSYS. Some functions are actually named
24367 something starting with __ and the normal name is an alias. */
24368#if defined __stub_$ac_func || defined __stub___$ac_func
24369choke me
24370#endif
24371
24372int
24373main ()
24374{
24375return $ac_func ();
24376 ;
24377 return 0;
24378}
24379_ACEOF
24380rm -f conftest.$ac_objext conftest$ac_exeext
24381if { (ac_try="$ac_link"
24382case "(($ac_try" in
24383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24384 *) ac_try_echo=$ac_try;;
24385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024387 (eval "$ac_link") 2>conftest.er1
24388 ac_status=$?
24389 grep -v '^ *+' conftest.er1 >conftest.err
24390 rm -f conftest.er1
24391 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024393 (exit $ac_status); } && {
24394 test -z "$ac_c_werror_flag" ||
24395 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024396 } && test -s conftest$ac_exeext &&
24397 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024398 eval "$as_ac_var=yes"
24399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024400 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024401sed 's/^/| /' conftest.$ac_ext >&5
24402
24403 eval "$as_ac_var=no"
24404fi
24405
24406rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24407 conftest$ac_exeext conftest.$ac_ext
24408fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024409ac_res=`eval echo '${'$as_ac_var'}'`
24410 { echo "$as_me:$LINENO: result: $ac_res" >&5
24411echo "${ECHO_T}$ac_res" >&6; }
24412if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024413 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024414#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024415_ACEOF
24416
24417fi
24418done
24419
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024420{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24421echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024422if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024423 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024424else
24425 cat >conftest.$ac_ext <<_ACEOF
24426/* confdefs.h. */
24427_ACEOF
24428cat confdefs.h >>conftest.$ac_ext
24429cat >>conftest.$ac_ext <<_ACEOF
24430/* end confdefs.h. */
24431#include <math.h>
24432
24433int
24434main ()
24435{
24436#ifndef isinf
24437 (void) isinf;
24438#endif
24439
24440 ;
24441 return 0;
24442}
24443_ACEOF
24444rm -f conftest.$ac_objext
24445if { (ac_try="$ac_compile"
24446case "(($ac_try" in
24447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24448 *) ac_try_echo=$ac_try;;
24449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024451 (eval "$ac_compile") 2>conftest.er1
24452 ac_status=$?
24453 grep -v '^ *+' conftest.er1 >conftest.err
24454 rm -f conftest.er1
24455 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024457 (exit $ac_status); } && {
24458 test -z "$ac_c_werror_flag" ||
24459 test ! -s conftest.err
24460 } && test -s conftest.$ac_objext; then
24461 ac_cv_have_decl_isinf=yes
24462else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024463 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024464sed 's/^/| /' conftest.$ac_ext >&5
24465
24466 ac_cv_have_decl_isinf=no
24467fi
24468
24469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24470fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024471{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24472echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24473if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024474
24475cat >>confdefs.h <<_ACEOF
24476#define HAVE_DECL_ISINF 1
24477_ACEOF
24478
24479
24480else
24481 cat >>confdefs.h <<_ACEOF
24482#define HAVE_DECL_ISINF 0
24483_ACEOF
24484
24485
24486fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024487{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24488echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024489if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024490 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024491else
24492 cat >conftest.$ac_ext <<_ACEOF
24493/* confdefs.h. */
24494_ACEOF
24495cat confdefs.h >>conftest.$ac_ext
24496cat >>conftest.$ac_ext <<_ACEOF
24497/* end confdefs.h. */
24498#include <math.h>
24499
24500int
24501main ()
24502{
24503#ifndef isnan
24504 (void) isnan;
24505#endif
24506
24507 ;
24508 return 0;
24509}
24510_ACEOF
24511rm -f conftest.$ac_objext
24512if { (ac_try="$ac_compile"
24513case "(($ac_try" in
24514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24515 *) ac_try_echo=$ac_try;;
24516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024518 (eval "$ac_compile") 2>conftest.er1
24519 ac_status=$?
24520 grep -v '^ *+' conftest.er1 >conftest.err
24521 rm -f conftest.er1
24522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024524 (exit $ac_status); } && {
24525 test -z "$ac_c_werror_flag" ||
24526 test ! -s conftest.err
24527 } && test -s conftest.$ac_objext; then
24528 ac_cv_have_decl_isnan=yes
24529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024530 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024531sed 's/^/| /' conftest.$ac_ext >&5
24532
24533 ac_cv_have_decl_isnan=no
24534fi
24535
24536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24537fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024538{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24539echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24540if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024541
24542cat >>confdefs.h <<_ACEOF
24543#define HAVE_DECL_ISNAN 1
24544_ACEOF
24545
24546
24547else
24548 cat >>confdefs.h <<_ACEOF
24549#define HAVE_DECL_ISNAN 0
24550_ACEOF
24551
24552
24553fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024554{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24555echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024556if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024557 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024558else
24559 cat >conftest.$ac_ext <<_ACEOF
24560/* confdefs.h. */
24561_ACEOF
24562cat confdefs.h >>conftest.$ac_ext
24563cat >>conftest.$ac_ext <<_ACEOF
24564/* end confdefs.h. */
24565#include <math.h>
24566
24567int
24568main ()
24569{
24570#ifndef isfinite
24571 (void) isfinite;
24572#endif
24573
24574 ;
24575 return 0;
24576}
24577_ACEOF
24578rm -f conftest.$ac_objext
24579if { (ac_try="$ac_compile"
24580case "(($ac_try" in
24581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24582 *) ac_try_echo=$ac_try;;
24583esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024585 (eval "$ac_compile") 2>conftest.er1
24586 ac_status=$?
24587 grep -v '^ *+' conftest.er1 >conftest.err
24588 rm -f conftest.er1
24589 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024591 (exit $ac_status); } && {
24592 test -z "$ac_c_werror_flag" ||
24593 test ! -s conftest.err
24594 } && test -s conftest.$ac_objext; then
24595 ac_cv_have_decl_isfinite=yes
24596else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024597 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024598sed 's/^/| /' conftest.$ac_ext >&5
24599
24600 ac_cv_have_decl_isfinite=no
24601fi
24602
24603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24604fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024605{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24606echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24607if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024608
24609cat >>confdefs.h <<_ACEOF
24610#define HAVE_DECL_ISFINITE 1
24611_ACEOF
24612
24613
24614else
24615 cat >>confdefs.h <<_ACEOF
24616#define HAVE_DECL_ISFINITE 0
24617_ACEOF
24618
24619
24620fi
24621
24622
Christian Heimes0a8143f2007-12-18 23:22:54 +000024623
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024624LIBS=$LIBS_SAVE
24625
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024626# For multiprocessing module, check that sem_open
24627# actually works. For FreeBSD versions <= 7.2,
24628# the kernel module that provides POSIX semaphores
24629# isn't loaded by default, so an attempt to call
24630# sem_open results in a 'Signal 12' error.
24631{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24632echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24633if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24634 echo $ECHO_N "(cached) $ECHO_C" >&6
24635else
24636 if test "$cross_compiling" = yes; then
24637 ac_cv_posix_semaphores_enabled=yes
24638else
24639 cat >conftest.$ac_ext <<_ACEOF
24640/* confdefs.h. */
24641_ACEOF
24642cat confdefs.h >>conftest.$ac_ext
24643cat >>conftest.$ac_ext <<_ACEOF
24644/* end confdefs.h. */
24645
24646#include <unistd.h>
24647#include <fcntl.h>
24648#include <stdio.h>
24649#include <semaphore.h>
24650#include <sys/stat.h>
24651
24652int main(void) {
24653 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24654 if (a == SEM_FAILED) {
24655 perror("sem_open");
24656 return 1;
24657 }
24658 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024659 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024660 return 0;
24661}
24662
24663_ACEOF
24664rm -f conftest$ac_exeext
24665if { (ac_try="$ac_link"
24666case "(($ac_try" in
24667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24668 *) ac_try_echo=$ac_try;;
24669esac
24670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24671 (eval "$ac_link") 2>&5
24672 ac_status=$?
24673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24674 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24675 { (case "(($ac_try" in
24676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24677 *) ac_try_echo=$ac_try;;
24678esac
24679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24680 (eval "$ac_try") 2>&5
24681 ac_status=$?
24682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24683 (exit $ac_status); }; }; then
24684 ac_cv_posix_semaphores_enabled=yes
24685else
24686 echo "$as_me: program exited with status $ac_status" >&5
24687echo "$as_me: failed program was:" >&5
24688sed 's/^/| /' conftest.$ac_ext >&5
24689
24690( exit $ac_status )
24691ac_cv_posix_semaphores_enabled=no
24692fi
24693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24694fi
24695
24696
24697
24698fi
24699
24700{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24701echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24702if test $ac_cv_posix_semaphores_enabled = no
24703then
24704
24705cat >>confdefs.h <<\_ACEOF
24706#define POSIX_SEMAPHORES_NOT_ENABLED 1
24707_ACEOF
24708
24709fi
24710
24711# Multiprocessing check for broken sem_getvalue
24712{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24713echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24714if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24715 echo $ECHO_N "(cached) $ECHO_C" >&6
24716else
24717 if test "$cross_compiling" = yes; then
24718 ac_cv_broken_sem_getvalue=yes
24719else
24720 cat >conftest.$ac_ext <<_ACEOF
24721/* confdefs.h. */
24722_ACEOF
24723cat confdefs.h >>conftest.$ac_ext
24724cat >>conftest.$ac_ext <<_ACEOF
24725/* end confdefs.h. */
24726
24727#include <unistd.h>
24728#include <fcntl.h>
24729#include <stdio.h>
24730#include <semaphore.h>
24731#include <sys/stat.h>
24732
24733int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024734 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024735 int count;
24736 int res;
24737 if(a==SEM_FAILED){
24738 perror("sem_open");
24739 return 1;
24740
24741 }
24742 res = sem_getvalue(a, &count);
24743 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024744 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024745 return res==-1 ? 1 : 0;
24746}
24747
24748_ACEOF
24749rm -f conftest$ac_exeext
24750if { (ac_try="$ac_link"
24751case "(($ac_try" in
24752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24753 *) ac_try_echo=$ac_try;;
24754esac
24755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24756 (eval "$ac_link") 2>&5
24757 ac_status=$?
24758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24759 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24760 { (case "(($ac_try" in
24761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24762 *) ac_try_echo=$ac_try;;
24763esac
24764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24765 (eval "$ac_try") 2>&5
24766 ac_status=$?
24767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24768 (exit $ac_status); }; }; then
24769 ac_cv_broken_sem_getvalue=no
24770else
24771 echo "$as_me: program exited with status $ac_status" >&5
24772echo "$as_me: failed program was:" >&5
24773sed 's/^/| /' conftest.$ac_ext >&5
24774
24775( exit $ac_status )
24776ac_cv_broken_sem_getvalue=yes
24777fi
24778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24779fi
24780
24781
24782
24783fi
24784
24785{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24786echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24787if test $ac_cv_broken_sem_getvalue = yes
24788then
24789
24790cat >>confdefs.h <<\_ACEOF
24791#define HAVE_BROKEN_SEM_GETVALUE 1
24792_ACEOF
24793
24794fi
24795
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024796# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024797{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24798echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024799# Check whether --enable-big-digits was given.
24800if test "${enable_big_digits+set}" = set; then
24801 enableval=$enable_big_digits; case $enable_big_digits in
24802yes)
24803 enable_big_digits=30 ;;
24804no)
24805 enable_big_digits=15 ;;
2480615|30)
24807 ;;
24808*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024809 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24810echo "$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 +000024811 { (exit 1); exit 1; }; } ;;
24812esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024813{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24814echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024815
24816cat >>confdefs.h <<_ACEOF
24817#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24818_ACEOF
24819
24820
24821else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024822 { echo "$as_me:$LINENO: result: no value specified" >&5
24823echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024824fi
24825
24826
Guido van Rossumef2255b2000-03-10 22:30:29 +000024827# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024828if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024829 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24830echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024831if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024832 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024833fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024834{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24835echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024836else
Martin v. Löwis11437992002-04-12 09:54:03 +000024837 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024838{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24839echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024840cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024841/* confdefs.h. */
24842_ACEOF
24843cat confdefs.h >>conftest.$ac_ext
24844cat >>conftest.$ac_ext <<_ACEOF
24845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024846$ac_includes_default
24847#include <wchar.h>
24848_ACEOF
24849rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024850if { (ac_try="$ac_compile"
24851case "(($ac_try" in
24852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24853 *) ac_try_echo=$ac_try;;
24854esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024858 grep -v '^ *+' conftest.er1 >conftest.err
24859 rm -f conftest.er1
24860 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024862 (exit $ac_status); } && {
24863 test -z "$ac_c_werror_flag" ||
24864 test ! -s conftest.err
24865 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024866 ac_header_compiler=yes
24867else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024869sed 's/^/| /' conftest.$ac_ext >&5
24870
Martin v. Löwiseba40652007-08-30 20:10:57 +000024871 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024873
24874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024875{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24876echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024877
24878# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024879{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24880echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024881cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024882/* confdefs.h. */
24883_ACEOF
24884cat confdefs.h >>conftest.$ac_ext
24885cat >>conftest.$ac_ext <<_ACEOF
24886/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024887#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024888_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889if { (ac_try="$ac_cpp conftest.$ac_ext"
24890case "(($ac_try" in
24891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24892 *) ac_try_echo=$ac_try;;
24893esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024895 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024896 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024897 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024898 rm -f conftest.er1
24899 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024901 (exit $ac_status); } >/dev/null && {
24902 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24903 test ! -s conftest.err
24904 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024905 ac_header_preproc=yes
24906else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024908sed 's/^/| /' conftest.$ac_ext >&5
24909
Martin v. Löwis11437992002-04-12 09:54:03 +000024910 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024912
Martin v. Löwis11437992002-04-12 09:54:03 +000024913rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024914{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24915echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024916
24917# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024918case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24919 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024920 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24921echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24922 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24923echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024924 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024925 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024926 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024927 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24928echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24929 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24930echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24931 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24932echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24933 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24934echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24935 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24936echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24937 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24938echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024939 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024940## -------------------------------------- ##
24941## Report this to http://bugs.python.org/ ##
24942## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024943_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024944 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024945 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024947{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24948echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024949if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024950 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024951else
24952 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024953fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024954{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24955echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024956
24957fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024958if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024959
24960
24961cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024962#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024963_ACEOF
24964
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024965 wchar_h="yes"
24966
Guido van Rossumef2255b2000-03-10 22:30:29 +000024967else
Martin v. Löwis11437992002-04-12 09:54:03 +000024968 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024969
24970fi
24971
Michael W. Hudson54241132001-12-07 15:38:26 +000024972
Martin v. Löwis11437992002-04-12 09:54:03 +000024973
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024974# determine wchar_t size
24975if test "$wchar_h" = yes
24976then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024977 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24978echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24979if test "${ac_cv_type_wchar_t+set}" = set; then
24980 echo $ECHO_N "(cached) $ECHO_C" >&6
24981else
24982 cat >conftest.$ac_ext <<_ACEOF
24983/* confdefs.h. */
24984_ACEOF
24985cat confdefs.h >>conftest.$ac_ext
24986cat >>conftest.$ac_ext <<_ACEOF
24987/* end confdefs.h. */
24988#include <wchar.h>
24989
24990typedef wchar_t ac__type_new_;
24991int
24992main ()
24993{
24994if ((ac__type_new_ *) 0)
24995 return 0;
24996if (sizeof (ac__type_new_))
24997 return 0;
24998 ;
24999 return 0;
25000}
25001_ACEOF
25002rm -f conftest.$ac_objext
25003if { (ac_try="$ac_compile"
25004case "(($ac_try" in
25005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25006 *) ac_try_echo=$ac_try;;
25007esac
25008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25009 (eval "$ac_compile") 2>conftest.er1
25010 ac_status=$?
25011 grep -v '^ *+' conftest.er1 >conftest.err
25012 rm -f conftest.er1
25013 cat conftest.err >&5
25014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25015 (exit $ac_status); } && {
25016 test -z "$ac_c_werror_flag" ||
25017 test ! -s conftest.err
25018 } && test -s conftest.$ac_objext; then
25019 ac_cv_type_wchar_t=yes
25020else
25021 echo "$as_me: failed program was:" >&5
25022sed 's/^/| /' conftest.$ac_ext >&5
25023
25024 ac_cv_type_wchar_t=no
25025fi
25026
25027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25028fi
25029{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25030echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25031
25032# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025033# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25034# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25035# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025036{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25037echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025038if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025039 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025040else
Martin v. Löwis11437992002-04-12 09:54:03 +000025041 if test "$cross_compiling" = yes; then
25042 # Depending upon the size, compute the lo and hi bounds.
25043cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025044/* confdefs.h. */
25045_ACEOF
25046cat confdefs.h >>conftest.$ac_ext
25047cat >>conftest.$ac_ext <<_ACEOF
25048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025049#include <wchar.h>
25050
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025051 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025052int
25053main ()
25054{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025055static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025056test_array [0] = 0
25057
25058 ;
25059 return 0;
25060}
25061_ACEOF
25062rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025063if { (ac_try="$ac_compile"
25064case "(($ac_try" in
25065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25066 *) ac_try_echo=$ac_try;;
25067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025071 grep -v '^ *+' conftest.er1 >conftest.err
25072 rm -f conftest.er1
25073 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025075 (exit $ac_status); } && {
25076 test -z "$ac_c_werror_flag" ||
25077 test ! -s conftest.err
25078 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025079 ac_lo=0 ac_mid=0
25080 while :; do
25081 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_))) <= $ac_mid)];
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=$ac_mid; break
25118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025120sed 's/^/| /' conftest.$ac_ext >&5
25121
Martin v. Löwiseba40652007-08-30 20:10:57 +000025122 ac_lo=`expr $ac_mid + 1`
25123 if test $ac_lo -le $ac_mid; then
25124 ac_lo= ac_hi=
25125 break
25126 fi
25127 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025129
25130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025131 done
25132else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025134sed 's/^/| /' conftest.$ac_ext >&5
25135
Martin v. Löwiseba40652007-08-30 20:10:57 +000025136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025137/* confdefs.h. */
25138_ACEOF
25139cat confdefs.h >>conftest.$ac_ext
25140cat >>conftest.$ac_ext <<_ACEOF
25141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025142#include <wchar.h>
25143
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025144 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025145int
25146main ()
25147{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025148static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025149test_array [0] = 0
25150
25151 ;
25152 return 0;
25153}
25154_ACEOF
25155rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025156if { (ac_try="$ac_compile"
25157case "(($ac_try" in
25158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25159 *) ac_try_echo=$ac_try;;
25160esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025164 grep -v '^ *+' conftest.er1 >conftest.err
25165 rm -f conftest.er1
25166 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025168 (exit $ac_status); } && {
25169 test -z "$ac_c_werror_flag" ||
25170 test ! -s conftest.err
25171 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025172 ac_hi=-1 ac_mid=-1
25173 while :; do
25174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025175/* confdefs.h. */
25176_ACEOF
25177cat confdefs.h >>conftest.$ac_ext
25178cat >>conftest.$ac_ext <<_ACEOF
25179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025180#include <wchar.h>
25181
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025182 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025183int
25184main ()
25185{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025186static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025187test_array [0] = 0
25188
25189 ;
25190 return 0;
25191}
25192_ACEOF
25193rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025194if { (ac_try="$ac_compile"
25195case "(($ac_try" in
25196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25197 *) ac_try_echo=$ac_try;;
25198esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025202 grep -v '^ *+' conftest.er1 >conftest.err
25203 rm -f conftest.er1
25204 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025206 (exit $ac_status); } && {
25207 test -z "$ac_c_werror_flag" ||
25208 test ! -s conftest.err
25209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025210 ac_lo=$ac_mid; break
25211else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025213sed 's/^/| /' conftest.$ac_ext >&5
25214
Martin v. Löwiseba40652007-08-30 20:10:57 +000025215 ac_hi=`expr '(' $ac_mid ')' - 1`
25216 if test $ac_mid -le $ac_hi; then
25217 ac_lo= ac_hi=
25218 break
25219 fi
25220 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025222
25223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025224 done
25225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025227sed 's/^/| /' conftest.$ac_ext >&5
25228
Martin v. Löwiseba40652007-08-30 20:10:57 +000025229 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025231
25232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025234
25235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025236# Binary search between lo and hi bounds.
25237while test "x$ac_lo" != "x$ac_hi"; do
25238 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025240/* confdefs.h. */
25241_ACEOF
25242cat confdefs.h >>conftest.$ac_ext
25243cat >>conftest.$ac_ext <<_ACEOF
25244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025245#include <wchar.h>
25246
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025247 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025248int
25249main ()
25250{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025252test_array [0] = 0
25253
25254 ;
25255 return 0;
25256}
25257_ACEOF
25258rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025259if { (ac_try="$ac_compile"
25260case "(($ac_try" in
25261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25262 *) ac_try_echo=$ac_try;;
25263esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025267 grep -v '^ *+' conftest.er1 >conftest.err
25268 rm -f conftest.er1
25269 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025271 (exit $ac_status); } && {
25272 test -z "$ac_c_werror_flag" ||
25273 test ! -s conftest.err
25274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025275 ac_hi=$ac_mid
25276else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025278sed 's/^/| /' conftest.$ac_ext >&5
25279
Martin v. Löwiseba40652007-08-30 20:10:57 +000025280 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025282
25283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025284done
25285case $ac_lo in
25286?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025287'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025288 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025289See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025290echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025291See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025292 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025293 else
25294 ac_cv_sizeof_wchar_t=0
25295 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025296esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025297else
Martin v. Löwis11437992002-04-12 09:54:03 +000025298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025299/* confdefs.h. */
25300_ACEOF
25301cat confdefs.h >>conftest.$ac_ext
25302cat >>conftest.$ac_ext <<_ACEOF
25303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025304#include <wchar.h>
25305
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025306 typedef wchar_t ac__type_sizeof_;
25307static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25308static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025309#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025310#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025311int
25312main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025313{
Martin v. Löwis11437992002-04-12 09:54:03 +000025314
25315 FILE *f = fopen ("conftest.val", "w");
25316 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025317 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025318 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025319 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025320 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025321 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025322 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025323 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025324 }
25325 else
25326 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025327 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025328 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025329 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025330 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025331 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025332 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025333
25334 ;
25335 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025336}
Martin v. Löwis11437992002-04-12 09:54:03 +000025337_ACEOF
25338rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025339if { (ac_try="$ac_link"
25340case "(($ac_try" in
25341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25342 *) ac_try_echo=$ac_try;;
25343esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025345 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025346 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025348 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025349 { (case "(($ac_try" in
25350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25351 *) ac_try_echo=$ac_try;;
25352esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025354 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025355 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025357 (exit $ac_status); }; }; then
25358 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025359else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025360 echo "$as_me: program exited with status $ac_status" >&5
25361echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025362sed 's/^/| /' conftest.$ac_ext >&5
25363
Martin v. Löwis11437992002-04-12 09:54:03 +000025364( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025365if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025366 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025367See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025368echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025369See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025370 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025371 else
25372 ac_cv_sizeof_wchar_t=0
25373 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025375rm -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 +000025376fi
25377rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025378fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025379{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25380echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025381
25382
25383
Martin v. Löwis11437992002-04-12 09:54:03 +000025384cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025385#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025386_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025387
Michael W. Hudson54241132001-12-07 15:38:26 +000025388
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025389fi
25390
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025391{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25392echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025393have_ucs4_tcl=no
25394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025395/* confdefs.h. */
25396_ACEOF
25397cat confdefs.h >>conftest.$ac_ext
25398cat >>conftest.$ac_ext <<_ACEOF
25399/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025400
25401#include <tcl.h>
25402#if TCL_UTF_MAX != 6
25403# error "NOT UCS4_TCL"
25404#endif
25405int
25406main ()
25407{
25408
25409 ;
25410 return 0;
25411}
25412_ACEOF
25413rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025414if { (ac_try="$ac_compile"
25415case "(($ac_try" in
25416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25417 *) ac_try_echo=$ac_try;;
25418esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025422 grep -v '^ *+' conftest.er1 >conftest.err
25423 rm -f conftest.er1
25424 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025426 (exit $ac_status); } && {
25427 test -z "$ac_c_werror_flag" ||
25428 test ! -s conftest.err
25429 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025430
25431
25432cat >>confdefs.h <<\_ACEOF
25433#define HAVE_UCS4_TCL 1
25434_ACEOF
25435
25436 have_ucs4_tcl=yes
25437
25438else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025440sed 's/^/| /' conftest.$ac_ext >&5
25441
Martin v. Löwiseba40652007-08-30 20:10:57 +000025442
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025444
25445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025446{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25447echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025448
Skip Montanaro6dead952003-09-25 14:50:04 +000025449# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025450if test "$wchar_h" = yes
25451then
25452 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025453 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25454echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025455 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025456 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025457else
25458
25459 if test "$cross_compiling" = yes; then
25460 ac_cv_wchar_t_signed=yes
25461else
25462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025463/* confdefs.h. */
25464_ACEOF
25465cat confdefs.h >>conftest.$ac_ext
25466cat >>conftest.$ac_ext <<_ACEOF
25467/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025468
25469 #include <wchar.h>
25470 int main()
25471 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025472 /* Success: exit code 0 */
25473 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025474 }
25475
25476_ACEOF
25477rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025478if { (ac_try="$ac_link"
25479case "(($ac_try" in
25480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25481 *) ac_try_echo=$ac_try;;
25482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025484 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025485 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025487 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025488 { (case "(($ac_try" in
25489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25490 *) ac_try_echo=$ac_try;;
25491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025493 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025494 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025496 (exit $ac_status); }; }; then
25497 ac_cv_wchar_t_signed=yes
25498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025499 echo "$as_me: program exited with status $ac_status" >&5
25500echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025501sed 's/^/| /' conftest.$ac_ext >&5
25502
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025503( exit $ac_status )
25504ac_cv_wchar_t_signed=no
25505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025506rm -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 +000025507fi
25508
Martin v. Löwiseba40652007-08-30 20:10:57 +000025509
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025510fi
25511
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025512 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25513echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025514fi
25515
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025516{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25517echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025518# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025519if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025520 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025521else
25522 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025523fi
25524
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025525
25526if test $enable_unicode = yes
25527then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025528 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025529 case "$have_ucs4_tcl" in
25530 yes) enable_unicode="ucs4"
25531 ;;
25532 *) enable_unicode="ucs2"
25533 ;;
25534 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025535fi
25536
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025537
25538
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025539case "$enable_unicode" in
25540ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025541 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025542#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025543_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025544
25545 ;;
25546ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025547 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025548#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025549_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025550
25551 ;;
25552esac
25553
Michael W. Hudson54241132001-12-07 15:38:26 +000025554
Martin v. Löwis11437992002-04-12 09:54:03 +000025555
25556
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025557
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025558if test "$enable_unicode" = "no"
25559then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025560 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025561 { echo "$as_me:$LINENO: result: not used" >&5
25562echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025563else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025564 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025565
25566cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025567#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025568_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025569
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025570
25571 # wchar_t is only usable if it maps to an unsigned type
25572 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025573 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025574 then
25575 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025576
Martin v. Löwis11437992002-04-12 09:54:03 +000025577cat >>confdefs.h <<\_ACEOF
25578#define HAVE_USABLE_WCHAR_T 1
25579_ACEOF
25580
25581 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025582#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025583_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025584
25585 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25586 then
25587 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025588 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025589#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025590_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025591
25592 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25593 then
25594 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025595 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025596#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025597_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025598
25599 else
25600 PY_UNICODE_TYPE="no type found"
25601 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025602 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25603echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025604fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025605
25606# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025607{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25608echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025609if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025610 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025612 # See if sys/param.h defines the BYTE_ORDER macro.
25613cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025614/* confdefs.h. */
25615_ACEOF
25616cat confdefs.h >>conftest.$ac_ext
25617cat >>conftest.$ac_ext <<_ACEOF
25618/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025619#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025620#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025621
Martin v. Löwis11437992002-04-12 09:54:03 +000025622int
25623main ()
25624{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025625#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25626 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25627 bogus endian macros
25628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025629
25630 ;
25631 return 0;
25632}
25633_ACEOF
25634rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025635if { (ac_try="$ac_compile"
25636case "(($ac_try" in
25637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25638 *) ac_try_echo=$ac_try;;
25639esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025643 grep -v '^ *+' conftest.er1 >conftest.err
25644 rm -f conftest.er1
25645 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025647 (exit $ac_status); } && {
25648 test -z "$ac_c_werror_flag" ||
25649 test ! -s conftest.err
25650 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025651 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025653/* confdefs.h. */
25654_ACEOF
25655cat confdefs.h >>conftest.$ac_ext
25656cat >>conftest.$ac_ext <<_ACEOF
25657/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025658#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025659#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025660
Martin v. Löwis11437992002-04-12 09:54:03 +000025661int
25662main ()
25663{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025664#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025665 not big endian
25666#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025667
25668 ;
25669 return 0;
25670}
25671_ACEOF
25672rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025673if { (ac_try="$ac_compile"
25674case "(($ac_try" in
25675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25676 *) ac_try_echo=$ac_try;;
25677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025681 grep -v '^ *+' conftest.er1 >conftest.err
25682 rm -f conftest.er1
25683 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025685 (exit $ac_status); } && {
25686 test -z "$ac_c_werror_flag" ||
25687 test ! -s conftest.err
25688 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025689 ac_cv_c_bigendian=yes
25690else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025692sed 's/^/| /' conftest.$ac_ext >&5
25693
Martin v. Löwiseba40652007-08-30 20:10:57 +000025694 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025696
25697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025698else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025700sed 's/^/| /' conftest.$ac_ext >&5
25701
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025702 # It does not; compile a test program.
25703if test "$cross_compiling" = yes; then
25704 # try to guess the endianness by grepping values into an object file
25705 ac_cv_c_bigendian=unknown
25706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025707/* confdefs.h. */
25708_ACEOF
25709cat confdefs.h >>conftest.$ac_ext
25710cat >>conftest.$ac_ext <<_ACEOF
25711/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025712short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25713short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25714void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25715short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25716short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25717void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025718int
25719main ()
25720{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025721 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025722 ;
25723 return 0;
25724}
25725_ACEOF
25726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025727if { (ac_try="$ac_compile"
25728case "(($ac_try" in
25729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25730 *) ac_try_echo=$ac_try;;
25731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025735 grep -v '^ *+' conftest.er1 >conftest.err
25736 rm -f conftest.er1
25737 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025739 (exit $ac_status); } && {
25740 test -z "$ac_c_werror_flag" ||
25741 test ! -s conftest.err
25742 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025743 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025744 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025745fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025746if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25747 if test "$ac_cv_c_bigendian" = unknown; then
25748 ac_cv_c_bigendian=no
25749 else
25750 # finding both strings is unlikely to happen, but who knows?
25751 ac_cv_c_bigendian=unknown
25752 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025753fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025754else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025756sed 's/^/| /' conftest.$ac_ext >&5
25757
Martin v. Löwiseba40652007-08-30 20:10:57 +000025758
Martin v. Löwis11437992002-04-12 09:54:03 +000025759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025760
25761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025762else
25763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025764/* confdefs.h. */
25765_ACEOF
25766cat confdefs.h >>conftest.$ac_ext
25767cat >>conftest.$ac_ext <<_ACEOF
25768/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025769$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025770int
25771main ()
25772{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025773
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025774 /* Are we little or big endian? From Harbison&Steele. */
25775 union
25776 {
25777 long int l;
25778 char c[sizeof (long int)];
25779 } u;
25780 u.l = 1;
25781 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025782
25783 ;
25784 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025785}
Martin v. Löwis11437992002-04-12 09:54:03 +000025786_ACEOF
25787rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025788if { (ac_try="$ac_link"
25789case "(($ac_try" in
25790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25791 *) ac_try_echo=$ac_try;;
25792esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025794 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025795 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025797 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025798 { (case "(($ac_try" in
25799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25800 *) ac_try_echo=$ac_try;;
25801esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025803 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025804 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025806 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025807 ac_cv_c_bigendian=no
25808else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025809 echo "$as_me: program exited with status $ac_status" >&5
25810echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025811sed 's/^/| /' conftest.$ac_ext >&5
25812
Martin v. Löwis11437992002-04-12 09:54:03 +000025813( exit $ac_status )
25814ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025816rm -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 +000025817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025818
25819
Martin v. Löwis11437992002-04-12 09:54:03 +000025820fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025821
25822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25823fi
25824{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25825echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25826case $ac_cv_c_bigendian in
25827 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025828
25829cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025830#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025831_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025832 ;;
25833 no)
25834 ;;
25835 *)
25836 { { echo "$as_me:$LINENO: error: unknown endianness
25837presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25838echo "$as_me: error: unknown endianness
25839presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025840 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025841esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025842
Michael W. Hudson54241132001-12-07 15:38:26 +000025843
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025844# Check whether right shifting a negative integer extends the sign bit
25845# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025846{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25847echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025848if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025849 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025850else
Martin v. Löwis11437992002-04-12 09:54:03 +000025851
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025852if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025853 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025854else
Martin v. Löwis11437992002-04-12 09:54:03 +000025855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025856/* confdefs.h. */
25857_ACEOF
25858cat confdefs.h >>conftest.$ac_ext
25859cat >>conftest.$ac_ext <<_ACEOF
25860/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025861
25862int main()
25863{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025864 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025865}
25866
Martin v. Löwis11437992002-04-12 09:54:03 +000025867_ACEOF
25868rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025869if { (ac_try="$ac_link"
25870case "(($ac_try" in
25871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25872 *) ac_try_echo=$ac_try;;
25873esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025875 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025876 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025878 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025879 { (case "(($ac_try" in
25880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25881 *) ac_try_echo=$ac_try;;
25882esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025884 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025885 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025887 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025888 ac_cv_rshift_extends_sign=yes
25889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025890 echo "$as_me: program exited with status $ac_status" >&5
25891echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025892sed 's/^/| /' conftest.$ac_ext >&5
25893
Martin v. Löwis11437992002-04-12 09:54:03 +000025894( exit $ac_status )
25895ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025897rm -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 +000025898fi
25899
Martin v. Löwiseba40652007-08-30 20:10:57 +000025900
25901fi
25902
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025903{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25904echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025905if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025906then
Martin v. Löwis11437992002-04-12 09:54:03 +000025907
25908cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025909#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025910_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025911
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025912fi
25913
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025914# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025915{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25916echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025917if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025918 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025919else
Martin v. Löwis11437992002-04-12 09:54:03 +000025920
25921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025922/* confdefs.h. */
25923_ACEOF
25924cat confdefs.h >>conftest.$ac_ext
25925cat >>conftest.$ac_ext <<_ACEOF
25926/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025927#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025928int
25929main ()
25930{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025931
25932 FILE *f = fopen("/dev/null", "r");
25933 flockfile(f);
25934 getc_unlocked(f);
25935 funlockfile(f);
25936
Martin v. Löwis11437992002-04-12 09:54:03 +000025937 ;
25938 return 0;
25939}
25940_ACEOF
25941rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025942if { (ac_try="$ac_link"
25943case "(($ac_try" in
25944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25945 *) ac_try_echo=$ac_try;;
25946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025948 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025950 grep -v '^ *+' conftest.er1 >conftest.err
25951 rm -f conftest.er1
25952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025954 (exit $ac_status); } && {
25955 test -z "$ac_c_werror_flag" ||
25956 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025957 } && test -s conftest$ac_exeext &&
25958 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025959 ac_cv_have_getc_unlocked=yes
25960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025962sed 's/^/| /' conftest.$ac_ext >&5
25963
Martin v. Löwiseba40652007-08-30 20:10:57 +000025964 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025966
25967rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025968 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025969fi
25970
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025971{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25972echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025973if test "$ac_cv_have_getc_unlocked" = yes
25974then
Martin v. Löwis11437992002-04-12 09:54:03 +000025975
25976cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025977#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025978_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025979
25980fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025981
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025982# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025983# save the value of LIBS so we don't actually link Python with readline
25984LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025985
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025986# On some systems we need to link readline to a termcap compatible
25987# library. NOTE: Keep the precedence of listed libraries synchronised
25988# with setup.py.
25989py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025990{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25991echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025992for py_libtermcap in "" ncursesw ncurses curses termcap; do
25993 if test -z "$py_libtermcap"; then
25994 READLINE_LIBS="-lreadline"
25995 else
25996 READLINE_LIBS="-lreadline -l$py_libtermcap"
25997 fi
25998 LIBS="$READLINE_LIBS $LIBS_no_readline"
25999 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026000/* confdefs.h. */
26001_ACEOF
26002cat confdefs.h >>conftest.$ac_ext
26003cat >>conftest.$ac_ext <<_ACEOF
26004/* end confdefs.h. */
26005
Martin v. Löwiseba40652007-08-30 20:10:57 +000026006/* Override any GCC internal prototype to avoid an error.
26007 Use char because int might match the return type of a GCC
26008 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026009#ifdef __cplusplus
26010extern "C"
26011#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026012char readline ();
26013int
26014main ()
26015{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026016return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026017 ;
26018 return 0;
26019}
26020_ACEOF
26021rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026022if { (ac_try="$ac_link"
26023case "(($ac_try" in
26024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26025 *) ac_try_echo=$ac_try;;
26026esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026028 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026029 ac_status=$?
26030 grep -v '^ *+' conftest.er1 >conftest.err
26031 rm -f conftest.er1
26032 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026034 (exit $ac_status); } && {
26035 test -z "$ac_c_werror_flag" ||
26036 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026037 } && test -s conftest$ac_exeext &&
26038 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026039 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026040else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026041 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026042sed 's/^/| /' conftest.$ac_ext >&5
26043
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026044
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026046
26047rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026048 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026049 if test $py_cv_lib_readline = yes; then
26050 break
26051 fi
26052done
26053# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26054#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026055if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026056 { echo "$as_me:$LINENO: result: none" >&5
26057echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026058else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026059 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26060echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026061
26062cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026063#define HAVE_LIBREADLINE 1
26064_ACEOF
26065
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026066fi
26067
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026068# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026069{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26070echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026071if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026072 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026073else
26074 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026075LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026076cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026077/* confdefs.h. */
26078_ACEOF
26079cat confdefs.h >>conftest.$ac_ext
26080cat >>conftest.$ac_ext <<_ACEOF
26081/* end confdefs.h. */
26082
Martin v. Löwiseba40652007-08-30 20:10:57 +000026083/* Override any GCC internal prototype to avoid an error.
26084 Use char because int might match the return type of a GCC
26085 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026086#ifdef __cplusplus
26087extern "C"
26088#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026089char rl_callback_handler_install ();
26090int
26091main ()
26092{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026093return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026094 ;
26095 return 0;
26096}
26097_ACEOF
26098rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026099if { (ac_try="$ac_link"
26100case "(($ac_try" in
26101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26102 *) ac_try_echo=$ac_try;;
26103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026105 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026107 grep -v '^ *+' conftest.er1 >conftest.err
26108 rm -f conftest.er1
26109 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026111 (exit $ac_status); } && {
26112 test -z "$ac_c_werror_flag" ||
26113 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026114 } && test -s conftest$ac_exeext &&
26115 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026116 ac_cv_lib_readline_rl_callback_handler_install=yes
26117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026118 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026119sed 's/^/| /' conftest.$ac_ext >&5
26120
Martin v. Löwiseba40652007-08-30 20:10:57 +000026121 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026123
26124rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026125 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026126LIBS=$ac_check_lib_save_LIBS
26127fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026128{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26129echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26130if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026131
26132cat >>confdefs.h <<\_ACEOF
26133#define HAVE_RL_CALLBACK 1
26134_ACEOF
26135
26136fi
26137
26138
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026139# check for readline 2.2
26140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026141/* confdefs.h. */
26142_ACEOF
26143cat confdefs.h >>conftest.$ac_ext
26144cat >>conftest.$ac_ext <<_ACEOF
26145/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026146#include <readline/readline.h>
26147_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026148if { (ac_try="$ac_cpp conftest.$ac_ext"
26149case "(($ac_try" in
26150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26151 *) ac_try_echo=$ac_try;;
26152esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026154 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026155 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026156 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026157 rm -f conftest.er1
26158 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026160 (exit $ac_status); } >/dev/null && {
26161 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26162 test ! -s conftest.err
26163 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026164 have_readline=yes
26165else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026167sed 's/^/| /' conftest.$ac_ext >&5
26168
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026169 have_readline=no
26170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026171
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026172rm -f conftest.err conftest.$ac_ext
26173if test $have_readline = yes
26174then
26175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026176/* confdefs.h. */
26177_ACEOF
26178cat confdefs.h >>conftest.$ac_ext
26179cat >>conftest.$ac_ext <<_ACEOF
26180/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026181#include <readline/readline.h>
26182
26183_ACEOF
26184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026185 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026186
26187cat >>confdefs.h <<\_ACEOF
26188#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26189_ACEOF
26190
26191fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000026192rm -f -r conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026193
26194 cat >conftest.$ac_ext <<_ACEOF
26195/* confdefs.h. */
26196_ACEOF
26197cat confdefs.h >>conftest.$ac_ext
26198cat >>conftest.$ac_ext <<_ACEOF
26199/* end confdefs.h. */
26200#include <readline/readline.h>
26201
26202_ACEOF
26203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26204 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26205
26206cat >>confdefs.h <<\_ACEOF
26207#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26208_ACEOF
26209
26210fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000026211rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026212
26213fi
26214
Martin v. Löwis0daad592001-09-30 21:09:59 +000026215# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026216{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26217echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026218if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026220else
Martin v. Löwis11437992002-04-12 09:54:03 +000026221 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026222LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026224/* confdefs.h. */
26225_ACEOF
26226cat confdefs.h >>conftest.$ac_ext
26227cat >>conftest.$ac_ext <<_ACEOF
26228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026229
Martin v. Löwiseba40652007-08-30 20:10:57 +000026230/* Override any GCC internal prototype to avoid an error.
26231 Use char because int might match the return type of a GCC
26232 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026233#ifdef __cplusplus
26234extern "C"
26235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026236char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026237int
26238main ()
26239{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026240return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026241 ;
26242 return 0;
26243}
26244_ACEOF
26245rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026246if { (ac_try="$ac_link"
26247case "(($ac_try" in
26248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26249 *) ac_try_echo=$ac_try;;
26250esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026252 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026254 grep -v '^ *+' conftest.er1 >conftest.err
26255 rm -f conftest.er1
26256 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026258 (exit $ac_status); } && {
26259 test -z "$ac_c_werror_flag" ||
26260 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026261 } && test -s conftest$ac_exeext &&
26262 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026263 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026264else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026266sed 's/^/| /' conftest.$ac_ext >&5
26267
Martin v. Löwiseba40652007-08-30 20:10:57 +000026268 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026270
26271rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026273LIBS=$ac_check_lib_save_LIBS
26274fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026275{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26276echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26277if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026278
Martin v. Löwis11437992002-04-12 09:54:03 +000026279cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026280#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026281_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026282
Martin v. Löwis0daad592001-09-30 21:09:59 +000026283fi
26284
Michael W. Hudson54241132001-12-07 15:38:26 +000026285
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026286# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026287{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26288echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026289if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026290 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026291else
26292 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026293LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026294cat >conftest.$ac_ext <<_ACEOF
26295/* confdefs.h. */
26296_ACEOF
26297cat confdefs.h >>conftest.$ac_ext
26298cat >>conftest.$ac_ext <<_ACEOF
26299/* end confdefs.h. */
26300
26301/* Override any GCC internal prototype to avoid an error.
26302 Use char because int might match the return type of a GCC
26303 builtin and then its argument prototype would still apply. */
26304#ifdef __cplusplus
26305extern "C"
26306#endif
26307char rl_completion_display_matches_hook ();
26308int
26309main ()
26310{
26311return rl_completion_display_matches_hook ();
26312 ;
26313 return 0;
26314}
26315_ACEOF
26316rm -f conftest.$ac_objext conftest$ac_exeext
26317if { (ac_try="$ac_link"
26318case "(($ac_try" in
26319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26320 *) ac_try_echo=$ac_try;;
26321esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026323 (eval "$ac_link") 2>conftest.er1
26324 ac_status=$?
26325 grep -v '^ *+' conftest.er1 >conftest.err
26326 rm -f conftest.er1
26327 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026329 (exit $ac_status); } && {
26330 test -z "$ac_c_werror_flag" ||
26331 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026332 } && test -s conftest$ac_exeext &&
26333 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026334 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26335else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026336 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026337sed 's/^/| /' conftest.$ac_ext >&5
26338
26339 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26340fi
26341
26342rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26343 conftest$ac_exeext conftest.$ac_ext
26344LIBS=$ac_check_lib_save_LIBS
26345fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026346{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26347echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26348if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026349
26350cat >>confdefs.h <<\_ACEOF
26351#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26352_ACEOF
26353
26354fi
26355
26356
Martin v. Löwis0daad592001-09-30 21:09:59 +000026357# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026358{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26359echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026360if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026361 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026362else
Martin v. Löwis11437992002-04-12 09:54:03 +000026363 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026364LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026365cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026366/* confdefs.h. */
26367_ACEOF
26368cat confdefs.h >>conftest.$ac_ext
26369cat >>conftest.$ac_ext <<_ACEOF
26370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026371
Martin v. Löwiseba40652007-08-30 20:10:57 +000026372/* Override any GCC internal prototype to avoid an error.
26373 Use char because int might match the return type of a GCC
26374 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026375#ifdef __cplusplus
26376extern "C"
26377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026378char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026379int
26380main ()
26381{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026382return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026383 ;
26384 return 0;
26385}
26386_ACEOF
26387rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026388if { (ac_try="$ac_link"
26389case "(($ac_try" in
26390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26391 *) ac_try_echo=$ac_try;;
26392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026394 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026396 grep -v '^ *+' conftest.er1 >conftest.err
26397 rm -f conftest.er1
26398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026400 (exit $ac_status); } && {
26401 test -z "$ac_c_werror_flag" ||
26402 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026403 } && test -s conftest$ac_exeext &&
26404 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026405 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026406else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026408sed 's/^/| /' conftest.$ac_ext >&5
26409
Martin v. Löwiseba40652007-08-30 20:10:57 +000026410 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026412
26413rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026414 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026415LIBS=$ac_check_lib_save_LIBS
26416fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026417{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26418echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26419if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026420
Martin v. Löwis11437992002-04-12 09:54:03 +000026421cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026422#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026423_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026424
Guido van Rossum353ae582001-07-10 16:45:32 +000026425fi
26426
Jack Jansendd19cf82001-12-06 22:36:17 +000026427
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026428# also in readline 4.2
26429cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026430/* confdefs.h. */
26431_ACEOF
26432cat confdefs.h >>conftest.$ac_ext
26433cat >>conftest.$ac_ext <<_ACEOF
26434/* end confdefs.h. */
26435#include <readline/readline.h>
26436_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026437if { (ac_try="$ac_cpp conftest.$ac_ext"
26438case "(($ac_try" in
26439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26440 *) ac_try_echo=$ac_try;;
26441esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026443 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026444 ac_status=$?
26445 grep -v '^ *+' conftest.er1 >conftest.err
26446 rm -f conftest.er1
26447 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026449 (exit $ac_status); } >/dev/null && {
26450 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26451 test ! -s conftest.err
26452 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026453 have_readline=yes
26454else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026455 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026456sed 's/^/| /' conftest.$ac_ext >&5
26457
26458 have_readline=no
26459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026460
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026461rm -f conftest.err conftest.$ac_ext
26462if test $have_readline = yes
26463then
26464 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026465/* confdefs.h. */
26466_ACEOF
26467cat confdefs.h >>conftest.$ac_ext
26468cat >>conftest.$ac_ext <<_ACEOF
26469/* end confdefs.h. */
26470#include <readline/readline.h>
26471
26472_ACEOF
26473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26474 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26475
26476cat >>confdefs.h <<\_ACEOF
26477#define HAVE_RL_CATCH_SIGNAL 1
26478_ACEOF
26479
26480fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000026481rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026482
26483fi
26484
Martin v. Löwis82bca632006-02-10 20:49:30 +000026485# End of readline checks: restore LIBS
26486LIBS=$LIBS_no_readline
26487
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026488{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26489echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026490if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026491 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026492else
Martin v. Löwis11437992002-04-12 09:54:03 +000026493
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026494if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026495 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026496else
Martin v. Löwis11437992002-04-12 09:54:03 +000026497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026498/* confdefs.h. */
26499_ACEOF
26500cat confdefs.h >>conftest.$ac_ext
26501cat >>conftest.$ac_ext <<_ACEOF
26502/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026503
26504int main()
26505{
26506 int val1 = nice(1);
26507 if (val1 != -1 && val1 == nice(2))
26508 exit(0);
26509 exit(1);
26510}
26511
Martin v. Löwis11437992002-04-12 09:54:03 +000026512_ACEOF
26513rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026514if { (ac_try="$ac_link"
26515case "(($ac_try" in
26516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26517 *) ac_try_echo=$ac_try;;
26518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026520 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026521 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026523 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026524 { (case "(($ac_try" in
26525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26526 *) ac_try_echo=$ac_try;;
26527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026529 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026530 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026532 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026533 ac_cv_broken_nice=yes
26534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026535 echo "$as_me: program exited with status $ac_status" >&5
26536echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026537sed 's/^/| /' conftest.$ac_ext >&5
26538
Martin v. Löwis11437992002-04-12 09:54:03 +000026539( exit $ac_status )
26540ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026542rm -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 +000026543fi
26544
Martin v. Löwiseba40652007-08-30 20:10:57 +000026545
26546fi
26547
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026548{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26549echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026550if test "$ac_cv_broken_nice" = yes
26551then
Martin v. Löwis11437992002-04-12 09:54:03 +000026552
26553cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026554#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026555_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026556
26557fi
26558
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026559{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26560echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026561if test "${ac_cv_broken_poll+set}" = set; then
26562 echo $ECHO_N "(cached) $ECHO_C" >&6
26563else
26564 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026565 ac_cv_broken_poll=no
26566else
26567 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026568/* confdefs.h. */
26569_ACEOF
26570cat confdefs.h >>conftest.$ac_ext
26571cat >>conftest.$ac_ext <<_ACEOF
26572/* end confdefs.h. */
26573
26574#include <poll.h>
26575
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026576int main()
26577{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026578 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026579 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026580
26581 close (42);
26582
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026583 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026584 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026585 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026586 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026587 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026588 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026589 return 1;
26590}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026591
26592_ACEOF
26593rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026594if { (ac_try="$ac_link"
26595case "(($ac_try" in
26596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26597 *) ac_try_echo=$ac_try;;
26598esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026600 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026601 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026603 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026604 { (case "(($ac_try" in
26605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26606 *) ac_try_echo=$ac_try;;
26607esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026609 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026610 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026612 (exit $ac_status); }; }; then
26613 ac_cv_broken_poll=yes
26614else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026615 echo "$as_me: program exited with status $ac_status" >&5
26616echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026617sed 's/^/| /' conftest.$ac_ext >&5
26618
26619( exit $ac_status )
26620ac_cv_broken_poll=no
26621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026622rm -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 +000026623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026624
26625
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026626fi
26627
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026628{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26629echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026630if test "$ac_cv_broken_poll" = yes
26631then
26632
26633cat >>confdefs.h <<\_ACEOF
26634#define HAVE_BROKEN_POLL 1
26635_ACEOF
26636
26637fi
26638
Brett Cannon43802422005-02-10 20:48:03 +000026639# 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 +000026640# (which is not required by ISO C or UNIX spec) and/or if we support
26641# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026642{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26643echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026644if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026645 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026646else
26647 cat >conftest.$ac_ext <<_ACEOF
26648/* confdefs.h. */
26649_ACEOF
26650cat confdefs.h >>conftest.$ac_ext
26651cat >>conftest.$ac_ext <<_ACEOF
26652/* end confdefs.h. */
26653#include <sys/types.h>
26654#include <$ac_cv_struct_tm>
26655
26656
26657int
26658main ()
26659{
26660static struct tm ac_aggr;
26661if (ac_aggr.tm_zone)
26662return 0;
26663 ;
26664 return 0;
26665}
26666_ACEOF
26667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026668if { (ac_try="$ac_compile"
26669case "(($ac_try" in
26670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26671 *) ac_try_echo=$ac_try;;
26672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026674 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026675 ac_status=$?
26676 grep -v '^ *+' conftest.er1 >conftest.err
26677 rm -f conftest.er1
26678 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026680 (exit $ac_status); } && {
26681 test -z "$ac_c_werror_flag" ||
26682 test ! -s conftest.err
26683 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026684 ac_cv_member_struct_tm_tm_zone=yes
26685else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026686 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026687sed 's/^/| /' conftest.$ac_ext >&5
26688
Martin v. Löwiseba40652007-08-30 20:10:57 +000026689 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026690/* confdefs.h. */
26691_ACEOF
26692cat confdefs.h >>conftest.$ac_ext
26693cat >>conftest.$ac_ext <<_ACEOF
26694/* end confdefs.h. */
26695#include <sys/types.h>
26696#include <$ac_cv_struct_tm>
26697
26698
26699int
26700main ()
26701{
26702static struct tm ac_aggr;
26703if (sizeof ac_aggr.tm_zone)
26704return 0;
26705 ;
26706 return 0;
26707}
26708_ACEOF
26709rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026710if { (ac_try="$ac_compile"
26711case "(($ac_try" in
26712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26713 *) ac_try_echo=$ac_try;;
26714esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026716 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026717 ac_status=$?
26718 grep -v '^ *+' conftest.er1 >conftest.err
26719 rm -f conftest.er1
26720 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026722 (exit $ac_status); } && {
26723 test -z "$ac_c_werror_flag" ||
26724 test ! -s conftest.err
26725 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026726 ac_cv_member_struct_tm_tm_zone=yes
26727else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026728 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026729sed 's/^/| /' conftest.$ac_ext >&5
26730
Martin v. Löwiseba40652007-08-30 20:10:57 +000026731 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026733
26734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026736
26737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026738fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026739{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26740echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26741if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026742
26743cat >>confdefs.h <<_ACEOF
26744#define HAVE_STRUCT_TM_TM_ZONE 1
26745_ACEOF
26746
26747
26748fi
26749
26750if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26751
26752cat >>confdefs.h <<\_ACEOF
26753#define HAVE_TM_ZONE 1
26754_ACEOF
26755
26756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026757 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26758echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026759if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026760 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026761else
26762 cat >conftest.$ac_ext <<_ACEOF
26763/* confdefs.h. */
26764_ACEOF
26765cat confdefs.h >>conftest.$ac_ext
26766cat >>conftest.$ac_ext <<_ACEOF
26767/* end confdefs.h. */
26768#include <time.h>
26769
26770int
26771main ()
26772{
26773#ifndef tzname
26774 (void) tzname;
26775#endif
26776
26777 ;
26778 return 0;
26779}
26780_ACEOF
26781rm -f conftest.$ac_objext
26782if { (ac_try="$ac_compile"
26783case "(($ac_try" in
26784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26785 *) ac_try_echo=$ac_try;;
26786esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026788 (eval "$ac_compile") 2>conftest.er1
26789 ac_status=$?
26790 grep -v '^ *+' conftest.er1 >conftest.err
26791 rm -f conftest.er1
26792 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026794 (exit $ac_status); } && {
26795 test -z "$ac_c_werror_flag" ||
26796 test ! -s conftest.err
26797 } && test -s conftest.$ac_objext; then
26798 ac_cv_have_decl_tzname=yes
26799else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026800 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026801sed 's/^/| /' conftest.$ac_ext >&5
26802
26803 ac_cv_have_decl_tzname=no
26804fi
26805
26806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26807fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026808{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26809echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26810if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026811
26812cat >>confdefs.h <<_ACEOF
26813#define HAVE_DECL_TZNAME 1
26814_ACEOF
26815
26816
26817else
26818 cat >>confdefs.h <<_ACEOF
26819#define HAVE_DECL_TZNAME 0
26820_ACEOF
26821
26822
26823fi
26824
26825
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026826 { echo "$as_me:$LINENO: checking for tzname" >&5
26827echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026828if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026829 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026830else
26831 cat >conftest.$ac_ext <<_ACEOF
26832/* confdefs.h. */
26833_ACEOF
26834cat confdefs.h >>conftest.$ac_ext
26835cat >>conftest.$ac_ext <<_ACEOF
26836/* end confdefs.h. */
26837#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026838#if !HAVE_DECL_TZNAME
26839extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026840#endif
26841
26842int
26843main ()
26844{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026845return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026846 ;
26847 return 0;
26848}
26849_ACEOF
26850rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026851if { (ac_try="$ac_link"
26852case "(($ac_try" in
26853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26854 *) ac_try_echo=$ac_try;;
26855esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026857 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026858 ac_status=$?
26859 grep -v '^ *+' conftest.er1 >conftest.err
26860 rm -f conftest.er1
26861 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026863 (exit $ac_status); } && {
26864 test -z "$ac_c_werror_flag" ||
26865 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026866 } && test -s conftest$ac_exeext &&
26867 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026868 ac_cv_var_tzname=yes
26869else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026870 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026871sed 's/^/| /' conftest.$ac_ext >&5
26872
Martin v. Löwiseba40652007-08-30 20:10:57 +000026873 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026875
26876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026877 conftest$ac_exeext conftest.$ac_ext
26878fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026879{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26880echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026881 if test $ac_cv_var_tzname = yes; then
26882
26883cat >>confdefs.h <<\_ACEOF
26884#define HAVE_TZNAME 1
26885_ACEOF
26886
26887 fi
26888fi
26889
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026890
Martin v. Löwis1d459062005-03-14 21:23:33 +000026891# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026892{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26893echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026894if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026895 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026896else
26897
26898if test "$cross_compiling" = yes; then
26899 ac_cv_working_tzset=no
26900else
26901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026902/* confdefs.h. */
26903_ACEOF
26904cat confdefs.h >>conftest.$ac_ext
26905cat >>conftest.$ac_ext <<_ACEOF
26906/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026907
26908#include <stdlib.h>
26909#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026910#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026911
26912#if HAVE_TZNAME
26913extern char *tzname[];
26914#endif
26915
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026916int main()
26917{
Brett Cannon18367812003-09-19 00:59:16 +000026918 /* Note that we need to ensure that not only does tzset(3)
26919 do 'something' with localtime, but it works as documented
26920 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026921 This includes making sure that tzname is set properly if
26922 tm->tm_zone does not exist since it is the alternative way
26923 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026924
26925 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026926 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026927 */
26928
Martin v. Löwis1d459062005-03-14 21:23:33 +000026929 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026930 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26931
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026932 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026933 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026934 if (localtime(&groundhogday)->tm_hour != 0)
26935 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026936#if HAVE_TZNAME
26937 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26938 if (strcmp(tzname[0], "UTC") ||
26939 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26940 exit(1);
26941#endif
Brett Cannon18367812003-09-19 00:59:16 +000026942
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026943 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026944 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026945 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026946 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026947#if HAVE_TZNAME
26948 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26949 exit(1);
26950#endif
Brett Cannon18367812003-09-19 00:59:16 +000026951
26952 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26953 tzset();
26954 if (localtime(&groundhogday)->tm_hour != 11)
26955 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026956#if HAVE_TZNAME
26957 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26958 exit(1);
26959#endif
26960
26961#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026962 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26963 exit(1);
26964 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26965 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026966#endif
Brett Cannon18367812003-09-19 00:59:16 +000026967
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026968 exit(0);
26969}
26970
26971_ACEOF
26972rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026973if { (ac_try="$ac_link"
26974case "(($ac_try" in
26975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26976 *) ac_try_echo=$ac_try;;
26977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026979 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026980 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026982 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026983 { (case "(($ac_try" in
26984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26985 *) ac_try_echo=$ac_try;;
26986esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026988 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026989 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026991 (exit $ac_status); }; }; then
26992 ac_cv_working_tzset=yes
26993else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026994 echo "$as_me: program exited with status $ac_status" >&5
26995echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026996sed 's/^/| /' conftest.$ac_ext >&5
26997
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026998( exit $ac_status )
26999ac_cv_working_tzset=no
27000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027001rm -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 +000027002fi
27003
Martin v. Löwiseba40652007-08-30 20:10:57 +000027004
27005fi
27006
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027007{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27008echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027009if test "$ac_cv_working_tzset" = yes
27010then
27011
27012cat >>confdefs.h <<\_ACEOF
27013#define HAVE_WORKING_TZSET 1
27014_ACEOF
27015
27016fi
27017
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027018# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027019{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27020echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027021if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027022 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027023else
27024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027025/* confdefs.h. */
27026_ACEOF
27027cat confdefs.h >>conftest.$ac_ext
27028cat >>conftest.$ac_ext <<_ACEOF
27029/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027030#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027031int
27032main ()
27033{
27034
27035struct stat st;
27036st.st_mtim.tv_nsec = 1;
27037
27038 ;
27039 return 0;
27040}
27041_ACEOF
27042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027043if { (ac_try="$ac_compile"
27044case "(($ac_try" in
27045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27046 *) ac_try_echo=$ac_try;;
27047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027051 grep -v '^ *+' conftest.er1 >conftest.err
27052 rm -f conftest.er1
27053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027055 (exit $ac_status); } && {
27056 test -z "$ac_c_werror_flag" ||
27057 test ! -s conftest.err
27058 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027059 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027062sed 's/^/| /' conftest.$ac_ext >&5
27063
Martin v. Löwiseba40652007-08-30 20:10:57 +000027064 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027065fi
27066
Martin v. Löwiseba40652007-08-30 20:10:57 +000027067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27068fi
27069
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027070{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27071echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027072if test "$ac_cv_stat_tv_nsec" = yes
27073then
27074
27075cat >>confdefs.h <<\_ACEOF
27076#define HAVE_STAT_TV_NSEC 1
27077_ACEOF
27078
27079fi
27080
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027081# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027082{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27083echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027084if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027085 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027086else
27087 cat >conftest.$ac_ext <<_ACEOF
27088/* confdefs.h. */
27089_ACEOF
27090cat confdefs.h >>conftest.$ac_ext
27091cat >>conftest.$ac_ext <<_ACEOF
27092/* end confdefs.h. */
27093#include <sys/stat.h>
27094int
27095main ()
27096{
27097
27098struct stat st;
27099st.st_mtimespec.tv_nsec = 1;
27100
27101 ;
27102 return 0;
27103}
27104_ACEOF
27105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027106if { (ac_try="$ac_compile"
27107case "(($ac_try" in
27108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27109 *) ac_try_echo=$ac_try;;
27110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027113 ac_status=$?
27114 grep -v '^ *+' conftest.er1 >conftest.err
27115 rm -f conftest.er1
27116 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027118 (exit $ac_status); } && {
27119 test -z "$ac_c_werror_flag" ||
27120 test ! -s conftest.err
27121 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027122 ac_cv_stat_tv_nsec2=yes
27123else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027124 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027125sed 's/^/| /' conftest.$ac_ext >&5
27126
Martin v. Löwiseba40652007-08-30 20:10:57 +000027127 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027128fi
27129
Martin v. Löwiseba40652007-08-30 20:10:57 +000027130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27131fi
27132
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027133{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27134echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027135if test "$ac_cv_stat_tv_nsec2" = yes
27136then
27137
27138cat >>confdefs.h <<\_ACEOF
27139#define HAVE_STAT_TV_NSEC2 1
27140_ACEOF
27141
27142fi
27143
Jack Jansen666b1e72001-10-31 12:11:48 +000027144# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027145{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27146echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027147if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027148 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027149else
Martin v. Löwis11437992002-04-12 09:54:03 +000027150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027151/* confdefs.h. */
27152_ACEOF
27153cat confdefs.h >>conftest.$ac_ext
27154cat >>conftest.$ac_ext <<_ACEOF
27155/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027156#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027157int
27158main ()
27159{
Jack Jansen666b1e72001-10-31 12:11:48 +000027160
27161 int rtn;
27162 rtn = mvwdelch(0,0,0);
27163
Martin v. Löwis11437992002-04-12 09:54:03 +000027164 ;
27165 return 0;
27166}
27167_ACEOF
27168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027169if { (ac_try="$ac_compile"
27170case "(($ac_try" in
27171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27172 *) ac_try_echo=$ac_try;;
27173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027177 grep -v '^ *+' conftest.er1 >conftest.err
27178 rm -f conftest.er1
27179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027181 (exit $ac_status); } && {
27182 test -z "$ac_c_werror_flag" ||
27183 test ! -s conftest.err
27184 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027185 ac_cv_mvwdelch_is_expression=yes
27186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027188sed 's/^/| /' conftest.$ac_ext >&5
27189
Martin v. Löwiseba40652007-08-30 20:10:57 +000027190 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027191fi
27192
Martin v. Löwiseba40652007-08-30 20:10:57 +000027193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27194fi
27195
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027196{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27197echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027198
27199if test "$ac_cv_mvwdelch_is_expression" = yes
27200then
Martin v. Löwis11437992002-04-12 09:54:03 +000027201
27202cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027203#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027204_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027205
27206fi
27207
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027208{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27209echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027210if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027211 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027212else
Martin v. Löwis11437992002-04-12 09:54:03 +000027213 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027214/* confdefs.h. */
27215_ACEOF
27216cat confdefs.h >>conftest.$ac_ext
27217cat >>conftest.$ac_ext <<_ACEOF
27218/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027219#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027220int
27221main ()
27222{
Jack Jansen666b1e72001-10-31 12:11:48 +000027223
27224 WINDOW *w;
27225 w->_flags = 0;
27226
Martin v. Löwis11437992002-04-12 09:54:03 +000027227 ;
27228 return 0;
27229}
27230_ACEOF
27231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027232if { (ac_try="$ac_compile"
27233case "(($ac_try" in
27234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27235 *) ac_try_echo=$ac_try;;
27236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027240 grep -v '^ *+' conftest.er1 >conftest.err
27241 rm -f conftest.er1
27242 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027244 (exit $ac_status); } && {
27245 test -z "$ac_c_werror_flag" ||
27246 test ! -s conftest.err
27247 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027248 ac_cv_window_has_flags=yes
27249else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027251sed 's/^/| /' conftest.$ac_ext >&5
27252
Martin v. Löwiseba40652007-08-30 20:10:57 +000027253 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027254fi
27255
Martin v. Löwiseba40652007-08-30 20:10:57 +000027256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27257fi
27258
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027259{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27260echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027261
Jack Jansen666b1e72001-10-31 12:11:48 +000027262
27263if test "$ac_cv_window_has_flags" = yes
27264then
Martin v. Löwis11437992002-04-12 09:54:03 +000027265
27266cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027267#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027268_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027269
27270fi
27271
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027272{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27273echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027274cat >conftest.$ac_ext <<_ACEOF
27275/* confdefs.h. */
27276_ACEOF
27277cat confdefs.h >>conftest.$ac_ext
27278cat >>conftest.$ac_ext <<_ACEOF
27279/* end confdefs.h. */
27280#include <curses.h>
27281int
27282main ()
27283{
27284void *x=is_term_resized
27285 ;
27286 return 0;
27287}
27288_ACEOF
27289rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027290if { (ac_try="$ac_compile"
27291case "(($ac_try" in
27292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27293 *) ac_try_echo=$ac_try;;
27294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027296 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027297 ac_status=$?
27298 grep -v '^ *+' conftest.er1 >conftest.err
27299 rm -f conftest.er1
27300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027302 (exit $ac_status); } && {
27303 test -z "$ac_c_werror_flag" ||
27304 test ! -s conftest.err
27305 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027306
27307cat >>confdefs.h <<\_ACEOF
27308#define HAVE_CURSES_IS_TERM_RESIZED 1
27309_ACEOF
27310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027311 { echo "$as_me:$LINENO: result: yes" >&5
27312echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027314 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027315sed 's/^/| /' conftest.$ac_ext >&5
27316
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027317 { echo "$as_me:$LINENO: result: no" >&5
27318echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027319
27320fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027321
Martin v. Löwiseba40652007-08-30 20:10:57 +000027322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27323
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027324{ echo "$as_me:$LINENO: checking for resize_term" >&5
27325echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027326cat >conftest.$ac_ext <<_ACEOF
27327/* confdefs.h. */
27328_ACEOF
27329cat confdefs.h >>conftest.$ac_ext
27330cat >>conftest.$ac_ext <<_ACEOF
27331/* end confdefs.h. */
27332#include <curses.h>
27333int
27334main ()
27335{
27336void *x=resize_term
27337 ;
27338 return 0;
27339}
27340_ACEOF
27341rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027342if { (ac_try="$ac_compile"
27343case "(($ac_try" in
27344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27345 *) ac_try_echo=$ac_try;;
27346esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027348 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027349 ac_status=$?
27350 grep -v '^ *+' conftest.er1 >conftest.err
27351 rm -f conftest.er1
27352 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027354 (exit $ac_status); } && {
27355 test -z "$ac_c_werror_flag" ||
27356 test ! -s conftest.err
27357 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027358
27359cat >>confdefs.h <<\_ACEOF
27360#define HAVE_CURSES_RESIZE_TERM 1
27361_ACEOF
27362
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027363 { echo "$as_me:$LINENO: result: yes" >&5
27364echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027365else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027366 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027367sed 's/^/| /' conftest.$ac_ext >&5
27368
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027369 { echo "$as_me:$LINENO: result: no" >&5
27370echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027371
27372fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027373
Martin v. Löwiseba40652007-08-30 20:10:57 +000027374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27375
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027376{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27377echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027378cat >conftest.$ac_ext <<_ACEOF
27379/* confdefs.h. */
27380_ACEOF
27381cat confdefs.h >>conftest.$ac_ext
27382cat >>conftest.$ac_ext <<_ACEOF
27383/* end confdefs.h. */
27384#include <curses.h>
27385int
27386main ()
27387{
27388void *x=resizeterm
27389 ;
27390 return 0;
27391}
27392_ACEOF
27393rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027394if { (ac_try="$ac_compile"
27395case "(($ac_try" in
27396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27397 *) ac_try_echo=$ac_try;;
27398esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027400 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027401 ac_status=$?
27402 grep -v '^ *+' conftest.er1 >conftest.err
27403 rm -f conftest.er1
27404 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027406 (exit $ac_status); } && {
27407 test -z "$ac_c_werror_flag" ||
27408 test ! -s conftest.err
27409 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027410
27411cat >>confdefs.h <<\_ACEOF
27412#define HAVE_CURSES_RESIZETERM 1
27413_ACEOF
27414
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027415 { echo "$as_me:$LINENO: result: yes" >&5
27416echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027417else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027418 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027419sed 's/^/| /' conftest.$ac_ext >&5
27420
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027421 { echo "$as_me:$LINENO: result: no" >&5
27422echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027423
27424fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027425
Martin v. Löwiseba40652007-08-30 20:10:57 +000027426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27427
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027428{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27429echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027430
27431if test -r /dev/ptmx
27432then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027433 { echo "$as_me:$LINENO: result: yes" >&5
27434echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027435
27436cat >>confdefs.h <<\_ACEOF
27437#define HAVE_DEV_PTMX 1
27438_ACEOF
27439
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027441 { echo "$as_me:$LINENO: result: no" >&5
27442echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027443fi
27444
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027445{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27446echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027447
27448if test -r /dev/ptc
27449then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027450 { echo "$as_me:$LINENO: result: yes" >&5
27451echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027452
27453cat >>confdefs.h <<\_ACEOF
27454#define HAVE_DEV_PTC 1
27455_ACEOF
27456
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027458 { echo "$as_me:$LINENO: result: no" >&5
27459echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027460fi
27461
Mark Dickinson82864d12009-11-15 16:18:58 +000027462if test "$have_long_long" = yes
27463then
27464 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27465echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27466 if test "${ac_cv_have_long_long_format+set}" = set; then
27467 echo $ECHO_N "(cached) $ECHO_C" >&6
27468else
27469 if test "$cross_compiling" = yes; then
27470 ac_cv_have_long_long_format=no
27471else
27472 cat >conftest.$ac_ext <<_ACEOF
27473/* confdefs.h. */
27474_ACEOF
27475cat confdefs.h >>conftest.$ac_ext
27476cat >>conftest.$ac_ext <<_ACEOF
27477/* end confdefs.h. */
27478
27479 #include <stdio.h>
27480 #include <stddef.h>
27481 #include <string.h>
27482
27483 #ifdef HAVE_SYS_TYPES_H
27484 #include <sys/types.h>
27485 #endif
27486
27487 int main()
27488 {
27489 char buffer[256];
27490
27491 if (sprintf(buffer, "%lld", (long long)123) < 0)
27492 return 1;
27493 if (strcmp(buffer, "123"))
27494 return 1;
27495
27496 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27497 return 1;
27498 if (strcmp(buffer, "-123"))
27499 return 1;
27500
27501 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27502 return 1;
27503 if (strcmp(buffer, "123"))
27504 return 1;
27505
27506 return 0;
27507 }
27508
27509_ACEOF
27510rm -f conftest$ac_exeext
27511if { (ac_try="$ac_link"
27512case "(($ac_try" in
27513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27514 *) ac_try_echo=$ac_try;;
27515esac
27516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27517 (eval "$ac_link") 2>&5
27518 ac_status=$?
27519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27521 { (case "(($ac_try" in
27522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27523 *) ac_try_echo=$ac_try;;
27524esac
27525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27526 (eval "$ac_try") 2>&5
27527 ac_status=$?
27528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27529 (exit $ac_status); }; }; then
27530 ac_cv_have_long_long_format=yes
27531else
27532 echo "$as_me: program exited with status $ac_status" >&5
27533echo "$as_me: failed program was:" >&5
27534sed 's/^/| /' conftest.$ac_ext >&5
27535
27536( exit $ac_status )
27537ac_cv_have_long_long_format=no
27538fi
27539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27540fi
27541
27542
27543
27544fi
27545
27546 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27547echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27548fi
27549
Mark Dickinson5ce84742009-12-31 20:48:04 +000027550if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027551then
27552
27553cat >>confdefs.h <<\_ACEOF
27554#define PY_FORMAT_LONG_LONG "ll"
27555_ACEOF
27556
27557fi
27558
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027559if test $ac_sys_system = Darwin
27560then
27561 LIBS="$LIBS -framework CoreFoundation"
27562fi
27563
Mark Dickinson82864d12009-11-15 16:18:58 +000027564
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027565{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27566echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027567if test "${ac_cv_have_size_t_format+set}" = set; then
27568 echo $ECHO_N "(cached) $ECHO_C" >&6
27569else
27570 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027571 ac_cv_have_size_t_format="cross -- assuming yes"
27572
Brett Cannon09d12362006-05-11 05:11:33 +000027573else
27574 cat >conftest.$ac_ext <<_ACEOF
27575/* confdefs.h. */
27576_ACEOF
27577cat confdefs.h >>conftest.$ac_ext
27578cat >>conftest.$ac_ext <<_ACEOF
27579/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027580
Brett Cannon09d12362006-05-11 05:11:33 +000027581#include <stdio.h>
27582#include <stddef.h>
27583#include <string.h>
27584
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027585#ifdef HAVE_SYS_TYPES_H
27586#include <sys/types.h>
27587#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027588
27589#ifdef HAVE_SSIZE_T
27590typedef ssize_t Py_ssize_t;
27591#elif SIZEOF_VOID_P == SIZEOF_LONG
27592typedef long Py_ssize_t;
27593#else
27594typedef int Py_ssize_t;
27595#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027596
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027597int main()
27598{
27599 char buffer[256];
27600
Brett Cannon09d12362006-05-11 05:11:33 +000027601 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27602 return 1;
27603
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027604 if (strcmp(buffer, "123"))
27605 return 1;
27606
27607 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27608 return 1;
27609
27610 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027611 return 1;
27612
27613 return 0;
27614}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027615
Brett Cannon09d12362006-05-11 05:11:33 +000027616_ACEOF
27617rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027618if { (ac_try="$ac_link"
27619case "(($ac_try" in
27620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27621 *) ac_try_echo=$ac_try;;
27622esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027624 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027625 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027627 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027628 { (case "(($ac_try" in
27629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27630 *) ac_try_echo=$ac_try;;
27631esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027633 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027634 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027636 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027637 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027638else
27639 echo "$as_me: program exited with status $ac_status" >&5
27640echo "$as_me: failed program was:" >&5
27641sed 's/^/| /' conftest.$ac_ext >&5
27642
27643( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027644ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027645fi
27646rm -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 +000027647fi
27648
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027649
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027650fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027651{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27652echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027653if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027654
27655cat >>confdefs.h <<\_ACEOF
27656#define PY_FORMAT_SIZE_T "z"
27657_ACEOF
27658
27659fi
27660
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027661{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27662echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027663if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027664 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027665else
Martin v. Löwis11437992002-04-12 09:54:03 +000027666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027667/* confdefs.h. */
27668_ACEOF
27669cat confdefs.h >>conftest.$ac_ext
27670cat >>conftest.$ac_ext <<_ACEOF
27671/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027672
27673#ifdef HAVE_SYS_TYPES_H
27674#include <sys/types.h>
27675#endif
27676#ifdef HAVE_SYS_SOCKET_H
27677#include <sys/socket.h>
27678#endif
27679
27680
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027681typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027682int
27683main ()
27684{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027685if ((ac__type_new_ *) 0)
27686 return 0;
27687if (sizeof (ac__type_new_))
27688 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027689 ;
27690 return 0;
27691}
27692_ACEOF
27693rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027694if { (ac_try="$ac_compile"
27695case "(($ac_try" in
27696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27697 *) ac_try_echo=$ac_try;;
27698esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027702 grep -v '^ *+' conftest.er1 >conftest.err
27703 rm -f conftest.er1
27704 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027706 (exit $ac_status); } && {
27707 test -z "$ac_c_werror_flag" ||
27708 test ! -s conftest.err
27709 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027710 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027713sed 's/^/| /' conftest.$ac_ext >&5
27714
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027715 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027717
27718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027719fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027720{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27721echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27722if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027723 :
27724else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027725
Martin v. Löwis01c04012002-11-11 14:58:44 +000027726cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027727#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027728_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027729
27730fi
27731
Michael W. Hudson54241132001-12-07 15:38:26 +000027732
Michael W. Hudson54241132001-12-07 15:38:26 +000027733
27734
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027735for h in `(cd $srcdir;echo Python/thread_*.h)`
27736do
27737 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27738done
27739
Michael W. Hudson54241132001-12-07 15:38:26 +000027740
Neal Norwitzd24499d2005-12-18 21:36:39 +000027741SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027742{ echo "$as_me:$LINENO: checking for build directories" >&5
27743echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027744for dir in $SRCDIRS; do
27745 if test ! -d $dir; then
27746 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027747 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027748done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027749{ echo "$as_me:$LINENO: result: done" >&5
27750echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027751
Guido van Rossum627b2d71993-12-24 10:39:16 +000027752# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027753ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027754
Martin v. Löwis11437992002-04-12 09:54:03 +000027755cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027756# This file is a shell script that caches the results of configure
27757# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027758# scripts and configure runs, see configure's option --config-cache.
27759# It is not useful on other systems. If it contains results you don't
27760# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027761#
Martin v. Löwis11437992002-04-12 09:54:03 +000027762# config.status only pays attention to the cache file if you give it
27763# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027764#
Skip Montanaro6dead952003-09-25 14:50:04 +000027765# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027766# loading this file, other *unset* `ac_cv_foo' will be assigned the
27767# following values.
27768
27769_ACEOF
27770
Guido van Rossumf78abae1997-01-21 22:02:36 +000027771# The following way of writing the cache mishandles newlines in values,
27772# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027773# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027774# Ultrix sh set writes to stderr and can't be redirected directly,
27775# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027776(
27777 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27778 eval ac_val=\$$ac_var
27779 case $ac_val in #(
27780 *${as_nl}*)
27781 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027782 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27783echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027784 esac
27785 case $ac_var in #(
27786 _ | IFS | as_nl) ;; #(
27787 *) $as_unset $ac_var ;;
27788 esac ;;
27789 esac
27790 done
27791
Martin v. Löwis11437992002-04-12 09:54:03 +000027792 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027793 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27794 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027795 # `set' does not quote correctly, so add quotes (double-quote
27796 # substitution turns \\\\ into \\, and sed turns \\ into \).
27797 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027798 "s/'/'\\\\''/g;
27799 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027800 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027801 *)
27802 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027803 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027804 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027805 esac |
27806 sort
27807) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027808 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027809 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027810 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027811 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027812 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27813 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027814 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27815 :end' >>confcache
27816if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27817 if test -w "$cache_file"; then
27818 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027819 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27820echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027821 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027822 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027823 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27824echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027825 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027826fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027827rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027828
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027829test "x$prefix" = xNONE && prefix=$ac_default_prefix
27830# Let make expand exec_prefix.
27831test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027832
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027833DEFS=-DHAVE_CONFIG_H
27834
Skip Montanaro6dead952003-09-25 14:50:04 +000027835ac_libobjs=
27836ac_ltlibobjs=
27837for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27838 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027839 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027840 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027841 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27842 # will be set to the directory where LIBOBJS objects are built.
27843 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27844 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027845done
27846LIBOBJS=$ac_libobjs
27847
27848LTLIBOBJS=$ac_ltlibobjs
27849
27850
Martin v. Löwis11437992002-04-12 09:54:03 +000027851
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027852: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027853ac_clean_files_save=$ac_clean_files
27854ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027855{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27856echo "$as_me: creating $CONFIG_STATUS" >&6;}
27857cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027858#! $SHELL
27859# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027860# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027861# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027862# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027863
Martin v. Löwis11437992002-04-12 09:54:03 +000027864debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027865ac_cs_recheck=false
27866ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027867SHELL=\${CONFIG_SHELL-$SHELL}
27868_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027869
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027870cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027871## --------------------- ##
27872## M4sh Initialization. ##
27873## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027874
Martin v. Löwiseba40652007-08-30 20:10:57 +000027875# Be more Bourne compatible
27876DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027877if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27878 emulate sh
27879 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027880 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027881 # is contrary to our usage. Disable this feature.
27882 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027883 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027884else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027885 case `(set -o) 2>/dev/null` in
27886 *posix*) set -o posix ;;
27887esac
27888
Martin v. Löwis11437992002-04-12 09:54:03 +000027889fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027890
Skip Montanaro6dead952003-09-25 14:50:04 +000027891
Martin v. Löwis11437992002-04-12 09:54:03 +000027892
27893
Martin v. Löwiseba40652007-08-30 20:10:57 +000027894# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027895# Avoid depending upon Character Ranges.
27896as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27897as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27898as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27899as_cr_digits='0123456789'
27900as_cr_alnum=$as_cr_Letters$as_cr_digits
27901
27902# The user is always right.
27903if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027904 echo "#! /bin/sh" >conf$$.sh
27905 echo "exit 0" >>conf$$.sh
27906 chmod +x conf$$.sh
27907 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27908 PATH_SEPARATOR=';'
27909 else
27910 PATH_SEPARATOR=:
27911 fi
27912 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027913fi
27914
Martin v. Löwiseba40652007-08-30 20:10:57 +000027915# Support unset when possible.
27916if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27917 as_unset=unset
27918else
27919 as_unset=false
27920fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027921
Martin v. Löwiseba40652007-08-30 20:10:57 +000027922
27923# IFS
27924# We need space, tab and new line, in precisely that order. Quoting is
27925# there to prevent editors from complaining about space-tab.
27926# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27927# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027928as_nl='
27929'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027930IFS=" "" $as_nl"
27931
27932# Find who we are. Look in the path if we contain no directory separator.
27933case $0 in
27934 *[\\/]* ) as_myself=$0 ;;
27935 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027936for as_dir in $PATH
27937do
27938 IFS=$as_save_IFS
27939 test -z "$as_dir" && as_dir=.
27940 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27941done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027942IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027943
Martin v. Löwiseba40652007-08-30 20:10:57 +000027944 ;;
27945esac
27946# We did not find ourselves, most probably we were run as `sh COMMAND'
27947# in which case we are not to be found in the path.
27948if test "x$as_myself" = x; then
27949 as_myself=$0
27950fi
27951if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027952 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027953 { (exit 1); exit 1; }
27954fi
27955
27956# Work around bugs in pre-3.0 UWIN ksh.
27957for as_var in ENV MAIL MAILPATH
27958do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27959done
27960PS1='$ '
27961PS2='> '
27962PS4='+ '
27963
27964# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027965for as_var in \
27966 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27967 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27968 LC_TELEPHONE LC_TIME
27969do
27970 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27971 eval $as_var=C; export $as_var
27972 else
27973 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27974 fi
27975done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027976
27977# Required to use basename.
27978if expr a : '\(a\)' >/dev/null 2>&1 &&
27979 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27980 as_expr=expr
27981else
27982 as_expr=false
27983fi
27984
27985if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27986 as_basename=basename
27987else
27988 as_basename=false
27989fi
27990
27991
27992# Name of the executable.
27993as_me=`$as_basename -- "$0" ||
27994$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27995 X"$0" : 'X\(//\)$' \| \
27996 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027997echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027998 sed '/^.*\/\([^/][^/]*\)\/*$/{
27999 s//\1/
28000 q
28001 }
28002 /^X\/\(\/\/\)$/{
28003 s//\1/
28004 q
28005 }
28006 /^X\/\(\/\).*/{
28007 s//\1/
28008 q
28009 }
28010 s/.*/./; q'`
28011
28012# CDPATH.
28013$as_unset CDPATH
28014
28015
28016
Martin v. Löwis11437992002-04-12 09:54:03 +000028017 as_lineno_1=$LINENO
28018 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028019 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028020 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028021
Martin v. Löwis11437992002-04-12 09:54:03 +000028022 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28023 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028024 # line-number line after each line using $LINENO; the second 'sed'
28025 # does the real work. The second script uses 'N' to pair each
28026 # line-number line with the line containing $LINENO, and appends
28027 # trailing '-' during substitution so that $LINENO is not a special
28028 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028029 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028030 # scripts with optimization help from Paolo Bonzini. Blame Lee
28031 # E. McMahon (1931-1989) for sed's syntax. :-)
28032 sed -n '
28033 p
28034 /[$]LINENO/=
28035 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028036 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028037 s/[$]LINENO.*/&-/
28038 t lineno
28039 b
28040 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028041 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028042 :loop
28043 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028044 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028045 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028046 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028047 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028048 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028049 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028050
Martin v. Löwis11437992002-04-12 09:54:03 +000028051 # Don't try to exec as it changes $[0], causing all sort of problems
28052 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028053 # original and so on. Autoconf is especially sensitive to this).
28054 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028055 # Exit status is that of the last command.
28056 exit
28057}
28058
28059
Martin v. Löwiseba40652007-08-30 20:10:57 +000028060if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28061 as_dirname=dirname
28062else
28063 as_dirname=false
28064fi
28065
28066ECHO_C= ECHO_N= ECHO_T=
28067case `echo -n x` in
28068-n*)
28069 case `echo 'x\c'` in
28070 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28071 *) ECHO_C='\c';;
28072 esac;;
28073*)
28074 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028076
Martin v. Löwiseba40652007-08-30 20:10:57 +000028077if expr a : '\(a\)' >/dev/null 2>&1 &&
28078 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028079 as_expr=expr
28080else
28081 as_expr=false
28082fi
28083
28084rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028085if test -d conf$$.dir; then
28086 rm -f conf$$.dir/conf$$.file
28087else
28088 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028089 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028090fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028091echo >conf$$.file
28092if ln -s conf$$.file conf$$ 2>/dev/null; then
28093 as_ln_s='ln -s'
28094 # ... but there are two gotchas:
28095 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28096 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28097 # In both cases, we have to default to `cp -p'.
28098 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028099 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028100elif ln conf$$.file conf$$ 2>/dev/null; then
28101 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028102else
28103 as_ln_s='cp -p'
28104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028105rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28106rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028107
Skip Montanaro6dead952003-09-25 14:50:04 +000028108if mkdir -p . 2>/dev/null; then
28109 as_mkdir_p=:
28110else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028111 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028112 as_mkdir_p=false
28113fi
28114
Martin v. Löwiseba40652007-08-30 20:10:57 +000028115if test -x / >/dev/null 2>&1; then
28116 as_test_x='test -x'
28117else
28118 if ls -dL / >/dev/null 2>&1; then
28119 as_ls_L_option=L
28120 else
28121 as_ls_L_option=
28122 fi
28123 as_test_x='
28124 eval sh -c '\''
28125 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028126 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028127 else
28128 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028129 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028130 esac;
28131 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28132 ???[sx]*):;;*)false;;esac;fi
28133 '\'' sh
28134 '
28135fi
28136as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028137
28138# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028139as_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 +000028140
28141# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028142as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028143
28144
Martin v. Löwis11437992002-04-12 09:54:03 +000028145exec 6>&1
28146
Martin v. Löwiseba40652007-08-30 20:10:57 +000028147# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028148# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028149# values after options handling.
28150ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028151This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028152generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028153
28154 CONFIG_FILES = $CONFIG_FILES
28155 CONFIG_HEADERS = $CONFIG_HEADERS
28156 CONFIG_LINKS = $CONFIG_LINKS
28157 CONFIG_COMMANDS = $CONFIG_COMMANDS
28158 $ $0 $@
28159
Martin v. Löwiseba40652007-08-30 20:10:57 +000028160on `(hostname || uname -n) 2>/dev/null | sed 1q`
28161"
28162
Martin v. Löwis11437992002-04-12 09:54:03 +000028163_ACEOF
28164
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028165cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028166# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028167config_files="$ac_config_files"
28168config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028169
Martin v. Löwiseba40652007-08-30 20:10:57 +000028170_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028171
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028172cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028173ac_cs_usage="\
28174\`$as_me' instantiates files from templates according to the
28175current configuration.
28176
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028177Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028178
28179 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028180 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028181 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028182 -d, --debug don't remove temporary files
28183 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028184 --file=FILE[:TEMPLATE]
28185 instantiate the configuration file FILE
28186 --header=FILE[:TEMPLATE]
28187 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028188
28189Configuration files:
28190$config_files
28191
28192Configuration headers:
28193$config_headers
28194
28195Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028196
Martin v. Löwiseba40652007-08-30 20:10:57 +000028197_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028198cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028199ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028200python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028201configured by $0, generated by GNU Autoconf 2.61,
28202 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028203
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028204Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028205This config.status script is free software; the Free Software Foundation
28206gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028207
28208ac_pwd='$ac_pwd'
28209srcdir='$srcdir'
28210INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028211_ACEOF
28212
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028213cat >>$CONFIG_STATUS <<\_ACEOF
28214# If no file are specified by the user, then we need to provide default
28215# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028216ac_need_defaults=:
28217while test $# != 0
28218do
28219 case $1 in
28220 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028221 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28222 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028223 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028224 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028225 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028226 ac_option=$1
28227 ac_optarg=$2
28228 ac_shift=shift
28229 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028230 esac
28231
Skip Montanaro6dead952003-09-25 14:50:04 +000028232 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028233 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028234 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28235 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028236 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028237 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028238 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028239 debug=: ;;
28240 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028241 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028242 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028243 ac_need_defaults=false;;
28244 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028245 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028246 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028247 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028248 --he | --h)
28249 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028250 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028251Try \`$0 --help' for more information." >&2
28252 { (exit 1); exit 1; }; };;
28253 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028254 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028255 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28256 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28257 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028258
28259 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028260 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028261Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028262 { (exit 1); exit 1; }; } ;;
28263
Martin v. Löwiseba40652007-08-30 20:10:57 +000028264 *) ac_config_targets="$ac_config_targets $1"
28265 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028266
28267 esac
28268 shift
28269done
28270
Skip Montanaro6dead952003-09-25 14:50:04 +000028271ac_configure_extra_args=
28272
28273if $ac_cs_silent; then
28274 exec 6>/dev/null
28275 ac_configure_extra_args="$ac_configure_extra_args --silent"
28276fi
28277
28278_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028279cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028280if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028281 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28282 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028283 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028284 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028285fi
28286
Martin v. Löwis11437992002-04-12 09:54:03 +000028287_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028288cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028289exec 5>>config.log
28290{
28291 echo
28292 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28293## Running $as_me. ##
28294_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028295 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028296} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028297
Martin v. Löwiseba40652007-08-30 20:10:57 +000028298_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028299cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028300_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028302cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028303
28304# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028305for ac_config_target in $ac_config_targets
28306do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028307 case $ac_config_target in
28308 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28309 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28310 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28311 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028312 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28313 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028314 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28315 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028316 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028317
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028318 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28319echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028320 { (exit 1); exit 1; }; };;
28321 esac
28322done
28323
Martin v. Löwiseba40652007-08-30 20:10:57 +000028324
Martin v. Löwis11437992002-04-12 09:54:03 +000028325# If the user did not use the arguments to specify the items to instantiate,
28326# then the envvar interface is used. Set only those that are not.
28327# We use the long form for the default assignment because of an extremely
28328# bizarre bug on SunOS 4.1.3.
28329if $ac_need_defaults; then
28330 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28331 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28332fi
28333
Skip Montanaro6dead952003-09-25 14:50:04 +000028334# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028335# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028336# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028337# Hook for its removal unless debugging.
28338# Note that there is a small window in which the directory will not be cleaned:
28339# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028340$debug ||
28341{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028342 tmp=
28343 trap 'exit_status=$?
28344 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28345' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028346 trap '{ (exit 1); exit 1; }' 1 2 13 15
28347}
Martin v. Löwis11437992002-04-12 09:54:03 +000028348# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028349
Martin v. Löwis11437992002-04-12 09:54:03 +000028350{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028351 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028352 test -n "$tmp" && test -d "$tmp"
28353} ||
28354{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028355 tmp=./conf$$-$RANDOM
28356 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028357} ||
28358{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028359 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028360 { (exit 1); exit 1; }
28361}
28362
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028363#
28364# Set up the sed scripts for CONFIG_FILES section.
28365#
28366
28367# No need to generate the scripts if there are no CONFIG_FILES.
28368# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028369if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028370
28371_ACEOF
28372
Martin v. Löwiseba40652007-08-30 20:10:57 +000028373
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028374
Martin v. Löwiseba40652007-08-30 20:10:57 +000028375ac_delim='%!_!# '
28376for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028377 cat >conf$$subs.sed <<_ACEOF
28378SHELL!$SHELL$ac_delim
28379PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28380PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28381PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28382PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28383PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28384PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28385exec_prefix!$exec_prefix$ac_delim
28386prefix!$prefix$ac_delim
28387program_transform_name!$program_transform_name$ac_delim
28388bindir!$bindir$ac_delim
28389sbindir!$sbindir$ac_delim
28390libexecdir!$libexecdir$ac_delim
28391datarootdir!$datarootdir$ac_delim
28392datadir!$datadir$ac_delim
28393sysconfdir!$sysconfdir$ac_delim
28394sharedstatedir!$sharedstatedir$ac_delim
28395localstatedir!$localstatedir$ac_delim
28396includedir!$includedir$ac_delim
28397oldincludedir!$oldincludedir$ac_delim
28398docdir!$docdir$ac_delim
28399infodir!$infodir$ac_delim
28400htmldir!$htmldir$ac_delim
28401dvidir!$dvidir$ac_delim
28402pdfdir!$pdfdir$ac_delim
28403psdir!$psdir$ac_delim
28404libdir!$libdir$ac_delim
28405localedir!$localedir$ac_delim
28406mandir!$mandir$ac_delim
28407DEFS!$DEFS$ac_delim
28408ECHO_C!$ECHO_C$ac_delim
28409ECHO_N!$ECHO_N$ac_delim
28410ECHO_T!$ECHO_T$ac_delim
28411LIBS!$LIBS$ac_delim
28412build_alias!$build_alias$ac_delim
28413host_alias!$host_alias$ac_delim
28414target_alias!$target_alias$ac_delim
28415VERSION!$VERSION$ac_delim
28416SOVERSION!$SOVERSION$ac_delim
28417CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28418UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28419ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028420LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028421PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28422PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28423PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28424PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28425PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28426FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28427FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28428FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28429FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28430FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28431MACHDEP!$MACHDEP$ac_delim
28432SGI_ABI!$SGI_ABI$ac_delim
28433EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28434EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28435CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28436EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28437CC!$CC$ac_delim
28438CFLAGS!$CFLAGS$ac_delim
28439LDFLAGS!$LDFLAGS$ac_delim
28440CPPFLAGS!$CPPFLAGS$ac_delim
28441ac_ct_CC!$ac_ct_CC$ac_delim
28442EXEEXT!$EXEEXT$ac_delim
28443OBJEXT!$OBJEXT$ac_delim
28444CXX!$CXX$ac_delim
28445MAINCC!$MAINCC$ac_delim
28446CPP!$CPP$ac_delim
28447GREP!$GREP$ac_delim
28448EGREP!$EGREP$ac_delim
28449BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28450LIBRARY!$LIBRARY$ac_delim
28451LDLIBRARY!$LDLIBRARY$ac_delim
28452DLLLIBRARY!$DLLLIBRARY$ac_delim
28453BLDLIBRARY!$BLDLIBRARY$ac_delim
28454LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28455INSTSONAME!$INSTSONAME$ac_delim
28456RUNSHARED!$RUNSHARED$ac_delim
28457LINKCC!$LINKCC$ac_delim
28458GNULD!$GNULD$ac_delim
28459RANLIB!$RANLIB$ac_delim
28460AR!$AR$ac_delim
28461ARFLAGS!$ARFLAGS$ac_delim
28462SVNVERSION!$SVNVERSION$ac_delim
28463INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28464INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28465INSTALL_DATA!$INSTALL_DATA$ac_delim
28466LN!$LN$ac_delim
28467OPT!$OPT$ac_delim
28468BASECFLAGS!$BASECFLAGS$ac_delim
28469UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28470OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28471LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28472SO!$SO$ac_delim
28473LDSHARED!$LDSHARED$ac_delim
28474BLDSHARED!$BLDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028475_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028477 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 +000028478 break
28479 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028480 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28481echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028482 { (exit 1); exit 1; }; }
28483 else
28484 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028485 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028486done
28487
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028488ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28489if test -n "$ac_eof"; then
28490 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28491 ac_eof=`expr $ac_eof + 1`
28492fi
28493
28494cat >>$CONFIG_STATUS <<_ACEOF
28495cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28496/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028497_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028498sed '
28499s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28500s/^/s,@/; s/!/@,|#_!!_#|/
28501:n
28502t n
28503s/'"$ac_delim"'$/,g/; t
28504s/$/\\/; p
28505N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28506' >>$CONFIG_STATUS <conf$$subs.sed
28507rm -f conf$$subs.sed
28508cat >>$CONFIG_STATUS <<_ACEOF
28509CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028510_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028511
28512
28513ac_delim='%!_!# '
28514for ac_last_try in false false false false false :; do
28515 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren92919a62009-12-24 13:30:58 +000028516CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028517LINKFORSHARED!$LINKFORSHARED$ac_delim
28518CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28519SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028520PKG_CONFIG!$PKG_CONFIG$ac_delim
28521LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028522USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28523SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28524USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28525LDLAST!$LDLAST$ac_delim
28526THREADOBJ!$THREADOBJ$ac_delim
28527DLINCLDIR!$DLINCLDIR$ac_delim
28528DYNLOADFILE!$DYNLOADFILE$ac_delim
28529MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28530TRUE!$TRUE$ac_delim
28531LIBOBJS!$LIBOBJS$ac_delim
28532HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28533HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28534HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28535HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28536HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28537LIBM!$LIBM$ac_delim
28538LIBC!$LIBC$ac_delim
28539UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28540THREADHEADERS!$THREADHEADERS$ac_delim
28541SRCDIRS!$SRCDIRS$ac_delim
28542LTLIBOBJS!$LTLIBOBJS$ac_delim
28543_ACEOF
28544
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028545 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028546 break
28547 elif $ac_last_try; then
28548 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28549echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028550 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028551 else
28552 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28553 fi
28554done
28555
28556ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28557if test -n "$ac_eof"; then
28558 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28559 ac_eof=`expr $ac_eof + 1`
28560fi
28561
28562cat >>$CONFIG_STATUS <<_ACEOF
28563cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28564/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028565_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028566sed '
28567s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28568s/^/s,@/; s/!/@,|#_!!_#|/
28569:n
28570t n
28571s/'"$ac_delim"'$/,g/; t
28572s/$/\\/; p
28573N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28574' >>$CONFIG_STATUS <conf$$subs.sed
28575rm -f conf$$subs.sed
28576cat >>$CONFIG_STATUS <<_ACEOF
28577:end
28578s/|#_!!_#|//g
28579CEOF$ac_eof
28580_ACEOF
28581
Martin v. Löwiseba40652007-08-30 20:10:57 +000028582
28583# VPATH may cause trouble with some makes, so we remove $(srcdir),
28584# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28585# trailing colons and then remove the whole line if VPATH becomes empty
28586# (actually we leave an empty line to preserve line numbers).
28587if test "x$srcdir" = x.; then
28588 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28589s/:*\$(srcdir):*/:/
28590s/:*\${srcdir}:*/:/
28591s/:*@srcdir@:*/:/
28592s/^\([^=]*=[ ]*\):*/\1/
28593s/:*$//
28594s/^[^=]*=[ ]*$//
28595}'
28596fi
28597
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028598cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028599fi # test -n "$CONFIG_FILES"
28600
Martin v. Löwiseba40652007-08-30 20:10:57 +000028601
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028602for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028603do
28604 case $ac_tag in
28605 :[FHLC]) ac_mode=$ac_tag; continue;;
28606 esac
28607 case $ac_mode$ac_tag in
28608 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028609 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28610echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028611 { (exit 1); exit 1; }; };;
28612 :[FH]-) ac_tag=-:-;;
28613 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28614 esac
28615 ac_save_IFS=$IFS
28616 IFS=:
28617 set x $ac_tag
28618 IFS=$ac_save_IFS
28619 shift
28620 ac_file=$1
28621 shift
28622
28623 case $ac_mode in
28624 :L) ac_source=$1;;
28625 :[FH])
28626 ac_file_inputs=
28627 for ac_f
28628 do
28629 case $ac_f in
28630 -) ac_f="$tmp/stdin";;
28631 *) # Look for the file first in the build tree, then in the source tree
28632 # (if the path is not absolute). The absolute path cannot be DOS-style,
28633 # because $ac_f cannot contain `:'.
28634 test -f "$ac_f" ||
28635 case $ac_f in
28636 [\\/$]*) false;;
28637 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28638 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028639 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28640echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028641 { (exit 1); exit 1; }; };;
28642 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028643 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028644 done
28645
28646 # Let's still pretend it is `configure' which instantiates (i.e., don't
28647 # use $as_me), people would be surprised to read:
28648 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028649 configure_input="Generated from "`IFS=:
28650 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028651 if test x"$ac_file" != x-; then
28652 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028653 { echo "$as_me:$LINENO: creating $ac_file" >&5
28654echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028655 fi
28656
28657 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028658 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028659 esac
28660 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028661 esac
28662
Martin v. Löwiseba40652007-08-30 20:10:57 +000028663 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028664$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028665 X"$ac_file" : 'X\(//\)[^/]' \| \
28666 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028667 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028668echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028669 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28670 s//\1/
28671 q
28672 }
28673 /^X\(\/\/\)[^/].*/{
28674 s//\1/
28675 q
28676 }
28677 /^X\(\/\/\)$/{
28678 s//\1/
28679 q
28680 }
28681 /^X\(\/\).*/{
28682 s//\1/
28683 q
28684 }
28685 s/.*/./; q'`
28686 { as_dir="$ac_dir"
28687 case $as_dir in #(
28688 -*) as_dir=./$as_dir;;
28689 esac
28690 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028691 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028692 while :; do
28693 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028694 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028695 *) as_qdir=$as_dir;;
28696 esac
28697 as_dirs="'$as_qdir' $as_dirs"
28698 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028699$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028700 X"$as_dir" : 'X\(//\)[^/]' \| \
28701 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028702 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028703echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028704 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28705 s//\1/
28706 q
28707 }
28708 /^X\(\/\/\)[^/].*/{
28709 s//\1/
28710 q
28711 }
28712 /^X\(\/\/\)$/{
28713 s//\1/
28714 q
28715 }
28716 /^X\(\/\).*/{
28717 s//\1/
28718 q
28719 }
28720 s/.*/./; q'`
28721 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028722 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028723 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028724 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28725echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028726 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028727 ac_builddir=.
28728
Martin v. Löwiseba40652007-08-30 20:10:57 +000028729case "$ac_dir" in
28730.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28731*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028732 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028733 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028734 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028735 case $ac_top_builddir_sub in
28736 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28737 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28738 esac ;;
28739esac
28740ac_abs_top_builddir=$ac_pwd
28741ac_abs_builddir=$ac_pwd$ac_dir_suffix
28742# for backward compatibility:
28743ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028744
28745case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028746 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028747 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028748 ac_top_srcdir=$ac_top_builddir_sub
28749 ac_abs_top_srcdir=$ac_pwd ;;
28750 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028751 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028752 ac_top_srcdir=$srcdir
28753 ac_abs_top_srcdir=$srcdir ;;
28754 *) # Relative name.
28755 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28756 ac_top_srcdir=$ac_top_build_prefix$srcdir
28757 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028758esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028759ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028760
Martin v. Löwis11437992002-04-12 09:54:03 +000028761
Martin v. Löwiseba40652007-08-30 20:10:57 +000028762 case $ac_mode in
28763 :F)
28764 #
28765 # CONFIG_FILE
28766 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028767
28768 case $INSTALL in
28769 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028770 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028771 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028772_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028773
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028774cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028775# If the template does not know about datarootdir, expand it.
28776# FIXME: This hack should be removed a few years after 2.60.
28777ac_datarootdir_hack=; ac_datarootdir_seen=
28778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028779case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028780 p
28781 q
28782}
28783/@datadir@/p
28784/@docdir@/p
28785/@infodir@/p
28786/@localedir@/p
28787/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028788' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028789*datarootdir*) ac_datarootdir_seen=yes;;
28790*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028791 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28792echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028793_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028794cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028795 ac_datarootdir_hack='
28796 s&@datadir@&$datadir&g
28797 s&@docdir@&$docdir&g
28798 s&@infodir@&$infodir&g
28799 s&@localedir@&$localedir&g
28800 s&@mandir@&$mandir&g
28801 s&\\\${datarootdir}&$datarootdir&g' ;;
28802esac
28803_ACEOF
28804
28805# Neutralize VPATH when `$srcdir' = `.'.
28806# Shell code in configure.ac might set extrasub.
28807# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028808cat >>$CONFIG_STATUS <<_ACEOF
28809 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028810$extrasub
28811_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028812cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028813:t
28814/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028815s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028816s&@top_builddir@&$ac_top_builddir_sub&;t t
28817s&@srcdir@&$ac_srcdir&;t t
28818s&@abs_srcdir@&$ac_abs_srcdir&;t t
28819s&@top_srcdir@&$ac_top_srcdir&;t t
28820s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28821s&@builddir@&$ac_builddir&;t t
28822s&@abs_builddir@&$ac_abs_builddir&;t t
28823s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28824s&@INSTALL@&$ac_INSTALL&;t t
28825$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028826" $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 +000028827
Martin v. Löwiseba40652007-08-30 20:10:57 +000028828test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28829 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28830 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028831 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028832which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028833echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028834which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028835
Martin v. Löwiseba40652007-08-30 20:10:57 +000028836 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028837 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028838 -) cat "$tmp/out"; rm -f "$tmp/out";;
28839 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28840 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028841 ;;
28842 :H)
28843 #
28844 # CONFIG_HEADER
28845 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028846_ACEOF
28847
28848# Transform confdefs.h into a sed script `conftest.defines', that
28849# substitutes the proper values into config.h.in to produce config.h.
28850rm -f conftest.defines conftest.tail
28851# First, append a space to every undef/define line, to ease matching.
28852echo 's/$/ /' >conftest.defines
28853# Then, protect against being on the right side of a sed subst, or in
28854# an unquoted here document, in config.status. If some macros were
28855# called several times there might be several #defines for the same
28856# symbol, which is useless. But do not sort them, since the last
28857# AC_DEFINE must be honored.
28858ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28859# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28860# NAME is the cpp macro being defined, VALUE is the value it is being given.
28861# PARAMS is the parameter list in the macro definition--in most cases, it's
28862# just an empty string.
28863ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28864ac_dB='\\)[ (].*,\\1define\\2'
28865ac_dC=' '
28866ac_dD=' ,'
28867
28868uniq confdefs.h |
28869 sed -n '
28870 t rset
28871 :rset
28872 s/^[ ]*#[ ]*define[ ][ ]*//
28873 t ok
28874 d
28875 :ok
28876 s/[\\&,]/\\&/g
28877 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28878 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28879 ' >>conftest.defines
28880
28881# Remove the space that was appended to ease matching.
28882# Then replace #undef with comments. This is necessary, for
28883# example, in the case of _POSIX_SOURCE, which is predefined and required
28884# on some systems where configure will not decide to define it.
28885# (The regexp can be short, since the line contains either #define or #undef.)
28886echo 's/ $//
28887s,^[ #]*u.*,/* & */,' >>conftest.defines
28888
28889# Break up conftest.defines:
28890ac_max_sed_lines=50
28891
28892# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28893# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28894# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28895# et cetera.
28896ac_in='$ac_file_inputs'
28897ac_out='"$tmp/out1"'
28898ac_nxt='"$tmp/out2"'
28899
28900while :
28901do
28902 # Write a here document:
28903 cat >>$CONFIG_STATUS <<_ACEOF
28904 # First, check the format of the line:
28905 cat >"\$tmp/defines.sed" <<\\CEOF
28906/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28907/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28908b
28909:def
28910_ACEOF
28911 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28912 echo 'CEOF
28913 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28914 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28915 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28916 grep . conftest.tail >/dev/null || break
28917 rm -f conftest.defines
28918 mv conftest.tail conftest.defines
28919done
28920rm -f conftest.defines conftest.tail
28921
28922echo "ac_result=$ac_in" >>$CONFIG_STATUS
28923cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028924 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028925 echo "/* $configure_input */" >"$tmp/config.h"
28926 cat "$ac_result" >>"$tmp/config.h"
28927 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28928 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28929echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028930 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028931 rm -f $ac_file
28932 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028933 fi
28934 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028935 echo "/* $configure_input */"
28936 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028937 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028938 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028939 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028940
Martin v. Löwiseba40652007-08-30 20:10:57 +000028941
28942 esac
28943
28944done # for ac_tag
28945
Guido van Rossum627b2d71993-12-24 10:39:16 +000028946
Martin v. Löwis11437992002-04-12 09:54:03 +000028947{ (exit 0); exit 0; }
28948_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028949chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028950ac_clean_files=$ac_clean_files_save
28951
28952
28953# configure is writing to config.log, and then calls config.status.
28954# config.status does its own redirection, appending to config.log.
28955# Unfortunately, on DOS this fails, as config.log is still kept open
28956# by configure, so config.status won't be able to write to it; its
28957# output is simply discarded. So we exec the FD to /dev/null,
28958# effectively closing config.log, so it can be properly (re)opened and
28959# appended to by config.status. When coming back to configure, we
28960# need to make the FD available again.
28961if test "$no_create" != yes; then
28962 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028963 ac_config_status_args=
28964 test "$silent" = yes &&
28965 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028966 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028967 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028968 exec 5>>config.log
28969 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28970 # would make configure fail if this is the last instruction.
28971 $ac_cs_success || { (exit 1); exit 1; }
28972fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028973
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028974
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028975echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028976if test ! -f Modules/Setup
28977then
28978 cp $srcdir/Modules/Setup.dist Modules/Setup
28979fi
28980
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028981echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028982if test ! -f Modules/Setup.local
28983then
28984 echo "# Edit this file for local setup changes" >Modules/Setup.local
28985fi
28986
28987echo "creating Makefile"
28988$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28989 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028990 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000028991
28992case $ac_sys_system in
28993BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028994 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028995
28996 Support for BeOS is deprecated as of Python 2.6.
28997 See PEP 11 for the gory details.
28998 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028999echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029000
29001 Support for BeOS is deprecated as of Python 2.6.
29002 See PEP 11 for the gory details.
29003 " >&2;}
29004 ;;
29005*) ;;
29006esac
29007
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029008mv config.c Modules