blob: f58fccf09edc5dc73ce84f3626c181351c1ad129 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren75912852010-04-08 08:13:31 +00002# From configure.in Revision: 79652 .
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
Ronald Oussoren75912852010-04-08 08:13:31 +0000715LDCXXSHARED
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000716BLDSHARED
717CCSHARED
718LINKFORSHARED
719CFLAGSFORSHARED
720SHLIBS
Benjamin Peterson1c335e62010-01-01 15:16:29 +0000721PKG_CONFIG
722LIBFFI_INCLUDEDIR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000723USE_SIGNAL_MODULE
724SIGNAL_OBJS
725USE_THREAD_MODULE
726LDLAST
727THREADOBJ
728DLINCLDIR
729DYNLOADFILE
730MACHDEP_OBJS
731TRUE
732LIBOBJS
733HAVE_GETHOSTBYNAME_R_6_ARG
734HAVE_GETHOSTBYNAME_R_5_ARG
735HAVE_GETHOSTBYNAME_R_3_ARG
736HAVE_GETHOSTBYNAME_R
737HAVE_GETHOSTBYNAME
738LIBM
739LIBC
740UNICODE_OBJS
741THREADHEADERS
742SRCDIRS
743LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000744ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000745 ac_precious_vars='build_alias
746host_alias
747target_alias
748CC
749CFLAGS
750LDFLAGS
751LIBS
752CPPFLAGS
753CPP'
754
Guido van Rossum627b2d71993-12-24 10:39:16 +0000755
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757ac_init_help=
758ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759# The variables have the same names as the options, with
760# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000761cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000762exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764no_recursion=
765prefix=NONE
766program_prefix=NONE
767program_suffix=NONE
768program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773x_includes=NONE
774x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000775
776# Installation directory options.
777# These are left unexpanded so users can "make install exec_prefix=/foo"
778# and all the variables that are supposed to be based on exec_prefix
779# by default will actually change.
780# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000781# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782bindir='${exec_prefix}/bin'
783sbindir='${exec_prefix}/sbin'
784libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000785datarootdir='${prefix}/share'
786datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000787sysconfdir='${prefix}/etc'
788sharedstatedir='${prefix}/com'
789localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000790includedir='${prefix}/include'
791oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000792docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
793infodir='${datarootdir}/info'
794htmldir='${docdir}'
795dvidir='${docdir}'
796pdfdir='${docdir}'
797psdir='${docdir}'
798libdir='${exec_prefix}/lib'
799localedir='${datarootdir}/locale'
800mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000803ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806 # If the previous option needs an argument, assign it.
807 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000808 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809 ac_prev=
810 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000811 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812
Martin v. Löwiseba40652007-08-30 20:10:57 +0000813 case $ac_option in
814 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
815 *) ac_optarg=yes ;;
816 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818 # Accept the important Cygnus configure options, so we can diagnose typos.
819
Martin v. Löwiseba40652007-08-30 20:10:57 +0000820 case $ac_dashdash$ac_option in
821 --)
822 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -bindir | --bindir | --bindi | --bind | --bin | --bi)
825 ac_prev=bindir ;;
826 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828
829 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000830 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834 -cache-file | --cache-file | --cache-fil | --cache-fi \
835 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
836 ac_prev=cache_file ;;
837 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
838 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 cache_file=$ac_optarg ;;
840
841 --config-cache | -C)
842 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843
Martin v. Löwiseba40652007-08-30 20:10:57 +0000844 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848
Martin v. Löwiseba40652007-08-30 20:10:57 +0000849 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
850 | --dataroo | --dataro | --datar)
851 ac_prev=datarootdir ;;
852 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
853 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
854 datarootdir=$ac_optarg ;;
855
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000857 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000859 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
860 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000862 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
863 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000864
865 -docdir | --docdir | --docdi | --doc | --do)
866 ac_prev=docdir ;;
867 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
868 docdir=$ac_optarg ;;
869
870 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
871 ac_prev=dvidir ;;
872 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
873 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
875 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000876 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000878 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
879 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000880 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000881 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
882 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
885 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
886 | --exec | --exe | --ex)
887 ac_prev=exec_prefix ;;
888 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
889 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
890 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
893 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 # Obsolete; use --with-gas.
895 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 -help | --help | --hel | --he | -h)
898 ac_init_help=long ;;
899 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
900 ac_init_help=recursive ;;
901 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
902 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
904 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000905 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908
Martin v. Löwiseba40652007-08-30 20:10:57 +0000909 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
910 ac_prev=htmldir ;;
911 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
912 | --ht=*)
913 htmldir=$ac_optarg ;;
914
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915 -includedir | --includedir | --includedi | --included | --include \
916 | --includ | --inclu | --incl | --inc)
917 ac_prev=includedir ;;
918 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
919 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921
922 -infodir | --infodir | --infodi | --infod | --info | --inf)
923 ac_prev=infodir ;;
924 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
927 -libdir | --libdir | --libdi | --libd)
928 ac_prev=libdir ;;
929 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
932 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
933 | --libexe | --libex | --libe)
934 ac_prev=libexecdir ;;
935 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
936 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 -localedir | --localedir | --localedi | --localed | --locale)
940 ac_prev=localedir ;;
941 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
942 localedir=$ac_optarg ;;
943
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000945 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=localstatedir ;;
947 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000948 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
951 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
952 ac_prev=mandir ;;
953 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 # Obsolete; use --without-fp.
958 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
960 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 no_create=yes ;;
963
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
965 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
966 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
969 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
970 | --oldin | --oldi | --old | --ol | --o)
971 ac_prev=oldincludedir ;;
972 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
973 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
974 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
978 ac_prev=prefix ;;
979 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-prefix | --program-prefix | --program-prefi | --program-pref \
983 | --program-pre | --program-pr | --program-p)
984 ac_prev=program_prefix ;;
985 -program-prefix=* | --program-prefix=* | --program-prefi=* \
986 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-suffix | --program-suffix | --program-suffi | --program-suff \
990 | --program-suf | --program-su | --program-s)
991 ac_prev=program_suffix ;;
992 -program-suffix=* | --program-suffix=* | --program-suffi=* \
993 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -program-transform-name | --program-transform-name \
997 | --program-transform-nam | --program-transform-na \
998 | --program-transform-n | --program-transform- \
999 | --program-transform | --program-transfor \
1000 | --program-transfo | --program-transf \
1001 | --program-trans | --program-tran \
1002 | --progr-tra | --program-tr | --program-t)
1003 ac_prev=program_transform_name ;;
1004 -program-transform-name=* | --program-transform-name=* \
1005 | --program-transform-nam=* | --program-transform-na=* \
1006 | --program-transform-n=* | --program-transform-=* \
1007 | --program-transform=* | --program-transfor=* \
1008 | --program-transfo=* | --program-transf=* \
1009 | --program-trans=* | --program-tran=* \
1010 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Martin v. Löwiseba40652007-08-30 20:10:57 +00001013 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1014 ac_prev=pdfdir ;;
1015 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1016 pdfdir=$ac_optarg ;;
1017
1018 -psdir | --psdir | --psdi | --psd | --ps)
1019 ac_prev=psdir ;;
1020 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1021 psdir=$ac_optarg ;;
1022
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1024 | -silent | --silent | --silen | --sile | --sil)
1025 silent=yes ;;
1026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1028 ac_prev=sbindir ;;
1029 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1030 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
1033 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1034 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1035 | --sharedst | --shareds | --shared | --share | --shar \
1036 | --sha | --sh)
1037 ac_prev=sharedstatedir ;;
1038 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1039 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1040 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1041 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044 -site | --site | --sit)
1045 ac_prev=site ;;
1046 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1050 ac_prev=srcdir ;;
1051 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1055 | --syscon | --sysco | --sysc | --sys | --sy)
1056 ac_prev=sysconfdir ;;
1057 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1058 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1067 verbose=yes ;;
1068
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 -version | --version | --versio | --versi | --vers | -V)
1070 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001073 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1076 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1079 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001082 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001084 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1085 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001087 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1088 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 --x)
1091 # Obsolete; use --with-x.
1092 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1095 | --x-incl | --x-inc | --x-in | --x-i)
1096 ac_prev=x_includes ;;
1097 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1098 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1102 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1103 ac_prev=x_libraries ;;
1104 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1105 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001108 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001109Try \`$0 --help' for more information." >&2
1110 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111 ;;
1112
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 *=*)
1114 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1115 # Reject names that are not valid shell variable names.
1116 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001117 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001119 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 export $ac_envvar ;;
1121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001124 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001126 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 ;;
1129
1130 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001131done
1132
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001135 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137fi
1138
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001139# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001140for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1141 datadir sysconfdir sharedstatedir localstatedir includedir \
1142 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1143 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001145 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001147 [\\/$]* | ?:[\\/]* ) continue;;
1148 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001150 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001151 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001152done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# There might be people who depend on the old broken behavior: `$host'
1155# used to hold the argument of --host etc.
1156# FIXME: To remove some day.
1157build=$build_alias
1158host=$host_alias
1159target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001160
Martin v. Löwis11437992002-04-12 09:54:03 +00001161# FIXME: To remove some day.
1162if test "x$host_alias" != x; then
1163 if test "x$build_alias" = x; then
1164 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001165 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 +00001166 If a cross compiler is detected then cross compile mode will be used." >&2
1167 elif test "x$build_alias" != "x$host_alias"; then
1168 cross_compiling=yes
1169 fi
1170fi
1171
1172ac_tool_prefix=
1173test -n "$host_alias" && ac_tool_prefix=$host_alias-
1174
1175test "$silent" = yes && exec 6>/dev/null
1176
Guido van Rossum627b2d71993-12-24 10:39:16 +00001177
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178ac_pwd=`pwd` && test -n "$ac_pwd" &&
1179ac_ls_di=`ls -di .` &&
1180ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001181 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 { (exit 1); exit 1; }; }
1183test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001184 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001185 { (exit 1); exit 1; }; }
1186
1187
Guido van Rossum627b2d71993-12-24 10:39:16 +00001188# Find the source files, if location was not specified.
1189if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001191 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001192 ac_confdir=`$as_dirname -- "$0" ||
1193$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1194 X"$0" : 'X\(//\)[^/]' \| \
1195 X"$0" : 'X\(//\)$' \| \
1196 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1197echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001198 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)[^/].*/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\/\)$/{
1207 s//\1/
1208 q
1209 }
1210 /^X\(\/\).*/{
1211 s//\1/
1212 q
1213 }
1214 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217 srcdir=..
1218 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219else
1220 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222if test ! -r "$srcdir/$ac_unique_file"; then
1223 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001224 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1228ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001229 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001230 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001231 pwd)`
1232# When building in place, set srcdir=.
1233if test "$ac_abs_confdir" = "$ac_pwd"; then
1234 srcdir=.
1235fi
1236# Remove unnecessary trailing slashes from srcdir.
1237# Double slashes in file names in object file debugging info
1238# mess up M-x gdb in Emacs.
1239case $srcdir in
1240*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1241esac
1242for ac_var in $ac_precious_vars; do
1243 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1244 eval ac_env_${ac_var}_value=\$${ac_var}
1245 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1246 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1247done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249#
1250# Report the --help message.
1251#
1252if test "$ac_init_help" = "long"; then
1253 # Omit some internal or obsolete options to make the list less imposing.
1254 # This message is too long to be a string in the A/UX 3.1 sh.
1255 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001256\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001257
1258Usage: $0 [OPTION]... [VAR=VALUE]...
1259
1260To assign environment variables (e.g., CC, CFLAGS...), specify them as
1261VAR=VALUE. See below for descriptions of some of the useful variables.
1262
1263Defaults for the options are specified in brackets.
1264
1265Configuration:
1266 -h, --help display this help and exit
1267 --help=short display options specific to this package
1268 --help=recursive display the short help of all the included packages
1269 -V, --version display version information and exit
1270 -q, --quiet, --silent do not print \`checking...' messages
1271 --cache-file=FILE cache test results in FILE [disabled]
1272 -C, --config-cache alias for \`--cache-file=config.cache'
1273 -n, --no-create do not create output files
1274 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276Installation directories:
1277 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001278 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001279 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001280 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001281
1282By default, \`make install' will install all the files in
1283\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1284an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1285for instance \`--prefix=\$HOME'.
1286
1287For better control, use the options below.
1288
1289Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001290 --bindir=DIR user executables [EPREFIX/bin]
1291 --sbindir=DIR system admin executables [EPREFIX/sbin]
1292 --libexecdir=DIR program executables [EPREFIX/libexec]
1293 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1294 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1295 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1296 --libdir=DIR object code libraries [EPREFIX/lib]
1297 --includedir=DIR C header files [PREFIX/include]
1298 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1299 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1300 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1301 --infodir=DIR info documentation [DATAROOTDIR/info]
1302 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1303 --mandir=DIR man documentation [DATAROOTDIR/man]
1304 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1305 --htmldir=DIR html documentation [DOCDIR]
1306 --dvidir=DIR dvi documentation [DOCDIR]
1307 --pdfdir=DIR pdf documentation [DOCDIR]
1308 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001309_ACEOF
1310
1311 cat <<\_ACEOF
1312_ACEOF
1313fi
1314
1315if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001316 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001317 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001318 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001319 cat <<\_ACEOF
1320
1321Optional Features:
1322 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1323 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001324 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001325 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-framework[=INSTALLDIR]
1327 Build (MacOSX|Darwin) framework
1328 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001329 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1331 --enable-ipv6 Enable ipv6 (with ipv4) support
1332 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001333 --enable-big-digits[=BITS]
1334 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001335 --enable-unicode[=ucs[24]]
1336 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001337
1338Optional Packages:
1339 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1340 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001341 --with-universal-archs=ARCH
1342 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001343 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001344 --with-framework-name=FRAMEWORK
1345 specify an alternate name of the framework built
1346 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001348 --with-cxx-main=<compiler>
1349 compile main() and link python executable with C++
1350 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001351 --with-suffix=.exe set executable suffix
1352 --with-pydebug build with Py_DEBUG defined
1353 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001354 --with-system-expat build pyexpat module using an installed expat
1355 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001356 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001357 --with-dbmliborder=db1:db2:...
1358 order to check db backends for dbm. Valid value is a
1359 colon separated string with the backend names
1360 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001361 --with-signal-module disable/enable signal module
1362 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1363 --with(out)-threads[=DIRECTORY]
1364 disable/enable thread support
1365 --with(out)-thread[=DIRECTORY]
1366 deprecated; use --with(out)-threads
1367 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001368 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001369 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001370 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001371 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001372 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001373 --with-fpectl enable SIGFPE catching
1374 --with-libm=STRING math library
1375 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001376
1377Some influential environment variables:
1378 CC C compiler command
1379 CFLAGS C compiler flags
1380 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1381 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001382 LIBS libraries to pass to the linker, e.g. -l<library>
1383 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1384 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001385 CPP C preprocessor
1386
1387Use these variables to override the choices made by `configure' or to help
1388it to find libraries and programs with nonstandard names/locations.
1389
Georg Brandl464432d2009-05-20 18:24:08 +00001390Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001391_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001392ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001393fi
1394
1395if test "$ac_init_help" = "recursive"; then
1396 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001397 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001398 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_builddir=.
1400
Martin v. Löwiseba40652007-08-30 20:10:57 +00001401case "$ac_dir" in
1402.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1403*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001404 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001406 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407 case $ac_top_builddir_sub in
1408 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1409 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1410 esac ;;
1411esac
1412ac_abs_top_builddir=$ac_pwd
1413ac_abs_builddir=$ac_pwd$ac_dir_suffix
1414# for backward compatibility:
1415ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001416
1417case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001420 ac_top_srcdir=$ac_top_builddir_sub
1421 ac_abs_top_srcdir=$ac_pwd ;;
1422 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424 ac_top_srcdir=$srcdir
1425 ac_abs_top_srcdir=$srcdir ;;
1426 *) # Relative name.
1427 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1428 ac_top_srcdir=$ac_top_build_prefix$srcdir
1429 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001430esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001431ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001432
Martin v. Löwiseba40652007-08-30 20:10:57 +00001433 cd "$ac_dir" || { ac_status=$?; continue; }
1434 # Check for guested configure.
1435 if test -f "$ac_srcdir/configure.gnu"; then
1436 echo &&
1437 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1438 elif test -f "$ac_srcdir/configure"; then
1439 echo &&
1440 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001442 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001443 fi || ac_status=$?
1444 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 done
1446fi
1447
Martin v. Löwiseba40652007-08-30 20:10:57 +00001448test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001449if $ac_init_version; then
1450 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001451python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001452generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001453
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014552002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001456This configure script is free software; the Free Software Foundation
1457gives unlimited permission to copy, distribute and modify it.
1458_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001459 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001461cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001462This file contains any messages produced by compilers while
1463running configure, to aid debugging if configure makes a mistake.
1464
Martin v. Löwis174440b2008-10-03 08:59:41 +00001465It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001466generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001467
1468 $ $0 $@
1469
1470_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001471exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001472{
1473cat <<_ASUNAME
1474## --------- ##
1475## Platform. ##
1476## --------- ##
1477
1478hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1479uname -m = `(uname -m) 2>/dev/null || echo unknown`
1480uname -r = `(uname -r) 2>/dev/null || echo unknown`
1481uname -s = `(uname -s) 2>/dev/null || echo unknown`
1482uname -v = `(uname -v) 2>/dev/null || echo unknown`
1483
1484/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1485/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1486
1487/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1488/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1489/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001490/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001491/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1492/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1493/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1494
1495_ASUNAME
1496
1497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1498for as_dir in $PATH
1499do
1500 IFS=$as_save_IFS
1501 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001502 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001503done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001504IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
1506} >&5
1507
1508cat >&5 <<_ACEOF
1509
1510
1511## ----------- ##
1512## Core tests. ##
1513## ----------- ##
1514
1515_ACEOF
1516
1517
1518# Keep a trace of the command line.
1519# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001520# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001521# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001522# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001523ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001524ac_configure_args0=
1525ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001526ac_must_keep_next=false
1527for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001528do
Skip Montanaro6dead952003-09-25 14:50:04 +00001529 for ac_arg
1530 do
1531 case $ac_arg in
1532 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1533 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1534 | -silent | --silent | --silen | --sile | --sil)
1535 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001536 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001537 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 esac
1539 case $ac_pass in
1540 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1541 2)
1542 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1543 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001544 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001545 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001546 case $ac_arg in
1547 *=* | --config-cache | -C | -disable-* | --disable-* \
1548 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1549 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1550 | -with-* | --with-* | -without-* | --without-* | --x)
1551 case "$ac_configure_args0 " in
1552 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1553 esac
1554 ;;
1555 -* ) ac_must_keep_next=true ;;
1556 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001557 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001558 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001559 ;;
1560 esac
1561 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001562done
Skip Montanaro6dead952003-09-25 14:50:04 +00001563$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1564$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 +00001565
1566# When interrupted or exit'd, cleanup temporary files, and complete
1567# config.log. We remove comments because anyway the quotes in there
1568# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001569# WARNING: Use '\'' to represent an apostrophe within the trap.
1570# 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 +00001571trap 'exit_status=$?
1572 # Save into config.log some information that might help in debugging.
1573 {
1574 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001575
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 cat <<\_ASBOX
1577## ---------------- ##
1578## Cache variables. ##
1579## ---------------- ##
1580_ASBOX
1581 echo
1582 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001583(
1584 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1585 eval ac_val=\$$ac_var
1586 case $ac_val in #(
1587 *${as_nl}*)
1588 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001589 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1590echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 esac
1592 case $ac_var in #(
1593 _ | IFS | as_nl) ;; #(
1594 *) $as_unset $ac_var ;;
1595 esac ;;
1596 esac
1597 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1600 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001602 "s/'\''/'\''\\\\'\'''\''/g;
1603 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1604 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001605 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001607 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001608 esac |
1609 sort
1610)
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001612
1613 cat <<\_ASBOX
1614## ----------------- ##
1615## Output variables. ##
1616## ----------------- ##
1617_ASBOX
1618 echo
1619 for ac_var in $ac_subst_vars
1620 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001621 eval ac_val=\$$ac_var
1622 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001623 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001624 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001625 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001626 done | sort
1627 echo
1628
1629 if test -n "$ac_subst_files"; then
1630 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001631## ------------------- ##
1632## File substitutions. ##
1633## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001634_ASBOX
1635 echo
1636 for ac_var in $ac_subst_files
1637 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001638 eval ac_val=\$$ac_var
1639 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001640 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001641 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001642 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001643 done | sort
1644 echo
1645 fi
1646
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 if test -s confdefs.h; then
1648 cat <<\_ASBOX
1649## ----------- ##
1650## confdefs.h. ##
1651## ----------- ##
1652_ASBOX
1653 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001654 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 echo
1656 fi
1657 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001658 echo "$as_me: caught signal $ac_signal"
1659 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001660 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001661 rm -f core *.core core.conftest.* &&
1662 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001663 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001664' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001665for ac_signal in 1 2 13 15; do
1666 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1667done
1668ac_signal=0
1669
1670# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001671rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001672
1673# Predefined preprocessor variables.
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_NAME "$PACKAGE_NAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_VERSION "$PACKAGE_VERSION"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_STRING "$PACKAGE_STRING"
1692_ACEOF
1693
1694
1695cat >>confdefs.h <<_ACEOF
1696#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1697_ACEOF
1698
1699
1700# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001701# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001702if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001703 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001704elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001705 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001706else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707 set x "$ac_default_prefix/share/config.site" \
1708 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001710shift
1711for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001712do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001713 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001714 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1715echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001716 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717 . "$ac_site_file"
1718 fi
1719done
1720
1721if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 # Some versions of bash will fail to source /dev/null (special
1723 # files actually), so we avoid doing that.
1724 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001725 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1726echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001728 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1729 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 esac
1731 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001733 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1734echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 >$cache_file
1736fi
1737
1738# Check that the precious variables saved in the cache have kept the same
1739# value.
1740ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001741for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1743 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001744 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1745 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001746 case $ac_old_set,$ac_new_set in
1747 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1749echo "$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 +00001750 ac_cache_corrupted=: ;;
1751 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001752 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1753echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 ac_cache_corrupted=: ;;
1755 ,);;
1756 *)
1757 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001758 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1759echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1760 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1761echo "$as_me: former value: $ac_old_val" >&2;}
1762 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1763echo "$as_me: current value: $ac_new_val" >&2;}
1764 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001765 fi;;
1766 esac
1767 # Pass precious variables to config.status.
1768 if test "$ac_new_set" = set; then
1769 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001770 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001771 *) ac_arg=$ac_var=$ac_new_val ;;
1772 esac
1773 case " $ac_configure_args " in
1774 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1775 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1776 esac
1777 fi
1778done
1779if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001780 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1781echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1782 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1783echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001784 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001785fi
1786
Martin v. Löwiseba40652007-08-30 20:10:57 +00001787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
Guido van Rossum7f43da71994-08-01 12:15:30 +00001811ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001813ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1814ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1815ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001816
Guido van Rossum627b2d71993-12-24 10:39:16 +00001817
Michael W. Hudson54241132001-12-07 15:38:26 +00001818
Martin v. Löwiseba40652007-08-30 20:10:57 +00001819ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001820
1821
Martin v. Löwis11437992002-04-12 09:54:03 +00001822
Georg Brandlbcd64a32009-03-31 21:45:18 +00001823if test "$prefix" != "/"; then
1824 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1825fi
1826
1827
Martin v. Löwis11437992002-04-12 09:54:03 +00001828
1829
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001832# We don't use PACKAGE_ variables, and they cause conflicts
1833# with other autoconf-based packages that include Python.h
1834grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1835rm confdefs.h
1836mv confdefs.h.new confdefs.h
1837
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001838
Martin v. Löwis174440b2008-10-03 08:59:41 +00001839VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001840
Martin v. Löwis1142de32002-03-29 16:28:31 +00001841
1842SOVERSION=1.0
1843
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001844# The later defininition of _XOPEN_SOURCE disables certain features
1845# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1846
1847cat >>confdefs.h <<\_ACEOF
1848#define _GNU_SOURCE 1
1849_ACEOF
1850
1851
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001852# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1853# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1854# them.
1855
1856cat >>confdefs.h <<\_ACEOF
1857#define _NETBSD_SOURCE 1
1858_ACEOF
1859
1860
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001861# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1862# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1863# them.
1864
1865cat >>confdefs.h <<\_ACEOF
1866#define __BSD_VISIBLE 1
1867_ACEOF
1868
1869
Martin v. Löwisd6320502004-08-12 13:45:08 +00001870# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1871# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1872
1873cat >>confdefs.h <<\_ACEOF
1874#define _BSD_TYPES 1
1875_ACEOF
1876
1877
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001878# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1879# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1880# them.
1881
1882cat >>confdefs.h <<\_ACEOF
1883#define _DARWIN_C_SOURCE 1
1884_ACEOF
1885
1886
1887
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001888define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001889
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001890# Arguments passed to configure.
1891
1892CONFIG_ARGS="$ac_configure_args"
1893
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001894{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1895echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001896# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001897if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001898 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001899 case $enableval in
1900 yes)
1901 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001902 if test ! -d "${enableval}"
1903 then
1904 enableval=/
1905 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001906 ;;
1907 esac
1908 case $enableval in
1909 no)
1910 UNIVERSALSDK=
1911 enable_universalsdk=
1912 ;;
1913 *)
1914 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001915 if test ! -d "${UNIVERSALSDK}"
1916 then
1917 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1918echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1919 { (exit 1); exit 1; }; }
1920 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001921 ;;
1922 esac
1923
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001924
Ronald Oussoren988117f2006-04-29 11:31:35 +00001925else
1926
1927 UNIVERSALSDK=
1928 enable_universalsdk=
1929
Martin v. Löwiseba40652007-08-30 20:10:57 +00001930fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001931
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001932if test -n "${UNIVERSALSDK}"
1933then
1934 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1935echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1936else
1937 { echo "$as_me:$LINENO: result: no" >&5
1938echo "${ECHO_T}no" >&6; }
1939fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001940
Martin v. Löwiseba40652007-08-30 20:10:57 +00001941
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001942
1943
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001944UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00001945
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001946{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1947echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001948
1949# Check whether --with-universal-archs was given.
1950if test "${with_universal_archs+set}" = set; then
1951 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001952 { echo "$as_me:$LINENO: result: $withval" >&5
1953echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001954 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001955 if test "${enable_universalsdk}" ; then
1956 :
1957 else
1958 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1959echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1960 { (exit 1); exit 1; }; }
1961 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001962
1963else
1964
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001965 { echo "$as_me:$LINENO: result: 32-bit" >&5
1966echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001967
1968fi
1969
1970
1971
1972
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001973
1974# Check whether --with-framework-name was given.
1975if test "${with_framework_name+set}" = set; then
1976 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001977 if test "${enable_framework}"; then
1978 :
1979 else
1980 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1981echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1982 { (exit 1); exit 1; }; }
1983 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001984 PYTHONFRAMEWORK=${withval}
1985 PYTHONFRAMEWORKDIR=${withval}.framework
1986 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1987
1988else
1989
1990 PYTHONFRAMEWORK=Python
1991 PYTHONFRAMEWORKDIR=Python.framework
1992 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1993
1994fi
1995
Martin v. Löwiseba40652007-08-30 20:10:57 +00001996# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001997if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001998 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001999 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002000 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002001 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002002 esac
2003 case $enableval in
2004 no)
2005 PYTHONFRAMEWORK=
2006 PYTHONFRAMEWORKDIR=no-framework
2007 PYTHONFRAMEWORKPREFIX=
2008 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002009 FRAMEWORKINSTALLFIRST=
2010 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002011 FRAMEWORKALTINSTALLFIRST=
2012 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002013 if test "x${prefix}" = "xNONE"; then
2014 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2015 else
2016 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2017 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002018 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002019 ;;
2020 *)
2021 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002022 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002023 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002024 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002025 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2026 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002027
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002028 if test "x${prefix}" = "xNONE" ; then
2029 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2030 else
2031 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2032 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002033 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002034
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002035 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002036 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002037 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002038
Martin v. Löwiseba40652007-08-30 20:10:57 +00002039 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002040
Martin v. Löwiseba40652007-08-30 20:10:57 +00002041 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002042
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002043 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2044
2045 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2046
Jack Jansene578a632001-08-15 01:27:14 +00002047 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002048
Guido van Rossum563e7081996-09-10 18:20:48 +00002049else
Martin v. Löwis11437992002-04-12 09:54:03 +00002050
Jack Jansene578a632001-08-15 01:27:14 +00002051 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002052 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002053 PYTHONFRAMEWORKPREFIX=
2054 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002055 FRAMEWORKINSTALLFIRST=
2056 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002057 FRAMEWORKALTINSTALLFIRST=
2058 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002059 if test "x${prefix}" = "xNONE" ; then
2060 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2061 else
2062 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2063 fi
Jack Jansene578a632001-08-15 01:27:14 +00002064 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002065
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002066
Martin v. Löwiseba40652007-08-30 20:10:57 +00002067fi
2068
Michael W. Hudson54241132001-12-07 15:38:26 +00002069
2070
2071
2072
Jack Jansene578a632001-08-15 01:27:14 +00002073
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002074
2075
Ronald Oussoren5b787322006-06-06 19:50:24 +00002076
2077
2078
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002079
Jack Jansene578a632001-08-15 01:27:14 +00002080##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002081## AC_HELP_STRING(--with-dyld,
2082## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002083##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002084# Set name for machine-dependent library files
2085
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002086{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2087echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002088if test -z "$MACHDEP"
2089then
Guido van Rossum563e7081996-09-10 18:20:48 +00002090 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002091 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002092 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002093 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002094 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002095 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002096 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002097 ac_md_system=`echo $ac_sys_system |
2098 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2099 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002100 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002101 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002102
Guido van Rossum07397971997-04-29 21:49:50 +00002103 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002104 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002105 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002106 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002107 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002108 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002109 esac
2110fi
Guido van Rossum91922671997-10-09 20:24:13 +00002111
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002112# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2113# disable features if it is defined, without any means to access these
2114# features as extensions. For these systems, we skip the definition of
2115# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2116# some feature, make sure there is no alternative way to access this
2117# feature. Also, when using wildcards, make sure you have verified the
2118# need for not defining _XOPEN_SOURCE on all systems matching the
2119# wildcard, and that the wildcard does not include future systems
2120# (which may remove their limitations).
2121case $ac_sys_system/$ac_sys_release in
2122 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2123 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002124 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002125 # In addition, Stefan Krah confirms that issue #1244610 exists through
2126 # OpenBSD 4.6, but is fixed in 4.7.
2127 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002128 define_xopen_source=no
2129 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2130 # also defined. This can be overridden by defining _BSD_SOURCE
2131 # As this has a different meaning on Linux, only define it on OpenBSD
2132
2133cat >>confdefs.h <<\_ACEOF
2134#define _BSD_SOURCE 1
2135_ACEOF
2136
2137 ;;
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002138 OpenBSD/4.[789])
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00002139 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2140 # also defined. This can be overridden by defining _BSD_SOURCE
2141 # As this has a different meaning on Linux, only define it on OpenBSD
2142
2143cat >>confdefs.h <<\_ACEOF
2144#define _BSD_SOURCE 1
2145_ACEOF
2146
2147 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002148 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2149 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2150 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002151 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 +00002152 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002153 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2154 # of union __?sigval. Reported by Stuart Bishop.
2155 SunOS/5.6)
2156 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002157 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2158 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002159 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002160 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002161 define_xopen_source=no;;
2162 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002163 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002164 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002165 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002166 # On FreeBSD 4, the math functions C89 does not cover are never defined
2167 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2168 FreeBSD/4.*)
2169 define_xopen_source=no;;
2170 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2171 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2172 # identifies itself as Darwin/7.*
2173 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2174 # disables platform specific features beyond repair.
2175 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2176 # has no effect, don't bother defining them
2177 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002178 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00002179 Darwin/1[0-9].*)
2180 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002181 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2182 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2183 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002184 AIX/4)
2185 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002186 AIX/5)
2187 if test `uname -r` -eq 1; then
2188 define_xopen_source=no
2189 fi
2190 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002191 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2192 # defining NI_NUMERICHOST.
2193 QNX/6.3.2)
2194 define_xopen_source=no
2195 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002196
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002197esac
2198
2199if test $define_xopen_source = yes
2200then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002201 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2202 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002203 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2204 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002205 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002206 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002207
2208cat >>confdefs.h <<\_ACEOF
2209#define _XOPEN_SOURCE 500
2210_ACEOF
2211
2212 ;;
2213 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002214
2215cat >>confdefs.h <<\_ACEOF
2216#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002217_ACEOF
2218
Skip Montanarof0d5f792004-08-15 14:08:23 +00002219 ;;
2220 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002221
2222 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2223 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2224 # several APIs are not declared. Since this is also needed in some
2225 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002226 # except for Solaris 10, where it must not be defined,
2227 # as it implies XPG4.2
2228 case $ac_sys_system/$ac_sys_release in
2229 SunOS/5.10)
2230 ;;
2231 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002232
2233cat >>confdefs.h <<\_ACEOF
2234#define _XOPEN_SOURCE_EXTENDED 1
2235_ACEOF
2236
Martin v. Löwis7dece662005-11-26 11:38:24 +00002237 ;;
2238 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002239
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002240
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002241cat >>confdefs.h <<\_ACEOF
2242#define _POSIX_C_SOURCE 200112L
2243_ACEOF
2244
2245
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002246fi
2247
Guido van Rossum91922671997-10-09 20:24:13 +00002248#
2249# SGI compilers allow the specification of the both the ABI and the
2250# ISA on the command line. Depending on the values of these switches,
2251# different and often incompatable code will be generated.
2252#
2253# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2254# thus supply support for various ABI/ISA combinations. The MACHDEP
2255# variable is also adjusted.
2256#
2257
2258if test ! -z "$SGI_ABI"
2259then
2260 CC="cc $SGI_ABI"
2261 LDFLAGS="$SGI_ABI $LDFLAGS"
2262 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2263fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002264{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2265echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002266
Jack Jansen83f898c2002-12-30 22:23:40 +00002267# And add extra plat-mac for darwin
2268
Jack Jansen7b59b422003-03-17 15:44:10 +00002269
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002270{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2271echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002272if test -z "$EXTRAPLATDIR"
2273then
2274 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002275 darwin)
2276 EXTRAPLATDIR="\$(PLATMACDIRS)"
2277 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2278 ;;
2279 *)
2280 EXTRAPLATDIR=""
2281 EXTRAMACHDEPPATH=""
2282 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002283 esac
2284fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002285{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2286echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002287
Jack Jansen6b08a402004-06-03 12:41:45 +00002288# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2289# it may influence the way we can build extensions, so distutils
2290# needs to check it
2291
Ronald Oussoren988117f2006-04-29 11:31:35 +00002292
Jack Jansen6b08a402004-06-03 12:41:45 +00002293CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002294EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002296{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2297echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002298ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002299{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2300echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002301
Guido van Rossum627b2d71993-12-24 10:39:16 +00002302# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002303
2304# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2305# for debug/optimization stuff. BASECFLAGS is for flags that are required
2306# just to get things to compile and link. Users are free to override OPT
2307# when running configure or make. The build should not break if they do.
2308# BASECFLAGS should generally not be messed with, however.
2309
2310# XXX shouldn't some/most/all of this code be merged with the stuff later
2311# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002312{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2313echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002314
Martin v. Löwiseba40652007-08-30 20:10:57 +00002315# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002316if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002317 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002318 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002319 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002320 without_gcc=yes;;
2321 yes) CC=gcc
2322 without_gcc=no;;
2323 *) CC=$withval
2324 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002325 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002326else
Martin v. Löwis11437992002-04-12 09:54:03 +00002327
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002328 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002329 AIX*) CC=cc_r
2330 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002331 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002332 case $BE_HOST_CPU in
2333 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002334 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002335 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002336 BASECFLAGS="$BASECFLAGS -export pragma"
2337 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002338 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002339 ;;
2340 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002341 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002342 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002343 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002344 ;;
2345 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002346 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2347echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002348 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002349 ;;
2350 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002351 AR="\$(srcdir)/Modules/ar_beos"
2352 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002353 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002354 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002355 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356fi
2357
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002358{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2359echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002360
Guido van Rossum8b131c51995-03-09 14:10:13 +00002361# If the user switches compilers, we can't believe the cache
2362if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2363then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002364 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002365(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002366echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002367(it is also a good idea to do 'make clean' before compiling)" >&2;}
2368 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002369fi
2370
Victor Stinner6cbf90f2010-03-25 00:21:53 +00002371save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372ac_ext=c
2373ac_cpp='$CPP $CPPFLAGS'
2374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2376ac_compiler_gnu=$ac_cv_c_compiler_gnu
2377if test -n "$ac_tool_prefix"; then
2378 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2379set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002382if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002383 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002384else
2385 if test -n "$CC"; then
2386 ac_cv_prog_CC="$CC" # Let the user override the test.
2387else
Martin v. Löwis11437992002-04-12 09:54:03 +00002388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2389for as_dir in $PATH
2390do
2391 IFS=$as_save_IFS
2392 test -z "$as_dir" && as_dir=.
2393 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394 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 +00002395 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002397 break 2
2398 fi
2399done
2400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
Jack Jansendd19cf82001-12-06 22:36:17 +00002403fi
2404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002405CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002406if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002407 { echo "$as_me:$LINENO: result: $CC" >&5
2408echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002410 { echo "$as_me:$LINENO: result: no" >&5
2411echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412fi
2413
Martin v. Löwiseba40652007-08-30 20:10:57 +00002414
Martin v. Löwis11437992002-04-12 09:54:03 +00002415fi
2416if test -z "$ac_cv_prog_CC"; then
2417 ac_ct_CC=$CC
2418 # Extract the first word of "gcc", so it can be a program name with args.
2419set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002420{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002422if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002424else
2425 if test -n "$ac_ct_CC"; then
2426 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2427else
2428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429for as_dir in $PATH
2430do
2431 IFS=$as_save_IFS
2432 test -z "$as_dir" && as_dir=.
2433 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434 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 +00002435 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 break 2
2438 fi
2439done
2440done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002441IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443fi
2444fi
2445ac_ct_CC=$ac_cv_prog_ac_ct_CC
2446if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002447 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2448echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002450 { echo "$as_me:$LINENO: result: no" >&5
2451echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002452fi
2453
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454 if test "x$ac_ct_CC" = x; then
2455 CC=""
2456 else
2457 case $cross_compiling:$ac_tool_warned in
2458yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002459{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2460whose name does not start with the host triplet. If you think this
2461configuration is useful to you, please write to autoconf@gnu.org." >&5
2462echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2463whose name does not start with the host triplet. If you think this
2464configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002465ac_tool_warned=yes ;;
2466esac
2467 CC=$ac_ct_CC
2468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002469else
2470 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002471fi
2472
Jack Jansendd19cf82001-12-06 22:36:17 +00002473if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 if test -n "$ac_tool_prefix"; then
2475 # 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 +00002476set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002477{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2478echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002479if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002480 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002481else
2482 if test -n "$CC"; then
2483 ac_cv_prog_CC="$CC" # Let the user override the test.
2484else
Martin v. Löwis11437992002-04-12 09:54:03 +00002485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2486for as_dir in $PATH
2487do
2488 IFS=$as_save_IFS
2489 test -z "$as_dir" && as_dir=.
2490 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002491 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002493 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 break 2
2495 fi
2496done
2497done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002498IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002499
2500fi
2501fi
2502CC=$ac_cv_prog_CC
2503if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002504 { echo "$as_me:$LINENO: result: $CC" >&5
2505echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002507 { echo "$as_me:$LINENO: result: no" >&5
2508echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002509fi
2510
Martin v. Löwiseba40652007-08-30 20:10:57 +00002511
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002513fi
2514if test -z "$CC"; then
2515 # Extract the first word of "cc", so it can be a program name with args.
2516set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002517{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2518echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002519if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002520 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002521else
2522 if test -n "$CC"; then
2523 ac_cv_prog_CC="$CC" # Let the user override the test.
2524else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002525 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527for as_dir in $PATH
2528do
2529 IFS=$as_save_IFS
2530 test -z "$as_dir" && as_dir=.
2531 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532 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 +00002533 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2534 ac_prog_rejected=yes
2535 continue
2536 fi
2537 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002538 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 break 2
2540 fi
2541done
2542done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002545if test $ac_prog_rejected = yes; then
2546 # We found a bogon in the path, so make sure we never use it.
2547 set dummy $ac_cv_prog_CC
2548 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002550 # We chose a different compiler from the bogus one.
2551 # However, it has the same basename, so the bogon will be chosen
2552 # first if we set CC to just the basename; use the full file name.
2553 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002555 fi
2556fi
2557fi
2558fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002559CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002560if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002561 { echo "$as_me:$LINENO: result: $CC" >&5
2562echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002563else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002564 { echo "$as_me:$LINENO: result: no" >&5
2565echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002566fi
2567
Martin v. Löwiseba40652007-08-30 20:10:57 +00002568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569fi
2570if test -z "$CC"; then
2571 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 do
2574 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2575set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002576{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2577echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002578if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002580else
2581 if test -n "$CC"; then
2582 ac_cv_prog_CC="$CC" # Let the user override the test.
2583else
Martin v. Löwis11437992002-04-12 09:54:03 +00002584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585for as_dir in $PATH
2586do
2587 IFS=$as_save_IFS
2588 test -z "$as_dir" && as_dir=.
2589 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 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 +00002591 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002592 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002595done
2596done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002598
2599fi
2600fi
2601CC=$ac_cv_prog_CC
2602if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 { echo "$as_me:$LINENO: result: $CC" >&5
2604echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002606 { echo "$as_me:$LINENO: result: no" >&5
2607echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002608fi
2609
Martin v. Löwiseba40652007-08-30 20:10:57 +00002610
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 test -n "$CC" && break
2612 done
2613fi
2614if test -z "$CC"; then
2615 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002616 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002617do
2618 # Extract the first word of "$ac_prog", so it can be a program name with args.
2619set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002620{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2621echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002622if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002624else
2625 if test -n "$ac_ct_CC"; then
2626 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2627else
2628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2629for as_dir in $PATH
2630do
2631 IFS=$as_save_IFS
2632 test -z "$as_dir" && as_dir=.
2633 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002634 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 +00002635 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002636 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 break 2
2638 fi
2639done
2640done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643fi
2644fi
2645ac_ct_CC=$ac_cv_prog_ac_ct_CC
2646if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002647 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2648echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002650 { echo "$as_me:$LINENO: result: no" >&5
2651echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002652fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002653
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 test -n "$ac_ct_CC" && break
2656done
Michael W. Hudson54241132001-12-07 15:38:26 +00002657
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658 if test "x$ac_ct_CC" = x; then
2659 CC=""
2660 else
2661 case $cross_compiling:$ac_tool_warned in
2662yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002663{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2664whose name does not start with the host triplet. If you think this
2665configuration is useful to you, please write to autoconf@gnu.org." >&5
2666echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2667whose name does not start with the host triplet. If you think this
2668configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002669ac_tool_warned=yes ;;
2670esac
2671 CC=$ac_ct_CC
2672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002673fi
2674
2675fi
2676
2677
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002678test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002679See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002680echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002681See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002682 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002683
2684# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002685echo "$as_me:$LINENO: checking for C compiler version" >&5
2686ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687{ (ac_try="$ac_compiler --version >&5"
2688case "(($ac_try" in
2689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690 *) ac_try_echo=$ac_try;;
2691esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002697{ (ac_try="$ac_compiler -v >&5"
2698case "(($ac_try" in
2699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2700 *) ac_try_echo=$ac_try;;
2701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002707{ (ac_try="$ac_compiler -V >&5"
2708case "(($ac_try" in
2709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2710 *) ac_try_echo=$ac_try;;
2711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002713 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 (exit $ac_status); }
2717
2718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002719/* confdefs.h. */
2720_ACEOF
2721cat confdefs.h >>conftest.$ac_ext
2722cat >>conftest.$ac_ext <<_ACEOF
2723/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002724
Martin v. Löwis11437992002-04-12 09:54:03 +00002725int
2726main ()
2727{
2728
2729 ;
2730 return 0;
2731}
2732_ACEOF
2733ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002734ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002735# Try to create an executable without -o first, disregard a.out.
2736# It will help us diagnose broken compilers, and finding out an intuition
2737# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002738{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2739echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2740ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2741#
2742# List of possible output files, starting from the most likely.
2743# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2744# only as a last resort. b.out is created by i960 compilers.
2745ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2746#
2747# The IRIX 6 linker writes into existing files which may not be
2748# executable, retaining their permissions. Remove them first so a
2749# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002750ac_rmfiles=
2751for ac_file in $ac_files
2752do
2753 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002754 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002755 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2756 esac
2757done
2758rm -f $ac_rmfiles
2759
2760if { (ac_try="$ac_link_default"
2761case "(($ac_try" in
2762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2763 *) ac_try_echo=$ac_try;;
2764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002766 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002770 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2771# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2772# in a Makefile. We should not override ac_cv_exeext if it was cached,
2773# so that the user can short-circuit this test for compilers unknown to
2774# Autoconf.
2775for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002776do
2777 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002779 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002780 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002781 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002782 # We found the default executable, but exeext='' is most
2783 # certainly right.
2784 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002785 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002786 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2787 then :; else
2788 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2789 fi
2790 # We set ac_cv_exeext here because the later test for it is not
2791 # safe: cross compilers may not add the suffix if given an `-o'
2792 # argument, so we may need to know it at that point already.
2793 # Even if this section looks crufty: it has the advantage of
2794 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002795 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002796 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002797 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 esac
2799done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800test "$ac_cv_exeext" = no && ac_cv_exeext=
2801
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002802else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002803 ac_file=''
2804fi
2805
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002806{ echo "$as_me:$LINENO: result: $ac_file" >&5
2807echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002808if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002810sed 's/^/| /' conftest.$ac_ext >&5
2811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002812{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002813See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002814echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002815See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002816 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002817fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002818
Martin v. Löwis11437992002-04-12 09:54:03 +00002819ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002820
Martin v. Löwiseba40652007-08-30 20:10:57 +00002821# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002822# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002823{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2824echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002825# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2826# If not cross compiling, check that we can run a simple program.
2827if test "$cross_compiling" != yes; then
2828 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002829 { (case "(($ac_try" in
2830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831 *) ac_try_echo=$ac_try;;
2832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002834 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 (exit $ac_status); }; }; then
2838 cross_compiling=no
2839 else
2840 if test "$cross_compiling" = maybe; then
2841 cross_compiling=yes
2842 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002843 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002844If you meant to cross compile, use \`--host'.
2845See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002846echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002847If you meant to cross compile, use \`--host'.
2848See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002849 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 fi
2851 fi
2852fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002853{ echo "$as_me:$LINENO: result: yes" >&5
2854echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002856rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002857ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002858# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002859# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002860{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2861echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2862{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2863echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002865{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2866echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002867if { (ac_try="$ac_link"
2868case "(($ac_try" in
2869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2870 *) ac_try_echo=$ac_try;;
2871esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002873 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002876 (exit $ac_status); }; then
2877 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2878# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2879# work properly (i.e., refer to `conftest.exe'), while it won't with
2880# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002881for ac_file in conftest.exe conftest conftest.*; do
2882 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002884 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002885 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002886 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002887 * ) break;;
2888 esac
2889done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002890else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002891 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002892See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002893echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002894See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002895 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002896fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002897
Martin v. Löwis11437992002-04-12 09:54:03 +00002898rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002899{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2900echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002901
2902rm -f conftest.$ac_ext
2903EXEEXT=$ac_cv_exeext
2904ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002905{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2906echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002907if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002908 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002909else
Martin v. Löwis11437992002-04-12 09:54:03 +00002910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002911/* confdefs.h. */
2912_ACEOF
2913cat confdefs.h >>conftest.$ac_ext
2914cat >>conftest.$ac_ext <<_ACEOF
2915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002916
Martin v. Löwis11437992002-04-12 09:54:03 +00002917int
2918main ()
2919{
2920
2921 ;
2922 return 0;
2923}
2924_ACEOF
2925rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002926if { (ac_try="$ac_compile"
2927case "(($ac_try" in
2928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2929 *) ac_try_echo=$ac_try;;
2930esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002932 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002933 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002935 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002936 for ac_file in conftest.o conftest.obj conftest.*; do
2937 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002938 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002939 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002940 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2941 break;;
2942 esac
2943done
2944else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002946sed 's/^/| /' conftest.$ac_ext >&5
2947
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002948{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002949See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002950echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002951See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002952 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002953fi
2954
2955rm -f conftest.$ac_cv_objext conftest.$ac_ext
2956fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2958echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002959OBJEXT=$ac_cv_objext
2960ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002961{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2962echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002963if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002964 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002965else
2966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002967/* confdefs.h. */
2968_ACEOF
2969cat confdefs.h >>conftest.$ac_ext
2970cat >>conftest.$ac_ext <<_ACEOF
2971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002972
Martin v. Löwis11437992002-04-12 09:54:03 +00002973int
2974main ()
2975{
2976#ifndef __GNUC__
2977 choke me
2978#endif
2979
2980 ;
2981 return 0;
2982}
2983_ACEOF
2984rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002985if { (ac_try="$ac_compile"
2986case "(($ac_try" in
2987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2988 *) ac_try_echo=$ac_try;;
2989esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002993 grep -v '^ *+' conftest.er1 >conftest.err
2994 rm -f conftest.er1
2995 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002997 (exit $ac_status); } && {
2998 test -z "$ac_c_werror_flag" ||
2999 test ! -s conftest.err
3000 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003001 ac_compiler_gnu=yes
3002else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003004sed 's/^/| /' conftest.$ac_ext >&5
3005
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008
3009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003010ac_cv_c_compiler_gnu=$ac_compiler_gnu
3011
3012fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003013{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3014echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3015GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00003016ac_test_CFLAGS=${CFLAGS+set}
3017ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003018{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3019echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003020if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003021 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003022else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003023 ac_save_c_werror_flag=$ac_c_werror_flag
3024 ac_c_werror_flag=yes
3025 ac_cv_prog_cc_g=no
3026 CFLAGS="-g"
3027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003028/* confdefs.h. */
3029_ACEOF
3030cat confdefs.h >>conftest.$ac_ext
3031cat >>conftest.$ac_ext <<_ACEOF
3032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003033
Martin v. Löwis11437992002-04-12 09:54:03 +00003034int
3035main ()
3036{
3037
3038 ;
3039 return 0;
3040}
3041_ACEOF
3042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003043if { (ac_try="$ac_compile"
3044case "(($ac_try" in
3045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3046 *) ac_try_echo=$ac_try;;
3047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003051 grep -v '^ *+' conftest.er1 >conftest.err
3052 rm -f conftest.er1
3053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003055 (exit $ac_status); } && {
3056 test -z "$ac_c_werror_flag" ||
3057 test ! -s conftest.err
3058 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003059 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003062sed 's/^/| /' conftest.$ac_ext >&5
3063
Martin v. Löwiseba40652007-08-30 20:10:57 +00003064 CFLAGS=""
3065 cat >conftest.$ac_ext <<_ACEOF
3066/* confdefs.h. */
3067_ACEOF
3068cat confdefs.h >>conftest.$ac_ext
3069cat >>conftest.$ac_ext <<_ACEOF
3070/* end confdefs.h. */
3071
3072int
3073main ()
3074{
3075
3076 ;
3077 return 0;
3078}
3079_ACEOF
3080rm -f conftest.$ac_objext
3081if { (ac_try="$ac_compile"
3082case "(($ac_try" in
3083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3084 *) ac_try_echo=$ac_try;;
3085esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003087 (eval "$ac_compile") 2>conftest.er1
3088 ac_status=$?
3089 grep -v '^ *+' conftest.er1 >conftest.err
3090 rm -f conftest.er1
3091 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 (exit $ac_status); } && {
3094 test -z "$ac_c_werror_flag" ||
3095 test ! -s conftest.err
3096 } && test -s conftest.$ac_objext; then
3097 :
3098else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003099 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003100sed 's/^/| /' conftest.$ac_ext >&5
3101
3102 ac_c_werror_flag=$ac_save_c_werror_flag
3103 CFLAGS="-g"
3104 cat >conftest.$ac_ext <<_ACEOF
3105/* confdefs.h. */
3106_ACEOF
3107cat confdefs.h >>conftest.$ac_ext
3108cat >>conftest.$ac_ext <<_ACEOF
3109/* end confdefs.h. */
3110
3111int
3112main ()
3113{
3114
3115 ;
3116 return 0;
3117}
3118_ACEOF
3119rm -f conftest.$ac_objext
3120if { (ac_try="$ac_compile"
3121case "(($ac_try" in
3122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3123 *) ac_try_echo=$ac_try;;
3124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003126 (eval "$ac_compile") 2>conftest.er1
3127 ac_status=$?
3128 grep -v '^ *+' conftest.er1 >conftest.err
3129 rm -f conftest.er1
3130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132 (exit $ac_status); } && {
3133 test -z "$ac_c_werror_flag" ||
3134 test ! -s conftest.err
3135 } && test -s conftest.$ac_objext; then
3136 ac_cv_prog_cc_g=yes
3137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003138 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003139sed 's/^/| /' conftest.$ac_ext >&5
3140
3141
Guido van Rossum627b2d71993-12-24 10:39:16 +00003142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003143
3144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003146
3147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3148fi
3149
3150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3151 ac_c_werror_flag=$ac_save_c_werror_flag
3152fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003153{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3154echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003155if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003156 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003157elif test $ac_cv_prog_cc_g = yes; then
3158 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003159 CFLAGS="-g -O2"
3160 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003161 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003162 fi
3163else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003164 if test "$GCC" = yes; then
3165 CFLAGS="-O2"
3166 else
3167 CFLAGS=
3168 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003169fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003170{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3171echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003173 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003174else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003175 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003176ac_save_CC=$CC
3177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003178/* confdefs.h. */
3179_ACEOF
3180cat confdefs.h >>conftest.$ac_ext
3181cat >>conftest.$ac_ext <<_ACEOF
3182/* end confdefs.h. */
3183#include <stdarg.h>
3184#include <stdio.h>
3185#include <sys/types.h>
3186#include <sys/stat.h>
3187/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3188struct buf { int x; };
3189FILE * (*rcsopen) (struct buf *, struct stat *, int);
3190static char *e (p, i)
3191 char **p;
3192 int i;
3193{
3194 return p[i];
3195}
3196static char *f (char * (*g) (char **, int), char **p, ...)
3197{
3198 char *s;
3199 va_list v;
3200 va_start (v,p);
3201 s = g (p, va_arg (v,int));
3202 va_end (v);
3203 return s;
3204}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003205
3206/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3207 function prototypes and stuff, but not '\xHH' hex character constants.
3208 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003209 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003210 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3211 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003213int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3214
Martin v. Löwiseba40652007-08-30 20:10:57 +00003215/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3216 inside strings and character constants. */
3217#define FOO(x) 'x'
3218int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3219
Skip Montanaro6dead952003-09-25 14:50:04 +00003220int test (int i, double x);
3221struct s1 {int (*f) (int a);};
3222struct s2 {int (*f) (double a);};
3223int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3224int argc;
3225char **argv;
3226int
3227main ()
3228{
3229return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3230 ;
3231 return 0;
3232}
3233_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003234for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3235 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003236do
3237 CC="$ac_save_CC $ac_arg"
3238 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003239if { (ac_try="$ac_compile"
3240case "(($ac_try" in
3241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3242 *) ac_try_echo=$ac_try;;
3243esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003245 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003247 grep -v '^ *+' conftest.er1 >conftest.err
3248 rm -f conftest.er1
3249 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251 (exit $ac_status); } && {
3252 test -z "$ac_c_werror_flag" ||
3253 test ! -s conftest.err
3254 } && test -s conftest.$ac_objext; then
3255 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003256else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003258sed 's/^/| /' conftest.$ac_ext >&5
3259
Martin v. Löwiseba40652007-08-30 20:10:57 +00003260
Skip Montanaro6dead952003-09-25 14:50:04 +00003261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262
3263rm -f core conftest.err conftest.$ac_objext
3264 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003265done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003267CC=$ac_save_CC
3268
3269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003270# AC_CACHE_VAL
3271case "x$ac_cv_prog_cc_c89" in
3272 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003273 { echo "$as_me:$LINENO: result: none needed" >&5
3274echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003275 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003276 { echo "$as_me:$LINENO: result: unsupported" >&5
3277echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003278 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003280 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3281echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003282esac
3283
Skip Montanaro6dead952003-09-25 14:50:04 +00003284
Martin v. Löwis11437992002-04-12 09:54:03 +00003285ac_ext=c
3286ac_cpp='$CPP $CPPFLAGS'
3287ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3288ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3289ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290
Victor Stinner6cbf90f2010-03-25 00:21:53 +00003291CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003292
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003293
3294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003295{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3296echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003297
Martin v. Löwiseba40652007-08-30 20:10:57 +00003298# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003299if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003300 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301
3302 case $withval in
3303 no) with_cxx_main=no
3304 MAINCC='$(CC)';;
3305 yes) with_cxx_main=yes
3306 MAINCC='$(CXX)';;
3307 *) with_cxx_main=yes
3308 MAINCC=$withval
3309 if test -z "$CXX"
3310 then
3311 CXX=$withval
3312 fi;;
3313 esac
3314else
3315
3316 with_cxx_main=no
3317 MAINCC='$(CC)'
3318
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319fi
3320
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003321{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3322echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003323
3324preset_cxx="$CXX"
3325if test -z "$CXX"
3326then
3327 case "$CC" in
3328 gcc) # Extract the first word of "g++", so it can be a program name with args.
3329set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003330{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3331echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003332if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003333 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003334else
3335 case $CXX in
3336 [\\/]* | ?:[\\/]*)
3337 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3338 ;;
3339 *)
3340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3341for as_dir in notfound
3342do
3343 IFS=$as_save_IFS
3344 test -z "$as_dir" && as_dir=.
3345 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346 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 +00003347 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003348 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003349 break 2
3350 fi
3351done
3352done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003353IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003354
3355 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3356 ;;
3357esac
3358fi
3359CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003360if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003361 { echo "$as_me:$LINENO: result: $CXX" >&5
3362echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003363else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003364 { echo "$as_me:$LINENO: result: no" >&5
3365echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003367
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003368 ;;
3369 cc) # Extract the first word of "c++", so it can be a program name with args.
3370set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003371{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3372echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003373if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003374 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003375else
3376 case $CXX in
3377 [\\/]* | ?:[\\/]*)
3378 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3379 ;;
3380 *)
3381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3382for as_dir in notfound
3383do
3384 IFS=$as_save_IFS
3385 test -z "$as_dir" && as_dir=.
3386 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003387 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 +00003388 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003389 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003390 break 2
3391 fi
3392done
3393done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003394IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003395
3396 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3397 ;;
3398esac
3399fi
3400CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003401if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003402 { echo "$as_me:$LINENO: result: $CXX" >&5
3403echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003404else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003405 { echo "$as_me:$LINENO: result: no" >&5
3406echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003408
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003409 ;;
3410 esac
3411 if test "$CXX" = "notfound"
3412 then
3413 CXX=""
3414 fi
3415fi
3416if test -z "$CXX"
3417then
3418 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3419do
3420 # Extract the first word of "$ac_prog", so it can be a program name with args.
3421set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003422{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3423echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003424if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003425 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003426else
3427 if test -n "$CXX"; then
3428 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3429else
3430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3431for as_dir in $PATH
3432do
3433 IFS=$as_save_IFS
3434 test -z "$as_dir" && as_dir=.
3435 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003436 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 +00003437 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003438 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003439 break 2
3440 fi
3441done
3442done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003444
3445fi
3446fi
3447CXX=$ac_cv_prog_CXX
3448if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003449 { echo "$as_me:$LINENO: result: $CXX" >&5
3450echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003451else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003452 { echo "$as_me:$LINENO: result: no" >&5
3453echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003454fi
3455
Martin v. Löwiseba40652007-08-30 20:10:57 +00003456
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003457 test -n "$CXX" && break
3458done
3459test -n "$CXX" || CXX="notfound"
3460
3461 if test "$CXX" = "notfound"
3462 then
3463 CXX=""
3464 fi
3465fi
3466if test "$preset_cxx" != "$CXX"
3467then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003468 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003469
3470 By default, distutils will build C++ extension modules with \"$CXX\".
3471 If this is not intended, then set CXX on the configure command line.
3472 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003473echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003474
3475 By default, distutils will build C++ extension modules with \"$CXX\".
3476 If this is not intended, then set CXX on the configure command line.
3477 " >&2;}
3478fi
3479
3480
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003481# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003482
3483ac_ext=c
3484ac_cpp='$CPP $CPPFLAGS'
3485ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3486ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3487ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003488{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3489echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003490# On Suns, sometimes $CPP names a directory.
3491if test -n "$CPP" && test -d "$CPP"; then
3492 CPP=
3493fi
3494if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003496 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003497else
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 # Double quotes because CPP needs to be expanded
3499 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3500 do
3501 ac_preproc_ok=false
3502for ac_c_preproc_warn_flag in '' yes
3503do
3504 # Use a header file that comes with gcc, so configuring glibc
3505 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003506 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3507 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003508 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 # not just through cpp. "Syntax error" is here to catch this case.
3510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003511/* confdefs.h. */
3512_ACEOF
3513cat confdefs.h >>conftest.$ac_ext
3514cat >>conftest.$ac_ext <<_ACEOF
3515/* end confdefs.h. */
3516#ifdef __STDC__
3517# include <limits.h>
3518#else
3519# include <assert.h>
3520#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003521 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003522_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523if { (ac_try="$ac_cpp conftest.$ac_ext"
3524case "(($ac_try" in
3525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3526 *) ac_try_echo=$ac_try;;
3527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003529 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003531 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 rm -f conftest.er1
3533 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003535 (exit $ac_status); } >/dev/null && {
3536 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3537 test ! -s conftest.err
3538 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003539 :
3540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Broken: fails on valid input.
3545continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003549
Martin v. Löwiseba40652007-08-30 20:10:57 +00003550 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 # can be detected and how.
3552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003553/* confdefs.h. */
3554_ACEOF
3555cat confdefs.h >>conftest.$ac_ext
3556cat >>conftest.$ac_ext <<_ACEOF
3557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003558#include <ac_nonexistent.h>
3559_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003560if { (ac_try="$ac_cpp conftest.$ac_ext"
3561case "(($ac_try" in
3562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563 *) ac_try_echo=$ac_try;;
3564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003566 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003568 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 rm -f conftest.er1
3570 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003572 (exit $ac_status); } >/dev/null && {
3573 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3574 test ! -s conftest.err
3575 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 # Broken: success on invalid input.
3577continue
3578else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003580sed 's/^/| /' conftest.$ac_ext >&5
3581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 # Passes both tests.
3583ac_preproc_ok=:
3584break
3585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587rm -f conftest.err conftest.$ac_ext
3588
3589done
3590# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3591rm -f conftest.err conftest.$ac_ext
3592if $ac_preproc_ok; then
3593 break
3594fi
3595
3596 done
3597 ac_cv_prog_CPP=$CPP
3598
3599fi
3600 CPP=$ac_cv_prog_CPP
3601else
3602 ac_cv_prog_CPP=$CPP
3603fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003604{ echo "$as_me:$LINENO: result: $CPP" >&5
3605echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606ac_preproc_ok=false
3607for ac_c_preproc_warn_flag in '' yes
3608do
3609 # Use a header file that comes with gcc, so configuring glibc
3610 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003611 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3612 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 # On the NeXT, cc -E runs the code through the compiler's parser,
3614 # not just through cpp. "Syntax error" is here to catch this case.
3615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003616/* confdefs.h. */
3617_ACEOF
3618cat confdefs.h >>conftest.$ac_ext
3619cat >>conftest.$ac_ext <<_ACEOF
3620/* end confdefs.h. */
3621#ifdef __STDC__
3622# include <limits.h>
3623#else
3624# include <assert.h>
3625#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003626 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003627_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003628if { (ac_try="$ac_cpp conftest.$ac_ext"
3629case "(($ac_try" in
3630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3631 *) ac_try_echo=$ac_try;;
3632esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003634 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003636 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 rm -f conftest.er1
3638 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003640 (exit $ac_status); } >/dev/null && {
3641 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3642 test ! -s conftest.err
3643 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 :
3645else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003647sed 's/^/| /' conftest.$ac_ext >&5
3648
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 # Broken: fails on valid input.
3650continue
3651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003652
Martin v. Löwis11437992002-04-12 09:54:03 +00003653rm -f conftest.err conftest.$ac_ext
3654
Martin v. Löwiseba40652007-08-30 20:10:57 +00003655 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003656 # can be detected and how.
3657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003658/* confdefs.h. */
3659_ACEOF
3660cat confdefs.h >>conftest.$ac_ext
3661cat >>conftest.$ac_ext <<_ACEOF
3662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003663#include <ac_nonexistent.h>
3664_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003665if { (ac_try="$ac_cpp conftest.$ac_ext"
3666case "(($ac_try" in
3667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3668 *) ac_try_echo=$ac_try;;
3669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003671 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003673 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003674 rm -f conftest.er1
3675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003677 (exit $ac_status); } >/dev/null && {
3678 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3679 test ! -s conftest.err
3680 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 # Broken: success on invalid input.
3682continue
3683else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003685sed 's/^/| /' conftest.$ac_ext >&5
3686
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 # Passes both tests.
3688ac_preproc_ok=:
3689break
3690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003691
Martin v. Löwis11437992002-04-12 09:54:03 +00003692rm -f conftest.err conftest.$ac_ext
3693
3694done
3695# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3696rm -f conftest.err conftest.$ac_ext
3697if $ac_preproc_ok; then
3698 :
3699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003700 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003701See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003702echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003703See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003704 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706
3707ac_ext=c
3708ac_cpp='$CPP $CPPFLAGS'
3709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3711ac_compiler_gnu=$ac_cv_c_compiler_gnu
3712
3713
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003714{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3715echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003717 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003719 # Extract the first word of "grep ggrep" to use in msg output
3720if test -z "$GREP"; then
3721set dummy grep ggrep; ac_prog_name=$2
3722if test "${ac_cv_path_GREP+set}" = set; then
3723 echo $ECHO_N "(cached) $ECHO_C" >&6
3724else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003725 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003726# Loop through the user's path and test for each of PROGNAME-LIST
3727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003728for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3729do
3730 IFS=$as_save_IFS
3731 test -z "$as_dir" && as_dir=.
3732 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
3734 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3735 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3736 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003737 # Check for GNU $ac_path_GREP
3738case `"$ac_path_GREP" --version 2>&1` in
3739*GNU*)
3740 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3741*)
3742 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003743 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003744 while :
3745 do
3746 cat "conftest.in" "conftest.in" >"conftest.tmp"
3747 mv "conftest.tmp" "conftest.in"
3748 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003749 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003750 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3751 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3752 ac_count=`expr $ac_count + 1`
3753 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3754 # Best one so far, save it but keep looking for a better one
3755 ac_cv_path_GREP="$ac_path_GREP"
3756 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003757 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003758 # 10*(2^10) chars as input seems more than enough
3759 test $ac_count -gt 10 && break
3760 done
3761 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3762esac
3763
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003764
3765 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003766 done
3767done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003768
3769done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003770IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003771
3772
3773fi
3774
3775GREP="$ac_cv_path_GREP"
3776if test -z "$GREP"; then
3777 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3778echo "$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 +00003779 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003780fi
3781
Martin v. Löwiseba40652007-08-30 20:10:57 +00003782else
3783 ac_cv_path_GREP=$GREP
3784fi
3785
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003786
Martin v. Löwiseba40652007-08-30 20:10:57 +00003787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003788{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3789echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790 GREP="$ac_cv_path_GREP"
3791
3792
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003793{ echo "$as_me:$LINENO: checking for egrep" >&5
3794echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003795if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003796 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003797else
3798 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3799 then ac_cv_path_EGREP="$GREP -E"
3800 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003801 # Extract the first word of "egrep" to use in msg output
3802if test -z "$EGREP"; then
3803set dummy egrep; ac_prog_name=$2
3804if test "${ac_cv_path_EGREP+set}" = set; then
3805 echo $ECHO_N "(cached) $ECHO_C" >&6
3806else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003807 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003808# Loop through the user's path and test for each of PROGNAME-LIST
3809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003810for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3811do
3812 IFS=$as_save_IFS
3813 test -z "$as_dir" && as_dir=.
3814 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003815 for ac_exec_ext in '' $ac_executable_extensions; do
3816 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3817 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3818 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003819 # Check for GNU $ac_path_EGREP
3820case `"$ac_path_EGREP" --version 2>&1` in
3821*GNU*)
3822 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3823*)
3824 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003825 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003826 while :
3827 do
3828 cat "conftest.in" "conftest.in" >"conftest.tmp"
3829 mv "conftest.tmp" "conftest.in"
3830 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003831 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003832 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3833 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3834 ac_count=`expr $ac_count + 1`
3835 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3836 # Best one so far, save it but keep looking for a better one
3837 ac_cv_path_EGREP="$ac_path_EGREP"
3838 ac_path_EGREP_max=$ac_count
3839 fi
3840 # 10*(2^10) chars as input seems more than enough
3841 test $ac_count -gt 10 && break
3842 done
3843 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3844esac
3845
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003846
3847 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848 done
3849done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003850
3851done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003852IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003853
3854
3855fi
3856
3857EGREP="$ac_cv_path_EGREP"
3858if test -z "$EGREP"; then
3859 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3860echo "$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 +00003861 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003862fi
3863
Martin v. Löwiseba40652007-08-30 20:10:57 +00003864else
3865 ac_cv_path_EGREP=$EGREP
3866fi
3867
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003868
Martin v. Löwiseba40652007-08-30 20:10:57 +00003869 fi
3870fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003871{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3872echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003873 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003874
3875
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003876
3877{ echo "$as_me:$LINENO: checking for AIX" >&5
3878echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3879cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003880/* confdefs.h. */
3881_ACEOF
3882cat confdefs.h >>conftest.$ac_ext
3883cat >>conftest.$ac_ext <<_ACEOF
3884/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003885#ifdef _AIX
3886 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003887#endif
3888
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003889_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3891 $EGREP "yes" >/dev/null 2>&1; then
3892 { echo "$as_me:$LINENO: result: yes" >&5
3893echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003894cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003895#define _ALL_SOURCE 1
3896_ACEOF
3897
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003898else
3899 { echo "$as_me:$LINENO: result: no" >&5
3900echo "${ECHO_T}no" >&6; }
3901fi
Ronald Oussoren75912852010-04-08 08:13:31 +00003902rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003903
3904
3905
3906# Check for unsupported systems
3907case $ac_sys_system/$ac_sys_release in
3908atheos*|Linux*/1*)
3909 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3910 echo See README for details.
3911 exit 1;;
3912esac
3913
3914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003915{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3916echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003917
3918# Check whether --with-suffix was given.
3919if test "${with_suffix+set}" = set; then
3920 withval=$with_suffix;
3921 case $withval in
3922 no) EXEEXT=;;
3923 yes) EXEEXT=.exe;;
3924 *) EXEEXT=$withval;;
3925 esac
3926fi
3927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003928{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3929echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003930
3931# Test whether we're running on a non-case-sensitive system, in which
3932# case we give a warning if no ext is given
3933
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003934{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3935echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003936if test ! -d CaseSensitiveTestDir; then
3937mkdir CaseSensitiveTestDir
3938fi
3939
3940if test -d casesensitivetestdir
3941then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942 { echo "$as_me:$LINENO: result: yes" >&5
3943echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003944 BUILDEXEEXT=.exe
3945else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003946 { echo "$as_me:$LINENO: result: no" >&5
3947echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003948 BUILDEXEEXT=$EXEEXT
3949fi
3950rmdir CaseSensitiveTestDir
3951
3952case $MACHDEP in
3953bsdos*)
3954 case $CC in
3955 gcc) CC="$CC -D_HAVE_BSDI";;
3956 esac;;
3957esac
3958
3959case $ac_sys_system in
3960hp*|HP*)
3961 case $CC in
3962 cc|*/cc) CC="$CC -Ae";;
3963 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003964SunOS*)
3965 # Some functions have a prototype only with that define, e.g. confstr
3966
3967cat >>confdefs.h <<\_ACEOF
3968#define __EXTENSIONS__ 1
3969_ACEOF
3970
3971 ;;
3972esac
3973
3974
3975
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003976{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3977echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003978if test -z "$LIBRARY"
3979then
3980 LIBRARY='libpython$(VERSION).a'
3981fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003982{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3983echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003984
3985# LDLIBRARY is the name of the library to link against (as opposed to the
3986# name of the library into which to insert object files). BLDLIBRARY is also
3987# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3988# is blank as the main program is not linked directly against LDLIBRARY.
3989# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3990# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3991# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3992# DLLLIBRARY is the shared (i.e., DLL) library.
3993#
3994# RUNSHARED is used to run shared python without installed libraries
3995#
3996# INSTSONAME is the name of the shared library that will be use to install
3997# on the system - some systems like version suffix, others don't
3998
3999
4000
4001
4002
4003
4004LDLIBRARY="$LIBRARY"
4005BLDLIBRARY='$(LDLIBRARY)'
4006INSTSONAME='$(LDLIBRARY)'
4007DLLLIBRARY=''
4008LDLIBRARYDIR=''
4009RUNSHARED=''
4010
4011# LINKCC is the command that links the python executable -- default is $(CC).
4012# If CXX is set, and if it is needed to link a main function that was
4013# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4014# python might then depend on the C++ runtime
4015# This is altered for AIX in order to build the export list before
4016# linking.
4017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004018{ echo "$as_me:$LINENO: checking LINKCC" >&5
4019echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004020if test -z "$LINKCC"
4021then
4022 LINKCC='$(PURIFY) $(MAINCC)'
4023 case $ac_sys_system in
4024 AIX*)
4025 exp_extra="\"\""
4026 if test $ac_sys_release -ge 5 -o \
4027 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4028 exp_extra="."
4029 fi
4030 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004031 QNX*)
4032 # qcc must be used because the other compilers do not
4033 # support -N.
4034 LINKCC=qcc;;
4035 esac
4036fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004037{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4038echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004039
4040# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4041# make sure we default having it set to "no": this is used by
4042# distutils.unixccompiler to know if it should add --enable-new-dtags
4043# to linker command lines, and failing to detect GNU ld simply results
4044# in the same bahaviour as before.
4045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004046{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4047echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004048ac_prog=ld
4049if test "$GCC" = yes; then
4050 ac_prog=`$CC -print-prog-name=ld`
4051fi
4052case `"$ac_prog" -V 2>&1 < /dev/null` in
4053 *GNU*)
4054 GNULD=yes;;
4055 *)
4056 GNULD=no;;
4057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004058{ echo "$as_me:$LINENO: result: $GNULD" >&5
4059echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004060
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004061{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4062echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004063# Check whether --enable-shared was given.
4064if test "${enable_shared+set}" = set; then
4065 enableval=$enable_shared;
4066fi
4067
4068
4069if test -z "$enable_shared"
4070then
4071 case $ac_sys_system in
4072 CYGWIN* | atheos*)
4073 enable_shared="yes";;
4074 *)
4075 enable_shared="no";;
4076 esac
4077fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004078{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4079echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004080
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004081{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4082echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004083# Check whether --enable-profiling was given.
4084if test "${enable_profiling+set}" = set; then
4085 enableval=$enable_profiling; ac_save_cc="$CC"
4086 CC="$CC -pg"
4087 if test "$cross_compiling" = yes; then
4088 ac_enable_profiling="no"
4089else
4090 cat >conftest.$ac_ext <<_ACEOF
4091/* confdefs.h. */
4092_ACEOF
4093cat confdefs.h >>conftest.$ac_ext
4094cat >>conftest.$ac_ext <<_ACEOF
4095/* end confdefs.h. */
4096int main() { return 0; }
4097_ACEOF
4098rm -f conftest$ac_exeext
4099if { (ac_try="$ac_link"
4100case "(($ac_try" in
4101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4102 *) ac_try_echo=$ac_try;;
4103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004105 (eval "$ac_link") 2>&5
4106 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4109 { (case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004114 (eval "$ac_try") 2>&5
4115 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004117 (exit $ac_status); }; }; then
4118 ac_enable_profiling="yes"
4119else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004120 echo "$as_me: program exited with status $ac_status" >&5
4121echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004122sed 's/^/| /' conftest.$ac_ext >&5
4123
4124( exit $ac_status )
4125ac_enable_profiling="no"
4126fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4128fi
4129
4130
4131 CC="$ac_save_cc"
4132fi
4133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004134{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4135echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004136
4137case "$ac_enable_profiling" in
4138 "yes")
4139 BASECFLAGS="-pg $BASECFLAGS"
4140 LDFLAGS="-pg $LDFLAGS"
4141 ;;
4142esac
4143
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004144{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4145echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004146
4147# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4148# library that we build, but we do not want to link against it (we
4149# will find it with a -framework option). For this reason there is an
4150# extra variable BLDLIBRARY against which Python and the extension
4151# modules are linked, BLDLIBRARY. This is normally the same as
4152# LDLIBRARY, but empty for MacOSX framework builds.
4153if test "$enable_framework"
4154then
4155 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4156 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4157 BLDLIBRARY=''
4158else
4159 BLDLIBRARY='$(LDLIBRARY)'
4160fi
4161
4162# Other platforms follow
4163if test $enable_shared = "yes"; then
4164
4165cat >>confdefs.h <<\_ACEOF
4166#define Py_ENABLE_SHARED 1
4167_ACEOF
4168
4169 case $ac_sys_system in
4170 BeOS*)
4171 LDLIBRARY='libpython$(VERSION).so'
4172 ;;
4173 CYGWIN*)
4174 LDLIBRARY='libpython$(VERSION).dll.a'
4175 DLLLIBRARY='libpython$(VERSION).dll'
4176 ;;
4177 SunOS*)
4178 LDLIBRARY='libpython$(VERSION).so'
4179 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4180 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4181 INSTSONAME="$LDLIBRARY".$SOVERSION
4182 ;;
4183 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4184 LDLIBRARY='libpython$(VERSION).so'
4185 BLDLIBRARY='-L. -lpython$(VERSION)'
4186 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4187 case $ac_sys_system in
4188 FreeBSD*)
4189 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4190 ;;
4191 esac
4192 INSTSONAME="$LDLIBRARY".$SOVERSION
4193 ;;
4194 hp*|HP*)
4195 case `uname -m` in
4196 ia64)
4197 LDLIBRARY='libpython$(VERSION).so'
4198 ;;
4199 *)
4200 LDLIBRARY='libpython$(VERSION).sl'
4201 ;;
4202 esac
4203 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4204 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4205 ;;
4206 OSF*)
4207 LDLIBRARY='libpython$(VERSION).so'
4208 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4209 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4210 ;;
4211 atheos*)
4212 LDLIBRARY='libpython$(VERSION).so'
4213 BLDLIBRARY='-L. -lpython$(VERSION)'
4214 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4215 ;;
4216 Darwin*)
4217 LDLIBRARY='libpython$(VERSION).dylib'
4218 BLDLIBRARY='-L. -lpython$(VERSION)'
4219 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4220 ;;
4221
4222 esac
4223else # shared is disabled
4224 case $ac_sys_system in
4225 CYGWIN*)
4226 BLDLIBRARY='$(LIBRARY)'
4227 LDLIBRARY='libpython$(VERSION).dll.a'
4228 ;;
4229 esac
4230fi
4231
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004232{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4233echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004234
4235if test -n "$ac_tool_prefix"; then
4236 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4237set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004240if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004241 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004242else
4243 if test -n "$RANLIB"; then
4244 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4245else
4246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4247for as_dir in $PATH
4248do
4249 IFS=$as_save_IFS
4250 test -z "$as_dir" && as_dir=.
4251 for ac_exec_ext in '' $ac_executable_extensions; do
4252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4253 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004255 break 2
4256 fi
4257done
4258done
4259IFS=$as_save_IFS
4260
4261fi
4262fi
4263RANLIB=$ac_cv_prog_RANLIB
4264if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004265 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4266echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004268 { echo "$as_me:$LINENO: result: no" >&5
4269echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004270fi
4271
4272
4273fi
4274if test -z "$ac_cv_prog_RANLIB"; then
4275 ac_ct_RANLIB=$RANLIB
4276 # Extract the first word of "ranlib", so it can be a program name with args.
4277set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004280if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004281 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004282else
4283 if test -n "$ac_ct_RANLIB"; then
4284 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4285else
4286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4287for as_dir in $PATH
4288do
4289 IFS=$as_save_IFS
4290 test -z "$as_dir" && as_dir=.
4291 for ac_exec_ext in '' $ac_executable_extensions; do
4292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4293 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004295 break 2
4296 fi
4297done
4298done
4299IFS=$as_save_IFS
4300
4301fi
4302fi
4303ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4304if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004305 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4306echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004308 { echo "$as_me:$LINENO: result: no" >&5
4309echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004310fi
4311
4312 if test "x$ac_ct_RANLIB" = x; then
4313 RANLIB=":"
4314 else
4315 case $cross_compiling:$ac_tool_warned in
4316yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004317{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4318whose name does not start with the host triplet. If you think this
4319configuration is useful to you, please write to autoconf@gnu.org." >&5
4320echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4321whose name does not start with the host triplet. If you think this
4322configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004323ac_tool_warned=yes ;;
4324esac
4325 RANLIB=$ac_ct_RANLIB
4326 fi
4327else
4328 RANLIB="$ac_cv_prog_RANLIB"
4329fi
4330
4331
4332for ac_prog in ar aal
4333do
4334 # Extract the first word of "$ac_prog", so it can be a program name with args.
4335set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004336{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4337echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004338if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004339 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004340else
4341 if test -n "$AR"; then
4342 ac_cv_prog_AR="$AR" # Let the user override the test.
4343else
4344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4345for as_dir in $PATH
4346do
4347 IFS=$as_save_IFS
4348 test -z "$as_dir" && as_dir=.
4349 for ac_exec_ext in '' $ac_executable_extensions; do
4350 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4351 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004352 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004353 break 2
4354 fi
4355done
4356done
4357IFS=$as_save_IFS
4358
4359fi
4360fi
4361AR=$ac_cv_prog_AR
4362if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004363 { echo "$as_me:$LINENO: result: $AR" >&5
4364echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004365else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004366 { echo "$as_me:$LINENO: result: no" >&5
4367echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004368fi
4369
4370
4371 test -n "$AR" && break
4372done
4373test -n "$AR" || AR="ar"
4374
4375
4376# tweak ARFLAGS only if the user didn't set it on the command line
4377
4378if test -z "$ARFLAGS"
4379then
4380 ARFLAGS="rc"
4381fi
4382
4383
4384# Extract the first word of "svnversion", so it can be a program name with args.
4385set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004386{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4387echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004388if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004389 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004390else
4391 if test -n "$SVNVERSION"; then
4392 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4393else
4394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395for as_dir in $PATH
4396do
4397 IFS=$as_save_IFS
4398 test -z "$as_dir" && as_dir=.
4399 for ac_exec_ext in '' $ac_executable_extensions; do
4400 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4401 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004402 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004403 break 2
4404 fi
4405done
4406done
4407IFS=$as_save_IFS
4408
4409 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4410fi
4411fi
4412SVNVERSION=$ac_cv_prog_SVNVERSION
4413if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004414 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4415echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004417 { echo "$as_me:$LINENO: result: no" >&5
4418echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004419fi
4420
4421
4422if test $SVNVERSION = found
4423then
4424 SVNVERSION="svnversion \$(srcdir)"
4425else
4426 SVNVERSION="echo Unversioned directory"
4427fi
4428
4429case $MACHDEP in
4430bsdos*|hp*|HP*)
4431 # install -d does not work on BSDI or HP-UX
4432 if test -z "$INSTALL"
4433 then
4434 INSTALL="${srcdir}/install-sh -c"
4435 fi
4436esac
4437ac_aux_dir=
4438for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4439 if test -f "$ac_dir/install-sh"; then
4440 ac_aux_dir=$ac_dir
4441 ac_install_sh="$ac_aux_dir/install-sh -c"
4442 break
4443 elif test -f "$ac_dir/install.sh"; then
4444 ac_aux_dir=$ac_dir
4445 ac_install_sh="$ac_aux_dir/install.sh -c"
4446 break
4447 elif test -f "$ac_dir/shtool"; then
4448 ac_aux_dir=$ac_dir
4449 ac_install_sh="$ac_aux_dir/shtool install -c"
4450 break
4451 fi
4452done
4453if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004454 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4455echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004456 { (exit 1); exit 1; }; }
4457fi
4458
4459# These three variables are undocumented and unsupported,
4460# and are intended to be withdrawn in a future Autoconf release.
4461# They can cause serious problems if a builder's source tree is in a directory
4462# whose full name contains unusual characters.
4463ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4464ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4465ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4466
4467
4468# Find a good install program. We prefer a C program (faster),
4469# so one script is as good as another. But avoid the broken or
4470# incompatible versions:
4471# SysV /etc/install, /usr/sbin/install
4472# SunOS /usr/etc/install
4473# IRIX /sbin/install
4474# AIX /bin/install
4475# AmigaOS /C/install, which installs bootblocks on floppy discs
4476# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4477# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4478# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4479# OS/2's system install, which has a completely different semantic
4480# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004481{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4482echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004483if test -z "$INSTALL"; then
4484if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004485 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004486else
4487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488for as_dir in $PATH
4489do
4490 IFS=$as_save_IFS
4491 test -z "$as_dir" && as_dir=.
4492 # Account for people who put trailing slashes in PATH elements.
4493case $as_dir/ in
4494 ./ | .// | /cC/* | \
4495 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4496 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4497 /usr/ucb/* ) ;;
4498 *)
4499 # OSF1 and SCO ODT 3.0 have their own names for install.
4500 # Don't use installbsd from OSF since it installs stuff as root
4501 # by default.
4502 for ac_prog in ginstall scoinst install; do
4503 for ac_exec_ext in '' $ac_executable_extensions; do
4504 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4505 if test $ac_prog = install &&
4506 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4507 # AIX install. It has an incompatible calling convention.
4508 :
4509 elif test $ac_prog = install &&
4510 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4511 # program-specific install script used by HP pwplus--don't use.
4512 :
4513 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004514 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4515 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004516 fi
4517 fi
4518 done
4519 done
4520 ;;
4521esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004522done
4523IFS=$as_save_IFS
4524
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004525
4526fi
4527 if test "${ac_cv_path_install+set}" = set; then
4528 INSTALL=$ac_cv_path_install
4529 else
4530 # As a last resort, use the slow shell script. Don't cache a
4531 # value for INSTALL within a source directory, because that will
4532 # break other packages using the cache if that directory is
4533 # removed, or if the value is a relative name.
4534 INSTALL=$ac_install_sh
4535 fi
4536fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004537{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4538echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004539
4540# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4541# It thinks the first close brace ends the variable substitution.
4542test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4543
4544test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4545
4546test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4547
4548
4549# Not every filesystem supports hard links
4550
4551if test -z "$LN" ; then
4552 case $ac_sys_system in
4553 BeOS*) LN="ln -s";;
4554 CYGWIN*) LN="ln -s";;
4555 atheos*) LN="ln -s";;
4556 *) LN=ln;;
4557 esac
4558fi
4559
4560# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004561{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4562echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004563
4564# Check whether --with-pydebug was given.
4565if test "${with_pydebug+set}" = set; then
4566 withval=$with_pydebug;
4567if test "$withval" != no
4568then
4569
4570cat >>confdefs.h <<\_ACEOF
4571#define Py_DEBUG 1
4572_ACEOF
4573
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004574 { echo "$as_me:$LINENO: result: yes" >&5
4575echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004576 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004577else { echo "$as_me:$LINENO: result: no" >&5
4578echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004579fi
4580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004581 { echo "$as_me:$LINENO: result: no" >&5
4582echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004583fi
4584
4585
4586# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4587# merged with this chunk of code?
4588
4589# Optimizer/debugger flags
4590# ------------------------
4591# (The following bit of code is complicated enough - please keep things
4592# indented properly. Just pretend you're editing Python code. ;-)
4593
4594# There are two parallel sets of case statements below, one that checks to
4595# see if OPT was set and one that does BASECFLAGS setting based upon
4596# compiler and platform. BASECFLAGS tweaks need to be made even if the
4597# user set OPT.
4598
4599# tweak OPT based on compiler and platform, only if the user didn't set
4600# it on the command line
4601
Benjamin Petersond4b721b2010-03-23 20:58:37 +00004602if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004603then
4604 case $GCC in
4605 yes)
4606 if test "$CC" != 'g++' ; then
4607 STRICT_PROTO="-Wstrict-prototypes"
4608 fi
4609 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4610 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4611 WRAP="-fwrapv"
4612 fi
4613 case $ac_cv_prog_cc_g in
4614 yes)
4615 if test "$Py_DEBUG" = 'true' ; then
4616 # Optimization messes up debuggers, so turn it off for
4617 # debug builds.
4618 OPT="-g -Wall $STRICT_PROTO"
4619 else
4620 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4621 fi
4622 ;;
4623 *)
4624 OPT="-O3 -Wall $STRICT_PROTO"
4625 ;;
4626 esac
4627 case $ac_sys_system in
4628 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4629 ;;
4630 esac
4631 ;;
4632
4633 *)
4634 OPT="-O"
4635 ;;
4636 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004637fi
4638
4639
4640
4641# The -arch flags for universal builds on OSX
4642UNIVERSAL_ARCH_FLAGS=
4643
4644
4645# tweak BASECFLAGS based on compiler and platform
4646case $GCC in
4647yes)
4648 # Python violates C99 rules, by casting between incompatible
4649 # pointer types. GCC may generate bad code as a result of that,
4650 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004651 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4652echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004653 ac_save_cc="$CC"
4654 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004655 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
4657else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004658 cat >conftest.$ac_ext <<_ACEOF
4659/* confdefs.h. */
4660_ACEOF
4661cat confdefs.h >>conftest.$ac_ext
4662cat >>conftest.$ac_ext <<_ACEOF
4663/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004664
4665int
4666main ()
4667{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004668int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004669 ;
4670 return 0;
4671}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004672_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004673rm -f conftest.$ac_objext
4674if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004675case "(($ac_try" in
4676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4677 *) ac_try_echo=$ac_try;;
4678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004680 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004681 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004682 grep -v '^ *+' conftest.er1 >conftest.err
4683 rm -f conftest.er1
4684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004686 (exit $ac_status); } && {
4687 test -z "$ac_c_werror_flag" ||
4688 test ! -s conftest.err
4689 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004690 ac_cv_no_strict_aliasing_ok=yes
4691else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004692 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004693sed 's/^/| /' conftest.$ac_ext >&5
4694
Gregory P. Smith373469a2009-11-01 21:03:38 +00004695 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004696fi
4697
Gregory P. Smith373469a2009-11-01 21:03:38 +00004698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004699fi
4700
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004701 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004702 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4703echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004704 if test $ac_cv_no_strict_aliasing_ok = yes
4705 then
4706 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4707 fi
4708
4709 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4710 # support. Without this, treatment of subnormals doesn't follow
4711 # the standard.
4712 case $ac_sys_machine in
4713 alpha*)
4714 BASECFLAGS="$BASECFLAGS -mieee"
4715 ;;
4716 esac
4717
4718 case $ac_sys_system in
4719 SCO_SV*)
4720 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4721 ;;
4722 # is there any other compiler on Darwin besides gcc?
4723 Darwin*)
4724 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4725 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004726 if test "${CC}" = gcc
4727 then
4728 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4729echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4730 case "${UNIVERSALSDK}" in
4731 */MacOSX10.4u.sdk)
4732 # Build using 10.4 SDK, force usage of gcc when the
4733 # compiler is gcc, otherwise the user will get very
4734 # confusing error messages when building on OSX 10.6
4735 CC=gcc-4.0
4736 CPP=cpp-4.0
4737 ;;
4738 esac
4739 { echo "$as_me:$LINENO: result: $CC" >&5
4740echo "${ECHO_T}$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004741 fi
4742
4743 # Calculate the right deployment target for this build.
4744 #
4745 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4746 if test ${cur_target} '>' 10.2; then
4747 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004748 if test ${enable_universalsdk}; then
4749 if test "${UNIVERSAL_ARCHS}" = "all"; then
4750 # Ensure that the default platform for a
4751 # 4-way universal build is OSX 10.5,
4752 # that's the first OS release where
4753 # 4-way builds make sense.
4754 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004755
4756 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4757 cur_target='10.5'
4758
4759 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4760 cur_target='10.5'
4761
4762 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4763 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004764 fi
4765 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00004766 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00004767 # On Intel macs default to a deployment
4768 # target of 10.4, that's the first OSX
4769 # release with Intel support.
4770 cur_target="10.4"
4771 fi
4772 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004773 fi
4774 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4775
4776 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4777 # environment with a value that is the same as what we'll use
4778 # in the Makefile to ensure that we'll get the same compiler
4779 # environment during configure and build time.
4780 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4781 export MACOSX_DEPLOYMENT_TARGET
4782 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4783
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004784 if test "${enable_universalsdk}"; then
4785 UNIVERSAL_ARCH_FLAGS=""
4786 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4787 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4788 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00004789 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004790
4791 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4792 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4793 LIPO_32BIT_FLAGS=""
4794 ARCH_RUN_32BIT="true"
4795
4796 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4797 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4798 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004799 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004800
4801 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4802 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4803 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004804 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004805
4806 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4807 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4808 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00004809 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004810
4811 else
4812 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4813echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
4814 { (exit 1); exit 1; }; }
4815
4816 fi
4817
4818
4819 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4820 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4821 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4822 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4823 CPPFLAGS="-isysroot ${UNIVERSALSDK}"
4824 fi
4825
4826 fi
4827
4828
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004829 ;;
4830 OSF*)
4831 BASECFLAGS="$BASECFLAGS -mieee"
4832 ;;
4833 esac
4834 ;;
4835
4836*)
4837 case $ac_sys_system in
4838 OpenUNIX*|UnixWare*)
4839 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4840 ;;
4841 OSF*)
4842 BASECFLAGS="$BASECFLAGS -ieee -std"
4843 ;;
4844 SCO_SV*)
4845 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4846 ;;
4847 esac
4848 ;;
4849esac
4850
4851if test "$Py_DEBUG" = 'true'; then
4852 :
4853else
4854 OPT="-DNDEBUG $OPT"
4855fi
4856
4857if test "$ac_arch_flags"
4858then
4859 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4860fi
4861
4862# disable check for icc since it seems to pass, but generates a warning
4863if test "$CC" = icc
4864then
4865 ac_cv_opt_olimit_ok=no
4866fi
4867
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004868{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4869echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004870if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004871 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004872else
4873 ac_save_cc="$CC"
4874CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004875cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004876/* confdefs.h. */
4877_ACEOF
4878cat confdefs.h >>conftest.$ac_ext
4879cat >>conftest.$ac_ext <<_ACEOF
4880/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004881
4882int
4883main ()
4884{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004885int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004886 ;
4887 return 0;
4888}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004889_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004890rm -f conftest.$ac_objext
4891if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004892case "(($ac_try" in
4893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4894 *) ac_try_echo=$ac_try;;
4895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004897 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004898 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004899 grep -v '^ *+' conftest.er1 >conftest.err
4900 rm -f conftest.er1
4901 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004903 (exit $ac_status); } && {
4904 test -z "$ac_c_werror_flag" ||
4905 test ! -s conftest.err
4906 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004907 ac_cv_opt_olimit_ok=yes
4908else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004909 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004910sed 's/^/| /' conftest.$ac_ext >&5
4911
Gregory P. Smith373469a2009-11-01 21:03:38 +00004912 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004913fi
4914
Gregory P. Smith373469a2009-11-01 21:03:38 +00004915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004916CC="$ac_save_cc"
4917fi
4918
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004919{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4920echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004921if test $ac_cv_opt_olimit_ok = yes; then
4922 case $ac_sys_system in
4923 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4924 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4925 # environment?
4926 Darwin*)
4927 ;;
4928 *)
4929 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4930 ;;
4931 esac
4932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004933 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4934echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004935 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004936 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004937else
4938 ac_save_cc="$CC"
4939 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004940 cat >conftest.$ac_ext <<_ACEOF
4941/* confdefs.h. */
4942_ACEOF
4943cat confdefs.h >>conftest.$ac_ext
4944cat >>conftest.$ac_ext <<_ACEOF
4945/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004946
4947int
4948main ()
4949{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004950int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004951 ;
4952 return 0;
4953}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004954_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004955rm -f conftest.$ac_objext
4956if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004957case "(($ac_try" in
4958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4959 *) ac_try_echo=$ac_try;;
4960esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004962 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004963 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004964 grep -v '^ *+' conftest.er1 >conftest.err
4965 rm -f conftest.er1
4966 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004968 (exit $ac_status); } && {
4969 test -z "$ac_c_werror_flag" ||
4970 test ! -s conftest.err
4971 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004972 ac_cv_olimit_ok=yes
4973else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004974 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004975sed 's/^/| /' conftest.$ac_ext >&5
4976
Gregory P. Smith373469a2009-11-01 21:03:38 +00004977 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004978fi
4979
Gregory P. Smith373469a2009-11-01 21:03:38 +00004980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004981 CC="$ac_save_cc"
4982fi
4983
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004984 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4985echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004986 if test $ac_cv_olimit_ok = yes; then
4987 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4988 fi
4989fi
4990
4991# Check whether GCC supports PyArg_ParseTuple format
4992if test "$GCC" = "yes"
4993then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004994 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4995echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004996 save_CFLAGS=$CFLAGS
4997 CFLAGS="$CFLAGS -Werror"
4998 cat >conftest.$ac_ext <<_ACEOF
4999/* confdefs.h. */
5000_ACEOF
5001cat confdefs.h >>conftest.$ac_ext
5002cat >>conftest.$ac_ext <<_ACEOF
5003/* end confdefs.h. */
5004
5005 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5006
5007int
5008main ()
5009{
5010
5011 ;
5012 return 0;
5013}
5014_ACEOF
5015rm -f conftest.$ac_objext
5016if { (ac_try="$ac_compile"
5017case "(($ac_try" in
5018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5019 *) ac_try_echo=$ac_try;;
5020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005022 (eval "$ac_compile") 2>conftest.er1
5023 ac_status=$?
5024 grep -v '^ *+' conftest.er1 >conftest.err
5025 rm -f conftest.er1
5026 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005028 (exit $ac_status); } && {
5029 test -z "$ac_c_werror_flag" ||
5030 test ! -s conftest.err
5031 } && test -s conftest.$ac_objext; then
5032
5033cat >>confdefs.h <<\_ACEOF
5034#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5035_ACEOF
5036
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005037 { echo "$as_me:$LINENO: result: yes" >&5
5038echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005040 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005041sed 's/^/| /' conftest.$ac_ext >&5
5042
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005043 { echo "$as_me:$LINENO: result: no" >&5
5044echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005045
5046fi
5047
5048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5049 CFLAGS=$save_CFLAGS
5050fi
5051
5052# On some compilers, pthreads are available without further options
5053# (e.g. MacOS X). On some of these systems, the compiler will not
5054# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5055# So we have to see first whether pthreads are available without
5056# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005057{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5058echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005059if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005060 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005061else
5062 if test "$cross_compiling" = yes; then
5063 ac_cv_pthread_is_default=no
5064else
5065 cat >conftest.$ac_ext <<_ACEOF
5066/* confdefs.h. */
5067_ACEOF
5068cat confdefs.h >>conftest.$ac_ext
5069cat >>conftest.$ac_ext <<_ACEOF
5070/* end confdefs.h. */
5071
5072#include <pthread.h>
5073
5074void* routine(void* p){return NULL;}
5075
5076int main(){
5077 pthread_t p;
5078 if(pthread_create(&p,NULL,routine,NULL)!=0)
5079 return 1;
5080 (void)pthread_detach(p);
5081 return 0;
5082}
5083
5084_ACEOF
5085rm -f conftest$ac_exeext
5086if { (ac_try="$ac_link"
5087case "(($ac_try" in
5088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5089 *) ac_try_echo=$ac_try;;
5090esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005092 (eval "$ac_link") 2>&5
5093 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5096 { (case "(($ac_try" in
5097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5098 *) ac_try_echo=$ac_try;;
5099esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005101 (eval "$ac_try") 2>&5
5102 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005104 (exit $ac_status); }; }; then
5105
5106 ac_cv_pthread_is_default=yes
5107 ac_cv_kthread=no
5108 ac_cv_pthread=no
5109
5110else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005111 echo "$as_me: program exited with status $ac_status" >&5
5112echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005113sed 's/^/| /' conftest.$ac_ext >&5
5114
5115( exit $ac_status )
5116ac_cv_pthread_is_default=no
5117fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5119fi
5120
5121
5122
5123fi
5124
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005125{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5126echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005127
5128
5129if test $ac_cv_pthread_is_default = yes
5130then
5131 ac_cv_kpthread=no
5132else
5133# -Kpthread, if available, provides the right #defines
5134# and linker options to make pthread_create available
5135# Some compilers won't report that they do not support -Kpthread,
5136# so we need to run a program to see whether it really made the
5137# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005138{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5139echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005141 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005142else
5143 ac_save_cc="$CC"
5144CC="$CC -Kpthread"
5145if test "$cross_compiling" = yes; then
5146 ac_cv_kpthread=no
5147else
5148 cat >conftest.$ac_ext <<_ACEOF
5149/* confdefs.h. */
5150_ACEOF
5151cat confdefs.h >>conftest.$ac_ext
5152cat >>conftest.$ac_ext <<_ACEOF
5153/* end confdefs.h. */
5154
5155#include <pthread.h>
5156
5157void* routine(void* p){return NULL;}
5158
5159int main(){
5160 pthread_t p;
5161 if(pthread_create(&p,NULL,routine,NULL)!=0)
5162 return 1;
5163 (void)pthread_detach(p);
5164 return 0;
5165}
5166
5167_ACEOF
5168rm -f conftest$ac_exeext
5169if { (ac_try="$ac_link"
5170case "(($ac_try" in
5171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5172 *) ac_try_echo=$ac_try;;
5173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005175 (eval "$ac_link") 2>&5
5176 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005178 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5179 { (case "(($ac_try" in
5180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5181 *) ac_try_echo=$ac_try;;
5182esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005184 (eval "$ac_try") 2>&5
5185 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005187 (exit $ac_status); }; }; then
5188 ac_cv_kpthread=yes
5189else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005190 echo "$as_me: program exited with status $ac_status" >&5
5191echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005192sed 's/^/| /' conftest.$ac_ext >&5
5193
5194( exit $ac_status )
5195ac_cv_kpthread=no
5196fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5198fi
5199
5200
5201CC="$ac_save_cc"
5202fi
5203
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005204{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5205echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005206fi
5207
5208if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5209then
5210# -Kthread, if available, provides the right #defines
5211# and linker options to make pthread_create available
5212# Some compilers won't report that they do not support -Kthread,
5213# so we need to run a program to see whether it really made the
5214# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005215{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5216echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005217if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005218 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005219else
5220 ac_save_cc="$CC"
5221CC="$CC -Kthread"
5222if test "$cross_compiling" = yes; then
5223 ac_cv_kthread=no
5224else
5225 cat >conftest.$ac_ext <<_ACEOF
5226/* confdefs.h. */
5227_ACEOF
5228cat confdefs.h >>conftest.$ac_ext
5229cat >>conftest.$ac_ext <<_ACEOF
5230/* end confdefs.h. */
5231
5232#include <pthread.h>
5233
5234void* routine(void* p){return NULL;}
5235
5236int main(){
5237 pthread_t p;
5238 if(pthread_create(&p,NULL,routine,NULL)!=0)
5239 return 1;
5240 (void)pthread_detach(p);
5241 return 0;
5242}
5243
5244_ACEOF
5245rm -f conftest$ac_exeext
5246if { (ac_try="$ac_link"
5247case "(($ac_try" in
5248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5249 *) ac_try_echo=$ac_try;;
5250esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005252 (eval "$ac_link") 2>&5
5253 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005255 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5256 { (case "(($ac_try" in
5257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5258 *) ac_try_echo=$ac_try;;
5259esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005261 (eval "$ac_try") 2>&5
5262 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005264 (exit $ac_status); }; }; then
5265 ac_cv_kthread=yes
5266else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005267 echo "$as_me: program exited with status $ac_status" >&5
5268echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005269sed 's/^/| /' conftest.$ac_ext >&5
5270
5271( exit $ac_status )
5272ac_cv_kthread=no
5273fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5275fi
5276
5277
5278CC="$ac_save_cc"
5279fi
5280
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005281{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5282echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005283fi
5284
5285if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5286then
5287# -pthread, if available, provides the right #defines
5288# and linker options to make pthread_create available
5289# Some compilers won't report that they do not support -pthread,
5290# so we need to run a program to see whether it really made the
5291# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005292{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5293echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005294if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005295 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005296else
5297 ac_save_cc="$CC"
5298CC="$CC -pthread"
5299if test "$cross_compiling" = yes; then
5300 ac_cv_pthread=no
5301else
5302 cat >conftest.$ac_ext <<_ACEOF
5303/* confdefs.h. */
5304_ACEOF
5305cat confdefs.h >>conftest.$ac_ext
5306cat >>conftest.$ac_ext <<_ACEOF
5307/* end confdefs.h. */
5308
5309#include <pthread.h>
5310
5311void* routine(void* p){return NULL;}
5312
5313int main(){
5314 pthread_t p;
5315 if(pthread_create(&p,NULL,routine,NULL)!=0)
5316 return 1;
5317 (void)pthread_detach(p);
5318 return 0;
5319}
5320
5321_ACEOF
5322rm -f conftest$ac_exeext
5323if { (ac_try="$ac_link"
5324case "(($ac_try" in
5325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5326 *) ac_try_echo=$ac_try;;
5327esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005329 (eval "$ac_link") 2>&5
5330 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5333 { (case "(($ac_try" in
5334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5335 *) ac_try_echo=$ac_try;;
5336esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005338 (eval "$ac_try") 2>&5
5339 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005341 (exit $ac_status); }; }; then
5342 ac_cv_pthread=yes
5343else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005344 echo "$as_me: program exited with status $ac_status" >&5
5345echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005346sed 's/^/| /' conftest.$ac_ext >&5
5347
5348( exit $ac_status )
5349ac_cv_pthread=no
5350fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5352fi
5353
5354
5355CC="$ac_save_cc"
5356fi
5357
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005358{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5359echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005360fi
5361
5362# If we have set a CC compiler flag for thread support then
5363# check if it works for CXX, too.
5364ac_cv_cxx_thread=no
5365if test ! -z "$CXX"
5366then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005367{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5368echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005369ac_save_cxx="$CXX"
5370
5371if test "$ac_cv_kpthread" = "yes"
5372then
5373 CXX="$CXX -Kpthread"
5374 ac_cv_cxx_thread=yes
5375elif test "$ac_cv_kthread" = "yes"
5376then
5377 CXX="$CXX -Kthread"
5378 ac_cv_cxx_thread=yes
5379elif test "$ac_cv_pthread" = "yes"
5380then
5381 CXX="$CXX -pthread"
5382 ac_cv_cxx_thread=yes
5383fi
5384
5385if test $ac_cv_cxx_thread = yes
5386then
5387 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5388 $CXX -c conftest.$ac_ext 2>&5
5389 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5390 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5391 then
5392 ac_cv_cxx_thread=yes
5393 else
5394 ac_cv_cxx_thread=no
5395 fi
5396 rm -fr conftest*
5397fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005398{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5399echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005400fi
5401CXX="$ac_save_cxx"
5402
5403
5404# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005405{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5406echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005407if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005408 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005409else
5410 cat >conftest.$ac_ext <<_ACEOF
5411/* confdefs.h. */
5412_ACEOF
5413cat confdefs.h >>conftest.$ac_ext
5414cat >>conftest.$ac_ext <<_ACEOF
5415/* end confdefs.h. */
5416#include <stdlib.h>
5417#include <stdarg.h>
5418#include <string.h>
5419#include <float.h>
5420
5421int
5422main ()
5423{
5424
5425 ;
5426 return 0;
5427}
5428_ACEOF
5429rm -f conftest.$ac_objext
5430if { (ac_try="$ac_compile"
5431case "(($ac_try" in
5432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5433 *) ac_try_echo=$ac_try;;
5434esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005436 (eval "$ac_compile") 2>conftest.er1
5437 ac_status=$?
5438 grep -v '^ *+' conftest.er1 >conftest.err
5439 rm -f conftest.er1
5440 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005442 (exit $ac_status); } && {
5443 test -z "$ac_c_werror_flag" ||
5444 test ! -s conftest.err
5445 } && test -s conftest.$ac_objext; then
5446 ac_cv_header_stdc=yes
5447else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005448 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005449sed 's/^/| /' conftest.$ac_ext >&5
5450
5451 ac_cv_header_stdc=no
5452fi
5453
5454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5455
5456if test $ac_cv_header_stdc = yes; then
5457 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5458 cat >conftest.$ac_ext <<_ACEOF
5459/* confdefs.h. */
5460_ACEOF
5461cat confdefs.h >>conftest.$ac_ext
5462cat >>conftest.$ac_ext <<_ACEOF
5463/* end confdefs.h. */
5464#include <string.h>
5465
5466_ACEOF
5467if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5468 $EGREP "memchr" >/dev/null 2>&1; then
5469 :
5470else
5471 ac_cv_header_stdc=no
5472fi
Ronald Oussoren75912852010-04-08 08:13:31 +00005473rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474
5475fi
5476
5477if test $ac_cv_header_stdc = yes; then
5478 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5479 cat >conftest.$ac_ext <<_ACEOF
5480/* confdefs.h. */
5481_ACEOF
5482cat confdefs.h >>conftest.$ac_ext
5483cat >>conftest.$ac_ext <<_ACEOF
5484/* end confdefs.h. */
5485#include <stdlib.h>
5486
5487_ACEOF
5488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5489 $EGREP "free" >/dev/null 2>&1; then
5490 :
5491else
5492 ac_cv_header_stdc=no
5493fi
Ronald Oussoren75912852010-04-08 08:13:31 +00005494rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005495
5496fi
5497
5498if test $ac_cv_header_stdc = yes; then
5499 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5500 if test "$cross_compiling" = yes; then
5501 :
5502else
5503 cat >conftest.$ac_ext <<_ACEOF
5504/* confdefs.h. */
5505_ACEOF
5506cat confdefs.h >>conftest.$ac_ext
5507cat >>conftest.$ac_ext <<_ACEOF
5508/* end confdefs.h. */
5509#include <ctype.h>
5510#include <stdlib.h>
5511#if ((' ' & 0x0FF) == 0x020)
5512# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5513# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5514#else
5515# define ISLOWER(c) \
5516 (('a' <= (c) && (c) <= 'i') \
5517 || ('j' <= (c) && (c) <= 'r') \
5518 || ('s' <= (c) && (c) <= 'z'))
5519# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5520#endif
5521
5522#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5523int
5524main ()
5525{
5526 int i;
5527 for (i = 0; i < 256; i++)
5528 if (XOR (islower (i), ISLOWER (i))
5529 || toupper (i) != TOUPPER (i))
5530 return 2;
5531 return 0;
5532}
5533_ACEOF
5534rm -f conftest$ac_exeext
5535if { (ac_try="$ac_link"
5536case "(($ac_try" in
5537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5538 *) ac_try_echo=$ac_try;;
5539esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005541 (eval "$ac_link") 2>&5
5542 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5545 { (case "(($ac_try" in
5546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5547 *) ac_try_echo=$ac_try;;
5548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005550 (eval "$ac_try") 2>&5
5551 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005553 (exit $ac_status); }; }; then
5554 :
5555else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005556 echo "$as_me: program exited with status $ac_status" >&5
5557echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005558sed 's/^/| /' conftest.$ac_ext >&5
5559
5560( exit $ac_status )
5561ac_cv_header_stdc=no
5562fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5564fi
5565
5566
5567fi
5568fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005569{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5570echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005571if test $ac_cv_header_stdc = yes; then
5572
5573cat >>confdefs.h <<\_ACEOF
5574#define STDC_HEADERS 1
5575_ACEOF
5576
5577fi
5578
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005579# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5590 inttypes.h stdint.h unistd.h
5591do
5592as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5593{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5594echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5595if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5596 echo $ECHO_N "(cached) $ECHO_C" >&6
5597else
5598 cat >conftest.$ac_ext <<_ACEOF
5599/* confdefs.h. */
5600_ACEOF
5601cat confdefs.h >>conftest.$ac_ext
5602cat >>conftest.$ac_ext <<_ACEOF
5603/* end confdefs.h. */
5604$ac_includes_default
5605
5606#include <$ac_header>
5607_ACEOF
5608rm -f conftest.$ac_objext
5609if { (ac_try="$ac_compile"
5610case "(($ac_try" in
5611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5612 *) ac_try_echo=$ac_try;;
5613esac
5614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5615 (eval "$ac_compile") 2>conftest.er1
5616 ac_status=$?
5617 grep -v '^ *+' conftest.er1 >conftest.err
5618 rm -f conftest.er1
5619 cat conftest.err >&5
5620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621 (exit $ac_status); } && {
5622 test -z "$ac_c_werror_flag" ||
5623 test ! -s conftest.err
5624 } && test -s conftest.$ac_objext; then
5625 eval "$as_ac_Header=yes"
5626else
5627 echo "$as_me: failed program was:" >&5
5628sed 's/^/| /' conftest.$ac_ext >&5
5629
5630 eval "$as_ac_Header=no"
5631fi
5632
5633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5634fi
5635ac_res=`eval echo '${'$as_ac_Header'}'`
5636 { echo "$as_me:$LINENO: result: $ac_res" >&5
5637echo "${ECHO_T}$ac_res" >&6; }
5638if test `eval echo '${'$as_ac_Header'}'` = yes; then
5639 cat >>confdefs.h <<_ACEOF
5640#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5641_ACEOF
5642
5643fi
5644
5645done
5646
5647
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005648
Martin v. Löwis11437992002-04-12 09:54:03 +00005649
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
5681
5682
5683
Anthony Baxter8a560de2004-10-13 15:30:56 +00005684
Martin v. Löwisc3001752005-01-23 09:27:24 +00005685
Martin v. Löwis11017b12006-01-14 18:12:57 +00005686
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005687
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005688
5689
5690
5691
5692
5693
5694
5695
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005696
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005697
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005698
5699
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005700
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005701
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005702
5703
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005704for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5705fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005706ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005707shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005708unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005709sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5710sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005711sys/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 +00005712sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005713sys/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 +00005714sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005715bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005716do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005717as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
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 "$as_me:$LINENO: checking for $ac_header" >&5
5720echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005721if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005722 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005723fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005724ac_res=`eval echo '${'$as_ac_Header'}'`
5725 { echo "$as_me:$LINENO: result: $ac_res" >&5
5726echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005727else
Martin v. Löwis11437992002-04-12 09:54:03 +00005728 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005729{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5730echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005732/* confdefs.h. */
5733_ACEOF
5734cat confdefs.h >>conftest.$ac_ext
5735cat >>conftest.$ac_ext <<_ACEOF
5736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005737$ac_includes_default
5738#include <$ac_header>
5739_ACEOF
5740rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005741if { (ac_try="$ac_compile"
5742case "(($ac_try" in
5743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5744 *) ac_try_echo=$ac_try;;
5745esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005749 grep -v '^ *+' conftest.er1 >conftest.err
5750 rm -f conftest.er1
5751 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005753 (exit $ac_status); } && {
5754 test -z "$ac_c_werror_flag" ||
5755 test ! -s conftest.err
5756 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005757 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005758else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005760sed 's/^/| /' conftest.$ac_ext >&5
5761
Martin v. Löwiseba40652007-08-30 20:10:57 +00005762 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005764
5765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005766{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5767echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005768
5769# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005770{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5771echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005772cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005773/* confdefs.h. */
5774_ACEOF
5775cat confdefs.h >>conftest.$ac_ext
5776cat >>conftest.$ac_ext <<_ACEOF
5777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005778#include <$ac_header>
5779_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005780if { (ac_try="$ac_cpp conftest.$ac_ext"
5781case "(($ac_try" in
5782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5783 *) ac_try_echo=$ac_try;;
5784esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005786 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005787 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005788 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005789 rm -f conftest.er1
5790 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005792 (exit $ac_status); } >/dev/null && {
5793 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5794 test ! -s conftest.err
5795 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005796 ac_header_preproc=yes
5797else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005799sed 's/^/| /' conftest.$ac_ext >&5
5800
Martin v. Löwis11437992002-04-12 09:54:03 +00005801 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005803
Martin v. Löwis11437992002-04-12 09:54:03 +00005804rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005805{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5806echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005807
5808# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005809case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5810 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005811 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5812echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5813 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5814echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005815 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005816 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005817 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005818 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5819echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5820 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5821echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5822 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5823echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5824 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5825echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5826 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5827echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5828 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5829echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005830 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005831## -------------------------------------- ##
5832## Report this to http://bugs.python.org/ ##
5833## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005834_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005835 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005836 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005837esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005838{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5839echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005840if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005841 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005842else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005843 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005844fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005845ac_res=`eval echo '${'$as_ac_Header'}'`
5846 { echo "$as_me:$LINENO: result: $ac_res" >&5
5847echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005848
5849fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005850if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005851 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005852#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005853_ACEOF
5854
5855fi
5856
Guido van Rossum627b2d71993-12-24 10:39:16 +00005857done
5858
Martin v. Löwis11437992002-04-12 09:54:03 +00005859
5860
5861
5862
5863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005864ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005865for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005866 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5867{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5868echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005869if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005871else
Martin v. Löwis11437992002-04-12 09:54:03 +00005872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005873/* confdefs.h. */
5874_ACEOF
5875cat confdefs.h >>conftest.$ac_ext
5876cat >>conftest.$ac_ext <<_ACEOF
5877/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878#include <sys/types.h>
5879#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005880
Martin v. Löwis11437992002-04-12 09:54:03 +00005881int
5882main ()
5883{
5884if ((DIR *) 0)
5885return 0;
5886 ;
5887 return 0;
5888}
5889_ACEOF
5890rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005891if { (ac_try="$ac_compile"
5892case "(($ac_try" in
5893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5894 *) ac_try_echo=$ac_try;;
5895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005899 grep -v '^ *+' conftest.er1 >conftest.err
5900 rm -f conftest.er1
5901 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005903 (exit $ac_status); } && {
5904 test -z "$ac_c_werror_flag" ||
5905 test ! -s conftest.err
5906 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005907 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005908else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005910sed 's/^/| /' conftest.$ac_ext >&5
5911
Martin v. Löwiseba40652007-08-30 20:10:57 +00005912 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914
5915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005916fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005917ac_res=`eval echo '${'$as_ac_Header'}'`
5918 { echo "$as_me:$LINENO: result: $ac_res" >&5
5919echo "${ECHO_T}$ac_res" >&6; }
5920if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005921 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005922#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005923_ACEOF
5924
5925ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005926fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005927
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005928done
5929# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5930if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005931 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5932echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005933if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005935else
Martin v. Löwis11437992002-04-12 09:54:03 +00005936 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005938/* confdefs.h. */
5939_ACEOF
5940cat confdefs.h >>conftest.$ac_ext
5941cat >>conftest.$ac_ext <<_ACEOF
5942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005943
Martin v. Löwiseba40652007-08-30 20:10:57 +00005944/* Override any GCC internal prototype to avoid an error.
5945 Use char because int might match the return type of a GCC
5946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005947#ifdef __cplusplus
5948extern "C"
5949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005950char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005951int
5952main ()
5953{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005954return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005955 ;
5956 return 0;
5957}
5958_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005959for ac_lib in '' dir; do
5960 if test -z "$ac_lib"; then
5961 ac_res="none required"
5962 else
5963 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005964 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005965 fi
5966 rm -f conftest.$ac_objext conftest$ac_exeext
5967if { (ac_try="$ac_link"
5968case "(($ac_try" in
5969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5970 *) ac_try_echo=$ac_try;;
5971esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005973 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005974 ac_status=$?
5975 grep -v '^ *+' conftest.er1 >conftest.err
5976 rm -f conftest.er1
5977 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005979 (exit $ac_status); } && {
5980 test -z "$ac_c_werror_flag" ||
5981 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005982 } && test -s conftest$ac_exeext &&
5983 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005984 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005985else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005986 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005987sed 's/^/| /' conftest.$ac_ext >&5
5988
Martin v. Löwiseba40652007-08-30 20:10:57 +00005989
Brett Cannon19fab762007-06-02 03:02:29 +00005990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005991
5992rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5993 conftest$ac_exeext
5994 if test "${ac_cv_search_opendir+set}" = set; then
5995 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005997done
5998if test "${ac_cv_search_opendir+set}" = set; then
5999 :
6000else
6001 ac_cv_search_opendir=no
6002fi
6003rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006004LIBS=$ac_func_search_save_LIBS
6005fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006006{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6007echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006008ac_res=$ac_cv_search_opendir
6009if test "$ac_res" != no; then
6010 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006011
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006012fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006013
Michael W. Hudson54241132001-12-07 15:38:26 +00006014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006015 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
6016echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006017if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006018 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006019else
6020 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006022/* confdefs.h. */
6023_ACEOF
6024cat confdefs.h >>conftest.$ac_ext
6025cat >>conftest.$ac_ext <<_ACEOF
6026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006027
Martin v. Löwiseba40652007-08-30 20:10:57 +00006028/* Override any GCC internal prototype to avoid an error.
6029 Use char because int might match the return type of a GCC
6030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006031#ifdef __cplusplus
6032extern "C"
6033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006034char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006035int
6036main ()
6037{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006038return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006039 ;
6040 return 0;
6041}
6042_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006043for ac_lib in '' x; do
6044 if test -z "$ac_lib"; then
6045 ac_res="none required"
6046 else
6047 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006048 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006049 fi
6050 rm -f conftest.$ac_objext conftest$ac_exeext
6051if { (ac_try="$ac_link"
6052case "(($ac_try" in
6053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6054 *) ac_try_echo=$ac_try;;
6055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006057 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006058 ac_status=$?
6059 grep -v '^ *+' conftest.er1 >conftest.err
6060 rm -f conftest.er1
6061 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006063 (exit $ac_status); } && {
6064 test -z "$ac_c_werror_flag" ||
6065 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006066 } && test -s conftest$ac_exeext &&
6067 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006068 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006069else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006070 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006071sed 's/^/| /' conftest.$ac_ext >&5
6072
Martin v. Löwiseba40652007-08-30 20:10:57 +00006073
Brett Cannon19fab762007-06-02 03:02:29 +00006074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006075
6076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6077 conftest$ac_exeext
6078 if test "${ac_cv_search_opendir+set}" = set; then
6079 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006081done
6082if test "${ac_cv_search_opendir+set}" = set; then
6083 :
6084else
6085 ac_cv_search_opendir=no
6086fi
6087rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006088LIBS=$ac_func_search_save_LIBS
6089fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006090{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6091echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006092ac_res=$ac_cv_search_opendir
6093if test "$ac_res" != no; then
6094 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006096fi
6097
6098fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006099
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006100{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6101echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006103 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104else
6105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006106/* confdefs.h. */
6107_ACEOF
6108cat confdefs.h >>conftest.$ac_ext
6109cat >>conftest.$ac_ext <<_ACEOF
6110/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006111#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112int
6113main ()
6114{
6115return makedev(0, 0);
6116 ;
6117 return 0;
6118}
6119_ACEOF
6120rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006121if { (ac_try="$ac_link"
6122case "(($ac_try" in
6123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6124 *) ac_try_echo=$ac_try;;
6125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006127 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006129 grep -v '^ *+' conftest.er1 >conftest.err
6130 rm -f conftest.er1
6131 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006133 (exit $ac_status); } && {
6134 test -z "$ac_c_werror_flag" ||
6135 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006136 } && test -s conftest$ac_exeext &&
6137 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138 ac_cv_header_sys_types_h_makedev=yes
6139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006141sed 's/^/| /' conftest.$ac_ext >&5
6142
Martin v. Löwiseba40652007-08-30 20:10:57 +00006143 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006145
6146rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006147 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148
6149fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006150{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6151echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006152
6153if test $ac_cv_header_sys_types_h_makedev = no; then
6154if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006155 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6156echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006157if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006158 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006159fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006160{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6161echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006162else
6163 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006164{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6165echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006167/* confdefs.h. */
6168_ACEOF
6169cat confdefs.h >>conftest.$ac_ext
6170cat >>conftest.$ac_ext <<_ACEOF
6171/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172$ac_includes_default
6173#include <sys/mkdev.h>
6174_ACEOF
6175rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006176if { (ac_try="$ac_compile"
6177case "(($ac_try" in
6178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6179 *) ac_try_echo=$ac_try;;
6180esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006184 grep -v '^ *+' conftest.er1 >conftest.err
6185 rm -f conftest.er1
6186 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006188 (exit $ac_status); } && {
6189 test -z "$ac_c_werror_flag" ||
6190 test ! -s conftest.err
6191 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006192 ac_header_compiler=yes
6193else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006195sed 's/^/| /' conftest.$ac_ext >&5
6196
Martin v. Löwiseba40652007-08-30 20:10:57 +00006197 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006199
6200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006201{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6202echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006203
6204# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006205{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6206echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006208/* confdefs.h. */
6209_ACEOF
6210cat confdefs.h >>conftest.$ac_ext
6211cat >>conftest.$ac_ext <<_ACEOF
6212/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213#include <sys/mkdev.h>
6214_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006215if { (ac_try="$ac_cpp conftest.$ac_ext"
6216case "(($ac_try" in
6217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6218 *) ac_try_echo=$ac_try;;
6219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006223 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006224 rm -f conftest.er1
6225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227 (exit $ac_status); } >/dev/null && {
6228 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6229 test ! -s conftest.err
6230 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231 ac_header_preproc=yes
6232else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006234sed 's/^/| /' conftest.$ac_ext >&5
6235
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236 ac_header_preproc=no
6237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006238
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006240{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6241echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242
6243# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006244case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6245 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006246 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6247echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6248 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6249echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006250 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006251 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006252 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006253 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6254echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6255 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6256echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6257 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6258echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6259 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6260echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6261 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6262echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6263 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6264echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006265 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006266## -------------------------------------- ##
6267## Report this to http://bugs.python.org/ ##
6268## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006269_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006270 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006271 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006273{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6274echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006276 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006277else
6278 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6279fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006280{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6281echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006284if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285
6286cat >>confdefs.h <<\_ACEOF
6287#define MAJOR_IN_MKDEV 1
6288_ACEOF
6289
6290fi
6291
6292
6293
6294 if test $ac_cv_header_sys_mkdev_h = no; then
6295 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006296 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6297echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006298if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006299 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006300fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006301{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6302echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006303else
6304 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006305{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6306echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006308/* confdefs.h. */
6309_ACEOF
6310cat confdefs.h >>conftest.$ac_ext
6311cat >>conftest.$ac_ext <<_ACEOF
6312/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313$ac_includes_default
6314#include <sys/sysmacros.h>
6315_ACEOF
6316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006317if { (ac_try="$ac_compile"
6318case "(($ac_try" in
6319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6320 *) ac_try_echo=$ac_try;;
6321esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006325 grep -v '^ *+' conftest.er1 >conftest.err
6326 rm -f conftest.er1
6327 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006329 (exit $ac_status); } && {
6330 test -z "$ac_c_werror_flag" ||
6331 test ! -s conftest.err
6332 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006333 ac_header_compiler=yes
6334else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006336sed 's/^/| /' conftest.$ac_ext >&5
6337
Martin v. Löwiseba40652007-08-30 20:10:57 +00006338 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006340
6341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006342{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6343echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006344
6345# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006346{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6347echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006348cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006349/* confdefs.h. */
6350_ACEOF
6351cat confdefs.h >>conftest.$ac_ext
6352cat >>conftest.$ac_ext <<_ACEOF
6353/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354#include <sys/sysmacros.h>
6355_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006356if { (ac_try="$ac_cpp conftest.$ac_ext"
6357case "(($ac_try" in
6358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6359 *) ac_try_echo=$ac_try;;
6360esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006362 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006363 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006364 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006365 rm -f conftest.er1
6366 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006368 (exit $ac_status); } >/dev/null && {
6369 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6370 test ! -s conftest.err
6371 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006372 ac_header_preproc=yes
6373else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006375sed 's/^/| /' conftest.$ac_ext >&5
6376
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006377 ac_header_preproc=no
6378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006379
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006380rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006381{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6382echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006383
6384# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006385case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6386 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006387 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6388echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6389 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6390echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006391 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006392 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006393 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006394 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6395echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6396 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6397echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6398 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6399echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6400 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6401echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6402 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6403echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6404 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6405echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006406 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006407## -------------------------------------- ##
6408## Report this to http://bugs.python.org/ ##
6409## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006410_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006412 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006413esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006414{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6415echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006416if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006417 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006418else
6419 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6420fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006421{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6422echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006423
6424fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006425if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006426
6427cat >>confdefs.h <<\_ACEOF
6428#define MAJOR_IN_SYSMACROS 1
6429_ACEOF
6430
6431fi
6432
6433
6434 fi
6435fi
6436
Michael W. Hudson54241132001-12-07 15:38:26 +00006437
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006438# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006439
6440for ac_header in term.h
6441do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006442as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6443{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6444echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006445if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006446 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006447else
6448 cat >conftest.$ac_ext <<_ACEOF
6449/* confdefs.h. */
6450_ACEOF
6451cat confdefs.h >>conftest.$ac_ext
6452cat >>conftest.$ac_ext <<_ACEOF
6453/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006454
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006455#ifdef HAVE_CURSES_H
6456#include <curses.h>
6457#endif
6458
6459
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006460#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006461_ACEOF
6462rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006463if { (ac_try="$ac_compile"
6464case "(($ac_try" in
6465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6466 *) ac_try_echo=$ac_try;;
6467esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006470 ac_status=$?
6471 grep -v '^ *+' conftest.er1 >conftest.err
6472 rm -f conftest.er1
6473 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006475 (exit $ac_status); } && {
6476 test -z "$ac_c_werror_flag" ||
6477 test ! -s conftest.err
6478 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006479 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006480else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006481 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006482sed 's/^/| /' conftest.$ac_ext >&5
6483
Martin v. Löwiseba40652007-08-30 20:10:57 +00006484 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006486
6487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006488fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006489ac_res=`eval echo '${'$as_ac_Header'}'`
6490 { echo "$as_me:$LINENO: result: $ac_res" >&5
6491echo "${ECHO_T}$ac_res" >&6; }
6492if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006493 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006494#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006495_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006496
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006497fi
6498
6499done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006500
6501
Martin v. Löwis11017b12006-01-14 18:12:57 +00006502# On Linux, netlink.h requires asm/types.h
6503
6504for ac_header in linux/netlink.h
6505do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006506as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6507{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6508echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006509if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006510 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006511else
6512 cat >conftest.$ac_ext <<_ACEOF
6513/* confdefs.h. */
6514_ACEOF
6515cat confdefs.h >>conftest.$ac_ext
6516cat >>conftest.$ac_ext <<_ACEOF
6517/* end confdefs.h. */
6518
6519#ifdef HAVE_ASM_TYPES_H
6520#include <asm/types.h>
6521#endif
6522#ifdef HAVE_SYS_SOCKET_H
6523#include <sys/socket.h>
6524#endif
6525
6526
6527#include <$ac_header>
6528_ACEOF
6529rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006530if { (ac_try="$ac_compile"
6531case "(($ac_try" in
6532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6533 *) ac_try_echo=$ac_try;;
6534esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006536 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006537 ac_status=$?
6538 grep -v '^ *+' conftest.er1 >conftest.err
6539 rm -f conftest.er1
6540 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006542 (exit $ac_status); } && {
6543 test -z "$ac_c_werror_flag" ||
6544 test ! -s conftest.err
6545 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006546 eval "$as_ac_Header=yes"
6547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006548 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006549sed 's/^/| /' conftest.$ac_ext >&5
6550
Martin v. Löwiseba40652007-08-30 20:10:57 +00006551 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006553
6554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006555fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006556ac_res=`eval echo '${'$as_ac_Header'}'`
6557 { echo "$as_me:$LINENO: result: $ac_res" >&5
6558echo "${ECHO_T}$ac_res" >&6; }
6559if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006560 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006561#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006562_ACEOF
6563
6564fi
6565
6566done
6567
6568
Guido van Rossum627b2d71993-12-24 10:39:16 +00006569# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006570was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006571{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6572echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006573cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006574/* confdefs.h. */
6575_ACEOF
6576cat confdefs.h >>conftest.$ac_ext
6577cat >>conftest.$ac_ext <<_ACEOF
6578/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006579#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006580
6581_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006583 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006584 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006585else
Martin v. Löwis11437992002-04-12 09:54:03 +00006586
6587
6588cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006589#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006590_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006591
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006592
Guido van Rossum627b2d71993-12-24 10:39:16 +00006593fi
Ronald Oussoren75912852010-04-08 08:13:31 +00006594rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006595
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006596{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6597echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006598
Neal Norwitz11690112002-07-30 01:08:28 +00006599# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006600{ echo "$as_me:$LINENO: checking for makedev" >&5
6601echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006603/* confdefs.h. */
6604_ACEOF
6605cat confdefs.h >>conftest.$ac_ext
6606cat >>conftest.$ac_ext <<_ACEOF
6607/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006608#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006609int
6610main ()
6611{
6612 makedev(0, 0)
6613 ;
6614 return 0;
6615}
6616_ACEOF
6617rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006618if { (ac_try="$ac_link"
6619case "(($ac_try" in
6620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6621 *) ac_try_echo=$ac_try;;
6622esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006624 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006626 grep -v '^ *+' conftest.er1 >conftest.err
6627 rm -f conftest.er1
6628 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006630 (exit $ac_status); } && {
6631 test -z "$ac_c_werror_flag" ||
6632 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006633 } && test -s conftest$ac_exeext &&
6634 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006635 ac_cv_has_makedev=yes
6636else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006638sed 's/^/| /' conftest.$ac_ext >&5
6639
Martin v. Löwiseba40652007-08-30 20:10:57 +00006640 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006642
6643rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006644 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006645if test "$ac_cv_has_makedev" = "no"; then
6646 # we didn't link, try if _OSF_SOURCE will allow us to link
6647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006648/* confdefs.h. */
6649_ACEOF
6650cat confdefs.h >>conftest.$ac_ext
6651cat >>conftest.$ac_ext <<_ACEOF
6652/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006653
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006654#define _OSF_SOURCE 1
6655#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006656
Neal Norwitz11690112002-07-30 01:08:28 +00006657int
6658main ()
6659{
6660 makedev(0, 0)
6661 ;
6662 return 0;
6663}
6664_ACEOF
6665rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006666if { (ac_try="$ac_link"
6667case "(($ac_try" in
6668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6669 *) ac_try_echo=$ac_try;;
6670esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006672 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006674 grep -v '^ *+' conftest.er1 >conftest.err
6675 rm -f conftest.er1
6676 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006678 (exit $ac_status); } && {
6679 test -z "$ac_c_werror_flag" ||
6680 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006681 } && test -s conftest$ac_exeext &&
6682 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006683 ac_cv_has_makedev=yes
6684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006686sed 's/^/| /' conftest.$ac_ext >&5
6687
Martin v. Löwiseba40652007-08-30 20:10:57 +00006688 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006690
6691rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006692 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006693 if test "$ac_cv_has_makedev" = "yes"; then
6694
6695cat >>confdefs.h <<\_ACEOF
6696#define _OSF_SOURCE 1
6697_ACEOF
6698
6699 fi
6700fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006701{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6702echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006703if test "$ac_cv_has_makedev" = "yes"; then
6704
6705cat >>confdefs.h <<\_ACEOF
6706#define HAVE_MAKEDEV 1
6707_ACEOF
6708
6709fi
6710
Martin v. Löwis399a6892002-10-04 10:22:02 +00006711# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6712# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6713# defined, but the compiler does not support pragma redefine_extname,
6714# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6715# structures (such as rlimit64) without declaring them. As a
6716# work-around, disable LFS on such configurations
6717
6718use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006719{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6720echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006721cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006722/* confdefs.h. */
6723_ACEOF
6724cat confdefs.h >>conftest.$ac_ext
6725cat >>conftest.$ac_ext <<_ACEOF
6726/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006727
6728#define _LARGEFILE_SOURCE 1
6729#define _FILE_OFFSET_BITS 64
6730#include <sys/resource.h>
6731
Martin v. Löwis399a6892002-10-04 10:22:02 +00006732int
6733main ()
6734{
6735struct rlimit foo;
6736 ;
6737 return 0;
6738}
6739_ACEOF
6740rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006741if { (ac_try="$ac_compile"
6742case "(($ac_try" in
6743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6744 *) ac_try_echo=$ac_try;;
6745esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006749 grep -v '^ *+' conftest.er1 >conftest.err
6750 rm -f conftest.er1
6751 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006753 (exit $ac_status); } && {
6754 test -z "$ac_c_werror_flag" ||
6755 test ! -s conftest.err
6756 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006757 sol_lfs_bug=no
6758else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006760sed 's/^/| /' conftest.$ac_ext >&5
6761
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006764
6765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006766{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6767echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006768if test "$sol_lfs_bug" = "yes"; then
6769 use_lfs=no
6770fi
6771
6772if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006773# Two defines needed to enable largefile support on various platforms
6774# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006775
Martin v. Löwis11437992002-04-12 09:54:03 +00006776cat >>confdefs.h <<\_ACEOF
6777#define _LARGEFILE_SOURCE 1
6778_ACEOF
6779
6780
6781cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006782#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006783_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006784
Martin v. Löwis399a6892002-10-04 10:22:02 +00006785fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006786
Guido van Rossum84e7b241996-08-19 21:59:00 +00006787# Add some code to confdefs.h so that the test for off_t works on SCO
6788cat >> confdefs.h <<\EOF
6789#if defined(SCO_DS)
6790#undef _OFF_T
6791#endif
6792EOF
6793
Guido van Rossumef2255b2000-03-10 22:30:29 +00006794# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006795{ echo "$as_me:$LINENO: checking for mode_t" >&5
6796echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006797if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006798 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006799else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006800 cat >conftest.$ac_ext <<_ACEOF
6801/* confdefs.h. */
6802_ACEOF
6803cat confdefs.h >>conftest.$ac_ext
6804cat >>conftest.$ac_ext <<_ACEOF
6805/* end confdefs.h. */
6806$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006807typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006808int
6809main ()
6810{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006811if ((ac__type_new_ *) 0)
6812 return 0;
6813if (sizeof (ac__type_new_))
6814 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006815 ;
6816 return 0;
6817}
6818_ACEOF
6819rm -f conftest.$ac_objext
6820if { (ac_try="$ac_compile"
6821case "(($ac_try" in
6822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6823 *) ac_try_echo=$ac_try;;
6824esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006826 (eval "$ac_compile") 2>conftest.er1
6827 ac_status=$?
6828 grep -v '^ *+' conftest.er1 >conftest.err
6829 rm -f conftest.er1
6830 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006832 (exit $ac_status); } && {
6833 test -z "$ac_c_werror_flag" ||
6834 test ! -s conftest.err
6835 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006836 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006837else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006839sed 's/^/| /' conftest.$ac_ext >&5
6840
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006841 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006843
6844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006845fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006846{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6847echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6848if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006849 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006850else
Martin v. Löwis11437992002-04-12 09:54:03 +00006851
6852cat >>confdefs.h <<_ACEOF
6853#define mode_t int
6854_ACEOF
6855
6856fi
6857
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006858{ echo "$as_me:$LINENO: checking for off_t" >&5
6859echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006860if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006861 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006862else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006863 cat >conftest.$ac_ext <<_ACEOF
6864/* confdefs.h. */
6865_ACEOF
6866cat confdefs.h >>conftest.$ac_ext
6867cat >>conftest.$ac_ext <<_ACEOF
6868/* end confdefs.h. */
6869$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006870typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006871int
6872main ()
6873{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006874if ((ac__type_new_ *) 0)
6875 return 0;
6876if (sizeof (ac__type_new_))
6877 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006878 ;
6879 return 0;
6880}
6881_ACEOF
6882rm -f conftest.$ac_objext
6883if { (ac_try="$ac_compile"
6884case "(($ac_try" in
6885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6886 *) ac_try_echo=$ac_try;;
6887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006889 (eval "$ac_compile") 2>conftest.er1
6890 ac_status=$?
6891 grep -v '^ *+' conftest.er1 >conftest.err
6892 rm -f conftest.er1
6893 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006895 (exit $ac_status); } && {
6896 test -z "$ac_c_werror_flag" ||
6897 test ! -s conftest.err
6898 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006899 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006900else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006902sed 's/^/| /' conftest.$ac_ext >&5
6903
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006904 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006906
6907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006908fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006909{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6910echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6911if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006912 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006913else
Martin v. Löwis11437992002-04-12 09:54:03 +00006914
6915cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006916#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006917_ACEOF
6918
6919fi
6920
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006921{ echo "$as_me:$LINENO: checking for pid_t" >&5
6922echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006923if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006924 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006925else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006926 cat >conftest.$ac_ext <<_ACEOF
6927/* confdefs.h. */
6928_ACEOF
6929cat confdefs.h >>conftest.$ac_ext
6930cat >>conftest.$ac_ext <<_ACEOF
6931/* end confdefs.h. */
6932$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006933typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006934int
6935main ()
6936{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006937if ((ac__type_new_ *) 0)
6938 return 0;
6939if (sizeof (ac__type_new_))
6940 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006941 ;
6942 return 0;
6943}
6944_ACEOF
6945rm -f conftest.$ac_objext
6946if { (ac_try="$ac_compile"
6947case "(($ac_try" in
6948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6949 *) ac_try_echo=$ac_try;;
6950esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006952 (eval "$ac_compile") 2>conftest.er1
6953 ac_status=$?
6954 grep -v '^ *+' conftest.er1 >conftest.err
6955 rm -f conftest.er1
6956 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006958 (exit $ac_status); } && {
6959 test -z "$ac_c_werror_flag" ||
6960 test ! -s conftest.err
6961 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006962 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006963else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006965sed 's/^/| /' conftest.$ac_ext >&5
6966
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006967 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969
6970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006971fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006972{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6973echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6974if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006975 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006976else
Martin v. Löwis11437992002-04-12 09:54:03 +00006977
6978cat >>confdefs.h <<_ACEOF
6979#define pid_t int
6980_ACEOF
6981
6982fi
6983
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006984{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6985echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006986if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006987 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006988else
6989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006990/* confdefs.h. */
6991_ACEOF
6992cat confdefs.h >>conftest.$ac_ext
6993cat >>conftest.$ac_ext <<_ACEOF
6994/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006995#include <sys/types.h>
6996#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006997
Martin v. Löwis11437992002-04-12 09:54:03 +00006998int
6999main ()
7000{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007001return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007002 ;
7003 return 0;
7004}
7005_ACEOF
7006rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007007if { (ac_try="$ac_compile"
7008case "(($ac_try" in
7009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7010 *) ac_try_echo=$ac_try;;
7011esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007015 grep -v '^ *+' conftest.er1 >conftest.err
7016 rm -f conftest.er1
7017 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007019 (exit $ac_status); } && {
7020 test -z "$ac_c_werror_flag" ||
7021 test ! -s conftest.err
7022 } && test -s conftest.$ac_objext; then
7023 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007024else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007026sed 's/^/| /' conftest.$ac_ext >&5
7027
Martin v. Löwiseba40652007-08-30 20:10:57 +00007028 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007030
7031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007032fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007033{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7034echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007035
Martin v. Löwis11437992002-04-12 09:54:03 +00007036cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007038_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007039
Michael W. Hudson54241132001-12-07 15:38:26 +00007040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007041{ echo "$as_me:$LINENO: checking for size_t" >&5
7042echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007043if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007044 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007046 cat >conftest.$ac_ext <<_ACEOF
7047/* confdefs.h. */
7048_ACEOF
7049cat confdefs.h >>conftest.$ac_ext
7050cat >>conftest.$ac_ext <<_ACEOF
7051/* end confdefs.h. */
7052$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007053typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007054int
7055main ()
7056{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007057if ((ac__type_new_ *) 0)
7058 return 0;
7059if (sizeof (ac__type_new_))
7060 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007061 ;
7062 return 0;
7063}
7064_ACEOF
7065rm -f conftest.$ac_objext
7066if { (ac_try="$ac_compile"
7067case "(($ac_try" in
7068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7069 *) ac_try_echo=$ac_try;;
7070esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007072 (eval "$ac_compile") 2>conftest.er1
7073 ac_status=$?
7074 grep -v '^ *+' conftest.er1 >conftest.err
7075 rm -f conftest.er1
7076 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007078 (exit $ac_status); } && {
7079 test -z "$ac_c_werror_flag" ||
7080 test ! -s conftest.err
7081 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007082 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007085sed 's/^/| /' conftest.$ac_ext >&5
7086
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007087 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089
7090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007091fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007092{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7093echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7094if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007095 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007096else
Martin v. Löwis11437992002-04-12 09:54:03 +00007097
7098cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007099#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007100_ACEOF
7101
7102fi
7103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007104{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7105echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007106if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007107 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007108else
7109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007110/* confdefs.h. */
7111_ACEOF
7112cat confdefs.h >>conftest.$ac_ext
7113cat >>conftest.$ac_ext <<_ACEOF
7114/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007115#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007116
7117_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007119 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007120 ac_cv_type_uid_t=yes
7121else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007122 ac_cv_type_uid_t=no
7123fi
Ronald Oussoren75912852010-04-08 08:13:31 +00007124rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007125
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007126fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007127{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7128echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007129if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007130
Martin v. Löwis11437992002-04-12 09:54:03 +00007131cat >>confdefs.h <<\_ACEOF
7132#define uid_t int
7133_ACEOF
7134
7135
7136cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007137#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007138_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007139
7140fi
7141
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007142
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007143 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7144echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007145if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007146 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007147else
7148 ac_cv_c_uint32_t=no
7149 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7150 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7151 cat >conftest.$ac_ext <<_ACEOF
7152/* confdefs.h. */
7153_ACEOF
7154cat confdefs.h >>conftest.$ac_ext
7155cat >>conftest.$ac_ext <<_ACEOF
7156/* end confdefs.h. */
7157$ac_includes_default
7158int
7159main ()
7160{
7161static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7162test_array [0] = 0
7163
7164 ;
7165 return 0;
7166}
7167_ACEOF
7168rm -f conftest.$ac_objext
7169if { (ac_try="$ac_compile"
7170case "(($ac_try" in
7171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7172 *) ac_try_echo=$ac_try;;
7173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007175 (eval "$ac_compile") 2>conftest.er1
7176 ac_status=$?
7177 grep -v '^ *+' conftest.er1 >conftest.err
7178 rm -f conftest.er1
7179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007181 (exit $ac_status); } && {
7182 test -z "$ac_c_werror_flag" ||
7183 test ! -s conftest.err
7184 } && test -s conftest.$ac_objext; then
7185 case $ac_type in
7186 uint32_t) ac_cv_c_uint32_t=yes ;;
7187 *) ac_cv_c_uint32_t=$ac_type ;;
7188esac
7189
7190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007191 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007192sed 's/^/| /' conftest.$ac_ext >&5
7193
7194
7195fi
7196
7197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7198 test "$ac_cv_c_uint32_t" != no && break
7199 done
7200fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007201{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7202echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007203 case $ac_cv_c_uint32_t in #(
7204 no|yes) ;; #(
7205 *)
7206
7207cat >>confdefs.h <<\_ACEOF
7208#define _UINT32_T 1
7209_ACEOF
7210
7211
7212cat >>confdefs.h <<_ACEOF
7213#define uint32_t $ac_cv_c_uint32_t
7214_ACEOF
7215;;
7216 esac
7217
7218
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007219 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7220echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007221if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007222 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007223else
7224 ac_cv_c_uint64_t=no
7225 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7226 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7227 cat >conftest.$ac_ext <<_ACEOF
7228/* confdefs.h. */
7229_ACEOF
7230cat confdefs.h >>conftest.$ac_ext
7231cat >>conftest.$ac_ext <<_ACEOF
7232/* end confdefs.h. */
7233$ac_includes_default
7234int
7235main ()
7236{
7237static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7238test_array [0] = 0
7239
7240 ;
7241 return 0;
7242}
7243_ACEOF
7244rm -f conftest.$ac_objext
7245if { (ac_try="$ac_compile"
7246case "(($ac_try" in
7247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7248 *) ac_try_echo=$ac_try;;
7249esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007251 (eval "$ac_compile") 2>conftest.er1
7252 ac_status=$?
7253 grep -v '^ *+' conftest.er1 >conftest.err
7254 rm -f conftest.er1
7255 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007257 (exit $ac_status); } && {
7258 test -z "$ac_c_werror_flag" ||
7259 test ! -s conftest.err
7260 } && test -s conftest.$ac_objext; then
7261 case $ac_type in
7262 uint64_t) ac_cv_c_uint64_t=yes ;;
7263 *) ac_cv_c_uint64_t=$ac_type ;;
7264esac
7265
7266else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007267 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007268sed 's/^/| /' conftest.$ac_ext >&5
7269
7270
7271fi
7272
7273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7274 test "$ac_cv_c_uint64_t" != no && break
7275 done
7276fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007277{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7278echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007279 case $ac_cv_c_uint64_t in #(
7280 no|yes) ;; #(
7281 *)
7282
7283cat >>confdefs.h <<\_ACEOF
7284#define _UINT64_T 1
7285_ACEOF
7286
7287
7288cat >>confdefs.h <<_ACEOF
7289#define uint64_t $ac_cv_c_uint64_t
7290_ACEOF
7291;;
7292 esac
7293
7294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007295 { echo "$as_me:$LINENO: checking for int32_t" >&5
7296echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007297if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007298 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007299else
7300 ac_cv_c_int32_t=no
7301 for ac_type in 'int32_t' 'int' 'long int' \
7302 'long long int' 'short int' 'signed char'; do
7303 cat >conftest.$ac_ext <<_ACEOF
7304/* confdefs.h. */
7305_ACEOF
7306cat confdefs.h >>conftest.$ac_ext
7307cat >>conftest.$ac_ext <<_ACEOF
7308/* end confdefs.h. */
7309$ac_includes_default
7310int
7311main ()
7312{
7313static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7314test_array [0] = 0
7315
7316 ;
7317 return 0;
7318}
7319_ACEOF
7320rm -f conftest.$ac_objext
7321if { (ac_try="$ac_compile"
7322case "(($ac_try" in
7323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7324 *) ac_try_echo=$ac_try;;
7325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007327 (eval "$ac_compile") 2>conftest.er1
7328 ac_status=$?
7329 grep -v '^ *+' conftest.er1 >conftest.err
7330 rm -f conftest.er1
7331 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007333 (exit $ac_status); } && {
7334 test -z "$ac_c_werror_flag" ||
7335 test ! -s conftest.err
7336 } && test -s conftest.$ac_objext; then
7337 cat >conftest.$ac_ext <<_ACEOF
7338/* confdefs.h. */
7339_ACEOF
7340cat confdefs.h >>conftest.$ac_ext
7341cat >>conftest.$ac_ext <<_ACEOF
7342/* end confdefs.h. */
7343$ac_includes_default
7344int
7345main ()
7346{
7347static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007348 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007349test_array [0] = 0
7350
7351 ;
7352 return 0;
7353}
7354_ACEOF
7355rm -f conftest.$ac_objext
7356if { (ac_try="$ac_compile"
7357case "(($ac_try" in
7358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7359 *) ac_try_echo=$ac_try;;
7360esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007362 (eval "$ac_compile") 2>conftest.er1
7363 ac_status=$?
7364 grep -v '^ *+' conftest.er1 >conftest.err
7365 rm -f conftest.er1
7366 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007368 (exit $ac_status); } && {
7369 test -z "$ac_c_werror_flag" ||
7370 test ! -s conftest.err
7371 } && test -s conftest.$ac_objext; then
7372 :
7373else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007374 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007375sed 's/^/| /' conftest.$ac_ext >&5
7376
7377 case $ac_type in
7378 int32_t) ac_cv_c_int32_t=yes ;;
7379 *) ac_cv_c_int32_t=$ac_type ;;
7380esac
7381
7382fi
7383
7384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7385else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007386 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007387sed 's/^/| /' conftest.$ac_ext >&5
7388
7389
7390fi
7391
7392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7393 test "$ac_cv_c_int32_t" != no && break
7394 done
7395fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007396{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7397echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007398 case $ac_cv_c_int32_t in #(
7399 no|yes) ;; #(
7400 *)
7401
7402cat >>confdefs.h <<_ACEOF
7403#define int32_t $ac_cv_c_int32_t
7404_ACEOF
7405;;
7406 esac
7407
7408
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007409 { echo "$as_me:$LINENO: checking for int64_t" >&5
7410echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007411if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007412 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007413else
7414 ac_cv_c_int64_t=no
7415 for ac_type in 'int64_t' 'int' 'long int' \
7416 'long long int' 'short int' 'signed char'; do
7417 cat >conftest.$ac_ext <<_ACEOF
7418/* confdefs.h. */
7419_ACEOF
7420cat confdefs.h >>conftest.$ac_ext
7421cat >>conftest.$ac_ext <<_ACEOF
7422/* end confdefs.h. */
7423$ac_includes_default
7424int
7425main ()
7426{
7427static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7428test_array [0] = 0
7429
7430 ;
7431 return 0;
7432}
7433_ACEOF
7434rm -f conftest.$ac_objext
7435if { (ac_try="$ac_compile"
7436case "(($ac_try" in
7437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7438 *) ac_try_echo=$ac_try;;
7439esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007441 (eval "$ac_compile") 2>conftest.er1
7442 ac_status=$?
7443 grep -v '^ *+' conftest.er1 >conftest.err
7444 rm -f conftest.er1
7445 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007447 (exit $ac_status); } && {
7448 test -z "$ac_c_werror_flag" ||
7449 test ! -s conftest.err
7450 } && test -s conftest.$ac_objext; then
7451 cat >conftest.$ac_ext <<_ACEOF
7452/* confdefs.h. */
7453_ACEOF
7454cat confdefs.h >>conftest.$ac_ext
7455cat >>conftest.$ac_ext <<_ACEOF
7456/* end confdefs.h. */
7457$ac_includes_default
7458int
7459main ()
7460{
7461static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007462 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007463test_array [0] = 0
7464
7465 ;
7466 return 0;
7467}
7468_ACEOF
7469rm -f conftest.$ac_objext
7470if { (ac_try="$ac_compile"
7471case "(($ac_try" in
7472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7473 *) ac_try_echo=$ac_try;;
7474esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007476 (eval "$ac_compile") 2>conftest.er1
7477 ac_status=$?
7478 grep -v '^ *+' conftest.er1 >conftest.err
7479 rm -f conftest.er1
7480 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007482 (exit $ac_status); } && {
7483 test -z "$ac_c_werror_flag" ||
7484 test ! -s conftest.err
7485 } && test -s conftest.$ac_objext; then
7486 :
7487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007488 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007489sed 's/^/| /' conftest.$ac_ext >&5
7490
7491 case $ac_type in
7492 int64_t) ac_cv_c_int64_t=yes ;;
7493 *) ac_cv_c_int64_t=$ac_type ;;
7494esac
7495
7496fi
7497
7498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007500 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007501sed 's/^/| /' conftest.$ac_ext >&5
7502
7503
7504fi
7505
7506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7507 test "$ac_cv_c_int64_t" != no && break
7508 done
7509fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007510{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7511echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007512 case $ac_cv_c_int64_t in #(
7513 no|yes) ;; #(
7514 *)
7515
7516cat >>confdefs.h <<_ACEOF
7517#define int64_t $ac_cv_c_int64_t
7518_ACEOF
7519;;
7520 esac
7521
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007522{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7523echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007524if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007526else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007527 cat >conftest.$ac_ext <<_ACEOF
7528/* confdefs.h. */
7529_ACEOF
7530cat confdefs.h >>conftest.$ac_ext
7531cat >>conftest.$ac_ext <<_ACEOF
7532/* end confdefs.h. */
7533$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007534typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007535int
7536main ()
7537{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007538if ((ac__type_new_ *) 0)
7539 return 0;
7540if (sizeof (ac__type_new_))
7541 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007542 ;
7543 return 0;
7544}
7545_ACEOF
7546rm -f conftest.$ac_objext
7547if { (ac_try="$ac_compile"
7548case "(($ac_try" in
7549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7550 *) ac_try_echo=$ac_try;;
7551esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007553 (eval "$ac_compile") 2>conftest.er1
7554 ac_status=$?
7555 grep -v '^ *+' conftest.er1 >conftest.err
7556 rm -f conftest.er1
7557 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007559 (exit $ac_status); } && {
7560 test -z "$ac_c_werror_flag" ||
7561 test ! -s conftest.err
7562 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007563 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007565 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007566sed 's/^/| /' conftest.$ac_ext >&5
7567
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007568 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007570
7571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007572fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007573{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7574echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7575if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007576
7577cat >>confdefs.h <<\_ACEOF
7578#define HAVE_SSIZE_T 1
7579_ACEOF
7580
7581fi
7582
Jack Jansendd19cf82001-12-06 22:36:17 +00007583
Michael W. Hudson54241132001-12-07 15:38:26 +00007584# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007585# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007586{ echo "$as_me:$LINENO: checking for int" >&5
7587echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7588if test "${ac_cv_type_int+set}" = set; then
7589 echo $ECHO_N "(cached) $ECHO_C" >&6
7590else
7591 cat >conftest.$ac_ext <<_ACEOF
7592/* confdefs.h. */
7593_ACEOF
7594cat confdefs.h >>conftest.$ac_ext
7595cat >>conftest.$ac_ext <<_ACEOF
7596/* end confdefs.h. */
7597$ac_includes_default
7598typedef int ac__type_new_;
7599int
7600main ()
7601{
7602if ((ac__type_new_ *) 0)
7603 return 0;
7604if (sizeof (ac__type_new_))
7605 return 0;
7606 ;
7607 return 0;
7608}
7609_ACEOF
7610rm -f conftest.$ac_objext
7611if { (ac_try="$ac_compile"
7612case "(($ac_try" in
7613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7614 *) ac_try_echo=$ac_try;;
7615esac
7616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7617 (eval "$ac_compile") 2>conftest.er1
7618 ac_status=$?
7619 grep -v '^ *+' conftest.er1 >conftest.err
7620 rm -f conftest.er1
7621 cat conftest.err >&5
7622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7623 (exit $ac_status); } && {
7624 test -z "$ac_c_werror_flag" ||
7625 test ! -s conftest.err
7626 } && test -s conftest.$ac_objext; then
7627 ac_cv_type_int=yes
7628else
7629 echo "$as_me: failed program was:" >&5
7630sed 's/^/| /' conftest.$ac_ext >&5
7631
7632 ac_cv_type_int=no
7633fi
7634
7635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7636fi
7637{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7638echo "${ECHO_T}$ac_cv_type_int" >&6; }
7639
Martin v. Löwiseba40652007-08-30 20:10:57 +00007640# The cast to long int works around a bug in the HP C Compiler
7641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7643# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007644{ echo "$as_me:$LINENO: checking size of int" >&5
7645echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007646if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007647 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007648else
Martin v. Löwis11437992002-04-12 09:54:03 +00007649 if test "$cross_compiling" = yes; then
7650 # Depending upon the size, compute the lo and hi bounds.
7651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007652/* confdefs.h. */
7653_ACEOF
7654cat confdefs.h >>conftest.$ac_ext
7655cat >>conftest.$ac_ext <<_ACEOF
7656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007657$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007658 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007659int
7660main ()
7661{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007662static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007663test_array [0] = 0
7664
7665 ;
7666 return 0;
7667}
7668_ACEOF
7669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670if { (ac_try="$ac_compile"
7671case "(($ac_try" in
7672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7673 *) ac_try_echo=$ac_try;;
7674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007678 grep -v '^ *+' conftest.er1 >conftest.err
7679 rm -f conftest.er1
7680 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682 (exit $ac_status); } && {
7683 test -z "$ac_c_werror_flag" ||
7684 test ! -s conftest.err
7685 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007686 ac_lo=0 ac_mid=0
7687 while :; do
7688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007689/* confdefs.h. */
7690_ACEOF
7691cat confdefs.h >>conftest.$ac_ext
7692cat >>conftest.$ac_ext <<_ACEOF
7693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007694$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007695 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007696int
7697main ()
7698{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007699static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007700test_array [0] = 0
7701
7702 ;
7703 return 0;
7704}
7705_ACEOF
7706rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707if { (ac_try="$ac_compile"
7708case "(($ac_try" in
7709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7710 *) ac_try_echo=$ac_try;;
7711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007715 grep -v '^ *+' conftest.er1 >conftest.err
7716 rm -f conftest.er1
7717 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719 (exit $ac_status); } && {
7720 test -z "$ac_c_werror_flag" ||
7721 test ! -s conftest.err
7722 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007723 ac_hi=$ac_mid; break
7724else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007726sed 's/^/| /' conftest.$ac_ext >&5
7727
Martin v. Löwiseba40652007-08-30 20:10:57 +00007728 ac_lo=`expr $ac_mid + 1`
7729 if test $ac_lo -le $ac_mid; then
7730 ac_lo= ac_hi=
7731 break
7732 fi
7733 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735
7736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 done
7738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007740sed 's/^/| /' conftest.$ac_ext >&5
7741
Martin v. Löwiseba40652007-08-30 20:10:57 +00007742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007743/* confdefs.h. */
7744_ACEOF
7745cat confdefs.h >>conftest.$ac_ext
7746cat >>conftest.$ac_ext <<_ACEOF
7747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007748$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007749 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007750int
7751main ()
7752{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007754test_array [0] = 0
7755
7756 ;
7757 return 0;
7758}
7759_ACEOF
7760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007761if { (ac_try="$ac_compile"
7762case "(($ac_try" in
7763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7764 *) ac_try_echo=$ac_try;;
7765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007769 grep -v '^ *+' conftest.er1 >conftest.err
7770 rm -f conftest.er1
7771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773 (exit $ac_status); } && {
7774 test -z "$ac_c_werror_flag" ||
7775 test ! -s conftest.err
7776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 ac_hi=-1 ac_mid=-1
7778 while :; do
7779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007785$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007786 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007787int
7788main ()
7789{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007791test_array [0] = 0
7792
7793 ;
7794 return 0;
7795}
7796_ACEOF
7797rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007798if { (ac_try="$ac_compile"
7799case "(($ac_try" in
7800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7801 *) ac_try_echo=$ac_try;;
7802esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007806 grep -v '^ *+' conftest.er1 >conftest.err
7807 rm -f conftest.er1
7808 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007810 (exit $ac_status); } && {
7811 test -z "$ac_c_werror_flag" ||
7812 test ! -s conftest.err
7813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_lo=$ac_mid; break
7815else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007817sed 's/^/| /' conftest.$ac_ext >&5
7818
Martin v. Löwiseba40652007-08-30 20:10:57 +00007819 ac_hi=`expr '(' $ac_mid ')' - 1`
7820 if test $ac_mid -le $ac_hi; then
7821 ac_lo= ac_hi=
7822 break
7823 fi
7824 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826
7827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 done
7829else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007831sed 's/^/| /' conftest.$ac_ext >&5
7832
Martin v. Löwiseba40652007-08-30 20:10:57 +00007833 ac_lo= ac_hi=
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 +00007837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007838
7839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007840# Binary search between lo and hi bounds.
7841while test "x$ac_lo" != "x$ac_hi"; do
7842 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007844/* confdefs.h. */
7845_ACEOF
7846cat confdefs.h >>conftest.$ac_ext
7847cat >>conftest.$ac_ext <<_ACEOF
7848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007849$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007850 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007851int
7852main ()
7853{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007854static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007855test_array [0] = 0
7856
7857 ;
7858 return 0;
7859}
7860_ACEOF
7861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862if { (ac_try="$ac_compile"
7863case "(($ac_try" in
7864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7865 *) ac_try_echo=$ac_try;;
7866esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007870 grep -v '^ *+' conftest.er1 >conftest.err
7871 rm -f conftest.er1
7872 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874 (exit $ac_status); } && {
7875 test -z "$ac_c_werror_flag" ||
7876 test ! -s conftest.err
7877 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 ac_hi=$ac_mid
7879else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007881sed 's/^/| /' conftest.$ac_ext >&5
7882
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007885
7886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007887done
7888case $ac_lo in
7889?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007890'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007891 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007892See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007893echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007894See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007895 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007896 else
7897 ac_cv_sizeof_int=0
7898 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007899esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007900else
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007902/* confdefs.h. */
7903_ACEOF
7904cat confdefs.h >>conftest.$ac_ext
7905cat >>conftest.$ac_ext <<_ACEOF
7906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007907$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007908 typedef int ac__type_sizeof_;
7909static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7910static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007911#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007912#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007913int
7914main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007915{
Martin v. Löwis11437992002-04-12 09:54:03 +00007916
7917 FILE *f = fopen ("conftest.val", "w");
7918 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007919 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007920 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007922 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007923 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007924 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007925 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 }
7927 else
7928 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007929 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007930 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007931 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007932 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007933 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007934 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007935
7936 ;
7937 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007938}
Martin v. Löwis11437992002-04-12 09:54:03 +00007939_ACEOF
7940rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007941if { (ac_try="$ac_link"
7942case "(($ac_try" in
7943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7944 *) ac_try_echo=$ac_try;;
7945esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007947 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007951 { (case "(($ac_try" in
7952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7953 *) ac_try_echo=$ac_try;;
7954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007956 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 (exit $ac_status); }; }; then
7960 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007961else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007962 echo "$as_me: program exited with status $ac_status" >&5
7963echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007964sed 's/^/| /' conftest.$ac_ext >&5
7965
Martin v. Löwis11437992002-04-12 09:54:03 +00007966( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007967if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007968 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007969See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007970echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007971See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007972 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973 else
7974 ac_cv_sizeof_int=0
7975 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007977rm -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 +00007978fi
7979rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007980fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007981{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7982echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007983
7984
7985
Martin v. Löwis11437992002-04-12 09:54:03 +00007986cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007987#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007988_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007989
7990
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007991{ echo "$as_me:$LINENO: checking for long" >&5
7992echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7993if test "${ac_cv_type_long+set}" = set; then
7994 echo $ECHO_N "(cached) $ECHO_C" >&6
7995else
7996 cat >conftest.$ac_ext <<_ACEOF
7997/* confdefs.h. */
7998_ACEOF
7999cat confdefs.h >>conftest.$ac_ext
8000cat >>conftest.$ac_ext <<_ACEOF
8001/* end confdefs.h. */
8002$ac_includes_default
8003typedef long ac__type_new_;
8004int
8005main ()
8006{
8007if ((ac__type_new_ *) 0)
8008 return 0;
8009if (sizeof (ac__type_new_))
8010 return 0;
8011 ;
8012 return 0;
8013}
8014_ACEOF
8015rm -f conftest.$ac_objext
8016if { (ac_try="$ac_compile"
8017case "(($ac_try" in
8018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8019 *) ac_try_echo=$ac_try;;
8020esac
8021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8022 (eval "$ac_compile") 2>conftest.er1
8023 ac_status=$?
8024 grep -v '^ *+' conftest.er1 >conftest.err
8025 rm -f conftest.er1
8026 cat conftest.err >&5
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); } && {
8029 test -z "$ac_c_werror_flag" ||
8030 test ! -s conftest.err
8031 } && test -s conftest.$ac_objext; then
8032 ac_cv_type_long=yes
8033else
8034 echo "$as_me: failed program was:" >&5
8035sed 's/^/| /' conftest.$ac_ext >&5
8036
8037 ac_cv_type_long=no
8038fi
8039
8040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8041fi
8042{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8043echo "${ECHO_T}$ac_cv_type_long" >&6; }
8044
Martin v. Löwiseba40652007-08-30 20:10:57 +00008045# The cast to long int works around a bug in the HP C Compiler
8046# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8047# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8048# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008049{ echo "$as_me:$LINENO: checking size of long" >&5
8050echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008051if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008052 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008053else
Martin v. Löwis11437992002-04-12 09:54:03 +00008054 if test "$cross_compiling" = yes; then
8055 # Depending upon the size, compute the lo and hi bounds.
8056cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008057/* confdefs.h. */
8058_ACEOF
8059cat confdefs.h >>conftest.$ac_ext
8060cat >>conftest.$ac_ext <<_ACEOF
8061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008062$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008063 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008064int
8065main ()
8066{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008067static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008068test_array [0] = 0
8069
8070 ;
8071 return 0;
8072}
8073_ACEOF
8074rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008075if { (ac_try="$ac_compile"
8076case "(($ac_try" in
8077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8078 *) ac_try_echo=$ac_try;;
8079esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008083 grep -v '^ *+' conftest.er1 >conftest.err
8084 rm -f conftest.er1
8085 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008087 (exit $ac_status); } && {
8088 test -z "$ac_c_werror_flag" ||
8089 test ! -s conftest.err
8090 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008091 ac_lo=0 ac_mid=0
8092 while :; do
8093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008094/* confdefs.h. */
8095_ACEOF
8096cat confdefs.h >>conftest.$ac_ext
8097cat >>conftest.$ac_ext <<_ACEOF
8098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008099$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008100 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008101int
8102main ()
8103{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008104static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008105test_array [0] = 0
8106
8107 ;
8108 return 0;
8109}
8110_ACEOF
8111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008112if { (ac_try="$ac_compile"
8113case "(($ac_try" in
8114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8115 *) ac_try_echo=$ac_try;;
8116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008120 grep -v '^ *+' conftest.er1 >conftest.err
8121 rm -f conftest.er1
8122 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124 (exit $ac_status); } && {
8125 test -z "$ac_c_werror_flag" ||
8126 test ! -s conftest.err
8127 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008128 ac_hi=$ac_mid; break
8129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008131sed 's/^/| /' conftest.$ac_ext >&5
8132
Martin v. Löwiseba40652007-08-30 20:10:57 +00008133 ac_lo=`expr $ac_mid + 1`
8134 if test $ac_lo -le $ac_mid; then
8135 ac_lo= ac_hi=
8136 break
8137 fi
8138 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008140
8141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008142 done
8143else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008145sed 's/^/| /' conftest.$ac_ext >&5
8146
Martin v. Löwiseba40652007-08-30 20:10:57 +00008147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008148/* confdefs.h. */
8149_ACEOF
8150cat confdefs.h >>conftest.$ac_ext
8151cat >>conftest.$ac_ext <<_ACEOF
8152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008153$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008154 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008155int
8156main ()
8157{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008159test_array [0] = 0
8160
8161 ;
8162 return 0;
8163}
8164_ACEOF
8165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008166if { (ac_try="$ac_compile"
8167case "(($ac_try" in
8168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8169 *) ac_try_echo=$ac_try;;
8170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008174 grep -v '^ *+' conftest.er1 >conftest.err
8175 rm -f conftest.er1
8176 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178 (exit $ac_status); } && {
8179 test -z "$ac_c_werror_flag" ||
8180 test ! -s conftest.err
8181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008182 ac_hi=-1 ac_mid=-1
8183 while :; do
8184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008185/* confdefs.h. */
8186_ACEOF
8187cat confdefs.h >>conftest.$ac_ext
8188cat >>conftest.$ac_ext <<_ACEOF
8189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008190$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008191 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192int
8193main ()
8194{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008196test_array [0] = 0
8197
8198 ;
8199 return 0;
8200}
8201_ACEOF
8202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008203if { (ac_try="$ac_compile"
8204case "(($ac_try" in
8205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8206 *) ac_try_echo=$ac_try;;
8207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008211 grep -v '^ *+' conftest.er1 >conftest.err
8212 rm -f conftest.er1
8213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215 (exit $ac_status); } && {
8216 test -z "$ac_c_werror_flag" ||
8217 test ! -s conftest.err
8218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 ac_lo=$ac_mid; break
8220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008222sed 's/^/| /' conftest.$ac_ext >&5
8223
Martin v. Löwiseba40652007-08-30 20:10:57 +00008224 ac_hi=`expr '(' $ac_mid ')' - 1`
8225 if test $ac_mid -le $ac_hi; then
8226 ac_lo= ac_hi=
8227 break
8228 fi
8229 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008231
8232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 done
8234else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008236sed 's/^/| /' conftest.$ac_ext >&5
8237
Martin v. Löwiseba40652007-08-30 20:10:57 +00008238 ac_lo= ac_hi=
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 +00008242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008243
8244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008245# Binary search between lo and hi bounds.
8246while test "x$ac_lo" != "x$ac_hi"; do
8247 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008249/* confdefs.h. */
8250_ACEOF
8251cat confdefs.h >>conftest.$ac_ext
8252cat >>conftest.$ac_ext <<_ACEOF
8253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008254$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008255 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008256int
8257main ()
8258{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008259static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008260test_array [0] = 0
8261
8262 ;
8263 return 0;
8264}
8265_ACEOF
8266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267if { (ac_try="$ac_compile"
8268case "(($ac_try" in
8269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8270 *) ac_try_echo=$ac_try;;
8271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008275 grep -v '^ *+' conftest.er1 >conftest.err
8276 rm -f conftest.er1
8277 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279 (exit $ac_status); } && {
8280 test -z "$ac_c_werror_flag" ||
8281 test ! -s conftest.err
8282 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008283 ac_hi=$ac_mid
8284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008286sed 's/^/| /' conftest.$ac_ext >&5
8287
Martin v. Löwiseba40652007-08-30 20:10:57 +00008288 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008290
8291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008292done
8293case $ac_lo in
8294?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008295'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008296 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008297See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008298echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008299See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008300 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008301 else
8302 ac_cv_sizeof_long=0
8303 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008304esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008305else
Martin v. Löwis11437992002-04-12 09:54:03 +00008306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008307/* confdefs.h. */
8308_ACEOF
8309cat confdefs.h >>conftest.$ac_ext
8310cat >>conftest.$ac_ext <<_ACEOF
8311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008312$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008313 typedef long ac__type_sizeof_;
8314static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8315static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008316#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008317#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008318int
8319main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008320{
Martin v. Löwis11437992002-04-12 09:54:03 +00008321
8322 FILE *f = fopen ("conftest.val", "w");
8323 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008324 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008325 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008327 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008328 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008329 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008330 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008331 }
8332 else
8333 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008334 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008335 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008336 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008337 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008338 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008339 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008340
8341 ;
8342 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008343}
Martin v. Löwis11437992002-04-12 09:54:03 +00008344_ACEOF
8345rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008346if { (ac_try="$ac_link"
8347case "(($ac_try" in
8348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8349 *) ac_try_echo=$ac_try;;
8350esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008352 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008353 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008356 { (case "(($ac_try" in
8357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8358 *) ac_try_echo=$ac_try;;
8359esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008361 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008362 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008364 (exit $ac_status); }; }; then
8365 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008367 echo "$as_me: program exited with status $ac_status" >&5
8368echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008369sed 's/^/| /' conftest.$ac_ext >&5
8370
Martin v. Löwis11437992002-04-12 09:54:03 +00008371( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008372if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008373 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008374See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008375echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008376See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008377 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008378 else
8379 ac_cv_sizeof_long=0
8380 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008382rm -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 +00008383fi
8384rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008385fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008386{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8387echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008388
8389
8390
Martin v. Löwis11437992002-04-12 09:54:03 +00008391cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008392#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008393_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008394
8395
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008396{ echo "$as_me:$LINENO: checking for void *" >&5
8397echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8398if test "${ac_cv_type_void_p+set}" = set; then
8399 echo $ECHO_N "(cached) $ECHO_C" >&6
8400else
8401 cat >conftest.$ac_ext <<_ACEOF
8402/* confdefs.h. */
8403_ACEOF
8404cat confdefs.h >>conftest.$ac_ext
8405cat >>conftest.$ac_ext <<_ACEOF
8406/* end confdefs.h. */
8407$ac_includes_default
8408typedef void * ac__type_new_;
8409int
8410main ()
8411{
8412if ((ac__type_new_ *) 0)
8413 return 0;
8414if (sizeof (ac__type_new_))
8415 return 0;
8416 ;
8417 return 0;
8418}
8419_ACEOF
8420rm -f conftest.$ac_objext
8421if { (ac_try="$ac_compile"
8422case "(($ac_try" in
8423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8424 *) ac_try_echo=$ac_try;;
8425esac
8426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8427 (eval "$ac_compile") 2>conftest.er1
8428 ac_status=$?
8429 grep -v '^ *+' conftest.er1 >conftest.err
8430 rm -f conftest.er1
8431 cat conftest.err >&5
8432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8433 (exit $ac_status); } && {
8434 test -z "$ac_c_werror_flag" ||
8435 test ! -s conftest.err
8436 } && test -s conftest.$ac_objext; then
8437 ac_cv_type_void_p=yes
8438else
8439 echo "$as_me: failed program was:" >&5
8440sed 's/^/| /' conftest.$ac_ext >&5
8441
8442 ac_cv_type_void_p=no
8443fi
8444
8445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8446fi
8447{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8448echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8449
Martin v. Löwiseba40652007-08-30 20:10:57 +00008450# The cast to long int works around a bug in the HP C Compiler
8451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8453# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008454{ echo "$as_me:$LINENO: checking size of void *" >&5
8455echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008456if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008457 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008458else
Martin v. Löwis11437992002-04-12 09:54:03 +00008459 if test "$cross_compiling" = yes; then
8460 # Depending upon the size, compute the lo and hi bounds.
8461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008462/* confdefs.h. */
8463_ACEOF
8464cat confdefs.h >>conftest.$ac_ext
8465cat >>conftest.$ac_ext <<_ACEOF
8466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008467$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008468 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008469int
8470main ()
8471{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008472static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008473test_array [0] = 0
8474
8475 ;
8476 return 0;
8477}
8478_ACEOF
8479rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480if { (ac_try="$ac_compile"
8481case "(($ac_try" in
8482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8483 *) ac_try_echo=$ac_try;;
8484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008488 grep -v '^ *+' conftest.er1 >conftest.err
8489 rm -f conftest.er1
8490 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008492 (exit $ac_status); } && {
8493 test -z "$ac_c_werror_flag" ||
8494 test ! -s conftest.err
8495 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ac_lo=0 ac_mid=0
8497 while :; do
8498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008499/* confdefs.h. */
8500_ACEOF
8501cat confdefs.h >>conftest.$ac_ext
8502cat >>conftest.$ac_ext <<_ACEOF
8503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008504$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008505 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008509static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008510test_array [0] = 0
8511
8512 ;
8513 return 0;
8514}
8515_ACEOF
8516rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008517if { (ac_try="$ac_compile"
8518case "(($ac_try" in
8519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8520 *) ac_try_echo=$ac_try;;
8521esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008525 grep -v '^ *+' conftest.er1 >conftest.err
8526 rm -f conftest.er1
8527 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529 (exit $ac_status); } && {
8530 test -z "$ac_c_werror_flag" ||
8531 test ! -s conftest.err
8532 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 ac_hi=$ac_mid; break
8534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008536sed 's/^/| /' conftest.$ac_ext >&5
8537
Martin v. Löwiseba40652007-08-30 20:10:57 +00008538 ac_lo=`expr $ac_mid + 1`
8539 if test $ac_lo -le $ac_mid; then
8540 ac_lo= ac_hi=
8541 break
8542 fi
8543 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008545
8546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 done
8548else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008550sed 's/^/| /' conftest.$ac_ext >&5
8551
Martin v. Löwiseba40652007-08-30 20:10:57 +00008552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008553/* confdefs.h. */
8554_ACEOF
8555cat confdefs.h >>conftest.$ac_ext
8556cat >>conftest.$ac_ext <<_ACEOF
8557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008558$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008559 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008560int
8561main ()
8562{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008564test_array [0] = 0
8565
8566 ;
8567 return 0;
8568}
8569_ACEOF
8570rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008571if { (ac_try="$ac_compile"
8572case "(($ac_try" in
8573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8574 *) ac_try_echo=$ac_try;;
8575esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008579 grep -v '^ *+' conftest.er1 >conftest.err
8580 rm -f conftest.er1
8581 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583 (exit $ac_status); } && {
8584 test -z "$ac_c_werror_flag" ||
8585 test ! -s conftest.err
8586 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 ac_hi=-1 ac_mid=-1
8588 while :; do
8589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008590/* confdefs.h. */
8591_ACEOF
8592cat confdefs.h >>conftest.$ac_ext
8593cat >>conftest.$ac_ext <<_ACEOF
8594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008596 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008597int
8598main ()
8599{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008601test_array [0] = 0
8602
8603 ;
8604 return 0;
8605}
8606_ACEOF
8607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008608if { (ac_try="$ac_compile"
8609case "(($ac_try" in
8610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8611 *) ac_try_echo=$ac_try;;
8612esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008616 grep -v '^ *+' conftest.er1 >conftest.err
8617 rm -f conftest.er1
8618 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620 (exit $ac_status); } && {
8621 test -z "$ac_c_werror_flag" ||
8622 test ! -s conftest.err
8623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_lo=$ac_mid; break
8625else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008627sed 's/^/| /' conftest.$ac_ext >&5
8628
Martin v. Löwiseba40652007-08-30 20:10:57 +00008629 ac_hi=`expr '(' $ac_mid ')' - 1`
8630 if test $ac_mid -le $ac_hi; then
8631 ac_lo= ac_hi=
8632 break
8633 fi
8634 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008636
8637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 done
8639else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008641sed 's/^/| /' conftest.$ac_ext >&5
8642
Martin v. Löwiseba40652007-08-30 20:10:57 +00008643 ac_lo= ac_hi=
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 +00008647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008648
8649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008650# Binary search between lo and hi bounds.
8651while test "x$ac_lo" != "x$ac_hi"; do
8652 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008654/* confdefs.h. */
8655_ACEOF
8656cat confdefs.h >>conftest.$ac_ext
8657cat >>conftest.$ac_ext <<_ACEOF
8658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008659$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008660 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008661int
8662main ()
8663{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008664static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008665test_array [0] = 0
8666
8667 ;
8668 return 0;
8669}
8670_ACEOF
8671rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672if { (ac_try="$ac_compile"
8673case "(($ac_try" in
8674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8675 *) ac_try_echo=$ac_try;;
8676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008680 grep -v '^ *+' conftest.er1 >conftest.err
8681 rm -f conftest.er1
8682 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684 (exit $ac_status); } && {
8685 test -z "$ac_c_werror_flag" ||
8686 test ! -s conftest.err
8687 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 ac_hi=$ac_mid
8689else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008691sed 's/^/| /' conftest.$ac_ext >&5
8692
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008695
8696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008697done
8698case $ac_lo in
8699?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008700'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008701 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008702See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008703echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008704See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008705 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008706 else
8707 ac_cv_sizeof_void_p=0
8708 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008709esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008710else
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008712/* confdefs.h. */
8713_ACEOF
8714cat confdefs.h >>conftest.$ac_ext
8715cat >>conftest.$ac_ext <<_ACEOF
8716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008718 typedef void * ac__type_sizeof_;
8719static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8720static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008721#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008722#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008723int
8724main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008725{
Martin v. Löwis11437992002-04-12 09:54:03 +00008726
8727 FILE *f = fopen ("conftest.val", "w");
8728 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008730 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008732 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008733 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008734 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008735 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 }
8737 else
8738 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008739 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008740 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008741 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008742 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008744 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008745
8746 ;
8747 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008748}
Martin v. Löwis11437992002-04-12 09:54:03 +00008749_ACEOF
8750rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008751if { (ac_try="$ac_link"
8752case "(($ac_try" in
8753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8754 *) ac_try_echo=$ac_try;;
8755esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008757 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008761 { (case "(($ac_try" in
8762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8763 *) ac_try_echo=$ac_try;;
8764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008766 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 (exit $ac_status); }; }; then
8770 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008771else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008772 echo "$as_me: program exited with status $ac_status" >&5
8773echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008774sed 's/^/| /' conftest.$ac_ext >&5
8775
Martin v. Löwis11437992002-04-12 09:54:03 +00008776( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008777if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008778 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008779See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008780echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008781See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008782 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008783 else
8784 ac_cv_sizeof_void_p=0
8785 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008787rm -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 +00008788fi
8789rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008790fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008791{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8792echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793
8794
8795
Martin v. Löwis11437992002-04-12 09:54:03 +00008796cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008797#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008798_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008799
8800
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008801{ echo "$as_me:$LINENO: checking for short" >&5
8802echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8803if test "${ac_cv_type_short+set}" = set; then
8804 echo $ECHO_N "(cached) $ECHO_C" >&6
8805else
8806 cat >conftest.$ac_ext <<_ACEOF
8807/* confdefs.h. */
8808_ACEOF
8809cat confdefs.h >>conftest.$ac_ext
8810cat >>conftest.$ac_ext <<_ACEOF
8811/* end confdefs.h. */
8812$ac_includes_default
8813typedef short ac__type_new_;
8814int
8815main ()
8816{
8817if ((ac__type_new_ *) 0)
8818 return 0;
8819if (sizeof (ac__type_new_))
8820 return 0;
8821 ;
8822 return 0;
8823}
8824_ACEOF
8825rm -f conftest.$ac_objext
8826if { (ac_try="$ac_compile"
8827case "(($ac_try" in
8828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8829 *) ac_try_echo=$ac_try;;
8830esac
8831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8832 (eval "$ac_compile") 2>conftest.er1
8833 ac_status=$?
8834 grep -v '^ *+' conftest.er1 >conftest.err
8835 rm -f conftest.er1
8836 cat conftest.err >&5
8837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8838 (exit $ac_status); } && {
8839 test -z "$ac_c_werror_flag" ||
8840 test ! -s conftest.err
8841 } && test -s conftest.$ac_objext; then
8842 ac_cv_type_short=yes
8843else
8844 echo "$as_me: failed program was:" >&5
8845sed 's/^/| /' conftest.$ac_ext >&5
8846
8847 ac_cv_type_short=no
8848fi
8849
8850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8851fi
8852{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8853echo "${ECHO_T}$ac_cv_type_short" >&6; }
8854
Martin v. Löwiseba40652007-08-30 20:10:57 +00008855# The cast to long int works around a bug in the HP C Compiler
8856# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8857# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8858# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008859{ echo "$as_me:$LINENO: checking size of short" >&5
8860echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008861if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008862 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008863else
Martin v. Löwis11437992002-04-12 09:54:03 +00008864 if test "$cross_compiling" = yes; then
8865 # Depending upon the size, compute the lo and hi bounds.
8866cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* confdefs.h. */
8868_ACEOF
8869cat confdefs.h >>conftest.$ac_ext
8870cat >>conftest.$ac_ext <<_ACEOF
8871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008872$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008873 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008874int
8875main ()
8876{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008877static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008878test_array [0] = 0
8879
8880 ;
8881 return 0;
8882}
8883_ACEOF
8884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885if { (ac_try="$ac_compile"
8886case "(($ac_try" in
8887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8888 *) ac_try_echo=$ac_try;;
8889esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008893 grep -v '^ *+' conftest.er1 >conftest.err
8894 rm -f conftest.er1
8895 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008897 (exit $ac_status); } && {
8898 test -z "$ac_c_werror_flag" ||
8899 test ! -s conftest.err
8900 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008901 ac_lo=0 ac_mid=0
8902 while :; do
8903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008904/* confdefs.h. */
8905_ACEOF
8906cat confdefs.h >>conftest.$ac_ext
8907cat >>conftest.$ac_ext <<_ACEOF
8908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008909$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008910 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008911int
8912main ()
8913{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008914static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008915test_array [0] = 0
8916
8917 ;
8918 return 0;
8919}
8920_ACEOF
8921rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008922if { (ac_try="$ac_compile"
8923case "(($ac_try" in
8924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8925 *) ac_try_echo=$ac_try;;
8926esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008930 grep -v '^ *+' conftest.er1 >conftest.err
8931 rm -f conftest.er1
8932 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934 (exit $ac_status); } && {
8935 test -z "$ac_c_werror_flag" ||
8936 test ! -s conftest.err
8937 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 ac_hi=$ac_mid; break
8939else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008941sed 's/^/| /' conftest.$ac_ext >&5
8942
Martin v. Löwiseba40652007-08-30 20:10:57 +00008943 ac_lo=`expr $ac_mid + 1`
8944 if test $ac_lo -le $ac_mid; then
8945 ac_lo= ac_hi=
8946 break
8947 fi
8948 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008950
8951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 done
8953else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008955sed 's/^/| /' conftest.$ac_ext >&5
8956
Martin v. Löwiseba40652007-08-30 20:10:57 +00008957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008958/* confdefs.h. */
8959_ACEOF
8960cat confdefs.h >>conftest.$ac_ext
8961cat >>conftest.$ac_ext <<_ACEOF
8962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008963$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008964 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008965int
8966main ()
8967{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008968static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008969test_array [0] = 0
8970
8971 ;
8972 return 0;
8973}
8974_ACEOF
8975rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008976if { (ac_try="$ac_compile"
8977case "(($ac_try" in
8978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8979 *) ac_try_echo=$ac_try;;
8980esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008984 grep -v '^ *+' conftest.er1 >conftest.err
8985 rm -f conftest.er1
8986 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 (exit $ac_status); } && {
8989 test -z "$ac_c_werror_flag" ||
8990 test ! -s conftest.err
8991 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 ac_hi=-1 ac_mid=-1
8993 while :; do
8994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* confdefs.h. */
8996_ACEOF
8997cat confdefs.h >>conftest.$ac_ext
8998cat >>conftest.$ac_ext <<_ACEOF
8999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009001 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009002int
9003main ()
9004{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009006test_array [0] = 0
9007
9008 ;
9009 return 0;
9010}
9011_ACEOF
9012rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009013if { (ac_try="$ac_compile"
9014case "(($ac_try" in
9015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9016 *) ac_try_echo=$ac_try;;
9017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009021 grep -v '^ *+' conftest.er1 >conftest.err
9022 rm -f conftest.er1
9023 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 (exit $ac_status); } && {
9026 test -z "$ac_c_werror_flag" ||
9027 test ! -s conftest.err
9028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_lo=$ac_mid; break
9030else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009032sed 's/^/| /' conftest.$ac_ext >&5
9033
Martin v. Löwiseba40652007-08-30 20:10:57 +00009034 ac_hi=`expr '(' $ac_mid ')' - 1`
9035 if test $ac_mid -le $ac_hi; then
9036 ac_lo= ac_hi=
9037 break
9038 fi
9039 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009041
9042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 done
9044else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009046sed 's/^/| /' conftest.$ac_ext >&5
9047
Martin v. Löwiseba40652007-08-30 20:10:57 +00009048 ac_lo= ac_hi=
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 +00009052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009053
9054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009055# Binary search between lo and hi bounds.
9056while test "x$ac_lo" != "x$ac_hi"; do
9057 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009059/* confdefs.h. */
9060_ACEOF
9061cat confdefs.h >>conftest.$ac_ext
9062cat >>conftest.$ac_ext <<_ACEOF
9063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009064$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009065 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009066int
9067main ()
9068{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009069static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009070test_array [0] = 0
9071
9072 ;
9073 return 0;
9074}
9075_ACEOF
9076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077if { (ac_try="$ac_compile"
9078case "(($ac_try" in
9079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9080 *) ac_try_echo=$ac_try;;
9081esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009085 grep -v '^ *+' conftest.er1 >conftest.err
9086 rm -f conftest.er1
9087 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089 (exit $ac_status); } && {
9090 test -z "$ac_c_werror_flag" ||
9091 test ! -s conftest.err
9092 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 ac_hi=$ac_mid
9094else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009096sed 's/^/| /' conftest.$ac_ext >&5
9097
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009100
9101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009102done
9103case $ac_lo in
9104?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009105'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009106 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009107See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009108echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009109See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009110 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009111 else
9112 ac_cv_sizeof_short=0
9113 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009114esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009115else
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009117/* confdefs.h. */
9118_ACEOF
9119cat confdefs.h >>conftest.$ac_ext
9120cat >>conftest.$ac_ext <<_ACEOF
9121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009122$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009123 typedef short ac__type_sizeof_;
9124static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9125static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009126#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009127#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009128int
9129main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009130{
Martin v. Löwis11437992002-04-12 09:54:03 +00009131
9132 FILE *f = fopen ("conftest.val", "w");
9133 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009134 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009135 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009136 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009137 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009138 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009139 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009140 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009141 }
9142 else
9143 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009144 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009145 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009146 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009147 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009149 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009150
9151 ;
9152 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009153}
Martin v. Löwis11437992002-04-12 09:54:03 +00009154_ACEOF
9155rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009156if { (ac_try="$ac_link"
9157case "(($ac_try" in
9158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9159 *) ac_try_echo=$ac_try;;
9160esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009162 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009166 { (case "(($ac_try" in
9167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9168 *) ac_try_echo=$ac_try;;
9169esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009171 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009174 (exit $ac_status); }; }; then
9175 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009176else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009177 echo "$as_me: program exited with status $ac_status" >&5
9178echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009179sed 's/^/| /' conftest.$ac_ext >&5
9180
Martin v. Löwis11437992002-04-12 09:54:03 +00009181( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009182if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009183 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009184See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009185echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009186See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009187 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009188 else
9189 ac_cv_sizeof_short=0
9190 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009192rm -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 +00009193fi
9194rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009195fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009196{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9197echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198
9199
9200
Martin v. Löwis11437992002-04-12 09:54:03 +00009201cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009202#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009203_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009204
9205
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009206{ echo "$as_me:$LINENO: checking for float" >&5
9207echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9208if test "${ac_cv_type_float+set}" = set; then
9209 echo $ECHO_N "(cached) $ECHO_C" >&6
9210else
9211 cat >conftest.$ac_ext <<_ACEOF
9212/* confdefs.h. */
9213_ACEOF
9214cat confdefs.h >>conftest.$ac_ext
9215cat >>conftest.$ac_ext <<_ACEOF
9216/* end confdefs.h. */
9217$ac_includes_default
9218typedef float ac__type_new_;
9219int
9220main ()
9221{
9222if ((ac__type_new_ *) 0)
9223 return 0;
9224if (sizeof (ac__type_new_))
9225 return 0;
9226 ;
9227 return 0;
9228}
9229_ACEOF
9230rm -f conftest.$ac_objext
9231if { (ac_try="$ac_compile"
9232case "(($ac_try" in
9233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9234 *) ac_try_echo=$ac_try;;
9235esac
9236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9237 (eval "$ac_compile") 2>conftest.er1
9238 ac_status=$?
9239 grep -v '^ *+' conftest.er1 >conftest.err
9240 rm -f conftest.er1
9241 cat conftest.err >&5
9242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9243 (exit $ac_status); } && {
9244 test -z "$ac_c_werror_flag" ||
9245 test ! -s conftest.err
9246 } && test -s conftest.$ac_objext; then
9247 ac_cv_type_float=yes
9248else
9249 echo "$as_me: failed program was:" >&5
9250sed 's/^/| /' conftest.$ac_ext >&5
9251
9252 ac_cv_type_float=no
9253fi
9254
9255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9256fi
9257{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9258echo "${ECHO_T}$ac_cv_type_float" >&6; }
9259
Martin v. Löwiseba40652007-08-30 20:10:57 +00009260# The cast to long int works around a bug in the HP C Compiler
9261# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9262# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9263# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009264{ echo "$as_me:$LINENO: checking size of float" >&5
9265echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009266if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009267 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009268else
Martin v. Löwis11437992002-04-12 09:54:03 +00009269 if test "$cross_compiling" = yes; then
9270 # Depending upon the size, compute the lo and hi bounds.
9271cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009272/* confdefs.h. */
9273_ACEOF
9274cat confdefs.h >>conftest.$ac_ext
9275cat >>conftest.$ac_ext <<_ACEOF
9276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009277$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009278 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009279int
9280main ()
9281{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009282static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009283test_array [0] = 0
9284
9285 ;
9286 return 0;
9287}
9288_ACEOF
9289rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290if { (ac_try="$ac_compile"
9291case "(($ac_try" in
9292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9293 *) ac_try_echo=$ac_try;;
9294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009298 grep -v '^ *+' conftest.er1 >conftest.err
9299 rm -f conftest.er1
9300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009302 (exit $ac_status); } && {
9303 test -z "$ac_c_werror_flag" ||
9304 test ! -s conftest.err
9305 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 ac_lo=0 ac_mid=0
9307 while :; do
9308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009309/* confdefs.h. */
9310_ACEOF
9311cat confdefs.h >>conftest.$ac_ext
9312cat >>conftest.$ac_ext <<_ACEOF
9313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009314$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009315 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009316int
9317main ()
9318{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009320test_array [0] = 0
9321
9322 ;
9323 return 0;
9324}
9325_ACEOF
9326rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009327if { (ac_try="$ac_compile"
9328case "(($ac_try" in
9329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9330 *) ac_try_echo=$ac_try;;
9331esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009335 grep -v '^ *+' conftest.er1 >conftest.err
9336 rm -f conftest.er1
9337 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339 (exit $ac_status); } && {
9340 test -z "$ac_c_werror_flag" ||
9341 test ! -s conftest.err
9342 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009343 ac_hi=$ac_mid; break
9344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009346sed 's/^/| /' conftest.$ac_ext >&5
9347
Martin v. Löwiseba40652007-08-30 20:10:57 +00009348 ac_lo=`expr $ac_mid + 1`
9349 if test $ac_lo -le $ac_mid; then
9350 ac_lo= ac_hi=
9351 break
9352 fi
9353 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009355
9356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 done
9358else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009360sed 's/^/| /' conftest.$ac_ext >&5
9361
Martin v. Löwiseba40652007-08-30 20:10:57 +00009362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009363/* confdefs.h. */
9364_ACEOF
9365cat confdefs.h >>conftest.$ac_ext
9366cat >>conftest.$ac_ext <<_ACEOF
9367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009368$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009369 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009370int
9371main ()
9372{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009374test_array [0] = 0
9375
9376 ;
9377 return 0;
9378}
9379_ACEOF
9380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009381if { (ac_try="$ac_compile"
9382case "(($ac_try" in
9383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9384 *) ac_try_echo=$ac_try;;
9385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009389 grep -v '^ *+' conftest.er1 >conftest.err
9390 rm -f conftest.er1
9391 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393 (exit $ac_status); } && {
9394 test -z "$ac_c_werror_flag" ||
9395 test ! -s conftest.err
9396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 ac_hi=-1 ac_mid=-1
9398 while :; do
9399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* confdefs.h. */
9401_ACEOF
9402cat confdefs.h >>conftest.$ac_ext
9403cat >>conftest.$ac_ext <<_ACEOF
9404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009406 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009407int
9408main ()
9409{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009411test_array [0] = 0
9412
9413 ;
9414 return 0;
9415}
9416_ACEOF
9417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009418if { (ac_try="$ac_compile"
9419case "(($ac_try" in
9420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9421 *) ac_try_echo=$ac_try;;
9422esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009426 grep -v '^ *+' conftest.er1 >conftest.err
9427 rm -f conftest.er1
9428 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 (exit $ac_status); } && {
9431 test -z "$ac_c_werror_flag" ||
9432 test ! -s conftest.err
9433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_lo=$ac_mid; break
9435else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009437sed 's/^/| /' conftest.$ac_ext >&5
9438
Martin v. Löwiseba40652007-08-30 20:10:57 +00009439 ac_hi=`expr '(' $ac_mid ')' - 1`
9440 if test $ac_mid -le $ac_hi; then
9441 ac_lo= ac_hi=
9442 break
9443 fi
9444 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009446
9447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 done
9449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009451sed 's/^/| /' conftest.$ac_ext >&5
9452
Martin v. Löwiseba40652007-08-30 20:10:57 +00009453 ac_lo= ac_hi=
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 +00009457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458
9459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009460# Binary search between lo and hi bounds.
9461while test "x$ac_lo" != "x$ac_hi"; do
9462 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009464/* confdefs.h. */
9465_ACEOF
9466cat confdefs.h >>conftest.$ac_ext
9467cat >>conftest.$ac_ext <<_ACEOF
9468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009469$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009470 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009471int
9472main ()
9473{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009474static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009475test_array [0] = 0
9476
9477 ;
9478 return 0;
9479}
9480_ACEOF
9481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482if { (ac_try="$ac_compile"
9483case "(($ac_try" in
9484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9485 *) ac_try_echo=$ac_try;;
9486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009490 grep -v '^ *+' conftest.er1 >conftest.err
9491 rm -f conftest.er1
9492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494 (exit $ac_status); } && {
9495 test -z "$ac_c_werror_flag" ||
9496 test ! -s conftest.err
9497 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_hi=$ac_mid
9499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009501sed 's/^/| /' conftest.$ac_ext >&5
9502
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009505
9506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009507done
9508case $ac_lo in
9509?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009511 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009512See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009513echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009514See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009515 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009516 else
9517 ac_cv_sizeof_float=0
9518 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009519esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009520else
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009522/* confdefs.h. */
9523_ACEOF
9524cat confdefs.h >>conftest.$ac_ext
9525cat >>conftest.$ac_ext <<_ACEOF
9526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009527$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009528 typedef float ac__type_sizeof_;
9529static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9530static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009531#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009532#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009533int
9534main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009535{
Martin v. Löwis11437992002-04-12 09:54:03 +00009536
9537 FILE *f = fopen ("conftest.val", "w");
9538 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009540 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009542 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009543 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009544 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009545 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 }
9547 else
9548 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009549 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009550 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009551 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009552 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009554 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009555
9556 ;
9557 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009558}
Martin v. Löwis11437992002-04-12 09:54:03 +00009559_ACEOF
9560rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009561if { (ac_try="$ac_link"
9562case "(($ac_try" in
9563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9564 *) ac_try_echo=$ac_try;;
9565esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009567 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009571 { (case "(($ac_try" in
9572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9573 *) ac_try_echo=$ac_try;;
9574esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009576 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009577 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009579 (exit $ac_status); }; }; then
9580 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009581else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009582 echo "$as_me: program exited with status $ac_status" >&5
9583echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009584sed 's/^/| /' conftest.$ac_ext >&5
9585
Martin v. Löwis11437992002-04-12 09:54:03 +00009586( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009587if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009588 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009589See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009590echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009591See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009592 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009593 else
9594 ac_cv_sizeof_float=0
9595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597rm -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 +00009598fi
9599rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009600fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009601{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9602echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009603
9604
9605
Martin v. Löwis11437992002-04-12 09:54:03 +00009606cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009607#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009608_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009609
9610
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009611{ echo "$as_me:$LINENO: checking for double" >&5
9612echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9613if test "${ac_cv_type_double+set}" = set; then
9614 echo $ECHO_N "(cached) $ECHO_C" >&6
9615else
9616 cat >conftest.$ac_ext <<_ACEOF
9617/* confdefs.h. */
9618_ACEOF
9619cat confdefs.h >>conftest.$ac_ext
9620cat >>conftest.$ac_ext <<_ACEOF
9621/* end confdefs.h. */
9622$ac_includes_default
9623typedef double ac__type_new_;
9624int
9625main ()
9626{
9627if ((ac__type_new_ *) 0)
9628 return 0;
9629if (sizeof (ac__type_new_))
9630 return 0;
9631 ;
9632 return 0;
9633}
9634_ACEOF
9635rm -f conftest.$ac_objext
9636if { (ac_try="$ac_compile"
9637case "(($ac_try" in
9638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9639 *) ac_try_echo=$ac_try;;
9640esac
9641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9642 (eval "$ac_compile") 2>conftest.er1
9643 ac_status=$?
9644 grep -v '^ *+' conftest.er1 >conftest.err
9645 rm -f conftest.er1
9646 cat conftest.err >&5
9647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9648 (exit $ac_status); } && {
9649 test -z "$ac_c_werror_flag" ||
9650 test ! -s conftest.err
9651 } && test -s conftest.$ac_objext; then
9652 ac_cv_type_double=yes
9653else
9654 echo "$as_me: failed program was:" >&5
9655sed 's/^/| /' conftest.$ac_ext >&5
9656
9657 ac_cv_type_double=no
9658fi
9659
9660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9661fi
9662{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9663echo "${ECHO_T}$ac_cv_type_double" >&6; }
9664
Martin v. Löwiseba40652007-08-30 20:10:57 +00009665# The cast to long int works around a bug in the HP C Compiler
9666# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9667# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9668# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009669{ echo "$as_me:$LINENO: checking size of double" >&5
9670echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009671if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009672 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009673else
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 if test "$cross_compiling" = yes; then
9675 # Depending upon the size, compute the lo and hi bounds.
9676cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009677/* confdefs.h. */
9678_ACEOF
9679cat confdefs.h >>conftest.$ac_ext
9680cat >>conftest.$ac_ext <<_ACEOF
9681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009682$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009683 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009684int
9685main ()
9686{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009687static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009688test_array [0] = 0
9689
9690 ;
9691 return 0;
9692}
9693_ACEOF
9694rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695if { (ac_try="$ac_compile"
9696case "(($ac_try" in
9697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9698 *) ac_try_echo=$ac_try;;
9699esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009703 grep -v '^ *+' conftest.er1 >conftest.err
9704 rm -f conftest.er1
9705 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009707 (exit $ac_status); } && {
9708 test -z "$ac_c_werror_flag" ||
9709 test ! -s conftest.err
9710 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009711 ac_lo=0 ac_mid=0
9712 while :; do
9713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009714/* confdefs.h. */
9715_ACEOF
9716cat confdefs.h >>conftest.$ac_ext
9717cat >>conftest.$ac_ext <<_ACEOF
9718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009719$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009720 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009721int
9722main ()
9723{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009724static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009725test_array [0] = 0
9726
9727 ;
9728 return 0;
9729}
9730_ACEOF
9731rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009732if { (ac_try="$ac_compile"
9733case "(($ac_try" in
9734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9735 *) ac_try_echo=$ac_try;;
9736esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009740 grep -v '^ *+' conftest.er1 >conftest.err
9741 rm -f conftest.er1
9742 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744 (exit $ac_status); } && {
9745 test -z "$ac_c_werror_flag" ||
9746 test ! -s conftest.err
9747 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ac_hi=$ac_mid; break
9749else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009751sed 's/^/| /' conftest.$ac_ext >&5
9752
Martin v. Löwiseba40652007-08-30 20:10:57 +00009753 ac_lo=`expr $ac_mid + 1`
9754 if test $ac_lo -le $ac_mid; then
9755 ac_lo= ac_hi=
9756 break
9757 fi
9758 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009760
9761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 done
9763else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009765sed 's/^/| /' conftest.$ac_ext >&5
9766
Martin v. Löwiseba40652007-08-30 20:10:57 +00009767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009768/* confdefs.h. */
9769_ACEOF
9770cat confdefs.h >>conftest.$ac_ext
9771cat >>conftest.$ac_ext <<_ACEOF
9772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009773$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009774 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009775int
9776main ()
9777{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009778static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009779test_array [0] = 0
9780
9781 ;
9782 return 0;
9783}
9784_ACEOF
9785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009786if { (ac_try="$ac_compile"
9787case "(($ac_try" in
9788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9789 *) ac_try_echo=$ac_try;;
9790esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009794 grep -v '^ *+' conftest.er1 >conftest.err
9795 rm -f conftest.er1
9796 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798 (exit $ac_status); } && {
9799 test -z "$ac_c_werror_flag" ||
9800 test ! -s conftest.err
9801 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 ac_hi=-1 ac_mid=-1
9803 while :; do
9804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009805/* confdefs.h. */
9806_ACEOF
9807cat confdefs.h >>conftest.$ac_ext
9808cat >>conftest.$ac_ext <<_ACEOF
9809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009810$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009811 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009812int
9813main ()
9814{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009816test_array [0] = 0
9817
9818 ;
9819 return 0;
9820}
9821_ACEOF
9822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009823if { (ac_try="$ac_compile"
9824case "(($ac_try" in
9825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9826 *) ac_try_echo=$ac_try;;
9827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009831 grep -v '^ *+' conftest.er1 >conftest.err
9832 rm -f conftest.er1
9833 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835 (exit $ac_status); } && {
9836 test -z "$ac_c_werror_flag" ||
9837 test ! -s conftest.err
9838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ac_lo=$ac_mid; break
9840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009842sed 's/^/| /' conftest.$ac_ext >&5
9843
Martin v. Löwiseba40652007-08-30 20:10:57 +00009844 ac_hi=`expr '(' $ac_mid ')' - 1`
9845 if test $ac_mid -le $ac_hi; then
9846 ac_lo= ac_hi=
9847 break
9848 fi
9849 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009851
9852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 done
9854else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009856sed 's/^/| /' conftest.$ac_ext >&5
9857
Martin v. Löwiseba40652007-08-30 20:10:57 +00009858 ac_lo= ac_hi=
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 +00009862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009863
9864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009865# Binary search between lo and hi bounds.
9866while test "x$ac_lo" != "x$ac_hi"; do
9867 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009869/* confdefs.h. */
9870_ACEOF
9871cat confdefs.h >>conftest.$ac_ext
9872cat >>conftest.$ac_ext <<_ACEOF
9873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009874$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009875 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009876int
9877main ()
9878{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009879static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009880test_array [0] = 0
9881
9882 ;
9883 return 0;
9884}
9885_ACEOF
9886rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887if { (ac_try="$ac_compile"
9888case "(($ac_try" in
9889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9890 *) ac_try_echo=$ac_try;;
9891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009895 grep -v '^ *+' conftest.er1 >conftest.err
9896 rm -f conftest.er1
9897 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899 (exit $ac_status); } && {
9900 test -z "$ac_c_werror_flag" ||
9901 test ! -s conftest.err
9902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 ac_hi=$ac_mid
9904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009906sed 's/^/| /' conftest.$ac_ext >&5
9907
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009910
9911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009912done
9913case $ac_lo in
9914?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009915'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009916 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009917See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009918echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009919See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009920 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009921 else
9922 ac_cv_sizeof_double=0
9923 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009924esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009925else
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* confdefs.h. */
9928_ACEOF
9929cat confdefs.h >>conftest.$ac_ext
9930cat >>conftest.$ac_ext <<_ACEOF
9931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009932$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009933 typedef double ac__type_sizeof_;
9934static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9935static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009936#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009937#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009938int
9939main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009940{
Martin v. Löwis11437992002-04-12 09:54:03 +00009941
9942 FILE *f = fopen ("conftest.val", "w");
9943 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009945 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009947 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009948 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009949 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009950 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 }
9952 else
9953 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009954 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009955 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009956 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009957 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009958 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009959 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009960
9961 ;
9962 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009963}
Martin v. Löwis11437992002-04-12 09:54:03 +00009964_ACEOF
9965rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009966if { (ac_try="$ac_link"
9967case "(($ac_try" in
9968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9969 *) ac_try_echo=$ac_try;;
9970esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009972 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976 { (case "(($ac_try" in
9977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9978 *) ac_try_echo=$ac_try;;
9979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009981 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009982 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009984 (exit $ac_status); }; }; then
9985 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009986else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009987 echo "$as_me: program exited with status $ac_status" >&5
9988echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009989sed 's/^/| /' conftest.$ac_ext >&5
9990
Martin v. Löwis11437992002-04-12 09:54:03 +00009991( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009992if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009993 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009994See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009995echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009996See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009997 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009998 else
9999 ac_cv_sizeof_double=0
10000 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010002rm -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 +000010003fi
10004rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010005fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010006{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10007echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010008
10009
10010
Martin v. Löwis11437992002-04-12 09:54:03 +000010011cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010012#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010013_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010014
10015
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010016{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10017echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10018if test "${ac_cv_type_fpos_t+set}" = set; then
10019 echo $ECHO_N "(cached) $ECHO_C" >&6
10020else
10021 cat >conftest.$ac_ext <<_ACEOF
10022/* confdefs.h. */
10023_ACEOF
10024cat confdefs.h >>conftest.$ac_ext
10025cat >>conftest.$ac_ext <<_ACEOF
10026/* end confdefs.h. */
10027$ac_includes_default
10028typedef fpos_t ac__type_new_;
10029int
10030main ()
10031{
10032if ((ac__type_new_ *) 0)
10033 return 0;
10034if (sizeof (ac__type_new_))
10035 return 0;
10036 ;
10037 return 0;
10038}
10039_ACEOF
10040rm -f conftest.$ac_objext
10041if { (ac_try="$ac_compile"
10042case "(($ac_try" in
10043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10044 *) ac_try_echo=$ac_try;;
10045esac
10046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10047 (eval "$ac_compile") 2>conftest.er1
10048 ac_status=$?
10049 grep -v '^ *+' conftest.er1 >conftest.err
10050 rm -f conftest.er1
10051 cat conftest.err >&5
10052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10053 (exit $ac_status); } && {
10054 test -z "$ac_c_werror_flag" ||
10055 test ! -s conftest.err
10056 } && test -s conftest.$ac_objext; then
10057 ac_cv_type_fpos_t=yes
10058else
10059 echo "$as_me: failed program was:" >&5
10060sed 's/^/| /' conftest.$ac_ext >&5
10061
10062 ac_cv_type_fpos_t=no
10063fi
10064
10065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10066fi
10067{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10068echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10069
Martin v. Löwiseba40652007-08-30 20:10:57 +000010070# The cast to long int works around a bug in the HP C Compiler
10071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10073# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010074{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10075echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010076if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010077 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010078else
Martin v. Löwis11437992002-04-12 09:54:03 +000010079 if test "$cross_compiling" = yes; then
10080 # Depending upon the size, compute the lo and hi bounds.
10081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010082/* confdefs.h. */
10083_ACEOF
10084cat confdefs.h >>conftest.$ac_ext
10085cat >>conftest.$ac_ext <<_ACEOF
10086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010087$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010088 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010089int
10090main ()
10091{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010092static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010093test_array [0] = 0
10094
10095 ;
10096 return 0;
10097}
10098_ACEOF
10099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100if { (ac_try="$ac_compile"
10101case "(($ac_try" in
10102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10103 *) ac_try_echo=$ac_try;;
10104esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010108 grep -v '^ *+' conftest.er1 >conftest.err
10109 rm -f conftest.er1
10110 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010112 (exit $ac_status); } && {
10113 test -z "$ac_c_werror_flag" ||
10114 test ! -s conftest.err
10115 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 ac_lo=0 ac_mid=0
10117 while :; do
10118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010119/* confdefs.h. */
10120_ACEOF
10121cat confdefs.h >>conftest.$ac_ext
10122cat >>conftest.$ac_ext <<_ACEOF
10123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010125 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010126int
10127main ()
10128{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010129static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010130test_array [0] = 0
10131
10132 ;
10133 return 0;
10134}
10135_ACEOF
10136rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137if { (ac_try="$ac_compile"
10138case "(($ac_try" in
10139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10140 *) ac_try_echo=$ac_try;;
10141esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010145 grep -v '^ *+' conftest.er1 >conftest.err
10146 rm -f conftest.er1
10147 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149 (exit $ac_status); } && {
10150 test -z "$ac_c_werror_flag" ||
10151 test ! -s conftest.err
10152 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010153 ac_hi=$ac_mid; break
10154else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010156sed 's/^/| /' conftest.$ac_ext >&5
10157
Martin v. Löwiseba40652007-08-30 20:10:57 +000010158 ac_lo=`expr $ac_mid + 1`
10159 if test $ac_lo -le $ac_mid; then
10160 ac_lo= ac_hi=
10161 break
10162 fi
10163 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010165
10166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 done
10168else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010170sed 's/^/| /' conftest.$ac_ext >&5
10171
Martin v. Löwiseba40652007-08-30 20:10:57 +000010172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010173/* confdefs.h. */
10174_ACEOF
10175cat confdefs.h >>conftest.$ac_ext
10176cat >>conftest.$ac_ext <<_ACEOF
10177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010178$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010179 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010180int
10181main ()
10182{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010183static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010184test_array [0] = 0
10185
10186 ;
10187 return 0;
10188}
10189_ACEOF
10190rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010191if { (ac_try="$ac_compile"
10192case "(($ac_try" in
10193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10194 *) ac_try_echo=$ac_try;;
10195esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010199 grep -v '^ *+' conftest.er1 >conftest.err
10200 rm -f conftest.er1
10201 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203 (exit $ac_status); } && {
10204 test -z "$ac_c_werror_flag" ||
10205 test ! -s conftest.err
10206 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 ac_hi=-1 ac_mid=-1
10208 while :; do
10209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* confdefs.h. */
10211_ACEOF
10212cat confdefs.h >>conftest.$ac_ext
10213cat >>conftest.$ac_ext <<_ACEOF
10214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010215$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010216 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010217int
10218main ()
10219{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010221test_array [0] = 0
10222
10223 ;
10224 return 0;
10225}
10226_ACEOF
10227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010228if { (ac_try="$ac_compile"
10229case "(($ac_try" in
10230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10231 *) ac_try_echo=$ac_try;;
10232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010236 grep -v '^ *+' conftest.er1 >conftest.err
10237 rm -f conftest.er1
10238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010240 (exit $ac_status); } && {
10241 test -z "$ac_c_werror_flag" ||
10242 test ! -s conftest.err
10243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_lo=$ac_mid; break
10245else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010247sed 's/^/| /' conftest.$ac_ext >&5
10248
Martin v. Löwiseba40652007-08-30 20:10:57 +000010249 ac_hi=`expr '(' $ac_mid ')' - 1`
10250 if test $ac_mid -le $ac_hi; then
10251 ac_lo= ac_hi=
10252 break
10253 fi
10254 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010256
10257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 done
10259else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010261sed 's/^/| /' conftest.$ac_ext >&5
10262
Martin v. Löwiseba40652007-08-30 20:10:57 +000010263 ac_lo= ac_hi=
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 +000010267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010268
10269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010270# Binary search between lo and hi bounds.
10271while test "x$ac_lo" != "x$ac_hi"; do
10272 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010274/* confdefs.h. */
10275_ACEOF
10276cat confdefs.h >>conftest.$ac_ext
10277cat >>conftest.$ac_ext <<_ACEOF
10278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010279$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010280 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010281int
10282main ()
10283{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010284static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010285test_array [0] = 0
10286
10287 ;
10288 return 0;
10289}
10290_ACEOF
10291rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010292if { (ac_try="$ac_compile"
10293case "(($ac_try" in
10294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10295 *) ac_try_echo=$ac_try;;
10296esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010300 grep -v '^ *+' conftest.er1 >conftest.err
10301 rm -f conftest.er1
10302 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010304 (exit $ac_status); } && {
10305 test -z "$ac_c_werror_flag" ||
10306 test ! -s conftest.err
10307 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 ac_hi=$ac_mid
10309else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010311sed 's/^/| /' conftest.$ac_ext >&5
10312
Martin v. Löwiseba40652007-08-30 20:10:57 +000010313 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010315
10316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010317done
10318case $ac_lo in
10319?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010320'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010321 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010322See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010323echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010324See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010325 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010326 else
10327 ac_cv_sizeof_fpos_t=0
10328 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010329esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010330else
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010332/* confdefs.h. */
10333_ACEOF
10334cat confdefs.h >>conftest.$ac_ext
10335cat >>conftest.$ac_ext <<_ACEOF
10336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010338 typedef fpos_t ac__type_sizeof_;
10339static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10340static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010341#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010342#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010343int
10344main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010345{
Martin v. Löwis11437992002-04-12 09:54:03 +000010346
10347 FILE *f = fopen ("conftest.val", "w");
10348 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010349 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010350 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010352 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010353 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010354 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010355 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 }
10357 else
10358 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010359 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010360 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010361 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010362 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010364 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010365
10366 ;
10367 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010368}
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
10370rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010371if { (ac_try="$ac_link"
10372case "(($ac_try" in
10373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10374 *) ac_try_echo=$ac_try;;
10375esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010377 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010381 { (case "(($ac_try" in
10382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10383 *) ac_try_echo=$ac_try;;
10384esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010386 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 (exit $ac_status); }; }; then
10390 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010392 echo "$as_me: program exited with status $ac_status" >&5
10393echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010394sed 's/^/| /' conftest.$ac_ext >&5
10395
Martin v. Löwis11437992002-04-12 09:54:03 +000010396( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010397if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010398 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010399See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010400echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010401See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010402 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010403 else
10404 ac_cv_sizeof_fpos_t=0
10405 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010407rm -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 +000010408fi
10409rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010410fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010411{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10412echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010413
10414
10415
Martin v. Löwis11437992002-04-12 09:54:03 +000010416cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010417#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010418_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010419
Michael W. Hudson54241132001-12-07 15:38:26 +000010420
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010421{ echo "$as_me:$LINENO: checking for size_t" >&5
10422echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10423if test "${ac_cv_type_size_t+set}" = set; then
10424 echo $ECHO_N "(cached) $ECHO_C" >&6
10425else
10426 cat >conftest.$ac_ext <<_ACEOF
10427/* confdefs.h. */
10428_ACEOF
10429cat confdefs.h >>conftest.$ac_ext
10430cat >>conftest.$ac_ext <<_ACEOF
10431/* end confdefs.h. */
10432$ac_includes_default
10433typedef size_t ac__type_new_;
10434int
10435main ()
10436{
10437if ((ac__type_new_ *) 0)
10438 return 0;
10439if (sizeof (ac__type_new_))
10440 return 0;
10441 ;
10442 return 0;
10443}
10444_ACEOF
10445rm -f conftest.$ac_objext
10446if { (ac_try="$ac_compile"
10447case "(($ac_try" in
10448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10449 *) ac_try_echo=$ac_try;;
10450esac
10451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10452 (eval "$ac_compile") 2>conftest.er1
10453 ac_status=$?
10454 grep -v '^ *+' conftest.er1 >conftest.err
10455 rm -f conftest.er1
10456 cat conftest.err >&5
10457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10458 (exit $ac_status); } && {
10459 test -z "$ac_c_werror_flag" ||
10460 test ! -s conftest.err
10461 } && test -s conftest.$ac_objext; then
10462 ac_cv_type_size_t=yes
10463else
10464 echo "$as_me: failed program was:" >&5
10465sed 's/^/| /' conftest.$ac_ext >&5
10466
10467 ac_cv_type_size_t=no
10468fi
10469
10470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10471fi
10472{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10473echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10474
Martin v. Löwiseba40652007-08-30 20:10:57 +000010475# The cast to long int works around a bug in the HP C Compiler
10476# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10477# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10478# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010479{ echo "$as_me:$LINENO: checking size of size_t" >&5
10480echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010482 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010483else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010484 if test "$cross_compiling" = yes; then
10485 # Depending upon the size, compute the lo and hi bounds.
10486cat >conftest.$ac_ext <<_ACEOF
10487/* confdefs.h. */
10488_ACEOF
10489cat confdefs.h >>conftest.$ac_ext
10490cat >>conftest.$ac_ext <<_ACEOF
10491/* end confdefs.h. */
10492$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010493 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010494int
10495main ()
10496{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010497static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010498test_array [0] = 0
10499
10500 ;
10501 return 0;
10502}
10503_ACEOF
10504rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010505if { (ac_try="$ac_compile"
10506case "(($ac_try" in
10507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10508 *) ac_try_echo=$ac_try;;
10509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512 ac_status=$?
10513 grep -v '^ *+' conftest.er1 >conftest.err
10514 rm -f conftest.er1
10515 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010517 (exit $ac_status); } && {
10518 test -z "$ac_c_werror_flag" ||
10519 test ! -s conftest.err
10520 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521 ac_lo=0 ac_mid=0
10522 while :; do
10523 cat >conftest.$ac_ext <<_ACEOF
10524/* confdefs.h. */
10525_ACEOF
10526cat confdefs.h >>conftest.$ac_ext
10527cat >>conftest.$ac_ext <<_ACEOF
10528/* end confdefs.h. */
10529$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010530 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010531int
10532main ()
10533{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010534static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535test_array [0] = 0
10536
10537 ;
10538 return 0;
10539}
10540_ACEOF
10541rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010542if { (ac_try="$ac_compile"
10543case "(($ac_try" in
10544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10545 *) ac_try_echo=$ac_try;;
10546esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010548 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010549 ac_status=$?
10550 grep -v '^ *+' conftest.er1 >conftest.err
10551 rm -f conftest.er1
10552 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010554 (exit $ac_status); } && {
10555 test -z "$ac_c_werror_flag" ||
10556 test ! -s conftest.err
10557 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558 ac_hi=$ac_mid; break
10559else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010560 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010561sed 's/^/| /' conftest.$ac_ext >&5
10562
Martin v. Löwiseba40652007-08-30 20:10:57 +000010563 ac_lo=`expr $ac_mid + 1`
10564 if test $ac_lo -le $ac_mid; then
10565 ac_lo= ac_hi=
10566 break
10567 fi
10568 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010570
10571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572 done
10573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010574 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010575sed 's/^/| /' conftest.$ac_ext >&5
10576
Martin v. Löwiseba40652007-08-30 20:10:57 +000010577 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578/* confdefs.h. */
10579_ACEOF
10580cat confdefs.h >>conftest.$ac_ext
10581cat >>conftest.$ac_ext <<_ACEOF
10582/* end confdefs.h. */
10583$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010584 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585int
10586main ()
10587{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010588static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010589test_array [0] = 0
10590
10591 ;
10592 return 0;
10593}
10594_ACEOF
10595rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010596if { (ac_try="$ac_compile"
10597case "(($ac_try" in
10598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10599 *) ac_try_echo=$ac_try;;
10600esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603 ac_status=$?
10604 grep -v '^ *+' conftest.er1 >conftest.err
10605 rm -f conftest.er1
10606 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608 (exit $ac_status); } && {
10609 test -z "$ac_c_werror_flag" ||
10610 test ! -s conftest.err
10611 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612 ac_hi=-1 ac_mid=-1
10613 while :; do
10614 cat >conftest.$ac_ext <<_ACEOF
10615/* confdefs.h. */
10616_ACEOF
10617cat confdefs.h >>conftest.$ac_ext
10618cat >>conftest.$ac_ext <<_ACEOF
10619/* end confdefs.h. */
10620$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010621 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622int
10623main ()
10624{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010625static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626test_array [0] = 0
10627
10628 ;
10629 return 0;
10630}
10631_ACEOF
10632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010633if { (ac_try="$ac_compile"
10634case "(($ac_try" in
10635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10636 *) ac_try_echo=$ac_try;;
10637esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640 ac_status=$?
10641 grep -v '^ *+' conftest.er1 >conftest.err
10642 rm -f conftest.er1
10643 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645 (exit $ac_status); } && {
10646 test -z "$ac_c_werror_flag" ||
10647 test ! -s conftest.err
10648 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649 ac_lo=$ac_mid; break
10650else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010651 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652sed 's/^/| /' conftest.$ac_ext >&5
10653
Martin v. Löwiseba40652007-08-30 20:10:57 +000010654 ac_hi=`expr '(' $ac_mid ')' - 1`
10655 if test $ac_mid -le $ac_hi; then
10656 ac_lo= ac_hi=
10657 break
10658 fi
10659 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661
10662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663 done
10664else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010665 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666sed 's/^/| /' conftest.$ac_ext >&5
10667
Martin v. Löwiseba40652007-08-30 20:10:57 +000010668 ac_lo= ac_hi=
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 +000010672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673
10674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010675# Binary search between lo and hi bounds.
10676while test "x$ac_lo" != "x$ac_hi"; do
10677 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10678 cat >conftest.$ac_ext <<_ACEOF
10679/* confdefs.h. */
10680_ACEOF
10681cat confdefs.h >>conftest.$ac_ext
10682cat >>conftest.$ac_ext <<_ACEOF
10683/* end confdefs.h. */
10684$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010685 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010686int
10687main ()
10688{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010690test_array [0] = 0
10691
10692 ;
10693 return 0;
10694}
10695_ACEOF
10696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010697if { (ac_try="$ac_compile"
10698case "(($ac_try" in
10699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10700 *) ac_try_echo=$ac_try;;
10701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704 ac_status=$?
10705 grep -v '^ *+' conftest.er1 >conftest.err
10706 rm -f conftest.er1
10707 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010709 (exit $ac_status); } && {
10710 test -z "$ac_c_werror_flag" ||
10711 test ! -s conftest.err
10712 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010713 ac_hi=$ac_mid
10714else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010715 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010716sed 's/^/| /' conftest.$ac_ext >&5
10717
Martin v. Löwiseba40652007-08-30 20:10:57 +000010718 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010720
10721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010722done
10723case $ac_lo in
10724?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010725'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010726 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010727See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010728echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010729See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010730 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010731 else
10732 ac_cv_sizeof_size_t=0
10733 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010734esac
10735else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010736 cat >conftest.$ac_ext <<_ACEOF
10737/* confdefs.h. */
10738_ACEOF
10739cat confdefs.h >>conftest.$ac_ext
10740cat >>conftest.$ac_ext <<_ACEOF
10741/* end confdefs.h. */
10742$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010743 typedef size_t ac__type_sizeof_;
10744static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10745static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010746#include <stdio.h>
10747#include <stdlib.h>
10748int
10749main ()
10750{
10751
10752 FILE *f = fopen ("conftest.val", "w");
10753 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010754 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010755 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010756 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010757 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010758 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010759 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010760 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010761 }
10762 else
10763 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010764 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010765 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010766 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010767 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010768 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010769 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010770
10771 ;
10772 return 0;
10773}
10774_ACEOF
10775rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010776if { (ac_try="$ac_link"
10777case "(($ac_try" in
10778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10779 *) ac_try_echo=$ac_try;;
10780esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010782 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010783 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010785 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010786 { (case "(($ac_try" in
10787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10788 *) ac_try_echo=$ac_try;;
10789esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010791 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010792 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010794 (exit $ac_status); }; }; then
10795 ac_cv_sizeof_size_t=`cat conftest.val`
10796else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010797 echo "$as_me: program exited with status $ac_status" >&5
10798echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010799sed 's/^/| /' conftest.$ac_ext >&5
10800
10801( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010802if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010803 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010804See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010805echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010806See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010807 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010808 else
10809 ac_cv_sizeof_size_t=0
10810 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010812rm -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 +000010813fi
10814rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010815fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010816{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10817echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010818
10819
10820
Martin v. Löwis18e16552006-02-15 17:27:45 +000010821cat >>confdefs.h <<_ACEOF
10822#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10823_ACEOF
10824
10825
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010826{ echo "$as_me:$LINENO: checking for pid_t" >&5
10827echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10828if test "${ac_cv_type_pid_t+set}" = set; then
10829 echo $ECHO_N "(cached) $ECHO_C" >&6
10830else
10831 cat >conftest.$ac_ext <<_ACEOF
10832/* confdefs.h. */
10833_ACEOF
10834cat confdefs.h >>conftest.$ac_ext
10835cat >>conftest.$ac_ext <<_ACEOF
10836/* end confdefs.h. */
10837$ac_includes_default
10838typedef pid_t ac__type_new_;
10839int
10840main ()
10841{
10842if ((ac__type_new_ *) 0)
10843 return 0;
10844if (sizeof (ac__type_new_))
10845 return 0;
10846 ;
10847 return 0;
10848}
10849_ACEOF
10850rm -f conftest.$ac_objext
10851if { (ac_try="$ac_compile"
10852case "(($ac_try" in
10853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10854 *) ac_try_echo=$ac_try;;
10855esac
10856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10857 (eval "$ac_compile") 2>conftest.er1
10858 ac_status=$?
10859 grep -v '^ *+' conftest.er1 >conftest.err
10860 rm -f conftest.er1
10861 cat conftest.err >&5
10862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10863 (exit $ac_status); } && {
10864 test -z "$ac_c_werror_flag" ||
10865 test ! -s conftest.err
10866 } && test -s conftest.$ac_objext; then
10867 ac_cv_type_pid_t=yes
10868else
10869 echo "$as_me: failed program was:" >&5
10870sed 's/^/| /' conftest.$ac_ext >&5
10871
10872 ac_cv_type_pid_t=no
10873fi
10874
10875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10876fi
10877{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10878echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10879
Christian Heimes951cc0f2008-01-31 23:08:23 +000010880# The cast to long int works around a bug in the HP C Compiler
10881# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10882# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10883# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010884{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10885echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010886if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010887 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010888else
10889 if test "$cross_compiling" = yes; then
10890 # Depending upon the size, compute the lo and hi bounds.
10891cat >conftest.$ac_ext <<_ACEOF
10892/* confdefs.h. */
10893_ACEOF
10894cat confdefs.h >>conftest.$ac_ext
10895cat >>conftest.$ac_ext <<_ACEOF
10896/* end confdefs.h. */
10897$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010898 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010899int
10900main ()
10901{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010902static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010903test_array [0] = 0
10904
10905 ;
10906 return 0;
10907}
10908_ACEOF
10909rm -f conftest.$ac_objext
10910if { (ac_try="$ac_compile"
10911case "(($ac_try" in
10912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10913 *) ac_try_echo=$ac_try;;
10914esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010916 (eval "$ac_compile") 2>conftest.er1
10917 ac_status=$?
10918 grep -v '^ *+' conftest.er1 >conftest.err
10919 rm -f conftest.er1
10920 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010922 (exit $ac_status); } && {
10923 test -z "$ac_c_werror_flag" ||
10924 test ! -s conftest.err
10925 } && test -s conftest.$ac_objext; then
10926 ac_lo=0 ac_mid=0
10927 while :; do
10928 cat >conftest.$ac_ext <<_ACEOF
10929/* confdefs.h. */
10930_ACEOF
10931cat confdefs.h >>conftest.$ac_ext
10932cat >>conftest.$ac_ext <<_ACEOF
10933/* end confdefs.h. */
10934$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010935 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010936int
10937main ()
10938{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010939static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010940test_array [0] = 0
10941
10942 ;
10943 return 0;
10944}
10945_ACEOF
10946rm -f conftest.$ac_objext
10947if { (ac_try="$ac_compile"
10948case "(($ac_try" in
10949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10950 *) ac_try_echo=$ac_try;;
10951esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010953 (eval "$ac_compile") 2>conftest.er1
10954 ac_status=$?
10955 grep -v '^ *+' conftest.er1 >conftest.err
10956 rm -f conftest.er1
10957 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010959 (exit $ac_status); } && {
10960 test -z "$ac_c_werror_flag" ||
10961 test ! -s conftest.err
10962 } && test -s conftest.$ac_objext; then
10963 ac_hi=$ac_mid; break
10964else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010965 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010966sed 's/^/| /' conftest.$ac_ext >&5
10967
10968 ac_lo=`expr $ac_mid + 1`
10969 if test $ac_lo -le $ac_mid; then
10970 ac_lo= ac_hi=
10971 break
10972 fi
10973 ac_mid=`expr 2 '*' $ac_mid + 1`
10974fi
10975
10976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10977 done
10978else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010979 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010980sed 's/^/| /' conftest.$ac_ext >&5
10981
10982 cat >conftest.$ac_ext <<_ACEOF
10983/* confdefs.h. */
10984_ACEOF
10985cat confdefs.h >>conftest.$ac_ext
10986cat >>conftest.$ac_ext <<_ACEOF
10987/* end confdefs.h. */
10988$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010989 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010990int
10991main ()
10992{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010993static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010994test_array [0] = 0
10995
10996 ;
10997 return 0;
10998}
10999_ACEOF
11000rm -f conftest.$ac_objext
11001if { (ac_try="$ac_compile"
11002case "(($ac_try" in
11003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11004 *) ac_try_echo=$ac_try;;
11005esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011007 (eval "$ac_compile") 2>conftest.er1
11008 ac_status=$?
11009 grep -v '^ *+' conftest.er1 >conftest.err
11010 rm -f conftest.er1
11011 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011013 (exit $ac_status); } && {
11014 test -z "$ac_c_werror_flag" ||
11015 test ! -s conftest.err
11016 } && test -s conftest.$ac_objext; then
11017 ac_hi=-1 ac_mid=-1
11018 while :; do
11019 cat >conftest.$ac_ext <<_ACEOF
11020/* confdefs.h. */
11021_ACEOF
11022cat confdefs.h >>conftest.$ac_ext
11023cat >>conftest.$ac_ext <<_ACEOF
11024/* end confdefs.h. */
11025$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011026 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011027int
11028main ()
11029{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011030static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011031test_array [0] = 0
11032
11033 ;
11034 return 0;
11035}
11036_ACEOF
11037rm -f conftest.$ac_objext
11038if { (ac_try="$ac_compile"
11039case "(($ac_try" in
11040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11041 *) ac_try_echo=$ac_try;;
11042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011044 (eval "$ac_compile") 2>conftest.er1
11045 ac_status=$?
11046 grep -v '^ *+' conftest.er1 >conftest.err
11047 rm -f conftest.er1
11048 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011050 (exit $ac_status); } && {
11051 test -z "$ac_c_werror_flag" ||
11052 test ! -s conftest.err
11053 } && test -s conftest.$ac_objext; then
11054 ac_lo=$ac_mid; break
11055else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011056 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011057sed 's/^/| /' conftest.$ac_ext >&5
11058
11059 ac_hi=`expr '(' $ac_mid ')' - 1`
11060 if test $ac_mid -le $ac_hi; then
11061 ac_lo= ac_hi=
11062 break
11063 fi
11064 ac_mid=`expr 2 '*' $ac_mid`
11065fi
11066
11067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11068 done
11069else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011070 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011071sed 's/^/| /' conftest.$ac_ext >&5
11072
11073 ac_lo= ac_hi=
11074fi
11075
11076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11077fi
11078
11079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11080# Binary search between lo and hi bounds.
11081while test "x$ac_lo" != "x$ac_hi"; do
11082 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11083 cat >conftest.$ac_ext <<_ACEOF
11084/* confdefs.h. */
11085_ACEOF
11086cat confdefs.h >>conftest.$ac_ext
11087cat >>conftest.$ac_ext <<_ACEOF
11088/* end confdefs.h. */
11089$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011090 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011091int
11092main ()
11093{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011095test_array [0] = 0
11096
11097 ;
11098 return 0;
11099}
11100_ACEOF
11101rm -f conftest.$ac_objext
11102if { (ac_try="$ac_compile"
11103case "(($ac_try" in
11104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11105 *) ac_try_echo=$ac_try;;
11106esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011108 (eval "$ac_compile") 2>conftest.er1
11109 ac_status=$?
11110 grep -v '^ *+' conftest.er1 >conftest.err
11111 rm -f conftest.er1
11112 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011114 (exit $ac_status); } && {
11115 test -z "$ac_c_werror_flag" ||
11116 test ! -s conftest.err
11117 } && test -s conftest.$ac_objext; then
11118 ac_hi=$ac_mid
11119else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011120 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011121sed 's/^/| /' conftest.$ac_ext >&5
11122
11123 ac_lo=`expr '(' $ac_mid ')' + 1`
11124fi
11125
11126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11127done
11128case $ac_lo in
11129?*) ac_cv_sizeof_pid_t=$ac_lo;;
11130'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011131 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011132See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011133echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011134See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011135 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011136 else
11137 ac_cv_sizeof_pid_t=0
11138 fi ;;
11139esac
11140else
11141 cat >conftest.$ac_ext <<_ACEOF
11142/* confdefs.h. */
11143_ACEOF
11144cat confdefs.h >>conftest.$ac_ext
11145cat >>conftest.$ac_ext <<_ACEOF
11146/* end confdefs.h. */
11147$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011148 typedef pid_t ac__type_sizeof_;
11149static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11150static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011151#include <stdio.h>
11152#include <stdlib.h>
11153int
11154main ()
11155{
11156
11157 FILE *f = fopen ("conftest.val", "w");
11158 if (! f)
11159 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011160 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011161 {
11162 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011163 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011164 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011165 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011166 }
11167 else
11168 {
11169 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011170 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011171 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011172 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011173 }
11174 return ferror (f) || fclose (f) != 0;
11175
11176 ;
11177 return 0;
11178}
11179_ACEOF
11180rm -f conftest$ac_exeext
11181if { (ac_try="$ac_link"
11182case "(($ac_try" in
11183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11184 *) ac_try_echo=$ac_try;;
11185esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011187 (eval "$ac_link") 2>&5
11188 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011190 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11191 { (case "(($ac_try" in
11192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11193 *) ac_try_echo=$ac_try;;
11194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011196 (eval "$ac_try") 2>&5
11197 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011199 (exit $ac_status); }; }; then
11200 ac_cv_sizeof_pid_t=`cat conftest.val`
11201else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011202 echo "$as_me: program exited with status $ac_status" >&5
11203echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011204sed 's/^/| /' conftest.$ac_ext >&5
11205
11206( exit $ac_status )
11207if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011208 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011209See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011210echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011211See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011212 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011213 else
11214 ac_cv_sizeof_pid_t=0
11215 fi
11216fi
11217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11218fi
11219rm -f conftest.val
11220fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011221{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11222echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011223
11224
11225
11226cat >>confdefs.h <<_ACEOF
11227#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11228_ACEOF
11229
11230
Michael W. Hudson54241132001-12-07 15:38:26 +000011231
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011232{ echo "$as_me:$LINENO: checking for long long support" >&5
11233echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011234have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011236/* confdefs.h. */
11237_ACEOF
11238cat confdefs.h >>conftest.$ac_ext
11239cat >>conftest.$ac_ext <<_ACEOF
11240/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011241
Martin v. Löwis11437992002-04-12 09:54:03 +000011242int
11243main ()
11244{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011245long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011246 ;
11247 return 0;
11248}
11249_ACEOF
11250rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011251if { (ac_try="$ac_compile"
11252case "(($ac_try" in
11253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11254 *) ac_try_echo=$ac_try;;
11255esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011257 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011259 grep -v '^ *+' conftest.er1 >conftest.err
11260 rm -f conftest.er1
11261 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011263 (exit $ac_status); } && {
11264 test -z "$ac_c_werror_flag" ||
11265 test ! -s conftest.err
11266 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011267
11268
11269cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011270#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011271_ACEOF
11272
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011273 have_long_long=yes
11274
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011275else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011277sed 's/^/| /' conftest.$ac_ext >&5
11278
Martin v. Löwiseba40652007-08-30 20:10:57 +000011279
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011281
11282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011283{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11284echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011285if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011286{ echo "$as_me:$LINENO: checking for long long" >&5
11287echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11288if test "${ac_cv_type_long_long+set}" = set; then
11289 echo $ECHO_N "(cached) $ECHO_C" >&6
11290else
11291 cat >conftest.$ac_ext <<_ACEOF
11292/* confdefs.h. */
11293_ACEOF
11294cat confdefs.h >>conftest.$ac_ext
11295cat >>conftest.$ac_ext <<_ACEOF
11296/* end confdefs.h. */
11297$ac_includes_default
11298typedef long long ac__type_new_;
11299int
11300main ()
11301{
11302if ((ac__type_new_ *) 0)
11303 return 0;
11304if (sizeof (ac__type_new_))
11305 return 0;
11306 ;
11307 return 0;
11308}
11309_ACEOF
11310rm -f conftest.$ac_objext
11311if { (ac_try="$ac_compile"
11312case "(($ac_try" in
11313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11314 *) ac_try_echo=$ac_try;;
11315esac
11316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11317 (eval "$ac_compile") 2>conftest.er1
11318 ac_status=$?
11319 grep -v '^ *+' conftest.er1 >conftest.err
11320 rm -f conftest.er1
11321 cat conftest.err >&5
11322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11323 (exit $ac_status); } && {
11324 test -z "$ac_c_werror_flag" ||
11325 test ! -s conftest.err
11326 } && test -s conftest.$ac_objext; then
11327 ac_cv_type_long_long=yes
11328else
11329 echo "$as_me: failed program was:" >&5
11330sed 's/^/| /' conftest.$ac_ext >&5
11331
11332 ac_cv_type_long_long=no
11333fi
11334
11335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11336fi
11337{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11338echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11339
Martin v. Löwiseba40652007-08-30 20:10:57 +000011340# The cast to long int works around a bug in the HP C Compiler
11341# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11342# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11343# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011344{ echo "$as_me:$LINENO: checking size of long long" >&5
11345echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011346if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011347 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011348else
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 if test "$cross_compiling" = yes; then
11350 # Depending upon the size, compute the lo and hi bounds.
11351cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011352/* confdefs.h. */
11353_ACEOF
11354cat confdefs.h >>conftest.$ac_ext
11355cat >>conftest.$ac_ext <<_ACEOF
11356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011357$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011358 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011359int
11360main ()
11361{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011363test_array [0] = 0
11364
11365 ;
11366 return 0;
11367}
11368_ACEOF
11369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011370if { (ac_try="$ac_compile"
11371case "(($ac_try" in
11372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11373 *) ac_try_echo=$ac_try;;
11374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011378 grep -v '^ *+' conftest.er1 >conftest.err
11379 rm -f conftest.er1
11380 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382 (exit $ac_status); } && {
11383 test -z "$ac_c_werror_flag" ||
11384 test ! -s conftest.err
11385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 ac_lo=0 ac_mid=0
11387 while :; do
11388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011389/* confdefs.h. */
11390_ACEOF
11391cat confdefs.h >>conftest.$ac_ext
11392cat >>conftest.$ac_ext <<_ACEOF
11393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011394$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011395 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011396int
11397main ()
11398{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011399static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011400test_array [0] = 0
11401
11402 ;
11403 return 0;
11404}
11405_ACEOF
11406rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407if { (ac_try="$ac_compile"
11408case "(($ac_try" in
11409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11410 *) ac_try_echo=$ac_try;;
11411esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011415 grep -v '^ *+' conftest.er1 >conftest.err
11416 rm -f conftest.er1
11417 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011419 (exit $ac_status); } && {
11420 test -z "$ac_c_werror_flag" ||
11421 test ! -s conftest.err
11422 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 ac_hi=$ac_mid; break
11424else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011426sed 's/^/| /' conftest.$ac_ext >&5
11427
Martin v. Löwiseba40652007-08-30 20:10:57 +000011428 ac_lo=`expr $ac_mid + 1`
11429 if test $ac_lo -le $ac_mid; then
11430 ac_lo= ac_hi=
11431 break
11432 fi
11433 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435
11436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 done
11438else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011440sed 's/^/| /' conftest.$ac_ext >&5
11441
Martin v. Löwiseba40652007-08-30 20:10:57 +000011442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011443/* confdefs.h. */
11444_ACEOF
11445cat confdefs.h >>conftest.$ac_ext
11446cat >>conftest.$ac_ext <<_ACEOF
11447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011448$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011449 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011450int
11451main ()
11452{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011453static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011454test_array [0] = 0
11455
11456 ;
11457 return 0;
11458}
11459_ACEOF
11460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011461if { (ac_try="$ac_compile"
11462case "(($ac_try" in
11463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11464 *) ac_try_echo=$ac_try;;
11465esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011469 grep -v '^ *+' conftest.er1 >conftest.err
11470 rm -f conftest.er1
11471 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473 (exit $ac_status); } && {
11474 test -z "$ac_c_werror_flag" ||
11475 test ! -s conftest.err
11476 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 ac_hi=-1 ac_mid=-1
11478 while :; do
11479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* confdefs.h. */
11481_ACEOF
11482cat confdefs.h >>conftest.$ac_ext
11483cat >>conftest.$ac_ext <<_ACEOF
11484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011485$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011486 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011487int
11488main ()
11489{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011491test_array [0] = 0
11492
11493 ;
11494 return 0;
11495}
11496_ACEOF
11497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011498if { (ac_try="$ac_compile"
11499case "(($ac_try" in
11500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11501 *) ac_try_echo=$ac_try;;
11502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011506 grep -v '^ *+' conftest.er1 >conftest.err
11507 rm -f conftest.er1
11508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510 (exit $ac_status); } && {
11511 test -z "$ac_c_werror_flag" ||
11512 test ! -s conftest.err
11513 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ac_lo=$ac_mid; break
11515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011517sed 's/^/| /' conftest.$ac_ext >&5
11518
Martin v. Löwiseba40652007-08-30 20:10:57 +000011519 ac_hi=`expr '(' $ac_mid ')' - 1`
11520 if test $ac_mid -le $ac_hi; then
11521 ac_lo= ac_hi=
11522 break
11523 fi
11524 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526
11527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 done
11529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011531sed 's/^/| /' conftest.$ac_ext >&5
11532
Martin v. Löwiseba40652007-08-30 20:10:57 +000011533 ac_lo= ac_hi=
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 +000011537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011538
11539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011540# Binary search between lo and hi bounds.
11541while test "x$ac_lo" != "x$ac_hi"; do
11542 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011544/* confdefs.h. */
11545_ACEOF
11546cat confdefs.h >>conftest.$ac_ext
11547cat >>conftest.$ac_ext <<_ACEOF
11548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011549$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011550 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011551int
11552main ()
11553{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011555test_array [0] = 0
11556
11557 ;
11558 return 0;
11559}
11560_ACEOF
11561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562if { (ac_try="$ac_compile"
11563case "(($ac_try" in
11564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11565 *) ac_try_echo=$ac_try;;
11566esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011570 grep -v '^ *+' conftest.er1 >conftest.err
11571 rm -f conftest.er1
11572 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011574 (exit $ac_status); } && {
11575 test -z "$ac_c_werror_flag" ||
11576 test ! -s conftest.err
11577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 ac_hi=$ac_mid
11579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011581sed 's/^/| /' conftest.$ac_ext >&5
11582
Martin v. Löwiseba40652007-08-30 20:10:57 +000011583 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011585
11586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011587done
11588case $ac_lo in
11589?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011590'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011591 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011592See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011593echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011594See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011595 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011596 else
11597 ac_cv_sizeof_long_long=0
11598 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011599esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011600else
Martin v. Löwis11437992002-04-12 09:54:03 +000011601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011602/* confdefs.h. */
11603_ACEOF
11604cat confdefs.h >>conftest.$ac_ext
11605cat >>conftest.$ac_ext <<_ACEOF
11606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011607$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011608 typedef long long ac__type_sizeof_;
11609static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11610static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011611#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011612#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011613int
11614main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011615{
Martin v. Löwis11437992002-04-12 09:54:03 +000011616
11617 FILE *f = fopen ("conftest.val", "w");
11618 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011620 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011621 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011622 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011623 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011624 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011625 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011626 }
11627 else
11628 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011629 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011630 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011631 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011632 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011633 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011634 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
11636 ;
11637 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011638}
Martin v. Löwis11437992002-04-12 09:54:03 +000011639_ACEOF
11640rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011641if { (ac_try="$ac_link"
11642case "(($ac_try" in
11643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11644 *) ac_try_echo=$ac_try;;
11645esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011647 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011651 { (case "(($ac_try" in
11652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11653 *) ac_try_echo=$ac_try;;
11654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011656 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011659 (exit $ac_status); }; }; then
11660 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011662 echo "$as_me: program exited with status $ac_status" >&5
11663echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011664sed 's/^/| /' conftest.$ac_ext >&5
11665
Martin v. Löwis11437992002-04-12 09:54:03 +000011666( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011667if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011668 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011669See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011670echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011671See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011672 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011673 else
11674 ac_cv_sizeof_long_long=0
11675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011677rm -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 +000011678fi
11679rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011680fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011681{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11682echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011683
11684
11685
Martin v. Löwis11437992002-04-12 09:54:03 +000011686cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011687#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011688_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011689
Michael W. Hudson54241132001-12-07 15:38:26 +000011690
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011691fi
11692
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011693{ echo "$as_me:$LINENO: checking for long double support" >&5
11694echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011695have_long_double=no
11696cat >conftest.$ac_ext <<_ACEOF
11697/* confdefs.h. */
11698_ACEOF
11699cat confdefs.h >>conftest.$ac_ext
11700cat >>conftest.$ac_ext <<_ACEOF
11701/* end confdefs.h. */
11702
11703int
11704main ()
11705{
11706long double x; x = (long double)0.;
11707 ;
11708 return 0;
11709}
11710_ACEOF
11711rm -f conftest.$ac_objext
11712if { (ac_try="$ac_compile"
11713case "(($ac_try" in
11714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11715 *) ac_try_echo=$ac_try;;
11716esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011718 (eval "$ac_compile") 2>conftest.er1
11719 ac_status=$?
11720 grep -v '^ *+' conftest.er1 >conftest.err
11721 rm -f conftest.er1
11722 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011724 (exit $ac_status); } && {
11725 test -z "$ac_c_werror_flag" ||
11726 test ! -s conftest.err
11727 } && test -s conftest.$ac_objext; then
11728
11729
11730cat >>confdefs.h <<\_ACEOF
11731#define HAVE_LONG_DOUBLE 1
11732_ACEOF
11733
11734 have_long_double=yes
11735
11736else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011737 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011738sed 's/^/| /' conftest.$ac_ext >&5
11739
11740
11741fi
11742
11743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011744{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11745echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011746if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011747{ echo "$as_me:$LINENO: checking for long double" >&5
11748echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11749if test "${ac_cv_type_long_double+set}" = set; then
11750 echo $ECHO_N "(cached) $ECHO_C" >&6
11751else
11752 cat >conftest.$ac_ext <<_ACEOF
11753/* confdefs.h. */
11754_ACEOF
11755cat confdefs.h >>conftest.$ac_ext
11756cat >>conftest.$ac_ext <<_ACEOF
11757/* end confdefs.h. */
11758$ac_includes_default
11759typedef long double ac__type_new_;
11760int
11761main ()
11762{
11763if ((ac__type_new_ *) 0)
11764 return 0;
11765if (sizeof (ac__type_new_))
11766 return 0;
11767 ;
11768 return 0;
11769}
11770_ACEOF
11771rm -f conftest.$ac_objext
11772if { (ac_try="$ac_compile"
11773case "(($ac_try" in
11774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11775 *) ac_try_echo=$ac_try;;
11776esac
11777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11778 (eval "$ac_compile") 2>conftest.er1
11779 ac_status=$?
11780 grep -v '^ *+' conftest.er1 >conftest.err
11781 rm -f conftest.er1
11782 cat conftest.err >&5
11783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11784 (exit $ac_status); } && {
11785 test -z "$ac_c_werror_flag" ||
11786 test ! -s conftest.err
11787 } && test -s conftest.$ac_objext; then
11788 ac_cv_type_long_double=yes
11789else
11790 echo "$as_me: failed program was:" >&5
11791sed 's/^/| /' conftest.$ac_ext >&5
11792
11793 ac_cv_type_long_double=no
11794fi
11795
11796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11797fi
11798{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11799echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11800
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011801# The cast to long int works around a bug in the HP C Compiler
11802# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11803# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11804# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011805{ echo "$as_me:$LINENO: checking size of long double" >&5
11806echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011807if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011808 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011809else
11810 if test "$cross_compiling" = yes; then
11811 # Depending upon the size, compute the lo and hi bounds.
11812cat >conftest.$ac_ext <<_ACEOF
11813/* confdefs.h. */
11814_ACEOF
11815cat confdefs.h >>conftest.$ac_ext
11816cat >>conftest.$ac_ext <<_ACEOF
11817/* end confdefs.h. */
11818$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011819 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011820int
11821main ()
11822{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011824test_array [0] = 0
11825
11826 ;
11827 return 0;
11828}
11829_ACEOF
11830rm -f conftest.$ac_objext
11831if { (ac_try="$ac_compile"
11832case "(($ac_try" in
11833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11834 *) ac_try_echo=$ac_try;;
11835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011837 (eval "$ac_compile") 2>conftest.er1
11838 ac_status=$?
11839 grep -v '^ *+' conftest.er1 >conftest.err
11840 rm -f conftest.er1
11841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011843 (exit $ac_status); } && {
11844 test -z "$ac_c_werror_flag" ||
11845 test ! -s conftest.err
11846 } && test -s conftest.$ac_objext; then
11847 ac_lo=0 ac_mid=0
11848 while :; do
11849 cat >conftest.$ac_ext <<_ACEOF
11850/* confdefs.h. */
11851_ACEOF
11852cat confdefs.h >>conftest.$ac_ext
11853cat >>conftest.$ac_ext <<_ACEOF
11854/* end confdefs.h. */
11855$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011856 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011857int
11858main ()
11859{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011860static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011861test_array [0] = 0
11862
11863 ;
11864 return 0;
11865}
11866_ACEOF
11867rm -f conftest.$ac_objext
11868if { (ac_try="$ac_compile"
11869case "(($ac_try" in
11870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11871 *) ac_try_echo=$ac_try;;
11872esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011874 (eval "$ac_compile") 2>conftest.er1
11875 ac_status=$?
11876 grep -v '^ *+' conftest.er1 >conftest.err
11877 rm -f conftest.er1
11878 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011880 (exit $ac_status); } && {
11881 test -z "$ac_c_werror_flag" ||
11882 test ! -s conftest.err
11883 } && test -s conftest.$ac_objext; then
11884 ac_hi=$ac_mid; break
11885else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011886 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011887sed 's/^/| /' conftest.$ac_ext >&5
11888
11889 ac_lo=`expr $ac_mid + 1`
11890 if test $ac_lo -le $ac_mid; then
11891 ac_lo= ac_hi=
11892 break
11893 fi
11894 ac_mid=`expr 2 '*' $ac_mid + 1`
11895fi
11896
11897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11898 done
11899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011900 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011901sed 's/^/| /' conftest.$ac_ext >&5
11902
11903 cat >conftest.$ac_ext <<_ACEOF
11904/* confdefs.h. */
11905_ACEOF
11906cat confdefs.h >>conftest.$ac_ext
11907cat >>conftest.$ac_ext <<_ACEOF
11908/* end confdefs.h. */
11909$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011910 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011911int
11912main ()
11913{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011914static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011915test_array [0] = 0
11916
11917 ;
11918 return 0;
11919}
11920_ACEOF
11921rm -f conftest.$ac_objext
11922if { (ac_try="$ac_compile"
11923case "(($ac_try" in
11924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11925 *) ac_try_echo=$ac_try;;
11926esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011928 (eval "$ac_compile") 2>conftest.er1
11929 ac_status=$?
11930 grep -v '^ *+' conftest.er1 >conftest.err
11931 rm -f conftest.er1
11932 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011934 (exit $ac_status); } && {
11935 test -z "$ac_c_werror_flag" ||
11936 test ! -s conftest.err
11937 } && test -s conftest.$ac_objext; then
11938 ac_hi=-1 ac_mid=-1
11939 while :; do
11940 cat >conftest.$ac_ext <<_ACEOF
11941/* confdefs.h. */
11942_ACEOF
11943cat confdefs.h >>conftest.$ac_ext
11944cat >>conftest.$ac_ext <<_ACEOF
11945/* end confdefs.h. */
11946$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011947 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011948int
11949main ()
11950{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011951static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011952test_array [0] = 0
11953
11954 ;
11955 return 0;
11956}
11957_ACEOF
11958rm -f conftest.$ac_objext
11959if { (ac_try="$ac_compile"
11960case "(($ac_try" in
11961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11962 *) ac_try_echo=$ac_try;;
11963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011965 (eval "$ac_compile") 2>conftest.er1
11966 ac_status=$?
11967 grep -v '^ *+' conftest.er1 >conftest.err
11968 rm -f conftest.er1
11969 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011971 (exit $ac_status); } && {
11972 test -z "$ac_c_werror_flag" ||
11973 test ! -s conftest.err
11974 } && test -s conftest.$ac_objext; then
11975 ac_lo=$ac_mid; break
11976else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011977 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011978sed 's/^/| /' conftest.$ac_ext >&5
11979
11980 ac_hi=`expr '(' $ac_mid ')' - 1`
11981 if test $ac_mid -le $ac_hi; then
11982 ac_lo= ac_hi=
11983 break
11984 fi
11985 ac_mid=`expr 2 '*' $ac_mid`
11986fi
11987
11988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11989 done
11990else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011991 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011992sed 's/^/| /' conftest.$ac_ext >&5
11993
11994 ac_lo= ac_hi=
11995fi
11996
11997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11998fi
11999
12000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12001# Binary search between lo and hi bounds.
12002while test "x$ac_lo" != "x$ac_hi"; do
12003 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12004 cat >conftest.$ac_ext <<_ACEOF
12005/* confdefs.h. */
12006_ACEOF
12007cat confdefs.h >>conftest.$ac_ext
12008cat >>conftest.$ac_ext <<_ACEOF
12009/* end confdefs.h. */
12010$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012011 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012012int
12013main ()
12014{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012015static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012016test_array [0] = 0
12017
12018 ;
12019 return 0;
12020}
12021_ACEOF
12022rm -f conftest.$ac_objext
12023if { (ac_try="$ac_compile"
12024case "(($ac_try" in
12025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12026 *) ac_try_echo=$ac_try;;
12027esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012029 (eval "$ac_compile") 2>conftest.er1
12030 ac_status=$?
12031 grep -v '^ *+' conftest.er1 >conftest.err
12032 rm -f conftest.er1
12033 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012035 (exit $ac_status); } && {
12036 test -z "$ac_c_werror_flag" ||
12037 test ! -s conftest.err
12038 } && test -s conftest.$ac_objext; then
12039 ac_hi=$ac_mid
12040else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012041 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012042sed 's/^/| /' conftest.$ac_ext >&5
12043
12044 ac_lo=`expr '(' $ac_mid ')' + 1`
12045fi
12046
12047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12048done
12049case $ac_lo in
12050?*) ac_cv_sizeof_long_double=$ac_lo;;
12051'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012052 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012053See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012054echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012055See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012056 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012057 else
12058 ac_cv_sizeof_long_double=0
12059 fi ;;
12060esac
12061else
12062 cat >conftest.$ac_ext <<_ACEOF
12063/* confdefs.h. */
12064_ACEOF
12065cat confdefs.h >>conftest.$ac_ext
12066cat >>conftest.$ac_ext <<_ACEOF
12067/* end confdefs.h. */
12068$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012069 typedef long double ac__type_sizeof_;
12070static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12071static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012072#include <stdio.h>
12073#include <stdlib.h>
12074int
12075main ()
12076{
12077
12078 FILE *f = fopen ("conftest.val", "w");
12079 if (! f)
12080 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012081 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012082 {
12083 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012084 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012085 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012086 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012087 }
12088 else
12089 {
12090 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012091 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012092 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012093 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012094 }
12095 return ferror (f) || fclose (f) != 0;
12096
12097 ;
12098 return 0;
12099}
12100_ACEOF
12101rm -f conftest$ac_exeext
12102if { (ac_try="$ac_link"
12103case "(($ac_try" in
12104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12105 *) ac_try_echo=$ac_try;;
12106esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012108 (eval "$ac_link") 2>&5
12109 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012111 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12112 { (case "(($ac_try" in
12113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12114 *) ac_try_echo=$ac_try;;
12115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012117 (eval "$ac_try") 2>&5
12118 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012120 (exit $ac_status); }; }; then
12121 ac_cv_sizeof_long_double=`cat conftest.val`
12122else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012123 echo "$as_me: program exited with status $ac_status" >&5
12124echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012125sed 's/^/| /' conftest.$ac_ext >&5
12126
12127( exit $ac_status )
12128if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012129 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012130See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012131echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012132See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012133 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012134 else
12135 ac_cv_sizeof_long_double=0
12136 fi
12137fi
12138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12139fi
12140rm -f conftest.val
12141fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012142{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12143echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012144
12145
12146
12147cat >>confdefs.h <<_ACEOF
12148#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12149_ACEOF
12150
12151
12152fi
12153
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012154{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12155echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012156have_c99_bool=no
12157cat >conftest.$ac_ext <<_ACEOF
12158/* confdefs.h. */
12159_ACEOF
12160cat confdefs.h >>conftest.$ac_ext
12161cat >>conftest.$ac_ext <<_ACEOF
12162/* end confdefs.h. */
12163
12164int
12165main ()
12166{
12167_Bool x; x = (_Bool)0;
12168 ;
12169 return 0;
12170}
12171_ACEOF
12172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012173if { (ac_try="$ac_compile"
12174case "(($ac_try" in
12175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12176 *) ac_try_echo=$ac_try;;
12177esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012180 ac_status=$?
12181 grep -v '^ *+' conftest.er1 >conftest.err
12182 rm -f conftest.er1
12183 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012185 (exit $ac_status); } && {
12186 test -z "$ac_c_werror_flag" ||
12187 test ! -s conftest.err
12188 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012189
12190
12191cat >>confdefs.h <<\_ACEOF
12192#define HAVE_C99_BOOL 1
12193_ACEOF
12194
12195 have_c99_bool=yes
12196
12197else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012198 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012199sed 's/^/| /' conftest.$ac_ext >&5
12200
Martin v. Löwiseba40652007-08-30 20:10:57 +000012201
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203
12204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012205{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12206echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012207if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012208{ echo "$as_me:$LINENO: checking for _Bool" >&5
12209echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12210if test "${ac_cv_type__Bool+set}" = set; then
12211 echo $ECHO_N "(cached) $ECHO_C" >&6
12212else
12213 cat >conftest.$ac_ext <<_ACEOF
12214/* confdefs.h. */
12215_ACEOF
12216cat confdefs.h >>conftest.$ac_ext
12217cat >>conftest.$ac_ext <<_ACEOF
12218/* end confdefs.h. */
12219$ac_includes_default
12220typedef _Bool ac__type_new_;
12221int
12222main ()
12223{
12224if ((ac__type_new_ *) 0)
12225 return 0;
12226if (sizeof (ac__type_new_))
12227 return 0;
12228 ;
12229 return 0;
12230}
12231_ACEOF
12232rm -f conftest.$ac_objext
12233if { (ac_try="$ac_compile"
12234case "(($ac_try" in
12235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12236 *) ac_try_echo=$ac_try;;
12237esac
12238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12239 (eval "$ac_compile") 2>conftest.er1
12240 ac_status=$?
12241 grep -v '^ *+' conftest.er1 >conftest.err
12242 rm -f conftest.er1
12243 cat conftest.err >&5
12244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12245 (exit $ac_status); } && {
12246 test -z "$ac_c_werror_flag" ||
12247 test ! -s conftest.err
12248 } && test -s conftest.$ac_objext; then
12249 ac_cv_type__Bool=yes
12250else
12251 echo "$as_me: failed program was:" >&5
12252sed 's/^/| /' conftest.$ac_ext >&5
12253
12254 ac_cv_type__Bool=no
12255fi
12256
12257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12258fi
12259{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12260echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12261
Martin v. Löwiseba40652007-08-30 20:10:57 +000012262# The cast to long int works around a bug in the HP C Compiler
12263# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12264# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12265# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012266{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12267echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012268if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012269 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012270else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012271 if test "$cross_compiling" = yes; then
12272 # Depending upon the size, compute the lo and hi bounds.
12273cat >conftest.$ac_ext <<_ACEOF
12274/* confdefs.h. */
12275_ACEOF
12276cat confdefs.h >>conftest.$ac_ext
12277cat >>conftest.$ac_ext <<_ACEOF
12278/* end confdefs.h. */
12279$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012280 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012281int
12282main ()
12283{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012284static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012285test_array [0] = 0
12286
12287 ;
12288 return 0;
12289}
12290_ACEOF
12291rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292if { (ac_try="$ac_compile"
12293case "(($ac_try" in
12294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12295 *) ac_try_echo=$ac_try;;
12296esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012299 ac_status=$?
12300 grep -v '^ *+' conftest.er1 >conftest.err
12301 rm -f conftest.er1
12302 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012304 (exit $ac_status); } && {
12305 test -z "$ac_c_werror_flag" ||
12306 test ! -s conftest.err
12307 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012308 ac_lo=0 ac_mid=0
12309 while :; do
12310 cat >conftest.$ac_ext <<_ACEOF
12311/* confdefs.h. */
12312_ACEOF
12313cat confdefs.h >>conftest.$ac_ext
12314cat >>conftest.$ac_ext <<_ACEOF
12315/* end confdefs.h. */
12316$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012317 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012318int
12319main ()
12320{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012321static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012322test_array [0] = 0
12323
12324 ;
12325 return 0;
12326}
12327_ACEOF
12328rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012329if { (ac_try="$ac_compile"
12330case "(($ac_try" in
12331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12332 *) ac_try_echo=$ac_try;;
12333esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012336 ac_status=$?
12337 grep -v '^ *+' conftest.er1 >conftest.err
12338 rm -f conftest.er1
12339 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012341 (exit $ac_status); } && {
12342 test -z "$ac_c_werror_flag" ||
12343 test ! -s conftest.err
12344 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012345 ac_hi=$ac_mid; break
12346else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012347 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012348sed 's/^/| /' conftest.$ac_ext >&5
12349
Martin v. Löwiseba40652007-08-30 20:10:57 +000012350 ac_lo=`expr $ac_mid + 1`
12351 if test $ac_lo -le $ac_mid; then
12352 ac_lo= ac_hi=
12353 break
12354 fi
12355 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357
12358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012359 done
12360else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012361 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012362sed 's/^/| /' conftest.$ac_ext >&5
12363
Martin v. Löwiseba40652007-08-30 20:10:57 +000012364 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012365/* confdefs.h. */
12366_ACEOF
12367cat confdefs.h >>conftest.$ac_ext
12368cat >>conftest.$ac_ext <<_ACEOF
12369/* end confdefs.h. */
12370$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012371 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012372int
12373main ()
12374{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012376test_array [0] = 0
12377
12378 ;
12379 return 0;
12380}
12381_ACEOF
12382rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012383if { (ac_try="$ac_compile"
12384case "(($ac_try" in
12385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12386 *) ac_try_echo=$ac_try;;
12387esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012390 ac_status=$?
12391 grep -v '^ *+' conftest.er1 >conftest.err
12392 rm -f conftest.er1
12393 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012395 (exit $ac_status); } && {
12396 test -z "$ac_c_werror_flag" ||
12397 test ! -s conftest.err
12398 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012399 ac_hi=-1 ac_mid=-1
12400 while :; do
12401 cat >conftest.$ac_ext <<_ACEOF
12402/* confdefs.h. */
12403_ACEOF
12404cat confdefs.h >>conftest.$ac_ext
12405cat >>conftest.$ac_ext <<_ACEOF
12406/* end confdefs.h. */
12407$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012408 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012409int
12410main ()
12411{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012413test_array [0] = 0
12414
12415 ;
12416 return 0;
12417}
12418_ACEOF
12419rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012420if { (ac_try="$ac_compile"
12421case "(($ac_try" in
12422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12423 *) ac_try_echo=$ac_try;;
12424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012427 ac_status=$?
12428 grep -v '^ *+' conftest.er1 >conftest.err
12429 rm -f conftest.er1
12430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432 (exit $ac_status); } && {
12433 test -z "$ac_c_werror_flag" ||
12434 test ! -s conftest.err
12435 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012436 ac_lo=$ac_mid; break
12437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012438 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012439sed 's/^/| /' conftest.$ac_ext >&5
12440
Martin v. Löwiseba40652007-08-30 20:10:57 +000012441 ac_hi=`expr '(' $ac_mid ')' - 1`
12442 if test $ac_mid -le $ac_hi; then
12443 ac_lo= ac_hi=
12444 break
12445 fi
12446 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448
12449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012450 done
12451else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012452 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012453sed 's/^/| /' conftest.$ac_ext >&5
12454
Martin v. Löwiseba40652007-08-30 20:10:57 +000012455 ac_lo= ac_hi=
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 +000012459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460
12461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012462# Binary search between lo and hi bounds.
12463while test "x$ac_lo" != "x$ac_hi"; do
12464 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12465 cat >conftest.$ac_ext <<_ACEOF
12466/* confdefs.h. */
12467_ACEOF
12468cat confdefs.h >>conftest.$ac_ext
12469cat >>conftest.$ac_ext <<_ACEOF
12470/* end confdefs.h. */
12471$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012472 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012473int
12474main ()
12475{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012476static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012477test_array [0] = 0
12478
12479 ;
12480 return 0;
12481}
12482_ACEOF
12483rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012484if { (ac_try="$ac_compile"
12485case "(($ac_try" in
12486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12487 *) ac_try_echo=$ac_try;;
12488esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012491 ac_status=$?
12492 grep -v '^ *+' conftest.er1 >conftest.err
12493 rm -f conftest.er1
12494 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012496 (exit $ac_status); } && {
12497 test -z "$ac_c_werror_flag" ||
12498 test ! -s conftest.err
12499 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012500 ac_hi=$ac_mid
12501else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012502 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012503sed 's/^/| /' conftest.$ac_ext >&5
12504
Martin v. Löwiseba40652007-08-30 20:10:57 +000012505 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012507
12508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012509done
12510case $ac_lo in
12511?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012512'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012513 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012514See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012515echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012516See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012517 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518 else
12519 ac_cv_sizeof__Bool=0
12520 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012521esac
12522else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012523 cat >conftest.$ac_ext <<_ACEOF
12524/* confdefs.h. */
12525_ACEOF
12526cat confdefs.h >>conftest.$ac_ext
12527cat >>conftest.$ac_ext <<_ACEOF
12528/* end confdefs.h. */
12529$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012530 typedef _Bool ac__type_sizeof_;
12531static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12532static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012533#include <stdio.h>
12534#include <stdlib.h>
12535int
12536main ()
12537{
12538
12539 FILE *f = fopen ("conftest.val", "w");
12540 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012542 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012543 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012544 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012545 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012546 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012547 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012548 }
12549 else
12550 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012551 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012552 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012553 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012554 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012555 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012556 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012557
12558 ;
12559 return 0;
12560}
12561_ACEOF
12562rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012563if { (ac_try="$ac_link"
12564case "(($ac_try" in
12565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12566 *) ac_try_echo=$ac_try;;
12567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012569 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012570 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012573 { (case "(($ac_try" in
12574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12575 *) ac_try_echo=$ac_try;;
12576esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012578 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012579 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012581 (exit $ac_status); }; }; then
12582 ac_cv_sizeof__Bool=`cat conftest.val`
12583else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012584 echo "$as_me: program exited with status $ac_status" >&5
12585echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012586sed 's/^/| /' conftest.$ac_ext >&5
12587
12588( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012589if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012590 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012591See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012592echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012593See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012594 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012595 else
12596 ac_cv_sizeof__Bool=0
12597 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012599rm -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 +000012600fi
12601rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012602fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012603{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12604echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012605
12606
12607
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012608cat >>confdefs.h <<_ACEOF
12609#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12610_ACEOF
12611
12612
12613fi
12614
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012615{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12616echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012617if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012618 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012619else
12620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012621/* confdefs.h. */
12622_ACEOF
12623cat confdefs.h >>conftest.$ac_ext
12624cat >>conftest.$ac_ext <<_ACEOF
12625/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012626#ifdef HAVE_STDINT_H
12627 #include <stdint.h>
12628 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012629
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012630typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012631int
12632main ()
12633{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012634if ((ac__type_new_ *) 0)
12635 return 0;
12636if (sizeof (ac__type_new_))
12637 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012638 ;
12639 return 0;
12640}
12641_ACEOF
12642rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012643if { (ac_try="$ac_compile"
12644case "(($ac_try" in
12645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12646 *) ac_try_echo=$ac_try;;
12647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012651 grep -v '^ *+' conftest.er1 >conftest.err
12652 rm -f conftest.er1
12653 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012655 (exit $ac_status); } && {
12656 test -z "$ac_c_werror_flag" ||
12657 test ! -s conftest.err
12658 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012659 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012660else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012662sed 's/^/| /' conftest.$ac_ext >&5
12663
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012664 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012666
12667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012668fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012669{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12670echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12671if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012672
12673cat >>confdefs.h <<_ACEOF
12674#define HAVE_UINTPTR_T 1
12675_ACEOF
12676
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012677{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12678echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12679if test "${ac_cv_type_uintptr_t+set}" = set; then
12680 echo $ECHO_N "(cached) $ECHO_C" >&6
12681else
12682 cat >conftest.$ac_ext <<_ACEOF
12683/* confdefs.h. */
12684_ACEOF
12685cat confdefs.h >>conftest.$ac_ext
12686cat >>conftest.$ac_ext <<_ACEOF
12687/* end confdefs.h. */
12688$ac_includes_default
12689typedef uintptr_t ac__type_new_;
12690int
12691main ()
12692{
12693if ((ac__type_new_ *) 0)
12694 return 0;
12695if (sizeof (ac__type_new_))
12696 return 0;
12697 ;
12698 return 0;
12699}
12700_ACEOF
12701rm -f conftest.$ac_objext
12702if { (ac_try="$ac_compile"
12703case "(($ac_try" in
12704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12705 *) ac_try_echo=$ac_try;;
12706esac
12707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12708 (eval "$ac_compile") 2>conftest.er1
12709 ac_status=$?
12710 grep -v '^ *+' conftest.er1 >conftest.err
12711 rm -f conftest.er1
12712 cat conftest.err >&5
12713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12714 (exit $ac_status); } && {
12715 test -z "$ac_c_werror_flag" ||
12716 test ! -s conftest.err
12717 } && test -s conftest.$ac_objext; then
12718 ac_cv_type_uintptr_t=yes
12719else
12720 echo "$as_me: failed program was:" >&5
12721sed 's/^/| /' conftest.$ac_ext >&5
12722
12723 ac_cv_type_uintptr_t=no
12724fi
12725
12726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12727fi
12728{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12729echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12730
Martin v. Löwiseba40652007-08-30 20:10:57 +000012731# The cast to long int works around a bug in the HP C Compiler
12732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12733# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12734# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012735{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12736echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012737if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012739else
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 if test "$cross_compiling" = yes; then
12741 # Depending upon the size, compute the lo and hi bounds.
12742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012743/* confdefs.h. */
12744_ACEOF
12745cat confdefs.h >>conftest.$ac_ext
12746cat >>conftest.$ac_ext <<_ACEOF
12747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012748$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012749 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012750int
12751main ()
12752{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012754test_array [0] = 0
12755
12756 ;
12757 return 0;
12758}
12759_ACEOF
12760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012761if { (ac_try="$ac_compile"
12762case "(($ac_try" in
12763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12764 *) ac_try_echo=$ac_try;;
12765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012769 grep -v '^ *+' conftest.er1 >conftest.err
12770 rm -f conftest.er1
12771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773 (exit $ac_status); } && {
12774 test -z "$ac_c_werror_flag" ||
12775 test ! -s conftest.err
12776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 ac_lo=0 ac_mid=0
12778 while :; do
12779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012780/* confdefs.h. */
12781_ACEOF
12782cat confdefs.h >>conftest.$ac_ext
12783cat >>conftest.$ac_ext <<_ACEOF
12784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012785$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012786 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012787int
12788main ()
12789{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012791test_array [0] = 0
12792
12793 ;
12794 return 0;
12795}
12796_ACEOF
12797rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798if { (ac_try="$ac_compile"
12799case "(($ac_try" in
12800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12801 *) ac_try_echo=$ac_try;;
12802esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012806 grep -v '^ *+' conftest.er1 >conftest.err
12807 rm -f conftest.er1
12808 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012810 (exit $ac_status); } && {
12811 test -z "$ac_c_werror_flag" ||
12812 test ! -s conftest.err
12813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 ac_hi=$ac_mid; break
12815else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012817sed 's/^/| /' conftest.$ac_ext >&5
12818
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819 ac_lo=`expr $ac_mid + 1`
12820 if test $ac_lo -le $ac_mid; then
12821 ac_lo= ac_hi=
12822 break
12823 fi
12824 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012826
12827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 done
12829else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012831sed 's/^/| /' conftest.$ac_ext >&5
12832
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012834/* confdefs.h. */
12835_ACEOF
12836cat confdefs.h >>conftest.$ac_ext
12837cat >>conftest.$ac_ext <<_ACEOF
12838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012839$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012840 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012841int
12842main ()
12843{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012844static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012845test_array [0] = 0
12846
12847 ;
12848 return 0;
12849}
12850_ACEOF
12851rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852if { (ac_try="$ac_compile"
12853case "(($ac_try" in
12854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12855 *) ac_try_echo=$ac_try;;
12856esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012858 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012860 grep -v '^ *+' conftest.er1 >conftest.err
12861 rm -f conftest.er1
12862 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864 (exit $ac_status); } && {
12865 test -z "$ac_c_werror_flag" ||
12866 test ! -s conftest.err
12867 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 ac_hi=-1 ac_mid=-1
12869 while :; do
12870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012871/* confdefs.h. */
12872_ACEOF
12873cat confdefs.h >>conftest.$ac_ext
12874cat >>conftest.$ac_ext <<_ACEOF
12875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012876$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012877 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012878int
12879main ()
12880{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012882test_array [0] = 0
12883
12884 ;
12885 return 0;
12886}
12887_ACEOF
12888rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012889if { (ac_try="$ac_compile"
12890case "(($ac_try" in
12891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12892 *) ac_try_echo=$ac_try;;
12893esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012897 grep -v '^ *+' conftest.er1 >conftest.err
12898 rm -f conftest.er1
12899 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 (exit $ac_status); } && {
12902 test -z "$ac_c_werror_flag" ||
12903 test ! -s conftest.err
12904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 ac_lo=$ac_mid; break
12906else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012908sed 's/^/| /' conftest.$ac_ext >&5
12909
Martin v. Löwiseba40652007-08-30 20:10:57 +000012910 ac_hi=`expr '(' $ac_mid ')' - 1`
12911 if test $ac_mid -le $ac_hi; then
12912 ac_lo= ac_hi=
12913 break
12914 fi
12915 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917
12918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 done
12920else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012922sed 's/^/| /' conftest.$ac_ext >&5
12923
Martin v. Löwiseba40652007-08-30 20:10:57 +000012924 ac_lo= ac_hi=
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 +000012928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012929
12930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012931# Binary search between lo and hi bounds.
12932while test "x$ac_lo" != "x$ac_hi"; do
12933 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012935/* confdefs.h. */
12936_ACEOF
12937cat confdefs.h >>conftest.$ac_ext
12938cat >>conftest.$ac_ext <<_ACEOF
12939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012940$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012941 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012942int
12943main ()
12944{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012945static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012946test_array [0] = 0
12947
12948 ;
12949 return 0;
12950}
12951_ACEOF
12952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012953if { (ac_try="$ac_compile"
12954case "(($ac_try" in
12955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12956 *) ac_try_echo=$ac_try;;
12957esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012961 grep -v '^ *+' conftest.er1 >conftest.err
12962 rm -f conftest.er1
12963 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012965 (exit $ac_status); } && {
12966 test -z "$ac_c_werror_flag" ||
12967 test ! -s conftest.err
12968 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ac_hi=$ac_mid
12970else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012972sed 's/^/| /' conftest.$ac_ext >&5
12973
Martin v. Löwiseba40652007-08-30 20:10:57 +000012974 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012976
12977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012978done
12979case $ac_lo in
12980?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012981'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012982 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012983See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012984echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012985See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012986 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012987 else
12988 ac_cv_sizeof_uintptr_t=0
12989 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012990esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012991else
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012993/* confdefs.h. */
12994_ACEOF
12995cat confdefs.h >>conftest.$ac_ext
12996cat >>conftest.$ac_ext <<_ACEOF
12997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012998$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012999 typedef uintptr_t ac__type_sizeof_;
13000static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13001static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013002#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013003#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013004int
13005main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013006{
Martin v. Löwis11437992002-04-12 09:54:03 +000013007
13008 FILE *f = fopen ("conftest.val", "w");
13009 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013011 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013013 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013014 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013015 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013016 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013017 }
13018 else
13019 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013020 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013021 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013022 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013023 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013025 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013026
13027 ;
13028 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013029}
Martin v. Löwis11437992002-04-12 09:54:03 +000013030_ACEOF
13031rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013032if { (ac_try="$ac_link"
13033case "(($ac_try" in
13034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13035 *) ac_try_echo=$ac_try;;
13036esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013038 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013039 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013041 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013042 { (case "(($ac_try" in
13043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13044 *) ac_try_echo=$ac_try;;
13045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013047 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013048 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013050 (exit $ac_status); }; }; then
13051 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013053 echo "$as_me: program exited with status $ac_status" >&5
13054echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013055sed 's/^/| /' conftest.$ac_ext >&5
13056
Martin v. Löwis11437992002-04-12 09:54:03 +000013057( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013058if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013059 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013060See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013061echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013062See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013063 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013064 else
13065 ac_cv_sizeof_uintptr_t=0
13066 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013068rm -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 +000013069fi
13070rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013071fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013072{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13073echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013074
13075
13076
Martin v. Löwis11437992002-04-12 09:54:03 +000013077cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013078#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013079_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013080
Michael W. Hudson54241132001-12-07 15:38:26 +000013081
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013082fi
13083
Martin v. Löwisebe26702006-10-02 14:55:51 +000013084
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013085{ echo "$as_me:$LINENO: checking for off_t" >&5
13086echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13087if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013088 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013089else
Martin v. Löwis11437992002-04-12 09:54:03 +000013090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013091/* confdefs.h. */
13092_ACEOF
13093cat confdefs.h >>conftest.$ac_ext
13094cat >>conftest.$ac_ext <<_ACEOF
13095/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013096
13097#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013098#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013099#endif
13100
13101
13102typedef off_t ac__type_new_;
13103int
13104main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013105{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013106if ((ac__type_new_ *) 0)
13107 return 0;
13108if (sizeof (ac__type_new_))
13109 return 0;
13110 ;
13111 return 0;
13112}
13113_ACEOF
13114rm -f conftest.$ac_objext
13115if { (ac_try="$ac_compile"
13116case "(($ac_try" in
13117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13118 *) ac_try_echo=$ac_try;;
13119esac
13120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13121 (eval "$ac_compile") 2>conftest.er1
13122 ac_status=$?
13123 grep -v '^ *+' conftest.er1 >conftest.err
13124 rm -f conftest.er1
13125 cat conftest.err >&5
13126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13127 (exit $ac_status); } && {
13128 test -z "$ac_c_werror_flag" ||
13129 test ! -s conftest.err
13130 } && test -s conftest.$ac_objext; then
13131 ac_cv_type_off_t=yes
13132else
13133 echo "$as_me: failed program was:" >&5
13134sed 's/^/| /' conftest.$ac_ext >&5
13135
13136 ac_cv_type_off_t=no
13137fi
13138
13139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13140fi
13141{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13142echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13143
13144# The cast to long int works around a bug in the HP C Compiler
13145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13147# This bug is HP SR number 8606223364.
13148{ echo "$as_me:$LINENO: checking size of off_t" >&5
13149echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13150if test "${ac_cv_sizeof_off_t+set}" = set; then
13151 echo $ECHO_N "(cached) $ECHO_C" >&6
13152else
13153 if test "$cross_compiling" = yes; then
13154 # Depending upon the size, compute the lo and hi bounds.
13155cat >conftest.$ac_ext <<_ACEOF
13156/* confdefs.h. */
13157_ACEOF
13158cat confdefs.h >>conftest.$ac_ext
13159cat >>conftest.$ac_ext <<_ACEOF
13160/* end confdefs.h. */
13161
13162#ifdef HAVE_SYS_TYPES_H
13163#include <sys/types.h>
13164#endif
13165
13166
13167 typedef off_t ac__type_sizeof_;
13168int
13169main ()
13170{
13171static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13172test_array [0] = 0
13173
13174 ;
13175 return 0;
13176}
13177_ACEOF
13178rm -f conftest.$ac_objext
13179if { (ac_try="$ac_compile"
13180case "(($ac_try" in
13181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13182 *) ac_try_echo=$ac_try;;
13183esac
13184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13185 (eval "$ac_compile") 2>conftest.er1
13186 ac_status=$?
13187 grep -v '^ *+' conftest.er1 >conftest.err
13188 rm -f conftest.er1
13189 cat conftest.err >&5
13190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13191 (exit $ac_status); } && {
13192 test -z "$ac_c_werror_flag" ||
13193 test ! -s conftest.err
13194 } && test -s conftest.$ac_objext; then
13195 ac_lo=0 ac_mid=0
13196 while :; do
13197 cat >conftest.$ac_ext <<_ACEOF
13198/* confdefs.h. */
13199_ACEOF
13200cat confdefs.h >>conftest.$ac_ext
13201cat >>conftest.$ac_ext <<_ACEOF
13202/* end confdefs.h. */
13203
13204#ifdef HAVE_SYS_TYPES_H
13205#include <sys/types.h>
13206#endif
13207
13208
13209 typedef off_t ac__type_sizeof_;
13210int
13211main ()
13212{
13213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13214test_array [0] = 0
13215
13216 ;
13217 return 0;
13218}
13219_ACEOF
13220rm -f conftest.$ac_objext
13221if { (ac_try="$ac_compile"
13222case "(($ac_try" in
13223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13224 *) ac_try_echo=$ac_try;;
13225esac
13226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13227 (eval "$ac_compile") 2>conftest.er1
13228 ac_status=$?
13229 grep -v '^ *+' conftest.er1 >conftest.err
13230 rm -f conftest.er1
13231 cat conftest.err >&5
13232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13233 (exit $ac_status); } && {
13234 test -z "$ac_c_werror_flag" ||
13235 test ! -s conftest.err
13236 } && test -s conftest.$ac_objext; then
13237 ac_hi=$ac_mid; break
13238else
13239 echo "$as_me: failed program was:" >&5
13240sed 's/^/| /' conftest.$ac_ext >&5
13241
13242 ac_lo=`expr $ac_mid + 1`
13243 if test $ac_lo -le $ac_mid; then
13244 ac_lo= ac_hi=
13245 break
13246 fi
13247 ac_mid=`expr 2 '*' $ac_mid + 1`
13248fi
13249
13250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13251 done
13252else
13253 echo "$as_me: failed program was:" >&5
13254sed 's/^/| /' conftest.$ac_ext >&5
13255
13256 cat >conftest.$ac_ext <<_ACEOF
13257/* confdefs.h. */
13258_ACEOF
13259cat confdefs.h >>conftest.$ac_ext
13260cat >>conftest.$ac_ext <<_ACEOF
13261/* end confdefs.h. */
13262
13263#ifdef HAVE_SYS_TYPES_H
13264#include <sys/types.h>
13265#endif
13266
13267
13268 typedef off_t ac__type_sizeof_;
13269int
13270main ()
13271{
13272static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13273test_array [0] = 0
13274
13275 ;
13276 return 0;
13277}
13278_ACEOF
13279rm -f conftest.$ac_objext
13280if { (ac_try="$ac_compile"
13281case "(($ac_try" in
13282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13283 *) ac_try_echo=$ac_try;;
13284esac
13285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13286 (eval "$ac_compile") 2>conftest.er1
13287 ac_status=$?
13288 grep -v '^ *+' conftest.er1 >conftest.err
13289 rm -f conftest.er1
13290 cat conftest.err >&5
13291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13292 (exit $ac_status); } && {
13293 test -z "$ac_c_werror_flag" ||
13294 test ! -s conftest.err
13295 } && test -s conftest.$ac_objext; then
13296 ac_hi=-1 ac_mid=-1
13297 while :; do
13298 cat >conftest.$ac_ext <<_ACEOF
13299/* confdefs.h. */
13300_ACEOF
13301cat confdefs.h >>conftest.$ac_ext
13302cat >>conftest.$ac_ext <<_ACEOF
13303/* end confdefs.h. */
13304
13305#ifdef HAVE_SYS_TYPES_H
13306#include <sys/types.h>
13307#endif
13308
13309
13310 typedef off_t ac__type_sizeof_;
13311int
13312main ()
13313{
13314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13315test_array [0] = 0
13316
13317 ;
13318 return 0;
13319}
13320_ACEOF
13321rm -f conftest.$ac_objext
13322if { (ac_try="$ac_compile"
13323case "(($ac_try" in
13324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13325 *) ac_try_echo=$ac_try;;
13326esac
13327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13328 (eval "$ac_compile") 2>conftest.er1
13329 ac_status=$?
13330 grep -v '^ *+' conftest.er1 >conftest.err
13331 rm -f conftest.er1
13332 cat conftest.err >&5
13333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13334 (exit $ac_status); } && {
13335 test -z "$ac_c_werror_flag" ||
13336 test ! -s conftest.err
13337 } && test -s conftest.$ac_objext; then
13338 ac_lo=$ac_mid; break
13339else
13340 echo "$as_me: failed program was:" >&5
13341sed 's/^/| /' conftest.$ac_ext >&5
13342
13343 ac_hi=`expr '(' $ac_mid ')' - 1`
13344 if test $ac_mid -le $ac_hi; then
13345 ac_lo= ac_hi=
13346 break
13347 fi
13348 ac_mid=`expr 2 '*' $ac_mid`
13349fi
13350
13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13352 done
13353else
13354 echo "$as_me: failed program was:" >&5
13355sed 's/^/| /' conftest.$ac_ext >&5
13356
13357 ac_lo= ac_hi=
13358fi
13359
13360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13361fi
13362
13363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13364# Binary search between lo and hi bounds.
13365while test "x$ac_lo" != "x$ac_hi"; do
13366 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13367 cat >conftest.$ac_ext <<_ACEOF
13368/* confdefs.h. */
13369_ACEOF
13370cat confdefs.h >>conftest.$ac_ext
13371cat >>conftest.$ac_ext <<_ACEOF
13372/* end confdefs.h. */
13373
13374#ifdef HAVE_SYS_TYPES_H
13375#include <sys/types.h>
13376#endif
13377
13378
13379 typedef off_t ac__type_sizeof_;
13380int
13381main ()
13382{
13383static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13384test_array [0] = 0
13385
13386 ;
13387 return 0;
13388}
13389_ACEOF
13390rm -f conftest.$ac_objext
13391if { (ac_try="$ac_compile"
13392case "(($ac_try" in
13393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13394 *) ac_try_echo=$ac_try;;
13395esac
13396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13397 (eval "$ac_compile") 2>conftest.er1
13398 ac_status=$?
13399 grep -v '^ *+' conftest.er1 >conftest.err
13400 rm -f conftest.er1
13401 cat conftest.err >&5
13402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13403 (exit $ac_status); } && {
13404 test -z "$ac_c_werror_flag" ||
13405 test ! -s conftest.err
13406 } && test -s conftest.$ac_objext; then
13407 ac_hi=$ac_mid
13408else
13409 echo "$as_me: failed program was:" >&5
13410sed 's/^/| /' conftest.$ac_ext >&5
13411
13412 ac_lo=`expr '(' $ac_mid ')' + 1`
13413fi
13414
13415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13416done
13417case $ac_lo in
13418?*) ac_cv_sizeof_off_t=$ac_lo;;
13419'') if test "$ac_cv_type_off_t" = yes; then
13420 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13421See \`config.log' for more details." >&5
13422echo "$as_me: error: cannot compute sizeof (off_t)
13423See \`config.log' for more details." >&2;}
13424 { (exit 77); exit 77; }; }
13425 else
13426 ac_cv_sizeof_off_t=0
13427 fi ;;
13428esac
13429else
13430 cat >conftest.$ac_ext <<_ACEOF
13431/* confdefs.h. */
13432_ACEOF
13433cat confdefs.h >>conftest.$ac_ext
13434cat >>conftest.$ac_ext <<_ACEOF
13435/* end confdefs.h. */
13436
13437#ifdef HAVE_SYS_TYPES_H
13438#include <sys/types.h>
13439#endif
13440
13441
13442 typedef off_t ac__type_sizeof_;
13443static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13444static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13445#include <stdio.h>
13446#include <stdlib.h>
13447int
13448main ()
13449{
13450
13451 FILE *f = fopen ("conftest.val", "w");
13452 if (! f)
13453 return 1;
13454 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13455 {
13456 long int i = longval ();
13457 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13458 return 1;
13459 fprintf (f, "%ld\n", i);
13460 }
13461 else
13462 {
13463 unsigned long int i = ulongval ();
13464 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13465 return 1;
13466 fprintf (f, "%lu\n", i);
13467 }
13468 return ferror (f) || fclose (f) != 0;
13469
13470 ;
13471 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013472}
Martin v. Löwis11437992002-04-12 09:54:03 +000013473_ACEOF
13474rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013475if { (ac_try="$ac_link"
13476case "(($ac_try" in
13477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13478 *) ac_try_echo=$ac_try;;
13479esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013481 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013482 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013485 { (case "(($ac_try" in
13486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13487 *) ac_try_echo=$ac_try;;
13488esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013490 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013491 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013494 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013495else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013496 echo "$as_me: program exited with status $ac_status" >&5
13497echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013498sed 's/^/| /' conftest.$ac_ext >&5
13499
Martin v. Löwis11437992002-04-12 09:54:03 +000013500( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013501if test "$ac_cv_type_off_t" = yes; then
13502 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13503See \`config.log' for more details." >&5
13504echo "$as_me: error: cannot compute sizeof (off_t)
13505See \`config.log' for more details." >&2;}
13506 { (exit 77); exit 77; }; }
13507 else
13508 ac_cv_sizeof_off_t=0
13509 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013511rm -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 +000013512fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013513rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013514fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013515{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13516echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013517
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013518
13519
Martin v. Löwis11437992002-04-12 09:54:03 +000013520cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013521#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013522_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013523
Michael W. Hudson54241132001-12-07 15:38:26 +000013524
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013526{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13527echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013528if test "$have_long_long" = yes
13529then
13530if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013531 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013532
Martin v. Löwis11437992002-04-12 09:54:03 +000013533cat >>confdefs.h <<\_ACEOF
13534#define HAVE_LARGEFILE_SUPPORT 1
13535_ACEOF
13536
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013537 { echo "$as_me:$LINENO: result: yes" >&5
13538echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013539else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013540 { echo "$as_me:$LINENO: result: no" >&5
13541echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013542fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013543else
13544 { echo "$as_me:$LINENO: result: no" >&5
13545echo "${ECHO_T}no" >&6; }
13546fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013547
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013548{ echo "$as_me:$LINENO: checking for time_t" >&5
13549echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13550if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013551 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013552else
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013554/* confdefs.h. */
13555_ACEOF
13556cat confdefs.h >>conftest.$ac_ext
13557cat >>conftest.$ac_ext <<_ACEOF
13558/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013559
13560#ifdef HAVE_SYS_TYPES_H
13561#include <sys/types.h>
13562#endif
13563#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013564#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013565#endif
13566
13567
13568typedef time_t ac__type_new_;
13569int
13570main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013571{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013572if ((ac__type_new_ *) 0)
13573 return 0;
13574if (sizeof (ac__type_new_))
13575 return 0;
13576 ;
13577 return 0;
13578}
13579_ACEOF
13580rm -f conftest.$ac_objext
13581if { (ac_try="$ac_compile"
13582case "(($ac_try" in
13583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13584 *) ac_try_echo=$ac_try;;
13585esac
13586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13587 (eval "$ac_compile") 2>conftest.er1
13588 ac_status=$?
13589 grep -v '^ *+' conftest.er1 >conftest.err
13590 rm -f conftest.er1
13591 cat conftest.err >&5
13592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13593 (exit $ac_status); } && {
13594 test -z "$ac_c_werror_flag" ||
13595 test ! -s conftest.err
13596 } && test -s conftest.$ac_objext; then
13597 ac_cv_type_time_t=yes
13598else
13599 echo "$as_me: failed program was:" >&5
13600sed 's/^/| /' conftest.$ac_ext >&5
13601
13602 ac_cv_type_time_t=no
13603fi
13604
13605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13606fi
13607{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13608echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13609
13610# The cast to long int works around a bug in the HP C Compiler
13611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13613# This bug is HP SR number 8606223364.
13614{ echo "$as_me:$LINENO: checking size of time_t" >&5
13615echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13616if test "${ac_cv_sizeof_time_t+set}" = set; then
13617 echo $ECHO_N "(cached) $ECHO_C" >&6
13618else
13619 if test "$cross_compiling" = yes; then
13620 # Depending upon the size, compute the lo and hi bounds.
13621cat >conftest.$ac_ext <<_ACEOF
13622/* confdefs.h. */
13623_ACEOF
13624cat confdefs.h >>conftest.$ac_ext
13625cat >>conftest.$ac_ext <<_ACEOF
13626/* end confdefs.h. */
13627
13628#ifdef HAVE_SYS_TYPES_H
13629#include <sys/types.h>
13630#endif
13631#ifdef HAVE_TIME_H
13632#include <time.h>
13633#endif
13634
13635
13636 typedef time_t ac__type_sizeof_;
13637int
13638main ()
13639{
13640static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13641test_array [0] = 0
13642
13643 ;
13644 return 0;
13645}
13646_ACEOF
13647rm -f conftest.$ac_objext
13648if { (ac_try="$ac_compile"
13649case "(($ac_try" in
13650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13651 *) ac_try_echo=$ac_try;;
13652esac
13653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13654 (eval "$ac_compile") 2>conftest.er1
13655 ac_status=$?
13656 grep -v '^ *+' conftest.er1 >conftest.err
13657 rm -f conftest.er1
13658 cat conftest.err >&5
13659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13660 (exit $ac_status); } && {
13661 test -z "$ac_c_werror_flag" ||
13662 test ! -s conftest.err
13663 } && test -s conftest.$ac_objext; then
13664 ac_lo=0 ac_mid=0
13665 while :; do
13666 cat >conftest.$ac_ext <<_ACEOF
13667/* confdefs.h. */
13668_ACEOF
13669cat confdefs.h >>conftest.$ac_ext
13670cat >>conftest.$ac_ext <<_ACEOF
13671/* end confdefs.h. */
13672
13673#ifdef HAVE_SYS_TYPES_H
13674#include <sys/types.h>
13675#endif
13676#ifdef HAVE_TIME_H
13677#include <time.h>
13678#endif
13679
13680
13681 typedef time_t ac__type_sizeof_;
13682int
13683main ()
13684{
13685static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13686test_array [0] = 0
13687
13688 ;
13689 return 0;
13690}
13691_ACEOF
13692rm -f conftest.$ac_objext
13693if { (ac_try="$ac_compile"
13694case "(($ac_try" in
13695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13696 *) ac_try_echo=$ac_try;;
13697esac
13698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13699 (eval "$ac_compile") 2>conftest.er1
13700 ac_status=$?
13701 grep -v '^ *+' conftest.er1 >conftest.err
13702 rm -f conftest.er1
13703 cat conftest.err >&5
13704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705 (exit $ac_status); } && {
13706 test -z "$ac_c_werror_flag" ||
13707 test ! -s conftest.err
13708 } && test -s conftest.$ac_objext; then
13709 ac_hi=$ac_mid; break
13710else
13711 echo "$as_me: failed program was:" >&5
13712sed 's/^/| /' conftest.$ac_ext >&5
13713
13714 ac_lo=`expr $ac_mid + 1`
13715 if test $ac_lo -le $ac_mid; then
13716 ac_lo= ac_hi=
13717 break
13718 fi
13719 ac_mid=`expr 2 '*' $ac_mid + 1`
13720fi
13721
13722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13723 done
13724else
13725 echo "$as_me: failed program was:" >&5
13726sed 's/^/| /' conftest.$ac_ext >&5
13727
13728 cat >conftest.$ac_ext <<_ACEOF
13729/* confdefs.h. */
13730_ACEOF
13731cat confdefs.h >>conftest.$ac_ext
13732cat >>conftest.$ac_ext <<_ACEOF
13733/* end confdefs.h. */
13734
13735#ifdef HAVE_SYS_TYPES_H
13736#include <sys/types.h>
13737#endif
13738#ifdef HAVE_TIME_H
13739#include <time.h>
13740#endif
13741
13742
13743 typedef time_t ac__type_sizeof_;
13744int
13745main ()
13746{
13747static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13748test_array [0] = 0
13749
13750 ;
13751 return 0;
13752}
13753_ACEOF
13754rm -f conftest.$ac_objext
13755if { (ac_try="$ac_compile"
13756case "(($ac_try" in
13757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13758 *) ac_try_echo=$ac_try;;
13759esac
13760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13761 (eval "$ac_compile") 2>conftest.er1
13762 ac_status=$?
13763 grep -v '^ *+' conftest.er1 >conftest.err
13764 rm -f conftest.er1
13765 cat conftest.err >&5
13766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13767 (exit $ac_status); } && {
13768 test -z "$ac_c_werror_flag" ||
13769 test ! -s conftest.err
13770 } && test -s conftest.$ac_objext; then
13771 ac_hi=-1 ac_mid=-1
13772 while :; do
13773 cat >conftest.$ac_ext <<_ACEOF
13774/* confdefs.h. */
13775_ACEOF
13776cat confdefs.h >>conftest.$ac_ext
13777cat >>conftest.$ac_ext <<_ACEOF
13778/* end confdefs.h. */
13779
13780#ifdef HAVE_SYS_TYPES_H
13781#include <sys/types.h>
13782#endif
13783#ifdef HAVE_TIME_H
13784#include <time.h>
13785#endif
13786
13787
13788 typedef time_t ac__type_sizeof_;
13789int
13790main ()
13791{
13792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13793test_array [0] = 0
13794
13795 ;
13796 return 0;
13797}
13798_ACEOF
13799rm -f conftest.$ac_objext
13800if { (ac_try="$ac_compile"
13801case "(($ac_try" in
13802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13803 *) ac_try_echo=$ac_try;;
13804esac
13805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13806 (eval "$ac_compile") 2>conftest.er1
13807 ac_status=$?
13808 grep -v '^ *+' conftest.er1 >conftest.err
13809 rm -f conftest.er1
13810 cat conftest.err >&5
13811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13812 (exit $ac_status); } && {
13813 test -z "$ac_c_werror_flag" ||
13814 test ! -s conftest.err
13815 } && test -s conftest.$ac_objext; then
13816 ac_lo=$ac_mid; break
13817else
13818 echo "$as_me: failed program was:" >&5
13819sed 's/^/| /' conftest.$ac_ext >&5
13820
13821 ac_hi=`expr '(' $ac_mid ')' - 1`
13822 if test $ac_mid -le $ac_hi; then
13823 ac_lo= ac_hi=
13824 break
13825 fi
13826 ac_mid=`expr 2 '*' $ac_mid`
13827fi
13828
13829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13830 done
13831else
13832 echo "$as_me: failed program was:" >&5
13833sed 's/^/| /' conftest.$ac_ext >&5
13834
13835 ac_lo= ac_hi=
13836fi
13837
13838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13839fi
13840
13841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13842# Binary search between lo and hi bounds.
13843while test "x$ac_lo" != "x$ac_hi"; do
13844 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13845 cat >conftest.$ac_ext <<_ACEOF
13846/* confdefs.h. */
13847_ACEOF
13848cat confdefs.h >>conftest.$ac_ext
13849cat >>conftest.$ac_ext <<_ACEOF
13850/* end confdefs.h. */
13851
13852#ifdef HAVE_SYS_TYPES_H
13853#include <sys/types.h>
13854#endif
13855#ifdef HAVE_TIME_H
13856#include <time.h>
13857#endif
13858
13859
13860 typedef time_t ac__type_sizeof_;
13861int
13862main ()
13863{
13864static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13865test_array [0] = 0
13866
13867 ;
13868 return 0;
13869}
13870_ACEOF
13871rm -f conftest.$ac_objext
13872if { (ac_try="$ac_compile"
13873case "(($ac_try" in
13874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13875 *) ac_try_echo=$ac_try;;
13876esac
13877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13878 (eval "$ac_compile") 2>conftest.er1
13879 ac_status=$?
13880 grep -v '^ *+' conftest.er1 >conftest.err
13881 rm -f conftest.er1
13882 cat conftest.err >&5
13883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13884 (exit $ac_status); } && {
13885 test -z "$ac_c_werror_flag" ||
13886 test ! -s conftest.err
13887 } && test -s conftest.$ac_objext; then
13888 ac_hi=$ac_mid
13889else
13890 echo "$as_me: failed program was:" >&5
13891sed 's/^/| /' conftest.$ac_ext >&5
13892
13893 ac_lo=`expr '(' $ac_mid ')' + 1`
13894fi
13895
13896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13897done
13898case $ac_lo in
13899?*) ac_cv_sizeof_time_t=$ac_lo;;
13900'') if test "$ac_cv_type_time_t" = yes; then
13901 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13902See \`config.log' for more details." >&5
13903echo "$as_me: error: cannot compute sizeof (time_t)
13904See \`config.log' for more details." >&2;}
13905 { (exit 77); exit 77; }; }
13906 else
13907 ac_cv_sizeof_time_t=0
13908 fi ;;
13909esac
13910else
13911 cat >conftest.$ac_ext <<_ACEOF
13912/* confdefs.h. */
13913_ACEOF
13914cat confdefs.h >>conftest.$ac_ext
13915cat >>conftest.$ac_ext <<_ACEOF
13916/* end confdefs.h. */
13917
13918#ifdef HAVE_SYS_TYPES_H
13919#include <sys/types.h>
13920#endif
13921#ifdef HAVE_TIME_H
13922#include <time.h>
13923#endif
13924
13925
13926 typedef time_t ac__type_sizeof_;
13927static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13928static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13929#include <stdio.h>
13930#include <stdlib.h>
13931int
13932main ()
13933{
13934
13935 FILE *f = fopen ("conftest.val", "w");
13936 if (! f)
13937 return 1;
13938 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13939 {
13940 long int i = longval ();
13941 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13942 return 1;
13943 fprintf (f, "%ld\n", i);
13944 }
13945 else
13946 {
13947 unsigned long int i = ulongval ();
13948 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13949 return 1;
13950 fprintf (f, "%lu\n", i);
13951 }
13952 return ferror (f) || fclose (f) != 0;
13953
13954 ;
13955 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013956}
Martin v. Löwis11437992002-04-12 09:54:03 +000013957_ACEOF
13958rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013959if { (ac_try="$ac_link"
13960case "(($ac_try" in
13961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13962 *) ac_try_echo=$ac_try;;
13963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013965 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013966 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013968 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013969 { (case "(($ac_try" in
13970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13971 *) ac_try_echo=$ac_try;;
13972esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013974 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013977 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013978 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013979else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013980 echo "$as_me: program exited with status $ac_status" >&5
13981echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013982sed 's/^/| /' conftest.$ac_ext >&5
13983
Martin v. Löwis11437992002-04-12 09:54:03 +000013984( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013985if test "$ac_cv_type_time_t" = yes; then
13986 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13987See \`config.log' for more details." >&5
13988echo "$as_me: error: cannot compute sizeof (time_t)
13989See \`config.log' for more details." >&2;}
13990 { (exit 77); exit 77; }; }
13991 else
13992 ac_cv_sizeof_time_t=0
13993 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995rm -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 +000013996fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013997rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013998fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013999{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14000echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014002
14003
Martin v. Löwis11437992002-04-12 09:54:03 +000014004cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014005#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014006_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014007
Michael W. Hudson54241132001-12-07 15:38:26 +000014008
14009
Trent Mick635f6fb2000-08-23 21:33:05 +000014010# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014011ac_save_cc="$CC"
14012if test "$ac_cv_kpthread" = "yes"
14013then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014014elif test "$ac_cv_kthread" = "yes"
14015then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014016elif test "$ac_cv_pthread" = "yes"
14017then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014018fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014019{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14020echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014021have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014022cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014023/* confdefs.h. */
14024_ACEOF
14025cat confdefs.h >>conftest.$ac_ext
14026cat >>conftest.$ac_ext <<_ACEOF
14027/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014028#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014029int
14030main ()
14031{
Guido van Rossum12580492000-09-24 16:47:19 +000014032pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 ;
14034 return 0;
14035}
14036_ACEOF
14037rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014038if { (ac_try="$ac_compile"
14039case "(($ac_try" in
14040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14041 *) ac_try_echo=$ac_try;;
14042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014046 grep -v '^ *+' conftest.er1 >conftest.err
14047 rm -f conftest.er1
14048 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014050 (exit $ac_status); } && {
14051 test -z "$ac_c_werror_flag" ||
14052 test ! -s conftest.err
14053 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014054 have_pthread_t=yes
14055else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014057sed 's/^/| /' conftest.$ac_ext >&5
14058
Martin v. Löwiseba40652007-08-30 20:10:57 +000014059
Trent Mick635f6fb2000-08-23 21:33:05 +000014060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014061
14062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014063{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14064echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014065if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014066 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14067echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14068if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014069 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014070else
Martin v. Löwis11437992002-04-12 09:54:03 +000014071 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014072/* confdefs.h. */
14073_ACEOF
14074cat confdefs.h >>conftest.$ac_ext
14075cat >>conftest.$ac_ext <<_ACEOF
14076/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014077
14078#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014079#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014080#endif
14081
14082
14083typedef pthread_t ac__type_new_;
14084int
14085main ()
14086{
14087if ((ac__type_new_ *) 0)
14088 return 0;
14089if (sizeof (ac__type_new_))
14090 return 0;
14091 ;
14092 return 0;
14093}
14094_ACEOF
14095rm -f conftest.$ac_objext
14096if { (ac_try="$ac_compile"
14097case "(($ac_try" in
14098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14099 *) ac_try_echo=$ac_try;;
14100esac
14101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14102 (eval "$ac_compile") 2>conftest.er1
14103 ac_status=$?
14104 grep -v '^ *+' conftest.er1 >conftest.err
14105 rm -f conftest.er1
14106 cat conftest.err >&5
14107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14108 (exit $ac_status); } && {
14109 test -z "$ac_c_werror_flag" ||
14110 test ! -s conftest.err
14111 } && test -s conftest.$ac_objext; then
14112 ac_cv_type_pthread_t=yes
14113else
14114 echo "$as_me: failed program was:" >&5
14115sed 's/^/| /' conftest.$ac_ext >&5
14116
14117 ac_cv_type_pthread_t=no
14118fi
14119
14120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14121fi
14122{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14123echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14124
14125# The cast to long int works around a bug in the HP C Compiler
14126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14128# This bug is HP SR number 8606223364.
14129{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14130echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14131if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14132 echo $ECHO_N "(cached) $ECHO_C" >&6
14133else
14134 if test "$cross_compiling" = yes; then
14135 # Depending upon the size, compute the lo and hi bounds.
14136cat >conftest.$ac_ext <<_ACEOF
14137/* confdefs.h. */
14138_ACEOF
14139cat confdefs.h >>conftest.$ac_ext
14140cat >>conftest.$ac_ext <<_ACEOF
14141/* end confdefs.h. */
14142
14143#ifdef HAVE_PTHREAD_H
14144#include <pthread.h>
14145#endif
14146
14147
14148 typedef pthread_t ac__type_sizeof_;
14149int
14150main ()
14151{
14152static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14153test_array [0] = 0
14154
14155 ;
14156 return 0;
14157}
14158_ACEOF
14159rm -f conftest.$ac_objext
14160if { (ac_try="$ac_compile"
14161case "(($ac_try" in
14162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14163 *) ac_try_echo=$ac_try;;
14164esac
14165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14166 (eval "$ac_compile") 2>conftest.er1
14167 ac_status=$?
14168 grep -v '^ *+' conftest.er1 >conftest.err
14169 rm -f conftest.er1
14170 cat conftest.err >&5
14171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14172 (exit $ac_status); } && {
14173 test -z "$ac_c_werror_flag" ||
14174 test ! -s conftest.err
14175 } && test -s conftest.$ac_objext; then
14176 ac_lo=0 ac_mid=0
14177 while :; do
14178 cat >conftest.$ac_ext <<_ACEOF
14179/* confdefs.h. */
14180_ACEOF
14181cat confdefs.h >>conftest.$ac_ext
14182cat >>conftest.$ac_ext <<_ACEOF
14183/* end confdefs.h. */
14184
14185#ifdef HAVE_PTHREAD_H
14186#include <pthread.h>
14187#endif
14188
14189
14190 typedef pthread_t ac__type_sizeof_;
14191int
14192main ()
14193{
14194static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14195test_array [0] = 0
14196
14197 ;
14198 return 0;
14199}
14200_ACEOF
14201rm -f conftest.$ac_objext
14202if { (ac_try="$ac_compile"
14203case "(($ac_try" in
14204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14205 *) ac_try_echo=$ac_try;;
14206esac
14207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14208 (eval "$ac_compile") 2>conftest.er1
14209 ac_status=$?
14210 grep -v '^ *+' conftest.er1 >conftest.err
14211 rm -f conftest.er1
14212 cat conftest.err >&5
14213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14214 (exit $ac_status); } && {
14215 test -z "$ac_c_werror_flag" ||
14216 test ! -s conftest.err
14217 } && test -s conftest.$ac_objext; then
14218 ac_hi=$ac_mid; break
14219else
14220 echo "$as_me: failed program was:" >&5
14221sed 's/^/| /' conftest.$ac_ext >&5
14222
14223 ac_lo=`expr $ac_mid + 1`
14224 if test $ac_lo -le $ac_mid; then
14225 ac_lo= ac_hi=
14226 break
14227 fi
14228 ac_mid=`expr 2 '*' $ac_mid + 1`
14229fi
14230
14231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14232 done
14233else
14234 echo "$as_me: failed program was:" >&5
14235sed 's/^/| /' conftest.$ac_ext >&5
14236
14237 cat >conftest.$ac_ext <<_ACEOF
14238/* confdefs.h. */
14239_ACEOF
14240cat confdefs.h >>conftest.$ac_ext
14241cat >>conftest.$ac_ext <<_ACEOF
14242/* end confdefs.h. */
14243
14244#ifdef HAVE_PTHREAD_H
14245#include <pthread.h>
14246#endif
14247
14248
14249 typedef pthread_t ac__type_sizeof_;
14250int
14251main ()
14252{
14253static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14254test_array [0] = 0
14255
14256 ;
14257 return 0;
14258}
14259_ACEOF
14260rm -f conftest.$ac_objext
14261if { (ac_try="$ac_compile"
14262case "(($ac_try" in
14263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14264 *) ac_try_echo=$ac_try;;
14265esac
14266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14267 (eval "$ac_compile") 2>conftest.er1
14268 ac_status=$?
14269 grep -v '^ *+' conftest.er1 >conftest.err
14270 rm -f conftest.er1
14271 cat conftest.err >&5
14272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14273 (exit $ac_status); } && {
14274 test -z "$ac_c_werror_flag" ||
14275 test ! -s conftest.err
14276 } && test -s conftest.$ac_objext; then
14277 ac_hi=-1 ac_mid=-1
14278 while :; do
14279 cat >conftest.$ac_ext <<_ACEOF
14280/* confdefs.h. */
14281_ACEOF
14282cat confdefs.h >>conftest.$ac_ext
14283cat >>conftest.$ac_ext <<_ACEOF
14284/* end confdefs.h. */
14285
14286#ifdef HAVE_PTHREAD_H
14287#include <pthread.h>
14288#endif
14289
14290
14291 typedef pthread_t ac__type_sizeof_;
14292int
14293main ()
14294{
14295static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14296test_array [0] = 0
14297
14298 ;
14299 return 0;
14300}
14301_ACEOF
14302rm -f conftest.$ac_objext
14303if { (ac_try="$ac_compile"
14304case "(($ac_try" in
14305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14306 *) ac_try_echo=$ac_try;;
14307esac
14308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14309 (eval "$ac_compile") 2>conftest.er1
14310 ac_status=$?
14311 grep -v '^ *+' conftest.er1 >conftest.err
14312 rm -f conftest.er1
14313 cat conftest.err >&5
14314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14315 (exit $ac_status); } && {
14316 test -z "$ac_c_werror_flag" ||
14317 test ! -s conftest.err
14318 } && test -s conftest.$ac_objext; then
14319 ac_lo=$ac_mid; break
14320else
14321 echo "$as_me: failed program was:" >&5
14322sed 's/^/| /' conftest.$ac_ext >&5
14323
14324 ac_hi=`expr '(' $ac_mid ')' - 1`
14325 if test $ac_mid -le $ac_hi; then
14326 ac_lo= ac_hi=
14327 break
14328 fi
14329 ac_mid=`expr 2 '*' $ac_mid`
14330fi
14331
14332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14333 done
14334else
14335 echo "$as_me: failed program was:" >&5
14336sed 's/^/| /' conftest.$ac_ext >&5
14337
14338 ac_lo= ac_hi=
14339fi
14340
14341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14342fi
14343
14344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14345# Binary search between lo and hi bounds.
14346while test "x$ac_lo" != "x$ac_hi"; do
14347 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14348 cat >conftest.$ac_ext <<_ACEOF
14349/* confdefs.h. */
14350_ACEOF
14351cat confdefs.h >>conftest.$ac_ext
14352cat >>conftest.$ac_ext <<_ACEOF
14353/* end confdefs.h. */
14354
14355#ifdef HAVE_PTHREAD_H
14356#include <pthread.h>
14357#endif
14358
14359
14360 typedef pthread_t ac__type_sizeof_;
14361int
14362main ()
14363{
14364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14365test_array [0] = 0
14366
14367 ;
14368 return 0;
14369}
14370_ACEOF
14371rm -f conftest.$ac_objext
14372if { (ac_try="$ac_compile"
14373case "(($ac_try" in
14374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14375 *) ac_try_echo=$ac_try;;
14376esac
14377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14378 (eval "$ac_compile") 2>conftest.er1
14379 ac_status=$?
14380 grep -v '^ *+' conftest.er1 >conftest.err
14381 rm -f conftest.er1
14382 cat conftest.err >&5
14383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14384 (exit $ac_status); } && {
14385 test -z "$ac_c_werror_flag" ||
14386 test ! -s conftest.err
14387 } && test -s conftest.$ac_objext; then
14388 ac_hi=$ac_mid
14389else
14390 echo "$as_me: failed program was:" >&5
14391sed 's/^/| /' conftest.$ac_ext >&5
14392
14393 ac_lo=`expr '(' $ac_mid ')' + 1`
14394fi
14395
14396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14397done
14398case $ac_lo in
14399?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14400'') if test "$ac_cv_type_pthread_t" = yes; then
14401 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14402See \`config.log' for more details." >&5
14403echo "$as_me: error: cannot compute sizeof (pthread_t)
14404See \`config.log' for more details." >&2;}
14405 { (exit 77); exit 77; }; }
14406 else
14407 ac_cv_sizeof_pthread_t=0
14408 fi ;;
14409esac
14410else
14411 cat >conftest.$ac_ext <<_ACEOF
14412/* confdefs.h. */
14413_ACEOF
14414cat confdefs.h >>conftest.$ac_ext
14415cat >>conftest.$ac_ext <<_ACEOF
14416/* end confdefs.h. */
14417
14418#ifdef HAVE_PTHREAD_H
14419#include <pthread.h>
14420#endif
14421
14422
14423 typedef pthread_t ac__type_sizeof_;
14424static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14425static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14426#include <stdio.h>
14427#include <stdlib.h>
14428int
14429main ()
14430{
14431
14432 FILE *f = fopen ("conftest.val", "w");
14433 if (! f)
14434 return 1;
14435 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14436 {
14437 long int i = longval ();
14438 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14439 return 1;
14440 fprintf (f, "%ld\n", i);
14441 }
14442 else
14443 {
14444 unsigned long int i = ulongval ();
14445 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14446 return 1;
14447 fprintf (f, "%lu\n", i);
14448 }
14449 return ferror (f) || fclose (f) != 0;
14450
14451 ;
14452 return 0;
14453}
Martin v. Löwis11437992002-04-12 09:54:03 +000014454_ACEOF
14455rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014456if { (ac_try="$ac_link"
14457case "(($ac_try" in
14458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14459 *) ac_try_echo=$ac_try;;
14460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014462 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014463 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466 { (case "(($ac_try" in
14467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14468 *) ac_try_echo=$ac_try;;
14469esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014474 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014475 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014476else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014477 echo "$as_me: program exited with status $ac_status" >&5
14478echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014479sed 's/^/| /' conftest.$ac_ext >&5
14480
Martin v. Löwis11437992002-04-12 09:54:03 +000014481( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014482if test "$ac_cv_type_pthread_t" = yes; then
14483 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14484See \`config.log' for more details." >&5
14485echo "$as_me: error: cannot compute sizeof (pthread_t)
14486See \`config.log' for more details." >&2;}
14487 { (exit 77); exit 77; }; }
14488 else
14489 ac_cv_sizeof_pthread_t=0
14490 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014492rm -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 +000014493fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014494rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014495fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014496{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014497echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014498
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014499
14500
Martin v. Löwis11437992002-04-12 09:54:03 +000014501cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014502#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014503_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014504
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014505
Trent Mick635f6fb2000-08-23 21:33:05 +000014506fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014507CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014509{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14510echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014511# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014512if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014513 enableval=$enable_toolbox_glue;
14514fi
Jack Jansene578a632001-08-15 01:27:14 +000014515
14516
14517if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014518then
Jack Jansene578a632001-08-15 01:27:14 +000014519 case $ac_sys_system/$ac_sys_release in
14520 Darwin/*)
14521 enable_toolbox_glue="yes";;
14522 *)
14523 enable_toolbox_glue="no";;
14524 esac
14525fi
14526case "$enable_toolbox_glue" in
14527yes)
Jack Jansene578a632001-08-15 01:27:14 +000014528 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014529 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014530
14531cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014532#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014533_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014534
14535 ;;
14536*)
Jack Jansene578a632001-08-15 01:27:14 +000014537 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014538 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014539 ;;
14540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014541{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14542echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014543
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014544
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014545
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014546case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014547 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014548 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14549 ;;
14550 Darwin/*)
14551 OTHER_LIBTOOL_OPT=""
14552 ;;
14553esac
14554
14555
Ronald Oussoren25967582009-09-06 10:00:26 +000014556ARCH_RUN_32BIT=""
14557
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014558case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014559 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014560 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14561 if test "${enable_universalsdk}"; then
14562 :
14563 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014564 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014565 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014566 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014567 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014568 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +000014569 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014570 if test ${gcc_version} '<' 4.0
14571 then
14572 LIBTOOL_CRUFT="-lcc_dynamic"
14573 else
14574 LIBTOOL_CRUFT=""
14575 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014576 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014577 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014578else
14579 cat >conftest.$ac_ext <<_ACEOF
14580/* confdefs.h. */
14581_ACEOF
14582cat confdefs.h >>conftest.$ac_ext
14583cat >>conftest.$ac_ext <<_ACEOF
14584/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014585
Ronald Oussoren25967582009-09-06 10:00:26 +000014586 #include <unistd.h>
14587 int main(int argc, char*argv[])
14588 {
14589 if (sizeof(long) == 4) {
14590 return 0;
14591 } else {
14592 return 1;
14593 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014594 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014595
Ronald Oussoren25967582009-09-06 10:00:26 +000014596_ACEOF
14597rm -f conftest$ac_exeext
14598if { (ac_try="$ac_link"
14599case "(($ac_try" in
14600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14601 *) ac_try_echo=$ac_try;;
14602esac
14603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14604 (eval "$ac_link") 2>&5
14605 ac_status=$?
14606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14607 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14608 { (case "(($ac_try" in
14609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14610 *) ac_try_echo=$ac_try;;
14611esac
14612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14613 (eval "$ac_try") 2>&5
14614 ac_status=$?
14615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14616 (exit $ac_status); }; }; then
14617 ac_osx_32bit=yes
14618else
14619 echo "$as_me: program exited with status $ac_status" >&5
14620echo "$as_me: failed program was:" >&5
14621sed 's/^/| /' conftest.$ac_ext >&5
14622
14623( exit $ac_status )
14624ac_osx_32bit=no
14625fi
14626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14627fi
14628
14629
14630
14631 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014632 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014633 i386)
14634 MACOSX_DEFAULT_ARCH="i386"
14635 ;;
14636 ppc)
14637 MACOSX_DEFAULT_ARCH="ppc"
14638 ;;
14639 *)
14640 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14641echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14642 { (exit 1); exit 1; }; }
14643 ;;
14644 esac
14645 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014646 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014647 i386)
14648 MACOSX_DEFAULT_ARCH="x86_64"
14649 ;;
14650 ppc)
14651 MACOSX_DEFAULT_ARCH="ppc64"
14652 ;;
14653 *)
14654 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14655echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14656 { (exit 1); exit 1; }; }
14657 ;;
14658 esac
14659
14660 #ARCH_RUN_32BIT="true"
14661 fi
14662
14663 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014664 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014665 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014666esac
14667
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014668{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14669echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014670if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014671then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014672 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014673 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014674 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014675
Martin v. Löwis11437992002-04-12 09:54:03 +000014676cat >>confdefs.h <<\_ACEOF
14677#define WITH_NEXT_FRAMEWORK 1
14678_ACEOF
14679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014680 { echo "$as_me:$LINENO: result: yes" >&5
14681echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014682 if test $enable_shared = "yes"
14683 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014684 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14685echo "$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 +000014686 { (exit 1); exit 1; }; }
14687 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014689 { echo "$as_me:$LINENO: result: no" >&5
14690echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014691fi
14692
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014693{ echo "$as_me:$LINENO: checking for dyld" >&5
14694echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014695case $ac_sys_system/$ac_sys_release in
14696 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014697
Martin v. Löwis11437992002-04-12 09:54:03 +000014698cat >>confdefs.h <<\_ACEOF
14699#define WITH_DYLD 1
14700_ACEOF
14701
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014702 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14703echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014704 ;;
14705 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014706 { echo "$as_me:$LINENO: result: no" >&5
14707echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014708 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014709esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014710
Guido van Rossum0a516c91994-09-12 10:58:40 +000014711# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014712
Michael W. Hudson54241132001-12-07 15:38:26 +000014713
14714
14715
14716
Ronald Oussoren75912852010-04-08 08:13:31 +000014717
Guido van Rossum0a516c91994-09-12 10:58:40 +000014718# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014719# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014720{ echo "$as_me:$LINENO: checking SO" >&5
14721echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014722if test -z "$SO"
14723then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014724 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014725 hp*|HP*)
14726 case `uname -m` in
14727 ia64) SO=.so;;
14728 *) SO=.sl;;
14729 esac
14730 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014731 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014732 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014733 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014734else
14735 # this might also be a termcap variable, see #610332
14736 echo
14737 echo '====================================================================='
14738 echo '+ +'
14739 echo '+ WARNING: You have set SO in your environment. +'
14740 echo '+ Do you really mean to change the extension for shared libraries? +'
14741 echo '+ Continuing in 10 seconds to let you to ponder. +'
14742 echo '+ +'
14743 echo '====================================================================='
14744 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014745fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014746{ echo "$as_me:$LINENO: result: $SO" >&5
14747echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014748
Ronald Oussoren79f90492009-01-02 10:44:46 +000014749
Neal Norwitz58e28882006-05-19 07:00:58 +000014750cat >>confdefs.h <<_ACEOF
14751#define SHLIB_EXT "$SO"
14752_ACEOF
14753
Guido van Rossum0a516c91994-09-12 10:58:40 +000014754# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014755# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014756# (Shared libraries in this instance are shared modules to be loaded into
14757# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014758{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14759echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014760if test -z "$LDSHARED"
14761then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014762 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014763 AIX*)
14764 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014765 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014766 ;;
14767 BeOS*)
14768 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014769 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014770 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014771 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014772 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014773 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014774 if test "$GCC" = "yes" ; then
14775 LDSHARED='$(CC) -shared'
14776 LDCXXSHARED='$(CXX) -shared'
14777 else
14778 LDSHARED='$(CC) -G'
14779 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +000014780 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014781 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014782 if test "$GCC" = "yes" ; then
14783 LDSHARED='$(CC) -shared'
14784 LDCXXSHARED='$(CXX) -shared'
14785 else
14786 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +000014787 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014788 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014789 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014790 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014791 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000014792 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)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014796 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014797 else
14798 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014799 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +000014800 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014801 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014802 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014803 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014804 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000014805 if test "$enable_framework" ; then
14806 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014807 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14808 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014809 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014810 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014811 # No framework, use the Python app as bundle-loader
14812 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014813 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014814 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014815 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014816 Darwin/*)
14817 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14818 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014819
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014820 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014821 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014822 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014823 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014824 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014825 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Ronald Oussoren75912852010-04-08 08:13:31 +000014826 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +000014827 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014828 else
14829 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014830 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +000014831 if test "$enable_framework" ; then
14832 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014833 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14834 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014835 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014836 else
14837 # No framework, use the Python app as bundle-loader
14838 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14839 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014840 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014841 fi
14842 fi
14843 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014844 Linux*|GNU*|QNX*)
14845 LDSHARED='$(CC) -shared'
14846 LDCXXSHARED='$(CXX) -shared';;
14847 BSD/OS*/4*)
14848 LDSHARED="gcc -shared"
14849 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014850 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014851 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014852 then
Benjamin Peterson3b2abe92010-03-14 15:06:14 +000014853 LDSHARED='$(CC) -shared ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014854 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000014855 else
14856 LDSHARED="ld -Bshareable ${LDFLAGS}"
14857 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014858 OpenBSD*)
14859 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14860 then
14861 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014862 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +000014863 else
14864 case `uname -r` in
14865 [01].* | 2.[0-7] | 2.[0-7].*)
14866 LDSHARED="ld -Bshareable ${LDFLAGS}"
14867 ;;
14868 *)
14869 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014870 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +000014871 ;;
14872 esac
14873 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014874 NetBSD*|DragonFly*)
14875 LDSHARED="cc -shared ${LDFLAGS}"
14876 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014877 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014878 if test "$GCC" = "yes" ; then
14879 LDSHARED='$(CC) -shared'
14880 LDCXXSHARED='$(CXX) -shared'
14881 else
14882 LDSHARED='$(CC) -G'
14883 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014884 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014885 SCO_SV*)
14886 LDSHARED='$(CC) -Wl,-G,-Bexport'
14887 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
14888 CYGWIN*)
14889 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
14890 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
14891 atheos*)
14892 LDSHARED="gcc -shared"
14893 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014894 *) LDSHARED="ld";;
14895 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014896fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014897{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14898echo "${ECHO_T}$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +000014899LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014900BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014901# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014902# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014903{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14904echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014905if test -z "$CCSHARED"
14906then
Guido van Rossum07397971997-04-29 21:49:50 +000014907 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014908 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014909 then CCSHARED="-fPIC";
14910 elif test `uname -p` = sparc;
14911 then CCSHARED="-xcode=pic32";
14912 else CCSHARED="-Kpic";
14913 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014914 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014915 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014916 else CCSHARED="+z";
14917 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014918 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014919 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014920 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014921 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014922 if test "$GCC" = "yes"
14923 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014924 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014925 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014926 SCO_SV*)
14927 if test "$GCC" = "yes"
14928 then CCSHARED="-fPIC"
14929 else CCSHARED="-Kpic -belf"
14930 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014931 IRIX*/6*) case $CC in
14932 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014933 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014934 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014935 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014936 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014937fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014938{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14939echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014940# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014941# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014942{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14943echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014944if test -z "$LINKFORSHARED"
14945then
Guido van Rossum07397971997-04-29 21:49:50 +000014946 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014947 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014948 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014949 LINKFORSHARED="-Wl,-E -Wl,+s";;
14950# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014951 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014952 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014953 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014955 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14956 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014957 # not used by the core itself but which needs to be in the core so
14958 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014959 # -prebind is no longer used, because it actually seems to give a
14960 # slowdown in stead of a speedup, maybe due to the large number of
14961 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014962
14963 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014964 if test "$enable_framework"
14965 then
Jack Jansenda49e192005-01-07 13:08:22 +000014966 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014967 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014968 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014969 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014970 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014971 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014972 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014973 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14974 then
14975 LINKFORSHARED="-Wl,--export-dynamic"
14976 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014977 SunOS/5*) case $CC in
14978 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014979 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014980 then
14981 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014982 fi;;
14983 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014984 CYGWIN*)
14985 if test $enable_shared = "no"
14986 then
14987 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14988 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014989 QNX*)
14990 # -Wl,-E causes the symbols to be added to the dynamic
14991 # symbol table so that they can be found when a module
14992 # is loaded. -N 2048K causes the stack size to be set
14993 # to 2048 kilobytes so that the stack doesn't overflow
14994 # when running test_compile.py.
14995 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014996 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014997fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014998{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14999echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000015000
Michael W. Hudson54241132001-12-07 15:38:26 +000015001
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015002
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015003{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
15004echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015005if test ! "$LIBRARY" = "$LDLIBRARY"
15006then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000015007 case $ac_sys_system in
15008 CYGWIN*)
15009 # Cygwin needs CCSHARED when building extension DLLs
15010 # but not when building the interpreter DLL.
15011 CFLAGSFORSHARED='';;
15012 *)
15013 CFLAGSFORSHARED='$(CCSHARED)'
15014 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015015fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015016{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
15017echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015018
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015019# SHLIBS are libraries (except -lc and -lm) to link to the python shared
15020# library (with --enable-shared).
15021# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015022# symbols, this must be set to $(LIBS) (expanded by make). We do this even
15023# if it is not required, since it creates a dependency of the shared library
15024# to LIBS. This, in turn, means that applications linking the shared libpython
15025# don't need to link LIBS explicitly. The default should be only changed
15026# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015027
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015028{ echo "$as_me:$LINENO: checking SHLIBS" >&5
15029echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015030case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015031 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015032 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015034{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
15035echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015036
15037
Guido van Rossum627b2d71993-12-24 10:39:16 +000015038# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000015039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015040{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
15041echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015042if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015043 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015044else
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015046LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015047cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015048/* confdefs.h. */
15049_ACEOF
15050cat confdefs.h >>conftest.$ac_ext
15051cat >>conftest.$ac_ext <<_ACEOF
15052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015053
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054/* Override any GCC internal prototype to avoid an error.
15055 Use char because int might match the return type of a GCC
15056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015057#ifdef __cplusplus
15058extern "C"
15059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015060char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015061int
15062main ()
15063{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015064return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015065 ;
15066 return 0;
15067}
15068_ACEOF
15069rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070if { (ac_try="$ac_link"
15071case "(($ac_try" in
15072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15073 *) ac_try_echo=$ac_try;;
15074esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015076 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015078 grep -v '^ *+' conftest.er1 >conftest.err
15079 rm -f conftest.er1
15080 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015082 (exit $ac_status); } && {
15083 test -z "$ac_c_werror_flag" ||
15084 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015085 } && test -s conftest$ac_exeext &&
15086 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015088else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015090sed 's/^/| /' conftest.$ac_ext >&5
15091
Martin v. Löwiseba40652007-08-30 20:10:57 +000015092 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015094
15095rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015096 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015097LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015098fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015099{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15100echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15101if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 cat >>confdefs.h <<_ACEOF
15103#define HAVE_LIBDL 1
15104_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015105
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015106 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015107
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015108fi
15109 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015110
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015111{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15112echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015113if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015114 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015115else
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015117LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015119/* confdefs.h. */
15120_ACEOF
15121cat confdefs.h >>conftest.$ac_ext
15122cat >>conftest.$ac_ext <<_ACEOF
15123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015124
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125/* Override any GCC internal prototype to avoid an error.
15126 Use char because int might match the return type of a GCC
15127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015128#ifdef __cplusplus
15129extern "C"
15130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015131char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015132int
15133main ()
15134{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015135return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 ;
15137 return 0;
15138}
15139_ACEOF
15140rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015141if { (ac_try="$ac_link"
15142case "(($ac_try" in
15143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15144 *) ac_try_echo=$ac_try;;
15145esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015147 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015149 grep -v '^ *+' conftest.er1 >conftest.err
15150 rm -f conftest.er1
15151 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015153 (exit $ac_status); } && {
15154 test -z "$ac_c_werror_flag" ||
15155 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015156 } && test -s conftest$ac_exeext &&
15157 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015158 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015159else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015161sed 's/^/| /' conftest.$ac_ext >&5
15162
Martin v. Löwiseba40652007-08-30 20:10:57 +000015163 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015165
15166rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015167 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015168LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015169fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015170{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15171echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15172if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 cat >>confdefs.h <<_ACEOF
15174#define HAVE_LIBDLD 1
15175_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015176
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015177 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015178
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015179fi
15180 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015181
Ronald Oussoren79f90492009-01-02 10:44:46 +000015182# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015183if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015184 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15185echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015186if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015187 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015188else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015189 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015191/* confdefs.h. */
15192_ACEOF
15193cat confdefs.h >>conftest.$ac_ext
15194cat >>conftest.$ac_ext <<_ACEOF
15195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015196
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197/* Override any GCC internal prototype to avoid an error.
15198 Use char because int might match the return type of a GCC
15199 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015200#ifdef __cplusplus
15201extern "C"
15202#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015203char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015204int
15205main ()
15206{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 ;
15209 return 0;
15210}
15211_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212for ac_lib in '' pthread rt posix4; do
15213 if test -z "$ac_lib"; then
15214 ac_res="none required"
15215 else
15216 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015217 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015218 fi
15219 rm -f conftest.$ac_objext conftest$ac_exeext
15220if { (ac_try="$ac_link"
15221case "(($ac_try" in
15222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15223 *) ac_try_echo=$ac_try;;
15224esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015227 ac_status=$?
15228 grep -v '^ *+' conftest.er1 >conftest.err
15229 rm -f conftest.er1
15230 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015232 (exit $ac_status); } && {
15233 test -z "$ac_c_werror_flag" ||
15234 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015235 } && test -s conftest$ac_exeext &&
15236 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015238else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015239 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015240sed 's/^/| /' conftest.$ac_ext >&5
15241
Martin v. Löwiseba40652007-08-30 20:10:57 +000015242
Brett Cannon19fab762007-06-02 03:02:29 +000015243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015244
15245rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15246 conftest$ac_exeext
15247 if test "${ac_cv_search_sem_init+set}" = set; then
15248 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250done
15251if test "${ac_cv_search_sem_init+set}" = set; then
15252 :
15253else
15254 ac_cv_search_sem_init=no
15255fi
15256rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015257LIBS=$ac_func_search_save_LIBS
15258fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015259{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15260echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015261ac_res=$ac_cv_search_sem_init
15262if test "$ac_res" != no; then
15263 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015264
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015265fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015266 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015267 # posix4 on Solaris 2.6
15268 # pthread (first!) on Linux
15269fi
15270
Martin v. Löwis19d17342003-06-14 21:03:05 +000015271# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015272{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15273echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015274if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015275 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015276else
15277 ac_check_lib_save_LIBS=$LIBS
15278LIBS="-lintl $LIBS"
15279cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015280/* confdefs.h. */
15281_ACEOF
15282cat confdefs.h >>conftest.$ac_ext
15283cat >>conftest.$ac_ext <<_ACEOF
15284/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015285
Martin v. Löwiseba40652007-08-30 20:10:57 +000015286/* Override any GCC internal prototype to avoid an error.
15287 Use char because int might match the return type of a GCC
15288 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015289#ifdef __cplusplus
15290extern "C"
15291#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015292char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015293int
15294main ()
15295{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015296return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015297 ;
15298 return 0;
15299}
15300_ACEOF
15301rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015302if { (ac_try="$ac_link"
15303case "(($ac_try" in
15304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15305 *) ac_try_echo=$ac_try;;
15306esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015308 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015310 grep -v '^ *+' conftest.er1 >conftest.err
15311 rm -f conftest.er1
15312 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015314 (exit $ac_status); } && {
15315 test -z "$ac_c_werror_flag" ||
15316 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015317 } && test -s conftest$ac_exeext &&
15318 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015319 ac_cv_lib_intl_textdomain=yes
15320else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015322sed 's/^/| /' conftest.$ac_ext >&5
15323
Martin v. Löwiseba40652007-08-30 20:10:57 +000015324 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015326
15327rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015328 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015329LIBS=$ac_check_lib_save_LIBS
15330fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015331{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15332echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15333if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015334
15335cat >>confdefs.h <<\_ACEOF
15336#define WITH_LIBINTL 1
15337_ACEOF
15338
15339fi
15340
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015341
15342# checks for system dependent C++ extensions support
15343case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015344 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15345echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015347/* confdefs.h. */
15348_ACEOF
15349cat confdefs.h >>conftest.$ac_ext
15350cat >>conftest.$ac_ext <<_ACEOF
15351/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015352#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015353int
15354main ()
15355{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015356loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015357 ;
15358 return 0;
15359}
15360_ACEOF
15361rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015362if { (ac_try="$ac_link"
15363case "(($ac_try" in
15364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15365 *) ac_try_echo=$ac_try;;
15366esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015369 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015370 grep -v '^ *+' conftest.er1 >conftest.err
15371 rm -f conftest.er1
15372 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015374 (exit $ac_status); } && {
15375 test -z "$ac_c_werror_flag" ||
15376 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015377 } && test -s conftest$ac_exeext &&
15378 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015379
Martin v. Löwis11437992002-04-12 09:54:03 +000015380cat >>confdefs.h <<\_ACEOF
15381#define AIX_GENUINE_CPLUSPLUS 1
15382_ACEOF
15383
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015384 { echo "$as_me:$LINENO: result: yes" >&5
15385echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015386else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015388sed 's/^/| /' conftest.$ac_ext >&5
15389
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015390 { echo "$as_me:$LINENO: result: no" >&5
15391echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015393
15394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015395 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015396 *) ;;
15397esac
15398
Guido van Rossum70c7f481998-03-26 18:44:10 +000015399# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015400# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015401{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15402echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015403if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015404 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015405else
Martin v. Löwis11437992002-04-12 09:54:03 +000015406 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015407LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015408cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015409/* confdefs.h. */
15410_ACEOF
15411cat confdefs.h >>conftest.$ac_ext
15412cat >>conftest.$ac_ext <<_ACEOF
15413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015414
Martin v. Löwiseba40652007-08-30 20:10:57 +000015415/* Override any GCC internal prototype to avoid an error.
15416 Use char because int might match the return type of a GCC
15417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015418#ifdef __cplusplus
15419extern "C"
15420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015421char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015422int
15423main ()
15424{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015425return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015426 ;
15427 return 0;
15428}
15429_ACEOF
15430rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015431if { (ac_try="$ac_link"
15432case "(($ac_try" in
15433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15434 *) ac_try_echo=$ac_try;;
15435esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015437 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015439 grep -v '^ *+' conftest.er1 >conftest.err
15440 rm -f conftest.er1
15441 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015443 (exit $ac_status); } && {
15444 test -z "$ac_c_werror_flag" ||
15445 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015446 } && test -s conftest$ac_exeext &&
15447 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015448 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015451sed 's/^/| /' conftest.$ac_ext >&5
15452
Martin v. Löwiseba40652007-08-30 20:10:57 +000015453 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015455
15456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015457 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015458LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015459fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015460{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15461echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15462if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015463 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015464fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015465 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015466{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15467echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015468if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015469 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015470else
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015472LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015473cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015474/* confdefs.h. */
15475_ACEOF
15476cat confdefs.h >>conftest.$ac_ext
15477cat >>conftest.$ac_ext <<_ACEOF
15478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015479
Martin v. Löwiseba40652007-08-30 20:10:57 +000015480/* Override any GCC internal prototype to avoid an error.
15481 Use char because int might match the return type of a GCC
15482 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015483#ifdef __cplusplus
15484extern "C"
15485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015486char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015487int
15488main ()
15489{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015490return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 ;
15492 return 0;
15493}
15494_ACEOF
15495rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015496if { (ac_try="$ac_link"
15497case "(($ac_try" in
15498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15499 *) ac_try_echo=$ac_try;;
15500esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015502 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015504 grep -v '^ *+' conftest.er1 >conftest.err
15505 rm -f conftest.er1
15506 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015508 (exit $ac_status); } && {
15509 test -z "$ac_c_werror_flag" ||
15510 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015511 } && test -s conftest$ac_exeext &&
15512 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015514else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015516sed 's/^/| /' conftest.$ac_ext >&5
15517
Martin v. Löwiseba40652007-08-30 20:10:57 +000015518 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015520
15521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015523LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015524fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015525{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15526echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15527if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015528 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015529fi
15530 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015531
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015532case "$ac_sys_system" in
15533BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015534{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15535echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015536if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015537 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015538else
Martin v. Löwis11437992002-04-12 09:54:03 +000015539 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015540LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015542/* confdefs.h. */
15543_ACEOF
15544cat confdefs.h >>conftest.$ac_ext
15545cat >>conftest.$ac_ext <<_ACEOF
15546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015547
Martin v. Löwiseba40652007-08-30 20:10:57 +000015548/* Override any GCC internal prototype to avoid an error.
15549 Use char because int might match the return type of a GCC
15550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015551#ifdef __cplusplus
15552extern "C"
15553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015554char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015555int
15556main ()
15557{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015558return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015559 ;
15560 return 0;
15561}
15562_ACEOF
15563rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015564if { (ac_try="$ac_link"
15565case "(($ac_try" in
15566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15567 *) ac_try_echo=$ac_try;;
15568esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015570 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015572 grep -v '^ *+' conftest.er1 >conftest.err
15573 rm -f conftest.er1
15574 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015576 (exit $ac_status); } && {
15577 test -z "$ac_c_werror_flag" ||
15578 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015579 } && test -s conftest$ac_exeext &&
15580 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015581 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015582else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015584sed 's/^/| /' conftest.$ac_ext >&5
15585
Martin v. Löwiseba40652007-08-30 20:10:57 +000015586 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015588
15589rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015591LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015592fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015593{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15594echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15595if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015596 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015597fi
15598 # BeOS
15599;;
15600esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015601
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015602{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15603echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015606if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015607 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015608{ echo "$as_me:$LINENO: result: $withval" >&5
15609echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015610LIBS="$withval $LIBS"
15611
15612else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015613 { echo "$as_me:$LINENO: result: no" >&5
15614echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015615fi
15616
Guido van Rossum7f43da71994-08-01 12:15:30 +000015617
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015618if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015619 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15620set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15621{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15622echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15623if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15624 echo $ECHO_N "(cached) $ECHO_C" >&6
15625else
15626 case $PKG_CONFIG in
15627 [\\/]* | ?:[\\/]*)
15628 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15629 ;;
15630 *)
15631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15632for as_dir in $PATH
15633do
15634 IFS=$as_save_IFS
15635 test -z "$as_dir" && as_dir=.
15636 for ac_exec_ext in '' $ac_executable_extensions; do
15637 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15638 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15639 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15640 break 2
15641 fi
15642done
15643done
15644IFS=$as_save_IFS
15645
15646 ;;
15647esac
15648fi
15649PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15650if test -n "$PKG_CONFIG"; then
15651 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15652echo "${ECHO_T}$PKG_CONFIG" >&6; }
15653else
15654 { echo "$as_me:$LINENO: result: no" >&5
15655echo "${ECHO_T}no" >&6; }
15656fi
15657
15658
15659fi
15660if test -z "$ac_cv_path_PKG_CONFIG"; then
15661 ac_pt_PKG_CONFIG=$PKG_CONFIG
15662 # Extract the first word of "pkg-config", so it can be a program name with args.
15663set dummy pkg-config; ac_word=$2
15664{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15665echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15666if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15667 echo $ECHO_N "(cached) $ECHO_C" >&6
15668else
15669 case $ac_pt_PKG_CONFIG in
15670 [\\/]* | ?:[\\/]*)
15671 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15672 ;;
15673 *)
15674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15675for as_dir in $PATH
15676do
15677 IFS=$as_save_IFS
15678 test -z "$as_dir" && as_dir=.
15679 for ac_exec_ext in '' $ac_executable_extensions; do
15680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15681 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15682 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15683 break 2
15684 fi
15685done
15686done
15687IFS=$as_save_IFS
15688
15689 ;;
15690esac
15691fi
15692ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15693if test -n "$ac_pt_PKG_CONFIG"; then
15694 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15695echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15696else
15697 { echo "$as_me:$LINENO: result: no" >&5
15698echo "${ECHO_T}no" >&6; }
15699fi
15700
15701 if test "x$ac_pt_PKG_CONFIG" = x; then
15702 PKG_CONFIG=""
15703 else
15704 case $cross_compiling:$ac_tool_warned in
15705yes:)
15706{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15707whose name does not start with the host triplet. If you think this
15708configuration is useful to you, please write to autoconf@gnu.org." >&5
15709echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15710whose name does not start with the host triplet. If you think this
15711configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15712ac_tool_warned=yes ;;
15713esac
15714 PKG_CONFIG=$ac_pt_PKG_CONFIG
15715 fi
15716else
15717 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15718fi
15719
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015720
15721# Check for use of the system expat library
15722{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15723echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15724
15725# Check whether --with-system_expat was given.
15726if test "${with_system_expat+set}" = set; then
15727 withval=$with_system_expat;
15728fi
15729
15730
15731{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15732echo "${ECHO_T}$with_system_expat" >&6; }
15733
15734# Check for use of the system libffi library
15735{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15736echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15737
15738# Check whether --with-system_ffi was given.
15739if test "${with_system_ffi+set}" = set; then
15740 withval=$with_system_ffi;
15741fi
15742
15743
15744if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015745 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15746else
15747 LIBFFI_INCLUDEDIR=""
15748fi
15749
15750
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015751{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15752echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015753
Benjamin Peterson867475c2009-04-29 20:36:25 +000015754# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015755{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15756echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015757
15758# Check whether --with-dbmliborder was given.
15759if test "${with_dbmliborder+set}" = set; then
15760 withval=$with_dbmliborder;
15761if test x$with_dbmliborder = xyes
15762then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015763{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15764echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015765 { (exit 1); exit 1; }; }
15766else
15767 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15768 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15769 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015770 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15771echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015772 { (exit 1); exit 1; }; }
15773 fi
15774 done
15775fi
15776fi
15777
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015778{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15779echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015780
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015781# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015782
15783
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015784{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15785echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015786
Martin v. Löwiseba40652007-08-30 20:10:57 +000015787# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015788if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015789 withval=$with_signal_module;
15790fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015791
15792
15793if test -z "$with_signal_module"
15794then with_signal_module="yes"
15795fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015796{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15797echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015798
15799if test "${with_signal_module}" = "yes"; then
15800 USE_SIGNAL_MODULE=""
15801 SIGNAL_OBJS=""
15802else
15803 USE_SIGNAL_MODULE="#"
15804 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15805fi
15806
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015807# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015808
Barry Warsawc0d24d82000-06-29 16:12:00 +000015809USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015810
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015811{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15812echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015813
Guido van Rossumec2f0731997-01-22 20:54:01 +000015814
Martin v. Löwiseba40652007-08-30 20:10:57 +000015815# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015816if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015817 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015818{ echo "$as_me:$LINENO: result: $withval" >&5
15819echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015820LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015821if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015822 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015823fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015824else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015825 { echo "$as_me:$LINENO: result: no" >&5
15826echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015827fi
15828
Martin v. Löwis11437992002-04-12 09:54:03 +000015829
15830# Templates for things AC_DEFINEd more than once.
15831# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015832
15833
Martin v. Löwis11437992002-04-12 09:54:03 +000015834
15835
15836
15837
15838
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015839{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15840echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015841
Martin v. Löwiseba40652007-08-30 20:10:57 +000015842# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015843if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844 withval=$with_threads;
15845fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015846
15847
Barry Warsawc0d24d82000-06-29 16:12:00 +000015848# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015849
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015851if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852 withval=$with_thread; with_threads=$with_thread
15853fi
15854
Barry Warsawc0d24d82000-06-29 16:12:00 +000015855
15856if test -z "$with_threads"
15857then with_threads="yes"
15858fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015859{ echo "$as_me:$LINENO: result: $with_threads" >&5
15860echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015861
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015862
Barry Warsawc0d24d82000-06-29 16:12:00 +000015863if test "$with_threads" = "no"
15864then
15865 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015866elif test "$ac_cv_pthread_is_default" = yes
15867then
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015869#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015870_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015871
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015872 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015873 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015874#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015875_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015876
15877 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015879elif test "$ac_cv_kpthread" = "yes"
15880then
15881 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015882 if test "$ac_cv_cxx_thread" = "yes"; then
15883 CXX="$CXX -Kpthread"
15884 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015886#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015887_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015888
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015889 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015890 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015891elif test "$ac_cv_kthread" = "yes"
15892then
15893 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015894 if test "$ac_cv_cxx_thread" = "yes"; then
15895 CXX="$CXX -Kthread"
15896 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015897 cat >>confdefs.h <<\_ACEOF
15898#define WITH_THREAD 1
15899_ACEOF
15900
15901 posix_threads=yes
15902 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015903elif test "$ac_cv_pthread" = "yes"
15904then
15905 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015906 if test "$ac_cv_cxx_thread" = "yes"; then
15907 CXX="$CXX -pthread"
15908 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015909 cat >>confdefs.h <<\_ACEOF
15910#define WITH_THREAD 1
15911_ACEOF
15912
15913 posix_threads=yes
15914 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015915else
15916 if test ! -z "$with_threads" -a -d "$with_threads"
15917 then LDFLAGS="$LDFLAGS -L$with_threads"
15918 fi
15919 if test ! -z "$withval" -a -d "$withval"
15920 then LDFLAGS="$LDFLAGS -L$withval"
15921 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015922
15923 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015924 # define _POSIX_THREADS in unistd.h. Some apparently don't
15925 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015926 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15927echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015929/* confdefs.h. */
15930_ACEOF
15931cat confdefs.h >>conftest.$ac_ext
15932cat >>conftest.$ac_ext <<_ACEOF
15933/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015934
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015935#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015936#ifdef _POSIX_THREADS
15937yes
15938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015939
15940_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015941if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015942 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015943 unistd_defines_pthreads=yes
15944else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015945 unistd_defines_pthreads=no
15946fi
Ronald Oussoren75912852010-04-08 08:13:31 +000015947rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015948
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015949 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15950echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015951
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015953#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015954_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015955
Martin v. Löwis11437992002-04-12 09:54:03 +000015956 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015957 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15958echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015959if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015960 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015961fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015962{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15963echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015964else
Martin v. Löwis11437992002-04-12 09:54:03 +000015965 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015966{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15967echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015969/* confdefs.h. */
15970_ACEOF
15971cat confdefs.h >>conftest.$ac_ext
15972cat >>conftest.$ac_ext <<_ACEOF
15973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015974$ac_includes_default
15975#include <cthreads.h>
15976_ACEOF
15977rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015978if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015986 grep -v '^ *+' conftest.er1 >conftest.err
15987 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); } && {
15991 test -z "$ac_c_werror_flag" ||
15992 test ! -s conftest.err
15993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015994 ac_header_compiler=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öwiseba40652007-08-30 20:10:57 +000015999 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016001
16002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016003{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16004echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016005
16006# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016007{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
16008echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016010/* confdefs.h. */
16011_ACEOF
16012cat confdefs.h >>conftest.$ac_ext
16013cat >>conftest.$ac_ext <<_ACEOF
16014/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016015#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016016_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017if { (ac_try="$ac_cpp conftest.$ac_ext"
16018case "(($ac_try" in
16019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16020 *) ac_try_echo=$ac_try;;
16021esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016023 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016024 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016025 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 rm -f conftest.er1
16027 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016029 (exit $ac_status); } >/dev/null && {
16030 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16031 test ! -s conftest.err
16032 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016033 ac_header_preproc=yes
16034else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016036sed 's/^/| /' conftest.$ac_ext >&5
16037
Martin v. Löwis11437992002-04-12 09:54:03 +000016038 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016040
Martin v. Löwis11437992002-04-12 09:54:03 +000016041rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016042{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16043echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016044
16045# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016046case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16047 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016048 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16049echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16050 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16051echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016052 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016053 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016054 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016055 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16056echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16057 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16058echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16059 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16060echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16061 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16062echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16063 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16064echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16065 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16066echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016067 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016068## -------------------------------------- ##
16069## Report this to http://bugs.python.org/ ##
16070## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016071_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016072 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016073 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016074esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016075{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16076echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016077if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016078 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016079else
16080 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016081fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016082{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16083echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016084
16085fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016086if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016087 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016088#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016089_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016090
Martin v. Löwis11437992002-04-12 09:54:03 +000016091 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016092#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016093_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016094
Martin v. Löwis11437992002-04-12 09:54:03 +000016095
16096cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016097#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016098_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016099
16100 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016101 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016102else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016103
Martin v. Löwis11437992002-04-12 09:54:03 +000016104 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016105 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16106echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016107if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016108 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016109fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016110{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16111echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016112else
Martin v. Löwis11437992002-04-12 09:54:03 +000016113 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016114{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16115echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016116cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016117/* confdefs.h. */
16118_ACEOF
16119cat confdefs.h >>conftest.$ac_ext
16120cat >>conftest.$ac_ext <<_ACEOF
16121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016122$ac_includes_default
16123#include <mach/cthreads.h>
16124_ACEOF
16125rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016126if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016134 grep -v '^ *+' conftest.er1 >conftest.err
16135 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); } && {
16139 test -z "$ac_c_werror_flag" ||
16140 test ! -s conftest.err
16141 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016142 ac_header_compiler=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öwiseba40652007-08-30 20:10:57 +000016147 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016149
16150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016151{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16152echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016153
16154# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016155{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16156echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016158/* confdefs.h. */
16159_ACEOF
16160cat confdefs.h >>conftest.$ac_ext
16161cat >>conftest.$ac_ext <<_ACEOF
16162/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016163#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016164_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016165if { (ac_try="$ac_cpp conftest.$ac_ext"
16166case "(($ac_try" in
16167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16168 *) ac_try_echo=$ac_try;;
16169esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016171 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016172 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016173 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016174 rm -f conftest.er1
16175 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016177 (exit $ac_status); } >/dev/null && {
16178 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16179 test ! -s conftest.err
16180 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016181 ac_header_preproc=yes
16182else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016184sed 's/^/| /' conftest.$ac_ext >&5
16185
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016188
Martin v. Löwis11437992002-04-12 09:54:03 +000016189rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016190{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16191echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016192
16193# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016194case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16195 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016196 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16197echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16198 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16199echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016200 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016201 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016202 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016203 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16204echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16205 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16206echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16207 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16208echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16209 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16210echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16211 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16212echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16213 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16214echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016216## -------------------------------------- ##
16217## Report this to http://bugs.python.org/ ##
16218## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016219_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016220 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016221 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016222esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016223{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16224echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016225if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016226 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016227else
16228 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016229fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016230{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16231echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016232
16233fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016234if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016235 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016236#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016237_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016238
Martin v. Löwis11437992002-04-12 09:54:03 +000016239 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016240#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016241_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016242
Martin v. Löwis11437992002-04-12 09:54:03 +000016243
16244cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016245#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016246_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016247
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016248 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016249else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016250
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016251 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16252echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016253
Martin v. Löwiseba40652007-08-30 20:10:57 +000016254# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016255if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016256 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16257echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016258 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016259#define WITH_THREAD 1
16260_ACEOF
16261
16262
16263cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016264#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016265_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016266
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016267 LIBS="-lpth $LIBS"
16268 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016269else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016270 { echo "$as_me:$LINENO: result: no" >&5
16271echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016272
16273 # Just looking for pthread_create in libpthread is not enough:
16274 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16275 # So we really have to include pthread.h, and then link.
16276 _libs=$LIBS
16277 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016278 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16279echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016281/* confdefs.h. */
16282_ACEOF
16283cat confdefs.h >>conftest.$ac_ext
16284cat >>conftest.$ac_ext <<_ACEOF
16285/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016286#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016287
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016288void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016289int
16290main ()
16291{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016292
16293pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016294 ;
16295 return 0;
16296}
16297_ACEOF
16298rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016299if { (ac_try="$ac_link"
16300case "(($ac_try" in
16301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16302 *) ac_try_echo=$ac_try;;
16303esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016305 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016307 grep -v '^ *+' conftest.er1 >conftest.err
16308 rm -f conftest.er1
16309 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016311 (exit $ac_status); } && {
16312 test -z "$ac_c_werror_flag" ||
16313 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016314 } && test -s conftest$ac_exeext &&
16315 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016316
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016317 { echo "$as_me:$LINENO: result: yes" >&5
16318echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016319 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016320#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016321_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016322
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016323 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016324 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016325else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016327sed 's/^/| /' conftest.$ac_ext >&5
16328
Martin v. Löwis11437992002-04-12 09:54:03 +000016329
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016330 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016331 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16332echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016333if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016334 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016335else
Martin v. Löwis11437992002-04-12 09:54:03 +000016336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016337/* confdefs.h. */
16338_ACEOF
16339cat confdefs.h >>conftest.$ac_ext
16340cat >>conftest.$ac_ext <<_ACEOF
16341/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016342/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16343 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16344#define pthread_detach innocuous_pthread_detach
16345
Guido van Rossumad678af1998-10-02 14:42:15 +000016346/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016347 which can conflict with char pthread_detach (); below.
16348 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016349 <limits.h> exists even on freestanding compilers. */
16350
16351#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016352# include <limits.h>
16353#else
16354# include <assert.h>
16355#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016356
16357#undef pthread_detach
16358
Martin v. Löwiseba40652007-08-30 20:10:57 +000016359/* Override any GCC internal prototype to avoid an error.
16360 Use char because int might match the return type of a GCC
16361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016362#ifdef __cplusplus
16363extern "C"
16364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016365char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016366/* The GNU C library defines this for functions which it implements
16367 to always fail with ENOSYS. Some functions are actually named
16368 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016369#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016370choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016371#endif
16372
Skip Montanaro6dead952003-09-25 14:50:04 +000016373int
16374main ()
16375{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016376return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016377 ;
16378 return 0;
16379}
16380_ACEOF
16381rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016382if { (ac_try="$ac_link"
16383case "(($ac_try" in
16384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16385 *) ac_try_echo=$ac_try;;
16386esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016388 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016390 grep -v '^ *+' conftest.er1 >conftest.err
16391 rm -f conftest.er1
16392 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016394 (exit $ac_status); } && {
16395 test -z "$ac_c_werror_flag" ||
16396 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016397 } && test -s conftest$ac_exeext &&
16398 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016399 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016400else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016402sed 's/^/| /' conftest.$ac_ext >&5
16403
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016406
16407rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016408 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016409fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016410{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16411echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16412if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016414#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016415_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016416
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016417 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016418 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016419else
Guido van Rossumad678af1998-10-02 14:42:15 +000016420
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016421 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016422 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16423echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016424if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016425 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016426fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016427{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16428echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016429else
16430 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016431{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16432echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016434/* confdefs.h. */
16435_ACEOF
16436cat confdefs.h >>conftest.$ac_ext
16437cat >>conftest.$ac_ext <<_ACEOF
16438/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016439$ac_includes_default
16440#include <atheos/threads.h>
16441_ACEOF
16442rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016443if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016451 grep -v '^ *+' conftest.er1 >conftest.err
16452 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); } && {
16456 test -z "$ac_c_werror_flag" ||
16457 test ! -s conftest.err
16458 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016459 ac_header_compiler=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öwiseba40652007-08-30 20:10:57 +000016464 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016466
16467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016468{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16469echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016470
16471# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016472{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16473echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016474cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016475/* confdefs.h. */
16476_ACEOF
16477cat confdefs.h >>conftest.$ac_ext
16478cat >>conftest.$ac_ext <<_ACEOF
16479/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016480#include <atheos/threads.h>
16481_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016482if { (ac_try="$ac_cpp conftest.$ac_ext"
16483case "(($ac_try" in
16484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16485 *) ac_try_echo=$ac_try;;
16486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016488 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016489 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016490 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016491 rm -f conftest.er1
16492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016494 (exit $ac_status); } >/dev/null && {
16495 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16496 test ! -s conftest.err
16497 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016498 ac_header_preproc=yes
16499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016501sed 's/^/| /' conftest.$ac_ext >&5
16502
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016503 ac_header_preproc=no
16504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016505
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016506rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016507{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16508echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016509
16510# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016511case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16512 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016513 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16514echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16515 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16516echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016517 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016518 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016519 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016520 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16521echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16522 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16523echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16524 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16525echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16526 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16527echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16528 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16529echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16530 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16531echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016532 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016533## -------------------------------------- ##
16534## Report this to http://bugs.python.org/ ##
16535## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016536_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016537 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016538 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016539esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016540{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16541echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016542if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016543 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016544else
16545 ac_cv_header_atheos_threads_h=$ac_header_preproc
16546fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016547{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16548echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016549
16550fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016551if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016552 cat >>confdefs.h <<\_ACEOF
16553#define WITH_THREAD 1
16554_ACEOF
16555
16556
16557cat >>confdefs.h <<\_ACEOF
16558#define ATHEOS_THREADS 1
16559_ACEOF
16560
16561 THREADOBJ="Python/thread.o"
16562else
16563
Martin v. Löwis11437992002-04-12 09:54:03 +000016564 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016565 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16566echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016567if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016568 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016569fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016570{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16571echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016572else
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016574{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16575echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016577/* confdefs.h. */
16578_ACEOF
16579cat confdefs.h >>conftest.$ac_ext
16580cat >>conftest.$ac_ext <<_ACEOF
16581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016582$ac_includes_default
16583#include <kernel/OS.h>
16584_ACEOF
16585rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016594 grep -v '^ *+' conftest.er1 >conftest.err
16595 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); } && {
16599 test -z "$ac_c_werror_flag" ||
16600 test ! -s conftest.err
16601 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016602 ac_header_compiler=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öwiseba40652007-08-30 20:10:57 +000016607 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016609
16610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016611{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16612echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016613
16614# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016615{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16616echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016618/* confdefs.h. */
16619_ACEOF
16620cat confdefs.h >>conftest.$ac_ext
16621cat >>conftest.$ac_ext <<_ACEOF
16622/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016623#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016624_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016625if { (ac_try="$ac_cpp conftest.$ac_ext"
16626case "(($ac_try" in
16627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16628 *) ac_try_echo=$ac_try;;
16629esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016633 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 rm -f conftest.er1
16635 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016637 (exit $ac_status); } >/dev/null && {
16638 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16639 test ! -s conftest.err
16640 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 ac_header_preproc=yes
16642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016644sed 's/^/| /' conftest.$ac_ext >&5
16645
Martin v. Löwis11437992002-04-12 09:54:03 +000016646 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016648
Martin v. Löwis11437992002-04-12 09:54:03 +000016649rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016650{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16651echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016652
Martin v. Löwis11437992002-04-12 09:54:03 +000016653# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016654case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16655 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016656 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16657echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16658 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16659echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016660 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016661 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016662 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016663 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16664echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16665 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16666echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16667 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16668echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16669 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16670echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16671 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16672echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16673 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16674echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016675 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016676## -------------------------------------- ##
16677## Report this to http://bugs.python.org/ ##
16678## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016679_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016680 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016681 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016682esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016683{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16684echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016685if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016686 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016687else
16688 ac_cv_header_kernel_OS_h=$ac_header_preproc
16689fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016690{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16691echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016692
16693fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016694if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016695 cat >>confdefs.h <<\_ACEOF
16696#define WITH_THREAD 1
16697_ACEOF
16698
16699
16700cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016701#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016702_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016703
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016704 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016705else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016706
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016707 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16708echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016709if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016711else
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016713LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016714cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016715/* confdefs.h. */
16716_ACEOF
16717cat confdefs.h >>conftest.$ac_ext
16718cat >>conftest.$ac_ext <<_ACEOF
16719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016720
Martin v. Löwiseba40652007-08-30 20:10:57 +000016721/* Override any GCC internal prototype to avoid an error.
16722 Use char because int might match the return type of a GCC
16723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016724#ifdef __cplusplus
16725extern "C"
16726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016727char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016728int
16729main ()
16730{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016731return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 ;
16733 return 0;
16734}
16735_ACEOF
16736rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016737if { (ac_try="$ac_link"
16738case "(($ac_try" in
16739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16740 *) ac_try_echo=$ac_try;;
16741esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016743 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016745 grep -v '^ *+' conftest.er1 >conftest.err
16746 rm -f conftest.er1
16747 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016749 (exit $ac_status); } && {
16750 test -z "$ac_c_werror_flag" ||
16751 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016752 } && test -s conftest$ac_exeext &&
16753 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016754 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016757sed 's/^/| /' conftest.$ac_ext >&5
16758
Martin v. Löwiseba40652007-08-30 20:10:57 +000016759 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016761
16762rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016764LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016765fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016766{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16767echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16768if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016770#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016771_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016772
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016773 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016774 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016775 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016776else
Greg Steinadf63d62000-07-05 10:38:09 +000016777
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016778 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16779echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016780if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016781 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016782else
Martin v. Löwis11437992002-04-12 09:54:03 +000016783 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016784LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016785cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016786/* confdefs.h. */
16787_ACEOF
16788cat confdefs.h >>conftest.$ac_ext
16789cat >>conftest.$ac_ext <<_ACEOF
16790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016791
Martin v. Löwiseba40652007-08-30 20:10:57 +000016792/* Override any GCC internal prototype to avoid an error.
16793 Use char because int might match the return type of a GCC
16794 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016795#ifdef __cplusplus
16796extern "C"
16797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016798char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016799int
16800main ()
16801{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016802return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016803 ;
16804 return 0;
16805}
16806_ACEOF
16807rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016808if { (ac_try="$ac_link"
16809case "(($ac_try" in
16810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16811 *) ac_try_echo=$ac_try;;
16812esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016816 grep -v '^ *+' conftest.er1 >conftest.err
16817 rm -f conftest.er1
16818 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016820 (exit $ac_status); } && {
16821 test -z "$ac_c_werror_flag" ||
16822 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016823 } && test -s conftest$ac_exeext &&
16824 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016825 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016826else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016828sed 's/^/| /' conftest.$ac_ext >&5
16829
Martin v. Löwiseba40652007-08-30 20:10:57 +000016830 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016831fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016832
16833rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016834 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016835LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016836fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016837{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16838echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16839if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016840 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016841#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016842_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016843
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016844 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016845 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016846 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016847else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016848
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016849 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16850echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016851if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016852 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016853else
Martin v. Löwis11437992002-04-12 09:54:03 +000016854 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016855LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016856cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016857/* confdefs.h. */
16858_ACEOF
16859cat confdefs.h >>conftest.$ac_ext
16860cat >>conftest.$ac_ext <<_ACEOF
16861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016862
Martin v. Löwiseba40652007-08-30 20:10:57 +000016863/* Override any GCC internal prototype to avoid an error.
16864 Use char because int might match the return type of a GCC
16865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016866#ifdef __cplusplus
16867extern "C"
16868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016869char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016870int
16871main ()
16872{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016873return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 ;
16875 return 0;
16876}
16877_ACEOF
16878rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016879if { (ac_try="$ac_link"
16880case "(($ac_try" in
16881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16882 *) ac_try_echo=$ac_try;;
16883esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016885 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016887 grep -v '^ *+' conftest.er1 >conftest.err
16888 rm -f conftest.er1
16889 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016891 (exit $ac_status); } && {
16892 test -z "$ac_c_werror_flag" ||
16893 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016894 } && test -s conftest$ac_exeext &&
16895 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016896 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016899sed 's/^/| /' conftest.$ac_ext >&5
16900
Martin v. Löwiseba40652007-08-30 20:10:57 +000016901 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016903
16904rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016905 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016906LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016907fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016908{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16909echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16910if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016912#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016913_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016914
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016915 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016916 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016917 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016918else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016919
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016920 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16921echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016922if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016923 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016924else
Martin v. Löwis11437992002-04-12 09:54:03 +000016925 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016926LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016927cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016928/* confdefs.h. */
16929_ACEOF
16930cat confdefs.h >>conftest.$ac_ext
16931cat >>conftest.$ac_ext <<_ACEOF
16932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016933
Martin v. Löwiseba40652007-08-30 20:10:57 +000016934/* Override any GCC internal prototype to avoid an error.
16935 Use char because int might match the return type of a GCC
16936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016937#ifdef __cplusplus
16938extern "C"
16939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016940char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016941int
16942main ()
16943{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016944return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016945 ;
16946 return 0;
16947}
16948_ACEOF
16949rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016950if { (ac_try="$ac_link"
16951case "(($ac_try" in
16952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16953 *) ac_try_echo=$ac_try;;
16954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016956 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016958 grep -v '^ *+' conftest.er1 >conftest.err
16959 rm -f conftest.er1
16960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016962 (exit $ac_status); } && {
16963 test -z "$ac_c_werror_flag" ||
16964 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016965 } && test -s conftest$ac_exeext &&
16966 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016967 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016970sed 's/^/| /' conftest.$ac_ext >&5
16971
Martin v. Löwiseba40652007-08-30 20:10:57 +000016972 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016974
16975rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016976 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016977LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016978fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016979{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16980echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16981if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016982 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016983#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016984_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016985
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016986 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016987 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016988 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016989else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016990
Martin v. Löwis130fb172001-07-19 11:00:41 +000016991 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016992fi
16993
Guido van Rossum627b2d71993-12-24 10:39:16 +000016994
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016995fi
16996
Guido van Rossum0be3e491997-05-22 20:33:33 +000016997fi
16998
Guido van Rossum49545951997-12-02 19:28:29 +000016999fi
17000
Guido van Rossumb93a8621998-05-07 13:27:32 +000017001fi
17002
Guido van Rossum07bd90e2000-05-08 13:41:38 +000017003
Michael W. Hudson54241132001-12-07 15:38:26 +000017004fi
17005
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017006
17007fi
17008
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017010
17011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017013fi
17014
Martin v. Löwis11437992002-04-12 09:54:03 +000017015fi
17016
17017
17018fi
17019
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017020
Michael W. Hudson54241132001-12-07 15:38:26 +000017021
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017022 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
17023echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017024if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017025 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017026else
Martin v. Löwis11437992002-04-12 09:54:03 +000017027 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017028LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017030/* confdefs.h. */
17031_ACEOF
17032cat confdefs.h >>conftest.$ac_ext
17033cat >>conftest.$ac_ext <<_ACEOF
17034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017035
Martin v. Löwiseba40652007-08-30 20:10:57 +000017036/* Override any GCC internal prototype to avoid an error.
17037 Use char because int might match the return type of a GCC
17038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017039#ifdef __cplusplus
17040extern "C"
17041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017042char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017043int
17044main ()
17045{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017046return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017047 ;
17048 return 0;
17049}
17050_ACEOF
17051rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017052if { (ac_try="$ac_link"
17053case "(($ac_try" in
17054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17055 *) ac_try_echo=$ac_try;;
17056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017058 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017060 grep -v '^ *+' conftest.er1 >conftest.err
17061 rm -f conftest.er1
17062 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017064 (exit $ac_status); } && {
17065 test -z "$ac_c_werror_flag" ||
17066 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017067 } && test -s conftest$ac_exeext &&
17068 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017069 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017072sed 's/^/| /' conftest.$ac_ext >&5
17073
Martin v. Löwiseba40652007-08-30 20:10:57 +000017074 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017076
17077rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017079LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017080fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017081{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17082echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17083if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017084 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017085#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017086_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017087
Martin v. Löwis130fb172001-07-19 11:00:41 +000017088 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017089 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017090 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017091fi
17092
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017093
Neal Norwitza978ab02002-11-02 16:58:05 +000017094 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017095 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17096echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017097if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017098 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017099else
Martin v. Löwis11437992002-04-12 09:54:03 +000017100 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017101LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017103/* confdefs.h. */
17104_ACEOF
17105cat confdefs.h >>conftest.$ac_ext
17106cat >>conftest.$ac_ext <<_ACEOF
17107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017108
Martin v. Löwiseba40652007-08-30 20:10:57 +000017109/* Override any GCC internal prototype to avoid an error.
17110 Use char because int might match the return type of a GCC
17111 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017112#ifdef __cplusplus
17113extern "C"
17114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017115char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017116int
17117main ()
17118{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017119return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017120 ;
17121 return 0;
17122}
17123_ACEOF
17124rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017125if { (ac_try="$ac_link"
17126case "(($ac_try" in
17127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17128 *) ac_try_echo=$ac_try;;
17129esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017131 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017133 grep -v '^ *+' conftest.er1 >conftest.err
17134 rm -f conftest.er1
17135 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017137 (exit $ac_status); } && {
17138 test -z "$ac_c_werror_flag" ||
17139 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017140 } && test -s conftest$ac_exeext &&
17141 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017142 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017143else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017145sed 's/^/| /' conftest.$ac_ext >&5
17146
Martin v. Löwiseba40652007-08-30 20:10:57 +000017147 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017149
17150rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017152LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017153fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017154{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17155echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17156if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017157 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017158#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017159_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017160
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017161 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017162 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017163 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017164fi
17165
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017166 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017167
Martin v. Löwis130fb172001-07-19 11:00:41 +000017168 if test "$USE_THREAD_MODULE" != "#"
17169 then
17170 # If the above checks didn't disable threads, (at least) OSF1
17171 # needs this '-threads' argument during linking.
17172 case $ac_sys_system in
17173 OSF1) LDLAST=-threads;;
17174 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017175 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017176fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017177
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017178if test "$posix_threads" = "yes"; then
17179 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017180
17181cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017182#define _POSIX_THREADS 1
17183_ACEOF
17184
17185 fi
17186
17187 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17188 case $ac_sys_system/$ac_sys_release in
17189 SunOS/5.6)
17190cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017191#define HAVE_PTHREAD_DESTRUCTOR 1
17192_ACEOF
17193
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017194 ;;
17195 SunOS/5.8)
17196cat >>confdefs.h <<\_ACEOF
17197#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17198_ACEOF
17199
17200 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017201 AIX/5)
17202cat >>confdefs.h <<\_ACEOF
17203#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17204_ACEOF
17205
17206 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017207 esac
17208
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017209 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17210echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017211 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017212 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017213else
17214 if test "$cross_compiling" = yes; then
17215 ac_cv_pthread_system_supported=no
17216else
17217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017218/* confdefs.h. */
17219_ACEOF
17220cat confdefs.h >>conftest.$ac_ext
17221cat >>conftest.$ac_ext <<_ACEOF
17222/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017223#include <pthread.h>
17224 void *foo(void *parm) {
17225 return NULL;
17226 }
17227 main() {
17228 pthread_attr_t attr;
17229 pthread_t id;
17230 if (pthread_attr_init(&attr)) exit(-1);
17231 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17232 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17233 exit(0);
17234 }
17235_ACEOF
17236rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017237if { (ac_try="$ac_link"
17238case "(($ac_try" in
17239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17240 *) ac_try_echo=$ac_try;;
17241esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017243 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017244 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017246 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017247 { (case "(($ac_try" in
17248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17249 *) ac_try_echo=$ac_try;;
17250esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017252 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017253 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017255 (exit $ac_status); }; }; then
17256 ac_cv_pthread_system_supported=yes
17257else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017258 echo "$as_me: program exited with status $ac_status" >&5
17259echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017260sed 's/^/| /' conftest.$ac_ext >&5
17261
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017262( exit $ac_status )
17263ac_cv_pthread_system_supported=no
17264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017265rm -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 +000017266fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017267
Martin v. Löwiseba40652007-08-30 20:10:57 +000017268
17269
Guido van Rossum627b2d71993-12-24 10:39:16 +000017270fi
17271
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017272 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17273echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017274 if test "$ac_cv_pthread_system_supported" = "yes"; then
17275
17276cat >>confdefs.h <<\_ACEOF
17277#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17278_ACEOF
17279
17280 fi
17281
17282for ac_func in pthread_sigmask
17283do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017284as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17285{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17286echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017287if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017288 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017289else
17290 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017291/* confdefs.h. */
17292_ACEOF
17293cat confdefs.h >>conftest.$ac_ext
17294cat >>conftest.$ac_ext <<_ACEOF
17295/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017296/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17297 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17298#define $ac_func innocuous_$ac_func
17299
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017300/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017301 which can conflict with char $ac_func (); below.
17302 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017303 <limits.h> exists even on freestanding compilers. */
17304
17305#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017306# include <limits.h>
17307#else
17308# include <assert.h>
17309#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017310
17311#undef $ac_func
17312
Martin v. Löwiseba40652007-08-30 20:10:57 +000017313/* Override any GCC internal prototype to avoid an error.
17314 Use char because int might match the return type of a GCC
17315 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017316#ifdef __cplusplus
17317extern "C"
17318#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017319char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017320/* The GNU C library defines this for functions which it implements
17321 to always fail with ENOSYS. Some functions are actually named
17322 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017323#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017324choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017325#endif
17326
Skip Montanaro6dead952003-09-25 14:50:04 +000017327int
17328main ()
17329{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017330return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017331 ;
17332 return 0;
17333}
17334_ACEOF
17335rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017336if { (ac_try="$ac_link"
17337case "(($ac_try" in
17338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17339 *) ac_try_echo=$ac_try;;
17340esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017342 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017344 grep -v '^ *+' conftest.er1 >conftest.err
17345 rm -f conftest.er1
17346 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017348 (exit $ac_status); } && {
17349 test -z "$ac_c_werror_flag" ||
17350 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017351 } && test -s conftest$ac_exeext &&
17352 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017353 eval "$as_ac_var=yes"
17354else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017356sed 's/^/| /' conftest.$ac_ext >&5
17357
Martin v. Löwiseba40652007-08-30 20:10:57 +000017358 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017360
17361rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017362 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017363fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017364ac_res=`eval echo '${'$as_ac_var'}'`
17365 { echo "$as_me:$LINENO: result: $ac_res" >&5
17366echo "${ECHO_T}$ac_res" >&6; }
17367if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017368 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017369#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017370_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017371 case $ac_sys_system in
17372 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017373
Jason Tishlerfac083d2003-07-22 15:20:49 +000017374cat >>confdefs.h <<\_ACEOF
17375#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17376_ACEOF
17377
17378 ;;
17379 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017380fi
17381done
17382
17383fi
17384
17385
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017386# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017387
17388
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017389{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17390echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017391# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017392if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017393 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017394 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017395 { echo "$as_me:$LINENO: result: no" >&5
17396echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017397 ipv6=no
17398 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017399 *) { echo "$as_me:$LINENO: result: yes" >&5
17400echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017401 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017402#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017403_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017404
17405 ipv6=yes
17406 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017407 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017408else
Martin v. Löwis11437992002-04-12 09:54:03 +000017409
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017410 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017411 { echo "$as_me:$LINENO: result: no" >&5
17412echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017413 ipv6=no
17414
17415else
Martin v. Löwis11437992002-04-12 09:54:03 +000017416 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017417/* confdefs.h. */
17418_ACEOF
17419cat confdefs.h >>conftest.$ac_ext
17420cat >>conftest.$ac_ext <<_ACEOF
17421/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017422 /* AF_INET6 available check */
17423#include <sys/types.h>
17424#include <sys/socket.h>
17425main()
17426{
17427 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17428 exit(1);
17429 else
17430 exit(0);
17431}
17432
Martin v. Löwis11437992002-04-12 09:54:03 +000017433_ACEOF
17434rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017435if { (ac_try="$ac_link"
17436case "(($ac_try" in
17437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17438 *) ac_try_echo=$ac_try;;
17439esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017441 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017442 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017444 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017445 { (case "(($ac_try" in
17446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17447 *) ac_try_echo=$ac_try;;
17448esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017450 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017451 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017453 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017454 { echo "$as_me:$LINENO: result: yes" >&5
17455echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017456 ipv6=yes
17457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017458 echo "$as_me: program exited with status $ac_status" >&5
17459echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017460sed 's/^/| /' conftest.$ac_ext >&5
17461
Martin v. Löwis11437992002-04-12 09:54:03 +000017462( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017463{ echo "$as_me:$LINENO: result: no" >&5
17464echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017465 ipv6=no
17466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017467rm -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 +000017468fi
17469
Martin v. Löwiseba40652007-08-30 20:10:57 +000017470
17471
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017472if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017473 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17474echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017476/* confdefs.h. */
17477_ACEOF
17478cat confdefs.h >>conftest.$ac_ext
17479cat >>conftest.$ac_ext <<_ACEOF
17480/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017481#include <sys/types.h>
17482#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017483int
17484main ()
17485{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017486struct sockaddr_in6 x;
17487x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017488 ;
17489 return 0;
17490}
17491_ACEOF
17492rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017493if { (ac_try="$ac_compile"
17494case "(($ac_try" in
17495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17496 *) ac_try_echo=$ac_try;;
17497esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017501 grep -v '^ *+' conftest.er1 >conftest.err
17502 rm -f conftest.er1
17503 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017505 (exit $ac_status); } && {
17506 test -z "$ac_c_werror_flag" ||
17507 test ! -s conftest.err
17508 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017509 { echo "$as_me:$LINENO: result: yes" >&5
17510echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017511 ipv6=yes
17512else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017514sed 's/^/| /' conftest.$ac_ext >&5
17515
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017516 { echo "$as_me:$LINENO: result: no" >&5
17517echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017518 ipv6=no
17519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017520
17521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017522fi
17523
17524if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017525 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017526#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017527_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017528
17529fi
17530
Martin v. Löwiseba40652007-08-30 20:10:57 +000017531fi
17532
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017533
17534ipv6type=unknown
17535ipv6lib=none
17536ipv6trylibc=no
17537
17538if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017539 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17540echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017541 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17542 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017543 case $i in
17544 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017546/* confdefs.h. */
17547_ACEOF
17548cat confdefs.h >>conftest.$ac_ext
17549cat >>conftest.$ac_ext <<_ACEOF
17550/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017551
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017552#include <netinet/in.h>
17553#ifdef IPV6_INRIA_VERSION
17554yes
17555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017556_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017558 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017559 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017560fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017561rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017562
17563 ;;
17564 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017565 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017566/* confdefs.h. */
17567_ACEOF
17568cat confdefs.h >>conftest.$ac_ext
17569cat >>conftest.$ac_ext <<_ACEOF
17570/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017571
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017572#include <netinet/in.h>
17573#ifdef __KAME__
17574yes
17575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017576_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017577if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017578 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017579 ipv6type=$i;
17580 ipv6lib=inet6
17581 ipv6libdir=/usr/local/v6/lib
17582 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017583fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017584rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017585
17586 ;;
17587 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017589/* confdefs.h. */
17590_ACEOF
17591cat confdefs.h >>conftest.$ac_ext
17592cat >>conftest.$ac_ext <<_ACEOF
17593/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017594
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017595#include <features.h>
17596#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17597yes
17598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017599_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017601 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017602 ipv6type=$i;
17603 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017604fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017605rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017606
17607 ;;
17608 linux-inet6)
17609 if test -d /usr/inet6; then
17610 ipv6type=$i
17611 ipv6lib=inet6
17612 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017613 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017614 fi
17615 ;;
17616 solaris)
17617 if test -f /etc/netconfig; then
17618 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17619 ipv6type=$i
17620 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017621 fi
17622 fi
17623 ;;
17624 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017626/* confdefs.h. */
17627_ACEOF
17628cat confdefs.h >>conftest.$ac_ext
17629cat >>conftest.$ac_ext <<_ACEOF
17630/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017631
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017632#include <sys/param.h>
17633#ifdef _TOSHIBA_INET6
17634yes
17635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017636_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017637if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017638 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017639 ipv6type=$i;
17640 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017641 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017642fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017643rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017644
17645 ;;
17646 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017648/* confdefs.h. */
17649_ACEOF
17650cat confdefs.h >>conftest.$ac_ext
17651cat >>conftest.$ac_ext <<_ACEOF
17652/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017653
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017654#include </usr/local/v6/include/sys/v6config.h>
17655#ifdef __V6D__
17656yes
17657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017658_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017660 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017661 ipv6type=$i;
17662 ipv6lib=v6;
17663 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017664 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017665fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017666rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017667
17668 ;;
17669 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017671/* confdefs.h. */
17672_ACEOF
17673cat confdefs.h >>conftest.$ac_ext
17674cat >>conftest.$ac_ext <<_ACEOF
17675/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017676
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017677#include <sys/param.h>
17678#ifdef _ZETA_MINAMI_INET6
17679yes
17680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017681_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017682if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017683 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017684 ipv6type=$i;
17685 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017686 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017687fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017688rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017689
17690 ;;
17691 esac
17692 if test "$ipv6type" != "unknown"; then
17693 break
17694 fi
17695 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017696 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17697echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017698fi
17699
17700if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17701 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17702 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17703 echo "using lib$ipv6lib"
17704 else
17705 if test $ipv6trylibc = "yes"; then
17706 echo "using libc"
17707 else
17708 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17709 echo "You need to fetch lib$ipv6lib.a from appropriate"
17710 echo 'ipv6 kit and compile beforehand.'
17711 exit 1
17712 fi
17713 fi
17714fi
17715
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017716{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17717echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017718cat >conftest.$ac_ext <<_ACEOF
17719/* confdefs.h. */
17720_ACEOF
17721cat confdefs.h >>conftest.$ac_ext
17722cat >>conftest.$ac_ext <<_ACEOF
17723/* end confdefs.h. */
17724#include <Carbon/Carbon.h>
17725int
17726main ()
17727{
17728FSIORefNum fRef = 0
17729 ;
17730 return 0;
17731}
17732_ACEOF
17733rm -f conftest.$ac_objext
17734if { (ac_try="$ac_compile"
17735case "(($ac_try" in
17736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17737 *) ac_try_echo=$ac_try;;
17738esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017740 (eval "$ac_compile") 2>conftest.er1
17741 ac_status=$?
17742 grep -v '^ *+' conftest.er1 >conftest.err
17743 rm -f conftest.er1
17744 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017746 (exit $ac_status); } && {
17747 test -z "$ac_c_werror_flag" ||
17748 test ! -s conftest.err
17749 } && test -s conftest.$ac_objext; then
17750
17751cat >>confdefs.h <<\_ACEOF
17752#define HAVE_OSX105_SDK 1
17753_ACEOF
17754
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017755 { echo "$as_me:$LINENO: result: yes" >&5
17756echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017757else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017758 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017759sed 's/^/| /' conftest.$ac_ext >&5
17760
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017761 { echo "$as_me:$LINENO: result: no" >&5
17762echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017763
17764fi
17765
17766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17767
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017768# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017769{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17770echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017771
Martin v. Löwiseba40652007-08-30 20:10:57 +000017772# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017773if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017774 withval=$with_doc_strings;
17775fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017776
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017777
17778if test -z "$with_doc_strings"
17779then with_doc_strings="yes"
17780fi
17781if test "$with_doc_strings" != "no"
17782then
17783
17784cat >>confdefs.h <<\_ACEOF
17785#define WITH_DOC_STRINGS 1
17786_ACEOF
17787
17788fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017789{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17790echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017791
Neil Schemenauera35c6882001-02-27 04:45:05 +000017792# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017793{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17794echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017795
Martin v. Löwiseba40652007-08-30 20:10:57 +000017796# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017797if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017798 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017799if test "$withval" != no
17800then
17801
17802cat >>confdefs.h <<\_ACEOF
17803#define WITH_TSC 1
17804_ACEOF
17805
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017806 { echo "$as_me:$LINENO: result: yes" >&5
17807echo "${ECHO_T}yes" >&6; }
17808else { echo "$as_me:$LINENO: result: no" >&5
17809echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017810fi
17811else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017812 { echo "$as_me:$LINENO: result: no" >&5
17813echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017814fi
17815
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017816
17817# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017818{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17819echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017820
Martin v. Löwiseba40652007-08-30 20:10:57 +000017821# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017822if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017823 withval=$with_pymalloc;
17824fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017825
Neil Schemenauera35c6882001-02-27 04:45:05 +000017826
Neil Schemenauer16c22972002-03-22 15:34:49 +000017827if test -z "$with_pymalloc"
17828then with_pymalloc="yes"
17829fi
17830if test "$with_pymalloc" != "no"
17831then
Martin v. Löwis11437992002-04-12 09:54:03 +000017832
17833cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017834#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017835_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017836
17837fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017838{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17839echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017840
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017841# Check for Valgrind support
17842{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17843echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17844
17845# Check whether --with-valgrind was given.
17846if test "${with_valgrind+set}" = set; then
17847 withval=$with_valgrind;
17848else
17849 with_valgrind=no
17850fi
17851
17852{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17853echo "${ECHO_T}$with_valgrind" >&6; }
17854if test "$with_valgrind" != no; then
17855 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17856 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17857echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17858if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17859 echo $ECHO_N "(cached) $ECHO_C" >&6
17860fi
17861{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17862echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17863else
17864 # Is the header compilable?
17865{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17866echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17867cat >conftest.$ac_ext <<_ACEOF
17868/* confdefs.h. */
17869_ACEOF
17870cat confdefs.h >>conftest.$ac_ext
17871cat >>conftest.$ac_ext <<_ACEOF
17872/* end confdefs.h. */
17873$ac_includes_default
17874#include <valgrind/valgrind.h>
17875_ACEOF
17876rm -f conftest.$ac_objext
17877if { (ac_try="$ac_compile"
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_compile") 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); } && {
17890 test -z "$ac_c_werror_flag" ||
17891 test ! -s conftest.err
17892 } && test -s conftest.$ac_objext; then
17893 ac_header_compiler=yes
17894else
17895 echo "$as_me: failed program was:" >&5
17896sed 's/^/| /' conftest.$ac_ext >&5
17897
17898 ac_header_compiler=no
17899fi
17900
17901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17902{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17903echo "${ECHO_T}$ac_header_compiler" >&6; }
17904
17905# Is the header present?
17906{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17907echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17908cat >conftest.$ac_ext <<_ACEOF
17909/* confdefs.h. */
17910_ACEOF
17911cat confdefs.h >>conftest.$ac_ext
17912cat >>conftest.$ac_ext <<_ACEOF
17913/* end confdefs.h. */
17914#include <valgrind/valgrind.h>
17915_ACEOF
17916if { (ac_try="$ac_cpp conftest.$ac_ext"
17917case "(($ac_try" in
17918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17919 *) ac_try_echo=$ac_try;;
17920esac
17921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17922 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17923 ac_status=$?
17924 grep -v '^ *+' conftest.er1 >conftest.err
17925 rm -f conftest.er1
17926 cat conftest.err >&5
17927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17928 (exit $ac_status); } >/dev/null && {
17929 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17930 test ! -s conftest.err
17931 }; then
17932 ac_header_preproc=yes
17933else
17934 echo "$as_me: failed program was:" >&5
17935sed 's/^/| /' conftest.$ac_ext >&5
17936
17937 ac_header_preproc=no
17938fi
17939
17940rm -f conftest.err conftest.$ac_ext
17941{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17942echo "${ECHO_T}$ac_header_preproc" >&6; }
17943
17944# So? What about this header?
17945case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17946 yes:no: )
17947 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17948echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17949 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17950echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17951 ac_header_preproc=yes
17952 ;;
17953 no:yes:* )
17954 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17955echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17956 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17957echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17958 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17959echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17960 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17961echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17962 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17963echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17964 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17965echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17966 ( cat <<\_ASBOX
17967## -------------------------------------- ##
17968## Report this to http://bugs.python.org/ ##
17969## -------------------------------------- ##
17970_ASBOX
17971 ) | sed "s/^/$as_me: WARNING: /" >&2
17972 ;;
17973esac
17974{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17975echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17976if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17977 echo $ECHO_N "(cached) $ECHO_C" >&6
17978else
17979 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17980fi
17981{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17982echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17983
17984fi
17985if test $ac_cv_header_valgrind_valgrind_h = yes; then
17986
17987cat >>confdefs.h <<\_ACEOF
17988#define WITH_VALGRIND 1
17989_ACEOF
17990
17991else
17992 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17993echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17994 { (exit 1); exit 1; }; }
17995
17996fi
17997
17998
17999fi
18000
Barry Warsawef82cd72000-06-30 16:21:01 +000018001# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018002{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
18003echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018004
Martin v. Löwiseba40652007-08-30 20:10:57 +000018005# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000018006if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018007 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000018008if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018009then
18010
18011cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000018012#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018013_ACEOF
18014
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018015 { echo "$as_me:$LINENO: result: yes" >&5
18016echo "${ECHO_T}yes" >&6; }
18017else { echo "$as_me:$LINENO: result: no" >&5
18018echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000018019fi
18020else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018021 { echo "$as_me:$LINENO: result: no" >&5
18022echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018023fi
18024
Barry Warsawef82cd72000-06-30 16:21:01 +000018025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018026# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000018027
Guido van Rossum98935bf2001-09-05 19:13:16 +000018028DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018029
Guido van Rossume97ee181999-12-20 21:27:22 +000018030# the dlopen() function means we might want to use dynload_shlib.o. some
18031# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018032
Thomas Wouters3a584202000-08-05 23:28:51 +000018033for ac_func in dlopen
18034do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018035as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18036{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18037echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018038if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018039 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018040else
Martin v. Löwis11437992002-04-12 09:54:03 +000018041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018042/* confdefs.h. */
18043_ACEOF
18044cat confdefs.h >>conftest.$ac_ext
18045cat >>conftest.$ac_ext <<_ACEOF
18046/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018047/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18048 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18049#define $ac_func innocuous_$ac_func
18050
Guido van Rossume97ee181999-12-20 21:27:22 +000018051/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018052 which can conflict with char $ac_func (); below.
18053 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018054 <limits.h> exists even on freestanding compilers. */
18055
18056#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018057# include <limits.h>
18058#else
18059# include <assert.h>
18060#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018061
18062#undef $ac_func
18063
Martin v. Löwiseba40652007-08-30 20:10:57 +000018064/* Override any GCC internal prototype to avoid an error.
18065 Use char because int might match the return type of a GCC
18066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018067#ifdef __cplusplus
18068extern "C"
18069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018070char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018071/* The GNU C library defines this for functions which it implements
18072 to always fail with ENOSYS. Some functions are actually named
18073 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018074#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018075choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018076#endif
18077
Skip Montanaro6dead952003-09-25 14:50:04 +000018078int
18079main ()
18080{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018081return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018082 ;
18083 return 0;
18084}
18085_ACEOF
18086rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018087if { (ac_try="$ac_link"
18088case "(($ac_try" in
18089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18090 *) ac_try_echo=$ac_try;;
18091esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018093 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018095 grep -v '^ *+' conftest.er1 >conftest.err
18096 rm -f conftest.er1
18097 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018099 (exit $ac_status); } && {
18100 test -z "$ac_c_werror_flag" ||
18101 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018102 } && test -s conftest$ac_exeext &&
18103 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018104 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018105else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018107sed 's/^/| /' conftest.$ac_ext >&5
18108
Martin v. Löwiseba40652007-08-30 20:10:57 +000018109 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018111
18112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018113 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018114fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018115ac_res=`eval echo '${'$as_ac_var'}'`
18116 { echo "$as_me:$LINENO: result: $ac_res" >&5
18117echo "${ECHO_T}$ac_res" >&6; }
18118if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018119 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018120#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018121_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018122
Guido van Rossume97ee181999-12-20 21:27:22 +000018123fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018124done
Guido van Rossume97ee181999-12-20 21:27:22 +000018125
Michael W. Hudson54241132001-12-07 15:38:26 +000018126
Guido van Rossume97ee181999-12-20 21:27:22 +000018127# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18128# loading of modules.
18129
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018130{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18131echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018132if test -z "$DYNLOADFILE"
18133then
18134 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018135 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18136 if test "$ac_cv_func_dlopen" = yes
18137 then DYNLOADFILE="dynload_shlib.o"
18138 else DYNLOADFILE="dynload_aix.o"
18139 fi
18140 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018141 BeOS*) DYNLOADFILE="dynload_beos.o";;
18142 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018143 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18144 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018145 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018146 *)
18147 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18148 # out any dynamic loading
18149 if test "$ac_cv_func_dlopen" = yes
18150 then DYNLOADFILE="dynload_shlib.o"
18151 else DYNLOADFILE="dynload_stub.o"
18152 fi
18153 ;;
18154 esac
18155fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018156{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18157echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018158if test "$DYNLOADFILE" != "dynload_stub.o"
18159then
Martin v. Löwis11437992002-04-12 09:54:03 +000018160
18161cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018162#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018163_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018164
18165fi
18166
Neil Schemenauer4e425612001-06-19 15:44:15 +000018167# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18168
Michael W. Hudson54241132001-12-07 15:38:26 +000018169
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018170{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18171echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018172if test -z "$MACHDEP_OBJS"
18173then
Jack Jansene578a632001-08-15 01:27:14 +000018174 MACHDEP_OBJS=$extra_machdep_objs
18175else
18176 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018177fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018178{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18179echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018180
Guido van Rossum627b2d71993-12-24 10:39:16 +000018181# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018182
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
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
Martin v. Löwisd6320502004-08-12 13:45:08 +000018253
Martin v. Löwisc3001752005-01-23 09:27:24 +000018254
18255
Neal Norwitz05a45592006-03-20 06:30:08 +000018256
18257
Martin v. Löwis382abef2007-02-19 10:55:19 +000018258
18259
Christian Heimes36281872007-11-30 21:11:28 +000018260
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018261
18262
Jesse Noller355b1262009-04-02 00:03:28 +000018263
18264
18265
18266
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018280
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018281for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18282 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018283 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018284 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018285 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018286 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018287 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018288 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18289 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018290 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018291 setlocale setregid setreuid setresuid setresgid \
18292 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018293 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018294 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018295 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018296do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018297as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18298{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18299echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018300if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018301 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018302else
Martin v. Löwis11437992002-04-12 09:54:03 +000018303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018304/* confdefs.h. */
18305_ACEOF
18306cat confdefs.h >>conftest.$ac_ext
18307cat >>conftest.$ac_ext <<_ACEOF
18308/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018309/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18310 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18311#define $ac_func innocuous_$ac_func
18312
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018313/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018314 which can conflict with char $ac_func (); below.
18315 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018316 <limits.h> exists even on freestanding compilers. */
18317
18318#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018319# include <limits.h>
18320#else
18321# include <assert.h>
18322#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018323
18324#undef $ac_func
18325
Martin v. Löwiseba40652007-08-30 20:10:57 +000018326/* Override any GCC internal prototype to avoid an error.
18327 Use char because int might match the return type of a GCC
18328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018329#ifdef __cplusplus
18330extern "C"
18331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018332char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018333/* The GNU C library defines this for functions which it implements
18334 to always fail with ENOSYS. Some functions are actually named
18335 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018336#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018337choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018338#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018339
Skip Montanaro6dead952003-09-25 14:50:04 +000018340int
18341main ()
18342{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018343return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018344 ;
18345 return 0;
18346}
18347_ACEOF
18348rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018349if { (ac_try="$ac_link"
18350case "(($ac_try" in
18351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18352 *) ac_try_echo=$ac_try;;
18353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018357 grep -v '^ *+' conftest.er1 >conftest.err
18358 rm -f conftest.er1
18359 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018361 (exit $ac_status); } && {
18362 test -z "$ac_c_werror_flag" ||
18363 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018364 } && test -s conftest$ac_exeext &&
18365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018366 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018367else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018369sed 's/^/| /' conftest.$ac_ext >&5
18370
Martin v. Löwiseba40652007-08-30 20:10:57 +000018371 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018373
18374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018375 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018376fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018377ac_res=`eval echo '${'$as_ac_var'}'`
18378 { echo "$as_me:$LINENO: result: $ac_res" >&5
18379echo "${ECHO_T}$ac_res" >&6; }
18380if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018381 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018382#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018383_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018384
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018385fi
18386done
18387
Michael W. Hudson54241132001-12-07 15:38:26 +000018388
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018389# For some functions, having a definition is not sufficient, since
18390# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018391{ echo "$as_me:$LINENO: checking for chroot" >&5
18392echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018393cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018394/* confdefs.h. */
18395_ACEOF
18396cat confdefs.h >>conftest.$ac_ext
18397cat >>conftest.$ac_ext <<_ACEOF
18398/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018399#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018400int
18401main ()
18402{
18403void *x=chroot
18404 ;
18405 return 0;
18406}
18407_ACEOF
18408rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018409if { (ac_try="$ac_compile"
18410case "(($ac_try" in
18411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18412 *) ac_try_echo=$ac_try;;
18413esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018417 grep -v '^ *+' conftest.er1 >conftest.err
18418 rm -f conftest.er1
18419 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018421 (exit $ac_status); } && {
18422 test -z "$ac_c_werror_flag" ||
18423 test ! -s conftest.err
18424 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018425
18426cat >>confdefs.h <<\_ACEOF
18427#define HAVE_CHROOT 1
18428_ACEOF
18429
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018430 { echo "$as_me:$LINENO: result: yes" >&5
18431echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018434sed 's/^/| /' conftest.$ac_ext >&5
18435
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018436 { echo "$as_me:$LINENO: result: no" >&5
18437echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018438
18439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018440
18441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018442{ echo "$as_me:$LINENO: checking for link" >&5
18443echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018444cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018445/* confdefs.h. */
18446_ACEOF
18447cat confdefs.h >>conftest.$ac_ext
18448cat >>conftest.$ac_ext <<_ACEOF
18449/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018450#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018451int
18452main ()
18453{
18454void *x=link
18455 ;
18456 return 0;
18457}
18458_ACEOF
18459rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018460if { (ac_try="$ac_compile"
18461case "(($ac_try" in
18462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18463 *) ac_try_echo=$ac_try;;
18464esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018468 grep -v '^ *+' conftest.er1 >conftest.err
18469 rm -f conftest.er1
18470 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018472 (exit $ac_status); } && {
18473 test -z "$ac_c_werror_flag" ||
18474 test ! -s conftest.err
18475 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018476
18477cat >>confdefs.h <<\_ACEOF
18478#define HAVE_LINK 1
18479_ACEOF
18480
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018481 { echo "$as_me:$LINENO: result: yes" >&5
18482echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018485sed 's/^/| /' conftest.$ac_ext >&5
18486
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018487 { echo "$as_me:$LINENO: result: no" >&5
18488echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018489
18490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018491
18492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018493{ echo "$as_me:$LINENO: checking for symlink" >&5
18494echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018496/* confdefs.h. */
18497_ACEOF
18498cat confdefs.h >>conftest.$ac_ext
18499cat >>conftest.$ac_ext <<_ACEOF
18500/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018501#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018502int
18503main ()
18504{
18505void *x=symlink
18506 ;
18507 return 0;
18508}
18509_ACEOF
18510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018511if { (ac_try="$ac_compile"
18512case "(($ac_try" in
18513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18514 *) ac_try_echo=$ac_try;;
18515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018519 grep -v '^ *+' conftest.er1 >conftest.err
18520 rm -f conftest.er1
18521 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018523 (exit $ac_status); } && {
18524 test -z "$ac_c_werror_flag" ||
18525 test ! -s conftest.err
18526 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018527
18528cat >>confdefs.h <<\_ACEOF
18529#define HAVE_SYMLINK 1
18530_ACEOF
18531
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018532 { echo "$as_me:$LINENO: result: yes" >&5
18533echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018536sed 's/^/| /' conftest.$ac_ext >&5
18537
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018538 { echo "$as_me:$LINENO: result: no" >&5
18539echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018540
18541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018542
18543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018544{ echo "$as_me:$LINENO: checking for fchdir" >&5
18545echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018546cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018547/* confdefs.h. */
18548_ACEOF
18549cat confdefs.h >>conftest.$ac_ext
18550cat >>conftest.$ac_ext <<_ACEOF
18551/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018552#include <unistd.h>
18553int
18554main ()
18555{
18556void *x=fchdir
18557 ;
18558 return 0;
18559}
18560_ACEOF
18561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018562if { (ac_try="$ac_compile"
18563case "(($ac_try" in
18564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18565 *) ac_try_echo=$ac_try;;
18566esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018570 grep -v '^ *+' conftest.er1 >conftest.err
18571 rm -f conftest.er1
18572 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018574 (exit $ac_status); } && {
18575 test -z "$ac_c_werror_flag" ||
18576 test ! -s conftest.err
18577 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018578
18579cat >>confdefs.h <<\_ACEOF
18580#define HAVE_FCHDIR 1
18581_ACEOF
18582
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018583 { echo "$as_me:$LINENO: result: yes" >&5
18584echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018585else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018587sed 's/^/| /' conftest.$ac_ext >&5
18588
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018589 { echo "$as_me:$LINENO: result: no" >&5
18590echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018591
18592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018593
18594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018595{ echo "$as_me:$LINENO: checking for fsync" >&5
18596echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018597cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018598/* confdefs.h. */
18599_ACEOF
18600cat confdefs.h >>conftest.$ac_ext
18601cat >>conftest.$ac_ext <<_ACEOF
18602/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018603#include <unistd.h>
18604int
18605main ()
18606{
18607void *x=fsync
18608 ;
18609 return 0;
18610}
18611_ACEOF
18612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018613if { (ac_try="$ac_compile"
18614case "(($ac_try" in
18615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18616 *) ac_try_echo=$ac_try;;
18617esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018621 grep -v '^ *+' conftest.er1 >conftest.err
18622 rm -f conftest.er1
18623 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018625 (exit $ac_status); } && {
18626 test -z "$ac_c_werror_flag" ||
18627 test ! -s conftest.err
18628 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018629
18630cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018631#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018632_ACEOF
18633
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018634 { echo "$as_me:$LINENO: result: yes" >&5
18635echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018636else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018638sed 's/^/| /' conftest.$ac_ext >&5
18639
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018640 { echo "$as_me:$LINENO: result: no" >&5
18641echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018642
18643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018644
18645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018646{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18647echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018649/* confdefs.h. */
18650_ACEOF
18651cat confdefs.h >>conftest.$ac_ext
18652cat >>conftest.$ac_ext <<_ACEOF
18653/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018654#include <unistd.h>
18655int
18656main ()
18657{
18658void *x=fdatasync
18659 ;
18660 return 0;
18661}
18662_ACEOF
18663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018664if { (ac_try="$ac_compile"
18665case "(($ac_try" in
18666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18667 *) ac_try_echo=$ac_try;;
18668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018672 grep -v '^ *+' conftest.er1 >conftest.err
18673 rm -f conftest.er1
18674 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018676 (exit $ac_status); } && {
18677 test -z "$ac_c_werror_flag" ||
18678 test ! -s conftest.err
18679 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018680
18681cat >>confdefs.h <<\_ACEOF
18682#define HAVE_FDATASYNC 1
18683_ACEOF
18684
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018685 { echo "$as_me:$LINENO: result: yes" >&5
18686echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018687else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018689sed 's/^/| /' conftest.$ac_ext >&5
18690
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018691 { echo "$as_me:$LINENO: result: no" >&5
18692echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018693
18694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018695
18696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018697{ echo "$as_me:$LINENO: checking for epoll" >&5
18698echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018699cat >conftest.$ac_ext <<_ACEOF
18700/* confdefs.h. */
18701_ACEOF
18702cat confdefs.h >>conftest.$ac_ext
18703cat >>conftest.$ac_ext <<_ACEOF
18704/* end confdefs.h. */
18705#include <sys/epoll.h>
18706int
18707main ()
18708{
18709void *x=epoll_create
18710 ;
18711 return 0;
18712}
18713_ACEOF
18714rm -f conftest.$ac_objext
18715if { (ac_try="$ac_compile"
18716case "(($ac_try" in
18717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18718 *) ac_try_echo=$ac_try;;
18719esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018721 (eval "$ac_compile") 2>conftest.er1
18722 ac_status=$?
18723 grep -v '^ *+' conftest.er1 >conftest.err
18724 rm -f conftest.er1
18725 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018727 (exit $ac_status); } && {
18728 test -z "$ac_c_werror_flag" ||
18729 test ! -s conftest.err
18730 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018731
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018732cat >>confdefs.h <<\_ACEOF
18733#define HAVE_EPOLL 1
18734_ACEOF
18735
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018736 { echo "$as_me:$LINENO: result: yes" >&5
18737echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018739 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018740sed 's/^/| /' conftest.$ac_ext >&5
18741
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018742 { echo "$as_me:$LINENO: result: no" >&5
18743echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018744
18745fi
18746
18747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018748{ echo "$as_me:$LINENO: checking for kqueue" >&5
18749echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018750cat >conftest.$ac_ext <<_ACEOF
18751/* confdefs.h. */
18752_ACEOF
18753cat confdefs.h >>conftest.$ac_ext
18754cat >>conftest.$ac_ext <<_ACEOF
18755/* end confdefs.h. */
18756
18757#include <sys/types.h>
18758#include <sys/event.h>
18759
18760int
18761main ()
18762{
18763int x=kqueue()
18764 ;
18765 return 0;
18766}
18767_ACEOF
18768rm -f conftest.$ac_objext
18769if { (ac_try="$ac_compile"
18770case "(($ac_try" in
18771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18772 *) ac_try_echo=$ac_try;;
18773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018775 (eval "$ac_compile") 2>conftest.er1
18776 ac_status=$?
18777 grep -v '^ *+' conftest.er1 >conftest.err
18778 rm -f conftest.er1
18779 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018781 (exit $ac_status); } && {
18782 test -z "$ac_c_werror_flag" ||
18783 test ! -s conftest.err
18784 } && test -s conftest.$ac_objext; then
18785
18786cat >>confdefs.h <<\_ACEOF
18787#define HAVE_KQUEUE 1
18788_ACEOF
18789
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018790 { echo "$as_me:$LINENO: result: yes" >&5
18791echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018792else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018793 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018794sed 's/^/| /' conftest.$ac_ext >&5
18795
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018796 { echo "$as_me:$LINENO: result: no" >&5
18797echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018798
18799fi
18800
18801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018802# On some systems (eg. FreeBSD 5), we would find a definition of the
18803# functions ctermid_r, setgroups in the library, but no prototype
18804# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18805# address to avoid compiler warnings and potential miscompilations
18806# because of the missing prototypes.
18807
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018808{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18809echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018811/* confdefs.h. */
18812_ACEOF
18813cat confdefs.h >>conftest.$ac_ext
18814cat >>conftest.$ac_ext <<_ACEOF
18815/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018816
18817#include "confdefs.h"
18818#include <stdio.h>
18819
Martin v. Löwisd5843682002-11-21 20:41:28 +000018820int
18821main ()
18822{
18823void* p = ctermid_r
18824 ;
18825 return 0;
18826}
18827_ACEOF
18828rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018829if { (ac_try="$ac_compile"
18830case "(($ac_try" in
18831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18832 *) ac_try_echo=$ac_try;;
18833esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018837 grep -v '^ *+' conftest.er1 >conftest.err
18838 rm -f conftest.er1
18839 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018841 (exit $ac_status); } && {
18842 test -z "$ac_c_werror_flag" ||
18843 test ! -s conftest.err
18844 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018845
18846cat >>confdefs.h <<\_ACEOF
18847#define HAVE_CTERMID_R 1
18848_ACEOF
18849
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018850 { echo "$as_me:$LINENO: result: yes" >&5
18851echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018852else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018854sed 's/^/| /' conftest.$ac_ext >&5
18855
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018856 { echo "$as_me:$LINENO: result: no" >&5
18857echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018858
18859fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018860
Martin v. Löwiseba40652007-08-30 20:10:57 +000018861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018863{ echo "$as_me:$LINENO: checking for flock" >&5
18864echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018865cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018866/* confdefs.h. */
18867_ACEOF
18868cat confdefs.h >>conftest.$ac_ext
18869cat >>conftest.$ac_ext <<_ACEOF
18870/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018871
18872#include "confdefs.h"
18873#include <sys/file.h>
18874
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018875int
18876main ()
18877{
18878void* p = flock
18879 ;
18880 return 0;
18881}
18882_ACEOF
18883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018884if { (ac_try="$ac_compile"
18885case "(($ac_try" in
18886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18887 *) ac_try_echo=$ac_try;;
18888esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018892 grep -v '^ *+' conftest.er1 >conftest.err
18893 rm -f conftest.er1
18894 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018896 (exit $ac_status); } && {
18897 test -z "$ac_c_werror_flag" ||
18898 test ! -s conftest.err
18899 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018900
18901cat >>confdefs.h <<\_ACEOF
18902#define HAVE_FLOCK 1
18903_ACEOF
18904
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018905 { echo "$as_me:$LINENO: result: yes" >&5
18906echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018909sed 's/^/| /' conftest.$ac_ext >&5
18910
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018911 { echo "$as_me:$LINENO: result: no" >&5
18912echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018913
18914fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018915
Martin v. Löwiseba40652007-08-30 20:10:57 +000018916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18917
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018918{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18919echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018920cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018921/* confdefs.h. */
18922_ACEOF
18923cat confdefs.h >>conftest.$ac_ext
18924cat >>conftest.$ac_ext <<_ACEOF
18925/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018926
18927#include "confdefs.h"
18928#include <unistd.h>
18929
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018930int
18931main ()
18932{
18933void* p = getpagesize
18934 ;
18935 return 0;
18936}
18937_ACEOF
18938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018939if { (ac_try="$ac_compile"
18940case "(($ac_try" in
18941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18942 *) ac_try_echo=$ac_try;;
18943esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018947 grep -v '^ *+' conftest.er1 >conftest.err
18948 rm -f conftest.er1
18949 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018951 (exit $ac_status); } && {
18952 test -z "$ac_c_werror_flag" ||
18953 test ! -s conftest.err
18954 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018955
18956cat >>confdefs.h <<\_ACEOF
18957#define HAVE_GETPAGESIZE 1
18958_ACEOF
18959
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018960 { echo "$as_me:$LINENO: result: yes" >&5
18961echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018962else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018964sed 's/^/| /' conftest.$ac_ext >&5
18965
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018966 { echo "$as_me:$LINENO: result: no" >&5
18967echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018968
18969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018970
18971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018972
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018973for ac_prog in true
18974do
18975 # Extract the first word of "$ac_prog", so it can be a program name with args.
18976set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018977{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18978echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018979if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018980 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018981else
18982 if test -n "$TRUE"; then
18983 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18984else
18985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18986for as_dir in $PATH
18987do
18988 IFS=$as_save_IFS
18989 test -z "$as_dir" && as_dir=.
18990 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018991 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 +000018992 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018993 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018994 break 2
18995 fi
18996done
18997done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018998IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018999
19000fi
19001fi
19002TRUE=$ac_cv_prog_TRUE
19003if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019004 { echo "$as_me:$LINENO: result: $TRUE" >&5
19005echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019006else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019007 { echo "$as_me:$LINENO: result: no" >&5
19008echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019009fi
19010
Martin v. Löwiseba40652007-08-30 20:10:57 +000019011
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019012 test -n "$TRUE" && break
19013done
19014test -n "$TRUE" || TRUE="/bin/true"
19015
19016
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019017{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
19018echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019019if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019020 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019021else
19022 ac_check_lib_save_LIBS=$LIBS
19023LIBS="-lc $LIBS"
19024cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019025/* confdefs.h. */
19026_ACEOF
19027cat confdefs.h >>conftest.$ac_ext
19028cat >>conftest.$ac_ext <<_ACEOF
19029/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019030
Martin v. Löwiseba40652007-08-30 20:10:57 +000019031/* Override any GCC internal prototype to avoid an error.
19032 Use char because int might match the return type of a GCC
19033 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019034#ifdef __cplusplus
19035extern "C"
19036#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019037char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019038int
19039main ()
19040{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019041return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019042 ;
19043 return 0;
19044}
19045_ACEOF
19046rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019047if { (ac_try="$ac_link"
19048case "(($ac_try" in
19049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19050 *) ac_try_echo=$ac_try;;
19051esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019053 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019055 grep -v '^ *+' conftest.er1 >conftest.err
19056 rm -f conftest.er1
19057 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019059 (exit $ac_status); } && {
19060 test -z "$ac_c_werror_flag" ||
19061 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019062 } && test -s conftest$ac_exeext &&
19063 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019064 ac_cv_lib_c_inet_aton=yes
19065else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019067sed 's/^/| /' conftest.$ac_ext >&5
19068
Martin v. Löwiseba40652007-08-30 20:10:57 +000019069 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019071
19072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019074LIBS=$ac_check_lib_save_LIBS
19075fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019076{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19077echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19078if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019079 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019080else
19081
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019082{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19083echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019084if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019085 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019086else
19087 ac_check_lib_save_LIBS=$LIBS
19088LIBS="-lresolv $LIBS"
19089cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019090/* confdefs.h. */
19091_ACEOF
19092cat confdefs.h >>conftest.$ac_ext
19093cat >>conftest.$ac_ext <<_ACEOF
19094/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019095
Martin v. Löwiseba40652007-08-30 20:10:57 +000019096/* Override any GCC internal prototype to avoid an error.
19097 Use char because int might match the return type of a GCC
19098 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019099#ifdef __cplusplus
19100extern "C"
19101#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019102char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019103int
19104main ()
19105{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019106return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019107 ;
19108 return 0;
19109}
19110_ACEOF
19111rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019112if { (ac_try="$ac_link"
19113case "(($ac_try" in
19114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19115 *) ac_try_echo=$ac_try;;
19116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019118 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019120 grep -v '^ *+' conftest.er1 >conftest.err
19121 rm -f conftest.er1
19122 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019124 (exit $ac_status); } && {
19125 test -z "$ac_c_werror_flag" ||
19126 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019127 } && test -s conftest$ac_exeext &&
19128 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019129 ac_cv_lib_resolv_inet_aton=yes
19130else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019132sed 's/^/| /' conftest.$ac_ext >&5
19133
Martin v. Löwiseba40652007-08-30 20:10:57 +000019134 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019136
19137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019138 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019139LIBS=$ac_check_lib_save_LIBS
19140fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019141{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19142echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19143if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019144 cat >>confdefs.h <<_ACEOF
19145#define HAVE_LIBRESOLV 1
19146_ACEOF
19147
19148 LIBS="-lresolv $LIBS"
19149
19150fi
19151
19152
19153fi
19154
19155
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019156# On Tru64, chflags seems to be present, but calling it will
19157# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019158{ echo "$as_me:$LINENO: checking for chflags" >&5
19159echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019160if test "${ac_cv_have_chflags+set}" = set; then
19161 echo $ECHO_N "(cached) $ECHO_C" >&6
19162else
19163 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019164 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019165else
19166 cat >conftest.$ac_ext <<_ACEOF
19167/* confdefs.h. */
19168_ACEOF
19169cat confdefs.h >>conftest.$ac_ext
19170cat >>conftest.$ac_ext <<_ACEOF
19171/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019172[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019173#include <sys/stat.h>
19174#include <unistd.h>
19175int main(int argc, char*argv[])
19176{
19177 if(chflags(argv[0], 0) != 0)
19178 return 1;
19179 return 0;
19180}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019181]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019182_ACEOF
19183rm -f conftest$ac_exeext
19184if { (ac_try="$ac_link"
19185case "(($ac_try" in
19186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19187 *) ac_try_echo=$ac_try;;
19188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019190 (eval "$ac_link") 2>&5
19191 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019193 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19194 { (case "(($ac_try" in
19195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19196 *) ac_try_echo=$ac_try;;
19197esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019199 (eval "$ac_try") 2>&5
19200 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019202 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019203 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019204else
19205 echo "$as_me: program exited with status $ac_status" >&5
19206echo "$as_me: failed program was:" >&5
19207sed 's/^/| /' conftest.$ac_ext >&5
19208
19209( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019210ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019211fi
19212rm -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 +000019213fi
19214
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019215
19216
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019217fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019218{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19219echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019220if test "$ac_cv_have_chflags" = cross ; then
19221 { echo "$as_me:$LINENO: checking for chflags" >&5
19222echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19223if test "${ac_cv_func_chflags+set}" = set; then
19224 echo $ECHO_N "(cached) $ECHO_C" >&6
19225else
19226 cat >conftest.$ac_ext <<_ACEOF
19227/* confdefs.h. */
19228_ACEOF
19229cat confdefs.h >>conftest.$ac_ext
19230cat >>conftest.$ac_ext <<_ACEOF
19231/* end confdefs.h. */
19232/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19233 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19234#define chflags innocuous_chflags
19235
19236/* System header to define __stub macros and hopefully few prototypes,
19237 which can conflict with char chflags (); below.
19238 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19239 <limits.h> exists even on freestanding compilers. */
19240
19241#ifdef __STDC__
19242# include <limits.h>
19243#else
19244# include <assert.h>
19245#endif
19246
19247#undef chflags
19248
19249/* Override any GCC internal prototype to avoid an error.
19250 Use char because int might match the return type of a GCC
19251 builtin and then its argument prototype would still apply. */
19252#ifdef __cplusplus
19253extern "C"
19254#endif
19255char chflags ();
19256/* The GNU C library defines this for functions which it implements
19257 to always fail with ENOSYS. Some functions are actually named
19258 something starting with __ and the normal name is an alias. */
19259#if defined __stub_chflags || defined __stub___chflags
19260choke me
19261#endif
19262
19263int
19264main ()
19265{
19266return chflags ();
19267 ;
19268 return 0;
19269}
19270_ACEOF
19271rm -f conftest.$ac_objext conftest$ac_exeext
19272if { (ac_try="$ac_link"
19273case "(($ac_try" in
19274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19275 *) ac_try_echo=$ac_try;;
19276esac
19277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19278 (eval "$ac_link") 2>conftest.er1
19279 ac_status=$?
19280 grep -v '^ *+' conftest.er1 >conftest.err
19281 rm -f conftest.er1
19282 cat conftest.err >&5
19283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19284 (exit $ac_status); } && {
19285 test -z "$ac_c_werror_flag" ||
19286 test ! -s conftest.err
19287 } && test -s conftest$ac_exeext &&
19288 $as_test_x conftest$ac_exeext; then
19289 ac_cv_func_chflags=yes
19290else
19291 echo "$as_me: failed program was:" >&5
19292sed 's/^/| /' conftest.$ac_ext >&5
19293
19294 ac_cv_func_chflags=no
19295fi
19296
19297rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19298 conftest$ac_exeext conftest.$ac_ext
19299fi
19300{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19301echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19302if test $ac_cv_func_chflags = yes; then
19303 ac_cv_have_chflags="yes"
19304else
19305 ac_cv_have_chflags="no"
19306fi
19307
19308fi
19309if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019310
19311cat >>confdefs.h <<\_ACEOF
19312#define HAVE_CHFLAGS 1
19313_ACEOF
19314
19315fi
19316
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019317{ echo "$as_me:$LINENO: checking for lchflags" >&5
19318echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019319if test "${ac_cv_have_lchflags+set}" = set; then
19320 echo $ECHO_N "(cached) $ECHO_C" >&6
19321else
19322 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019323 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019324else
19325 cat >conftest.$ac_ext <<_ACEOF
19326/* confdefs.h. */
19327_ACEOF
19328cat confdefs.h >>conftest.$ac_ext
19329cat >>conftest.$ac_ext <<_ACEOF
19330/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019331[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019332#include <sys/stat.h>
19333#include <unistd.h>
19334int main(int argc, char*argv[])
19335{
19336 if(lchflags(argv[0], 0) != 0)
19337 return 1;
19338 return 0;
19339}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019340]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019341_ACEOF
19342rm -f conftest$ac_exeext
19343if { (ac_try="$ac_link"
19344case "(($ac_try" in
19345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19346 *) ac_try_echo=$ac_try;;
19347esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019349 (eval "$ac_link") 2>&5
19350 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19353 { (case "(($ac_try" in
19354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19355 *) ac_try_echo=$ac_try;;
19356esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019358 (eval "$ac_try") 2>&5
19359 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019361 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019362 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019363else
19364 echo "$as_me: program exited with status $ac_status" >&5
19365echo "$as_me: failed program was:" >&5
19366sed 's/^/| /' conftest.$ac_ext >&5
19367
19368( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019369ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019370fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19372fi
19373
19374
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019375
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019376fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019377{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19378echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019379if test "$ac_cv_have_lchflags" = cross ; then
19380 { echo "$as_me:$LINENO: checking for lchflags" >&5
19381echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19382if test "${ac_cv_func_lchflags+set}" = set; then
19383 echo $ECHO_N "(cached) $ECHO_C" >&6
19384else
19385 cat >conftest.$ac_ext <<_ACEOF
19386/* confdefs.h. */
19387_ACEOF
19388cat confdefs.h >>conftest.$ac_ext
19389cat >>conftest.$ac_ext <<_ACEOF
19390/* end confdefs.h. */
19391/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19392 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19393#define lchflags innocuous_lchflags
19394
19395/* System header to define __stub macros and hopefully few prototypes,
19396 which can conflict with char lchflags (); below.
19397 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19398 <limits.h> exists even on freestanding compilers. */
19399
19400#ifdef __STDC__
19401# include <limits.h>
19402#else
19403# include <assert.h>
19404#endif
19405
19406#undef lchflags
19407
19408/* Override any GCC internal prototype to avoid an error.
19409 Use char because int might match the return type of a GCC
19410 builtin and then its argument prototype would still apply. */
19411#ifdef __cplusplus
19412extern "C"
19413#endif
19414char lchflags ();
19415/* The GNU C library defines this for functions which it implements
19416 to always fail with ENOSYS. Some functions are actually named
19417 something starting with __ and the normal name is an alias. */
19418#if defined __stub_lchflags || defined __stub___lchflags
19419choke me
19420#endif
19421
19422int
19423main ()
19424{
19425return lchflags ();
19426 ;
19427 return 0;
19428}
19429_ACEOF
19430rm -f conftest.$ac_objext conftest$ac_exeext
19431if { (ac_try="$ac_link"
19432case "(($ac_try" in
19433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19434 *) ac_try_echo=$ac_try;;
19435esac
19436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19437 (eval "$ac_link") 2>conftest.er1
19438 ac_status=$?
19439 grep -v '^ *+' conftest.er1 >conftest.err
19440 rm -f conftest.er1
19441 cat conftest.err >&5
19442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19443 (exit $ac_status); } && {
19444 test -z "$ac_c_werror_flag" ||
19445 test ! -s conftest.err
19446 } && test -s conftest$ac_exeext &&
19447 $as_test_x conftest$ac_exeext; then
19448 ac_cv_func_lchflags=yes
19449else
19450 echo "$as_me: failed program was:" >&5
19451sed 's/^/| /' conftest.$ac_ext >&5
19452
19453 ac_cv_func_lchflags=no
19454fi
19455
19456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19457 conftest$ac_exeext conftest.$ac_ext
19458fi
19459{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19460echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19461if test $ac_cv_func_lchflags = yes; then
19462 ac_cv_have_lchflags="yes"
19463else
19464 ac_cv_have_lchflags="no"
19465fi
19466
19467fi
19468if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019469
19470cat >>confdefs.h <<\_ACEOF
19471#define HAVE_LCHFLAGS 1
19472_ACEOF
19473
19474fi
19475
Ronald Oussorenf8752642006-07-06 10:13:35 +000019476case $ac_sys_system/$ac_sys_release in
19477Darwin/*)
19478 _CUR_CFLAGS="${CFLAGS}"
19479 _CUR_LDFLAGS="${LDFLAGS}"
19480 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19481 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19482 ;;
19483esac
19484
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019485{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19486echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019487if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019488 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019489else
19490 ac_check_lib_save_LIBS=$LIBS
19491LIBS="-lz $LIBS"
19492cat >conftest.$ac_ext <<_ACEOF
19493/* confdefs.h. */
19494_ACEOF
19495cat confdefs.h >>conftest.$ac_ext
19496cat >>conftest.$ac_ext <<_ACEOF
19497/* end confdefs.h. */
19498
Martin v. Löwiseba40652007-08-30 20:10:57 +000019499/* Override any GCC internal prototype to avoid an error.
19500 Use char because int might match the return type of a GCC
19501 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019502#ifdef __cplusplus
19503extern "C"
19504#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019505char inflateCopy ();
19506int
19507main ()
19508{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019509return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019510 ;
19511 return 0;
19512}
19513_ACEOF
19514rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019515if { (ac_try="$ac_link"
19516case "(($ac_try" in
19517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19518 *) ac_try_echo=$ac_try;;
19519esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019521 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019522 ac_status=$?
19523 grep -v '^ *+' conftest.er1 >conftest.err
19524 rm -f conftest.er1
19525 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019527 (exit $ac_status); } && {
19528 test -z "$ac_c_werror_flag" ||
19529 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019530 } && test -s conftest$ac_exeext &&
19531 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019532 ac_cv_lib_z_inflateCopy=yes
19533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019534 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019535sed 's/^/| /' conftest.$ac_ext >&5
19536
Martin v. Löwiseba40652007-08-30 20:10:57 +000019537 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019539
19540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019541 conftest$ac_exeext conftest.$ac_ext
19542LIBS=$ac_check_lib_save_LIBS
19543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019544{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19545echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19546if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019547
19548cat >>confdefs.h <<\_ACEOF
19549#define HAVE_ZLIB_COPY 1
19550_ACEOF
19551
19552fi
19553
19554
Ronald Oussorenf8752642006-07-06 10:13:35 +000019555case $ac_sys_system/$ac_sys_release in
19556Darwin/*)
19557 CFLAGS="${_CUR_CFLAGS}"
19558 LDFLAGS="${_CUR_LDFLAGS}"
19559 ;;
19560esac
19561
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019562{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19563echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019565/* confdefs.h. */
19566_ACEOF
19567cat confdefs.h >>conftest.$ac_ext
19568cat >>conftest.$ac_ext <<_ACEOF
19569/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019570
19571#include "confdefs.h"
19572#include <netdb.h>
19573
Martin v. Löwise9416172003-05-03 10:12:45 +000019574int
19575main ()
19576{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019577void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019578 ;
19579 return 0;
19580}
19581_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019582rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583if { (ac_try="$ac_link"
19584case "(($ac_try" in
19585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19586 *) ac_try_echo=$ac_try;;
19587esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019589 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019591 grep -v '^ *+' conftest.er1 >conftest.err
19592 rm -f conftest.er1
19593 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019595 (exit $ac_status); } && {
19596 test -z "$ac_c_werror_flag" ||
19597 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019598 } && test -s conftest$ac_exeext &&
19599 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019600
19601cat >>confdefs.h <<\_ACEOF
19602#define HAVE_HSTRERROR 1
19603_ACEOF
19604
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019605 { echo "$as_me:$LINENO: result: yes" >&5
19606echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019607else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019609sed 's/^/| /' conftest.$ac_ext >&5
19610
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019611 { echo "$as_me:$LINENO: result: no" >&5
19612echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019613
19614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019615
19616rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019619{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19620echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019622/* confdefs.h. */
19623_ACEOF
19624cat confdefs.h >>conftest.$ac_ext
19625cat >>conftest.$ac_ext <<_ACEOF
19626/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019627
19628#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019629#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019630#include <sys/socket.h>
19631#include <netinet/in.h>
19632#include <arpa/inet.h>
19633
Martin v. Löwise9416172003-05-03 10:12:45 +000019634int
19635main ()
19636{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019637void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019638 ;
19639 return 0;
19640}
19641_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019642rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019643if { (ac_try="$ac_link"
19644case "(($ac_try" in
19645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19646 *) ac_try_echo=$ac_try;;
19647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019649 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019651 grep -v '^ *+' conftest.er1 >conftest.err
19652 rm -f conftest.er1
19653 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019655 (exit $ac_status); } && {
19656 test -z "$ac_c_werror_flag" ||
19657 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019658 } && test -s conftest$ac_exeext &&
19659 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019660
19661cat >>confdefs.h <<\_ACEOF
19662#define HAVE_INET_ATON 1
19663_ACEOF
19664
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019665 { echo "$as_me:$LINENO: result: yes" >&5
19666echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019667else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019669sed 's/^/| /' conftest.$ac_ext >&5
19670
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019671 { echo "$as_me:$LINENO: result: no" >&5
19672echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019673
19674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019675
19676rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019677 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019678
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019679{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19680echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019682/* confdefs.h. */
19683_ACEOF
19684cat confdefs.h >>conftest.$ac_ext
19685cat >>conftest.$ac_ext <<_ACEOF
19686/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019687
19688#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019689#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019690#include <sys/socket.h>
19691#include <netinet/in.h>
19692#include <arpa/inet.h>
19693
Martin v. Löwise9416172003-05-03 10:12:45 +000019694int
19695main ()
19696{
19697void* p = inet_pton
19698 ;
19699 return 0;
19700}
19701_ACEOF
19702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019703if { (ac_try="$ac_compile"
19704case "(($ac_try" in
19705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19706 *) ac_try_echo=$ac_try;;
19707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019711 grep -v '^ *+' conftest.er1 >conftest.err
19712 rm -f conftest.er1
19713 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019715 (exit $ac_status); } && {
19716 test -z "$ac_c_werror_flag" ||
19717 test ! -s conftest.err
19718 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019719
19720cat >>confdefs.h <<\_ACEOF
19721#define HAVE_INET_PTON 1
19722_ACEOF
19723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019724 { echo "$as_me:$LINENO: result: yes" >&5
19725echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019726else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019728sed 's/^/| /' conftest.$ac_ext >&5
19729
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019730 { echo "$as_me:$LINENO: result: no" >&5
19731echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019732
19733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019734
19735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019736
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019737# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019738{ echo "$as_me:$LINENO: checking for setgroups" >&5
19739echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019740cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019741/* confdefs.h. */
19742_ACEOF
19743cat confdefs.h >>conftest.$ac_ext
19744cat >>conftest.$ac_ext <<_ACEOF
19745/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019746
19747#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019748#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019749#ifdef HAVE_GRP_H
19750#include <grp.h>
19751#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019752
Martin v. Löwisd5843682002-11-21 20:41:28 +000019753int
19754main ()
19755{
19756void* p = setgroups
19757 ;
19758 return 0;
19759}
19760_ACEOF
19761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019762if { (ac_try="$ac_compile"
19763case "(($ac_try" in
19764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19765 *) ac_try_echo=$ac_try;;
19766esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019770 grep -v '^ *+' conftest.er1 >conftest.err
19771 rm -f conftest.er1
19772 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019774 (exit $ac_status); } && {
19775 test -z "$ac_c_werror_flag" ||
19776 test ! -s conftest.err
19777 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019778
19779cat >>confdefs.h <<\_ACEOF
19780#define HAVE_SETGROUPS 1
19781_ACEOF
19782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019783 { echo "$as_me:$LINENO: result: yes" >&5
19784echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019785else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019787sed 's/^/| /' conftest.$ac_ext >&5
19788
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019789 { echo "$as_me:$LINENO: result: no" >&5
19790echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019791
19792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019793
19794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019795
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019796# check for openpty and forkpty
19797
Martin v. Löwis11437992002-04-12 09:54:03 +000019798
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019799for ac_func in openpty
19800do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019801as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19802{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19803echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019804if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019805 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019806else
Martin v. Löwis11437992002-04-12 09:54:03 +000019807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019808/* confdefs.h. */
19809_ACEOF
19810cat confdefs.h >>conftest.$ac_ext
19811cat >>conftest.$ac_ext <<_ACEOF
19812/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019813/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19814 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19815#define $ac_func innocuous_$ac_func
19816
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019817/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019818 which can conflict with char $ac_func (); below.
19819 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019820 <limits.h> exists even on freestanding compilers. */
19821
19822#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019823# include <limits.h>
19824#else
19825# include <assert.h>
19826#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019827
19828#undef $ac_func
19829
Martin v. Löwiseba40652007-08-30 20:10:57 +000019830/* Override any GCC internal prototype to avoid an error.
19831 Use char because int might match the return type of a GCC
19832 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019833#ifdef __cplusplus
19834extern "C"
19835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019836char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019837/* The GNU C library defines this for functions which it implements
19838 to always fail with ENOSYS. Some functions are actually named
19839 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019840#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019841choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019842#endif
19843
Skip Montanaro6dead952003-09-25 14:50:04 +000019844int
19845main ()
19846{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019847return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019848 ;
19849 return 0;
19850}
19851_ACEOF
19852rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019853if { (ac_try="$ac_link"
19854case "(($ac_try" in
19855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19856 *) ac_try_echo=$ac_try;;
19857esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019859 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019861 grep -v '^ *+' conftest.er1 >conftest.err
19862 rm -f conftest.er1
19863 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019865 (exit $ac_status); } && {
19866 test -z "$ac_c_werror_flag" ||
19867 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019868 } && test -s conftest$ac_exeext &&
19869 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019870 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019871else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019873sed 's/^/| /' conftest.$ac_ext >&5
19874
Martin v. Löwiseba40652007-08-30 20:10:57 +000019875 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019877
19878rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019879 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019880fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019881ac_res=`eval echo '${'$as_ac_var'}'`
19882 { echo "$as_me:$LINENO: result: $ac_res" >&5
19883echo "${ECHO_T}$ac_res" >&6; }
19884if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019886#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019887_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019888
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019890 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19891echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019892if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019893 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019894else
Martin v. Löwis11437992002-04-12 09:54:03 +000019895 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019896LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019897cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019898/* confdefs.h. */
19899_ACEOF
19900cat confdefs.h >>conftest.$ac_ext
19901cat >>conftest.$ac_ext <<_ACEOF
19902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019903
Martin v. Löwiseba40652007-08-30 20:10:57 +000019904/* Override any GCC internal prototype to avoid an error.
19905 Use char because int might match the return type of a GCC
19906 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019907#ifdef __cplusplus
19908extern "C"
19909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019910char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019911int
19912main ()
19913{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019914return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019915 ;
19916 return 0;
19917}
19918_ACEOF
19919rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019920if { (ac_try="$ac_link"
19921case "(($ac_try" in
19922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19923 *) ac_try_echo=$ac_try;;
19924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019926 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019928 grep -v '^ *+' conftest.er1 >conftest.err
19929 rm -f conftest.er1
19930 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019932 (exit $ac_status); } && {
19933 test -z "$ac_c_werror_flag" ||
19934 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019935 } && test -s conftest$ac_exeext &&
19936 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019937 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019938else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019940sed 's/^/| /' conftest.$ac_ext >&5
19941
Martin v. Löwiseba40652007-08-30 20:10:57 +000019942 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019944
19945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019947LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019948fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019949{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19950echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19951if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019952 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019953#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019954_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019955 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019956else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019957 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19958echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019959if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019960 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019961else
19962 ac_check_lib_save_LIBS=$LIBS
19963LIBS="-lbsd $LIBS"
19964cat >conftest.$ac_ext <<_ACEOF
19965/* confdefs.h. */
19966_ACEOF
19967cat confdefs.h >>conftest.$ac_ext
19968cat >>conftest.$ac_ext <<_ACEOF
19969/* end confdefs.h. */
19970
Martin v. Löwiseba40652007-08-30 20:10:57 +000019971/* Override any GCC internal prototype to avoid an error.
19972 Use char because int might match the return type of a GCC
19973 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019974#ifdef __cplusplus
19975extern "C"
19976#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019977char openpty ();
19978int
19979main ()
19980{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019981return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019982 ;
19983 return 0;
19984}
19985_ACEOF
19986rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987if { (ac_try="$ac_link"
19988case "(($ac_try" in
19989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19990 *) ac_try_echo=$ac_try;;
19991esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019993 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019994 ac_status=$?
19995 grep -v '^ *+' conftest.er1 >conftest.err
19996 rm -f conftest.er1
19997 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019999 (exit $ac_status); } && {
20000 test -z "$ac_c_werror_flag" ||
20001 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020002 } && test -s conftest$ac_exeext &&
20003 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020004 ac_cv_lib_bsd_openpty=yes
20005else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020006 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020007sed 's/^/| /' conftest.$ac_ext >&5
20008
Martin v. Löwiseba40652007-08-30 20:10:57 +000020009 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020011
20012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020013 conftest$ac_exeext conftest.$ac_ext
20014LIBS=$ac_check_lib_save_LIBS
20015fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020016{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
20017echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
20018if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020019 cat >>confdefs.h <<\_ACEOF
20020#define HAVE_OPENPTY 1
20021_ACEOF
20022 LIBS="$LIBS -lbsd"
20023fi
20024
20025
20026fi
20027
Fred Drake8cef4cf2000-06-28 16:40:38 +000020028
20029fi
20030done
20031
Martin v. Löwis11437992002-04-12 09:54:03 +000020032
Fred Drake8cef4cf2000-06-28 16:40:38 +000020033for ac_func in forkpty
20034do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020035as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20036{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20037echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020039 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020040else
Martin v. Löwis11437992002-04-12 09:54:03 +000020041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020042/* confdefs.h. */
20043_ACEOF
20044cat confdefs.h >>conftest.$ac_ext
20045cat >>conftest.$ac_ext <<_ACEOF
20046/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020047/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20048 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20049#define $ac_func innocuous_$ac_func
20050
Fred Drake8cef4cf2000-06-28 16:40:38 +000020051/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020052 which can conflict with char $ac_func (); below.
20053 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020054 <limits.h> exists even on freestanding compilers. */
20055
20056#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020057# include <limits.h>
20058#else
20059# include <assert.h>
20060#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020061
20062#undef $ac_func
20063
Martin v. Löwiseba40652007-08-30 20:10:57 +000020064/* Override any GCC internal prototype to avoid an error.
20065 Use char because int might match the return type of a GCC
20066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020067#ifdef __cplusplus
20068extern "C"
20069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020070char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020071/* The GNU C library defines this for functions which it implements
20072 to always fail with ENOSYS. Some functions are actually named
20073 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020074#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020075choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020076#endif
20077
Skip Montanaro6dead952003-09-25 14:50:04 +000020078int
20079main ()
20080{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020081return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020082 ;
20083 return 0;
20084}
20085_ACEOF
20086rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020087if { (ac_try="$ac_link"
20088case "(($ac_try" in
20089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20090 *) ac_try_echo=$ac_try;;
20091esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020093 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020095 grep -v '^ *+' conftest.er1 >conftest.err
20096 rm -f conftest.er1
20097 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020099 (exit $ac_status); } && {
20100 test -z "$ac_c_werror_flag" ||
20101 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020102 } && test -s conftest$ac_exeext &&
20103 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020104 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020105else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020107sed 's/^/| /' conftest.$ac_ext >&5
20108
Martin v. Löwiseba40652007-08-30 20:10:57 +000020109 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020111
20112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020113 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020114fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020115ac_res=`eval echo '${'$as_ac_var'}'`
20116 { echo "$as_me:$LINENO: result: $ac_res" >&5
20117echo "${ECHO_T}$ac_res" >&6; }
20118if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020119 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020120#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020121_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020122
Fred Drake8cef4cf2000-06-28 16:40:38 +000020123else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020124 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20125echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020126if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020127 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020128else
Martin v. Löwis11437992002-04-12 09:54:03 +000020129 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020130LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020131cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020132/* confdefs.h. */
20133_ACEOF
20134cat confdefs.h >>conftest.$ac_ext
20135cat >>conftest.$ac_ext <<_ACEOF
20136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020137
Martin v. Löwiseba40652007-08-30 20:10:57 +000020138/* Override any GCC internal prototype to avoid an error.
20139 Use char because int might match the return type of a GCC
20140 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020141#ifdef __cplusplus
20142extern "C"
20143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020144char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020145int
20146main ()
20147{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020148return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020149 ;
20150 return 0;
20151}
20152_ACEOF
20153rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020154if { (ac_try="$ac_link"
20155case "(($ac_try" in
20156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20157 *) ac_try_echo=$ac_try;;
20158esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020160 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020162 grep -v '^ *+' conftest.er1 >conftest.err
20163 rm -f conftest.er1
20164 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020166 (exit $ac_status); } && {
20167 test -z "$ac_c_werror_flag" ||
20168 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020169 } && test -s conftest$ac_exeext &&
20170 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020171 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020174sed 's/^/| /' conftest.$ac_ext >&5
20175
Martin v. Löwiseba40652007-08-30 20:10:57 +000020176 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020178
20179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020180 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020181LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020182fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020183{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20184echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20185if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020186 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020187#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020188_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020189 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020191 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20192echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020193if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020194 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020195else
20196 ac_check_lib_save_LIBS=$LIBS
20197LIBS="-lbsd $LIBS"
20198cat >conftest.$ac_ext <<_ACEOF
20199/* confdefs.h. */
20200_ACEOF
20201cat confdefs.h >>conftest.$ac_ext
20202cat >>conftest.$ac_ext <<_ACEOF
20203/* end confdefs.h. */
20204
Martin v. Löwiseba40652007-08-30 20:10:57 +000020205/* Override any GCC internal prototype to avoid an error.
20206 Use char because int might match the return type of a GCC
20207 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020208#ifdef __cplusplus
20209extern "C"
20210#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020211char forkpty ();
20212int
20213main ()
20214{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020215return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020216 ;
20217 return 0;
20218}
20219_ACEOF
20220rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020221if { (ac_try="$ac_link"
20222case "(($ac_try" in
20223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20224 *) ac_try_echo=$ac_try;;
20225esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020227 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020228 ac_status=$?
20229 grep -v '^ *+' conftest.er1 >conftest.err
20230 rm -f conftest.er1
20231 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020233 (exit $ac_status); } && {
20234 test -z "$ac_c_werror_flag" ||
20235 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020236 } && test -s conftest$ac_exeext &&
20237 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020238 ac_cv_lib_bsd_forkpty=yes
20239else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020240 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020241sed 's/^/| /' conftest.$ac_ext >&5
20242
Martin v. Löwiseba40652007-08-30 20:10:57 +000020243 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020245
20246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020247 conftest$ac_exeext conftest.$ac_ext
20248LIBS=$ac_check_lib_save_LIBS
20249fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020250{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20251echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20252if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020253 cat >>confdefs.h <<\_ACEOF
20254#define HAVE_FORKPTY 1
20255_ACEOF
20256 LIBS="$LIBS -lbsd"
20257fi
20258
20259
20260fi
20261
Fred Drake8cef4cf2000-06-28 16:40:38 +000020262
20263fi
20264done
20265
Jack Jansendd19cf82001-12-06 22:36:17 +000020266
Brett Cannonaa5778d2008-03-18 04:09:00 +000020267# Stuff for expat.
20268
20269for ac_func in memmove
20270do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020271as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20272{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20273echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020274if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020275 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020276else
20277 cat >conftest.$ac_ext <<_ACEOF
20278/* confdefs.h. */
20279_ACEOF
20280cat confdefs.h >>conftest.$ac_ext
20281cat >>conftest.$ac_ext <<_ACEOF
20282/* end confdefs.h. */
20283/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20284 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20285#define $ac_func innocuous_$ac_func
20286
20287/* System header to define __stub macros and hopefully few prototypes,
20288 which can conflict with char $ac_func (); below.
20289 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20290 <limits.h> exists even on freestanding compilers. */
20291
20292#ifdef __STDC__
20293# include <limits.h>
20294#else
20295# include <assert.h>
20296#endif
20297
20298#undef $ac_func
20299
20300/* Override any GCC internal prototype to avoid an error.
20301 Use char because int might match the return type of a GCC
20302 builtin and then its argument prototype would still apply. */
20303#ifdef __cplusplus
20304extern "C"
20305#endif
20306char $ac_func ();
20307/* The GNU C library defines this for functions which it implements
20308 to always fail with ENOSYS. Some functions are actually named
20309 something starting with __ and the normal name is an alias. */
20310#if defined __stub_$ac_func || defined __stub___$ac_func
20311choke me
20312#endif
20313
20314int
20315main ()
20316{
20317return $ac_func ();
20318 ;
20319 return 0;
20320}
20321_ACEOF
20322rm -f conftest.$ac_objext conftest$ac_exeext
20323if { (ac_try="$ac_link"
20324case "(($ac_try" in
20325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20326 *) ac_try_echo=$ac_try;;
20327esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020329 (eval "$ac_link") 2>conftest.er1
20330 ac_status=$?
20331 grep -v '^ *+' conftest.er1 >conftest.err
20332 rm -f conftest.er1
20333 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020335 (exit $ac_status); } && {
20336 test -z "$ac_c_werror_flag" ||
20337 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020338 } && test -s conftest$ac_exeext &&
20339 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020340 eval "$as_ac_var=yes"
20341else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020342 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020343sed 's/^/| /' conftest.$ac_ext >&5
20344
20345 eval "$as_ac_var=no"
20346fi
20347
20348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20349 conftest$ac_exeext conftest.$ac_ext
20350fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020351ac_res=`eval echo '${'$as_ac_var'}'`
20352 { echo "$as_me:$LINENO: result: $ac_res" >&5
20353echo "${ECHO_T}$ac_res" >&6; }
20354if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020355 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020356#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020357_ACEOF
20358
20359fi
20360done
20361
20362
Michael W. Hudson54241132001-12-07 15:38:26 +000020363# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020364
20365
20366
20367
20368
20369
Fred Drake8cef4cf2000-06-28 16:40:38 +000020370for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20371do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020372as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20373{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20374echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020375if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020376 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020377else
Martin v. Löwis11437992002-04-12 09:54:03 +000020378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020379/* confdefs.h. */
20380_ACEOF
20381cat confdefs.h >>conftest.$ac_ext
20382cat >>conftest.$ac_ext <<_ACEOF
20383/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020384/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20385 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20386#define $ac_func innocuous_$ac_func
20387
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020388/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020389 which can conflict with char $ac_func (); below.
20390 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020391 <limits.h> exists even on freestanding compilers. */
20392
20393#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020394# include <limits.h>
20395#else
20396# include <assert.h>
20397#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020398
20399#undef $ac_func
20400
Martin v. Löwiseba40652007-08-30 20:10:57 +000020401/* Override any GCC internal prototype to avoid an error.
20402 Use char because int might match the return type of a GCC
20403 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020404#ifdef __cplusplus
20405extern "C"
20406#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020407char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020408/* The GNU C library defines this for functions which it implements
20409 to always fail with ENOSYS. Some functions are actually named
20410 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020411#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020412choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020413#endif
20414
Skip Montanaro6dead952003-09-25 14:50:04 +000020415int
20416main ()
20417{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020419 ;
20420 return 0;
20421}
20422_ACEOF
20423rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020424if { (ac_try="$ac_link"
20425case "(($ac_try" in
20426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20427 *) ac_try_echo=$ac_try;;
20428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020430 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020432 grep -v '^ *+' conftest.er1 >conftest.err
20433 rm -f conftest.er1
20434 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020436 (exit $ac_status); } && {
20437 test -z "$ac_c_werror_flag" ||
20438 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020439 } && test -s conftest$ac_exeext &&
20440 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020441 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020444sed 's/^/| /' conftest.$ac_ext >&5
20445
Martin v. Löwiseba40652007-08-30 20:10:57 +000020446 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020448
20449rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020450 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020451fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020452ac_res=`eval echo '${'$as_ac_var'}'`
20453 { echo "$as_me:$LINENO: result: $ac_res" >&5
20454echo "${ECHO_T}$ac_res" >&6; }
20455if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020457#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020458_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020459
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020460fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020461done
20462
Michael W. Hudson54241132001-12-07 15:38:26 +000020463
Martin v. Löwis11437992002-04-12 09:54:03 +000020464
20465
20466
Brett Cannonaa5778d2008-03-18 04:09:00 +000020467for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020468do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020469as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20470{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20471echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020472if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020474else
Martin v. Löwis11437992002-04-12 09:54:03 +000020475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020476/* confdefs.h. */
20477_ACEOF
20478cat confdefs.h >>conftest.$ac_ext
20479cat >>conftest.$ac_ext <<_ACEOF
20480/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020481/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20482 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20483#define $ac_func innocuous_$ac_func
20484
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020485/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020486 which can conflict with char $ac_func (); below.
20487 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020488 <limits.h> exists even on freestanding compilers. */
20489
20490#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020491# include <limits.h>
20492#else
20493# include <assert.h>
20494#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020495
20496#undef $ac_func
20497
Martin v. Löwiseba40652007-08-30 20:10:57 +000020498/* Override any GCC internal prototype to avoid an error.
20499 Use char because int might match the return type of a GCC
20500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020501#ifdef __cplusplus
20502extern "C"
20503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020504char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020505/* The GNU C library defines this for functions which it implements
20506 to always fail with ENOSYS. Some functions are actually named
20507 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020508#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020509choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020510#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020511
Skip Montanaro6dead952003-09-25 14:50:04 +000020512int
20513main ()
20514{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020515return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020516 ;
20517 return 0;
20518}
20519_ACEOF
20520rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020521if { (ac_try="$ac_link"
20522case "(($ac_try" in
20523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20524 *) ac_try_echo=$ac_try;;
20525esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020527 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020529 grep -v '^ *+' conftest.er1 >conftest.err
20530 rm -f conftest.er1
20531 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020533 (exit $ac_status); } && {
20534 test -z "$ac_c_werror_flag" ||
20535 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020536 } && test -s conftest$ac_exeext &&
20537 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020538 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020539else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020541sed 's/^/| /' conftest.$ac_ext >&5
20542
Martin v. Löwiseba40652007-08-30 20:10:57 +000020543 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020545
20546rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020548fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020549ac_res=`eval echo '${'$as_ac_var'}'`
20550 { echo "$as_me:$LINENO: result: $ac_res" >&5
20551echo "${ECHO_T}$ac_res" >&6; }
20552if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020553 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020554#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020555_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020556
Martin v. Löwis1142de32002-03-29 16:28:31 +000020557else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020558 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020559 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020560 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20561 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020562esac
20563
Martin v. Löwis1142de32002-03-29 16:28:31 +000020564fi
20565done
20566
20567
Martin v. Löwis11437992002-04-12 09:54:03 +000020568
Martin v. Löwis1142de32002-03-29 16:28:31 +000020569for ac_func in getpgrp
20570do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020571as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20572{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20573echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020574if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020575 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020576else
Martin v. Löwis11437992002-04-12 09:54:03 +000020577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020578/* confdefs.h. */
20579_ACEOF
20580cat confdefs.h >>conftest.$ac_ext
20581cat >>conftest.$ac_ext <<_ACEOF
20582/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020583/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20584 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20585#define $ac_func innocuous_$ac_func
20586
Martin v. Löwis1142de32002-03-29 16:28:31 +000020587/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020588 which can conflict with char $ac_func (); below.
20589 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020590 <limits.h> exists even on freestanding compilers. */
20591
20592#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020593# include <limits.h>
20594#else
20595# include <assert.h>
20596#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020597
20598#undef $ac_func
20599
Martin v. Löwiseba40652007-08-30 20:10:57 +000020600/* Override any GCC internal prototype to avoid an error.
20601 Use char because int might match the return type of a GCC
20602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020603#ifdef __cplusplus
20604extern "C"
20605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020606char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020607/* The GNU C library defines this for functions which it implements
20608 to always fail with ENOSYS. Some functions are actually named
20609 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020610#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020611choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020612#endif
20613
Skip Montanaro6dead952003-09-25 14:50:04 +000020614int
20615main ()
20616{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020617return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020618 ;
20619 return 0;
20620}
20621_ACEOF
20622rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020623if { (ac_try="$ac_link"
20624case "(($ac_try" in
20625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20626 *) ac_try_echo=$ac_try;;
20627esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020629 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020631 grep -v '^ *+' conftest.er1 >conftest.err
20632 rm -f conftest.er1
20633 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020635 (exit $ac_status); } && {
20636 test -z "$ac_c_werror_flag" ||
20637 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020638 } && test -s conftest$ac_exeext &&
20639 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020640 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020641else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020643sed 's/^/| /' conftest.$ac_ext >&5
20644
Martin v. Löwiseba40652007-08-30 20:10:57 +000020645 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020647
20648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020649 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020650fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020651ac_res=`eval echo '${'$as_ac_var'}'`
20652 { echo "$as_me:$LINENO: result: $ac_res" >&5
20653echo "${ECHO_T}$ac_res" >&6; }
20654if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020655 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020656#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020657_ACEOF
20658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020659/* confdefs.h. */
20660_ACEOF
20661cat confdefs.h >>conftest.$ac_ext
20662cat >>conftest.$ac_ext <<_ACEOF
20663/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020664#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020665int
20666main ()
20667{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020668getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020669 ;
20670 return 0;
20671}
20672_ACEOF
20673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020674if { (ac_try="$ac_compile"
20675case "(($ac_try" in
20676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20677 *) ac_try_echo=$ac_try;;
20678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020682 grep -v '^ *+' conftest.er1 >conftest.err
20683 rm -f conftest.er1
20684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020686 (exit $ac_status); } && {
20687 test -z "$ac_c_werror_flag" ||
20688 test ! -s conftest.err
20689 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020690
20691cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020692#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020693_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020694
Martin v. Löwis11437992002-04-12 09:54:03 +000020695
Guido van Rossumf78abae1997-01-21 22:02:36 +000020696else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020698sed 's/^/| /' conftest.$ac_ext >&5
20699
Martin v. Löwiseba40652007-08-30 20:10:57 +000020700
Guido van Rossum627b2d71993-12-24 10:39:16 +000020701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020702
20703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020704
Guido van Rossum627b2d71993-12-24 10:39:16 +000020705fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020706done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020707
Jack Jansen150753c2003-03-29 22:07:47 +000020708
20709for ac_func in setpgrp
20710do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020711as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20712{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20713echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020714if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020715 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020716else
Martin v. Löwis11437992002-04-12 09:54:03 +000020717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020718/* confdefs.h. */
20719_ACEOF
20720cat confdefs.h >>conftest.$ac_ext
20721cat >>conftest.$ac_ext <<_ACEOF
20722/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020723/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20724 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20725#define $ac_func innocuous_$ac_func
20726
Jack Jansen150753c2003-03-29 22:07:47 +000020727/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020728 which can conflict with char $ac_func (); below.
20729 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020730 <limits.h> exists even on freestanding compilers. */
20731
20732#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020733# include <limits.h>
20734#else
20735# include <assert.h>
20736#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020737
20738#undef $ac_func
20739
Martin v. Löwiseba40652007-08-30 20:10:57 +000020740/* Override any GCC internal prototype to avoid an error.
20741 Use char because int might match the return type of a GCC
20742 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020743#ifdef __cplusplus
20744extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020745#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020746char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020747/* The GNU C library defines this for functions which it implements
20748 to always fail with ENOSYS. Some functions are actually named
20749 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020750#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020751choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020752#endif
20753
Skip Montanaro6dead952003-09-25 14:50:04 +000020754int
20755main ()
20756{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020757return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020758 ;
20759 return 0;
20760}
20761_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020762rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020763if { (ac_try="$ac_link"
20764case "(($ac_try" in
20765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20766 *) ac_try_echo=$ac_try;;
20767esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020769 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020771 grep -v '^ *+' conftest.er1 >conftest.err
20772 rm -f conftest.er1
20773 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020775 (exit $ac_status); } && {
20776 test -z "$ac_c_werror_flag" ||
20777 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020778 } && test -s conftest$ac_exeext &&
20779 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020780 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020781else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020783sed 's/^/| /' conftest.$ac_ext >&5
20784
Martin v. Löwiseba40652007-08-30 20:10:57 +000020785 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020787
20788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020789 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020790fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020791ac_res=`eval echo '${'$as_ac_var'}'`
20792 { echo "$as_me:$LINENO: result: $ac_res" >&5
20793echo "${ECHO_T}$ac_res" >&6; }
20794if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020795 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020796#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020797_ACEOF
20798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020799/* confdefs.h. */
20800_ACEOF
20801cat confdefs.h >>conftest.$ac_ext
20802cat >>conftest.$ac_ext <<_ACEOF
20803/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020804#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020805int
20806main ()
20807{
20808setpgrp(0,0);
20809 ;
20810 return 0;
20811}
20812_ACEOF
20813rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020814if { (ac_try="$ac_compile"
20815case "(($ac_try" in
20816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20817 *) ac_try_echo=$ac_try;;
20818esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020820 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020822 grep -v '^ *+' conftest.er1 >conftest.err
20823 rm -f conftest.er1
20824 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020826 (exit $ac_status); } && {
20827 test -z "$ac_c_werror_flag" ||
20828 test ! -s conftest.err
20829 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020830
20831cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020832#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020833_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020834
Jack Jansen150753c2003-03-29 22:07:47 +000020835
20836else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020838sed 's/^/| /' conftest.$ac_ext >&5
20839
Martin v. Löwiseba40652007-08-30 20:10:57 +000020840
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020842
20843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020844
20845fi
20846done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020847
Martin v. Löwis11437992002-04-12 09:54:03 +000020848
Thomas Wouters3a584202000-08-05 23:28:51 +000020849for ac_func in gettimeofday
20850do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020851as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20852{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20853echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020854if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020856else
Martin v. Löwis11437992002-04-12 09:54:03 +000020857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020858/* confdefs.h. */
20859_ACEOF
20860cat confdefs.h >>conftest.$ac_ext
20861cat >>conftest.$ac_ext <<_ACEOF
20862/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020863/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20864 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20865#define $ac_func innocuous_$ac_func
20866
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020867/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020868 which can conflict with char $ac_func (); below.
20869 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020870 <limits.h> exists even on freestanding compilers. */
20871
20872#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020873# include <limits.h>
20874#else
20875# include <assert.h>
20876#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020877
20878#undef $ac_func
20879
Martin v. Löwiseba40652007-08-30 20:10:57 +000020880/* Override any GCC internal prototype to avoid an error.
20881 Use char because int might match the return type of a GCC
20882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020883#ifdef __cplusplus
20884extern "C"
20885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020886char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020887/* The GNU C library defines this for functions which it implements
20888 to always fail with ENOSYS. Some functions are actually named
20889 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020890#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020891choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020892#endif
20893
Skip Montanaro6dead952003-09-25 14:50:04 +000020894int
20895main ()
20896{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020897return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020898 ;
20899 return 0;
20900}
20901_ACEOF
20902rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020903if { (ac_try="$ac_link"
20904case "(($ac_try" in
20905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20906 *) ac_try_echo=$ac_try;;
20907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020909 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020911 grep -v '^ *+' conftest.er1 >conftest.err
20912 rm -f conftest.er1
20913 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020915 (exit $ac_status); } && {
20916 test -z "$ac_c_werror_flag" ||
20917 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020918 } && test -s conftest$ac_exeext &&
20919 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020920 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020923sed 's/^/| /' conftest.$ac_ext >&5
20924
Martin v. Löwiseba40652007-08-30 20:10:57 +000020925 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020927
20928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020929 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020930fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020931ac_res=`eval echo '${'$as_ac_var'}'`
20932 { echo "$as_me:$LINENO: result: $ac_res" >&5
20933echo "${ECHO_T}$ac_res" >&6; }
20934if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020935 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020936#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020937_ACEOF
20938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020939/* confdefs.h. */
20940_ACEOF
20941cat confdefs.h >>conftest.$ac_ext
20942cat >>conftest.$ac_ext <<_ACEOF
20943/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020944#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020945int
20946main ()
20947{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020948gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020949 ;
20950 return 0;
20951}
20952_ACEOF
20953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020954if { (ac_try="$ac_compile"
20955case "(($ac_try" in
20956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20957 *) ac_try_echo=$ac_try;;
20958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020962 grep -v '^ *+' conftest.er1 >conftest.err
20963 rm -f conftest.er1
20964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020966 (exit $ac_status); } && {
20967 test -z "$ac_c_werror_flag" ||
20968 test ! -s conftest.err
20969 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020970 :
20971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020973sed 's/^/| /' conftest.$ac_ext >&5
20974
Martin v. Löwis11437992002-04-12 09:54:03 +000020975
20976cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020977#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020978_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020979
Martin v. Löwis11437992002-04-12 09:54:03 +000020980
Guido van Rossum627b2d71993-12-24 10:39:16 +000020981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020982
20983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020984
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020985fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020986done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020987
Michael W. Hudson54241132001-12-07 15:38:26 +000020988
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020989{ echo "$as_me:$LINENO: checking for major" >&5
20990echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020992/* confdefs.h. */
20993_ACEOF
20994cat confdefs.h >>conftest.$ac_ext
20995cat >>conftest.$ac_ext <<_ACEOF
20996/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020997
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020998#if defined(MAJOR_IN_MKDEV)
20999#include <sys/mkdev.h>
21000#elif defined(MAJOR_IN_SYSMACROS)
21001#include <sys/sysmacros.h>
21002#else
21003#include <sys/types.h>
21004#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021005
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021006int
21007main ()
21008{
21009
21010 makedev(major(0),minor(0));
21011
21012 ;
21013 return 0;
21014}
21015_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000021016rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021017if { (ac_try="$ac_link"
21018case "(($ac_try" in
21019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21020 *) ac_try_echo=$ac_try;;
21021esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021023 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021025 grep -v '^ *+' conftest.er1 >conftest.err
21026 rm -f conftest.er1
21027 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021029 (exit $ac_status); } && {
21030 test -z "$ac_c_werror_flag" ||
21031 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021032 } && test -s conftest$ac_exeext &&
21033 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021034
21035
21036cat >>confdefs.h <<\_ACEOF
21037#define HAVE_DEVICE_MACROS 1
21038_ACEOF
21039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021040 { echo "$as_me:$LINENO: result: yes" >&5
21041echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021042
21043else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021045sed 's/^/| /' conftest.$ac_ext >&5
21046
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021047
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021048 { echo "$as_me:$LINENO: result: no" >&5
21049echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021050
21051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021052
21053rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021054 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021055
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021056# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021057# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021058{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21059echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021060cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021061/* confdefs.h. */
21062_ACEOF
21063cat confdefs.h >>conftest.$ac_ext
21064cat >>conftest.$ac_ext <<_ACEOF
21065/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021066
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021067#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021068#include <sys/socket.h>
21069#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021070#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021071
Martin v. Löwis11437992002-04-12 09:54:03 +000021072int
21073main ()
21074{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021075getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021076 ;
21077 return 0;
21078}
21079_ACEOF
21080rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021081if { (ac_try="$ac_link"
21082case "(($ac_try" in
21083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21084 *) ac_try_echo=$ac_try;;
21085esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021087 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021089 grep -v '^ *+' conftest.er1 >conftest.err
21090 rm -f conftest.er1
21091 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021093 (exit $ac_status); } && {
21094 test -z "$ac_c_werror_flag" ||
21095 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021096 } && test -s conftest$ac_exeext &&
21097 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021098 have_getaddrinfo=yes
21099else
21100 echo "$as_me: failed program was:" >&5
21101sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021102
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021103 have_getaddrinfo=no
21104fi
21105
21106rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21107 conftest$ac_exeext conftest.$ac_ext
21108{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21109echo "${ECHO_T}$have_getaddrinfo" >&6; }
21110if test $have_getaddrinfo = yes
21111then
21112 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021113echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021114 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21115 echo $ECHO_N "(cached) $ECHO_C" >&6
21116else
21117 if test "$cross_compiling" = yes; then
21118 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021119else
Martin v. Löwis11437992002-04-12 09:54:03 +000021120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021121/* confdefs.h. */
21122_ACEOF
21123cat confdefs.h >>conftest.$ac_ext
21124cat >>conftest.$ac_ext <<_ACEOF
21125/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021126
21127#include <sys/types.h>
21128#include <netdb.h>
21129#include <string.h>
21130#include <sys/socket.h>
21131#include <netinet/in.h>
21132
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021133int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021134{
21135 int passive, gaierr, inet4 = 0, inet6 = 0;
21136 struct addrinfo hints, *ai, *aitop;
21137 char straddr[INET6_ADDRSTRLEN], strport[16];
21138
21139 for (passive = 0; passive <= 1; passive++) {
21140 memset(&hints, 0, sizeof(hints));
21141 hints.ai_family = AF_UNSPEC;
21142 hints.ai_flags = passive ? AI_PASSIVE : 0;
21143 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021144 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021145 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21146 (void)gai_strerror(gaierr);
21147 goto bad;
21148 }
21149 for (ai = aitop; ai; ai = ai->ai_next) {
21150 if (ai->ai_addr == NULL ||
21151 ai->ai_addrlen == 0 ||
21152 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21153 straddr, sizeof(straddr), strport, sizeof(strport),
21154 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21155 goto bad;
21156 }
21157 switch (ai->ai_family) {
21158 case AF_INET:
21159 if (strcmp(strport, "54321") != 0) {
21160 goto bad;
21161 }
21162 if (passive) {
21163 if (strcmp(straddr, "0.0.0.0") != 0) {
21164 goto bad;
21165 }
21166 } else {
21167 if (strcmp(straddr, "127.0.0.1") != 0) {
21168 goto bad;
21169 }
21170 }
21171 inet4++;
21172 break;
21173 case AF_INET6:
21174 if (strcmp(strport, "54321") != 0) {
21175 goto bad;
21176 }
21177 if (passive) {
21178 if (strcmp(straddr, "::") != 0) {
21179 goto bad;
21180 }
21181 } else {
21182 if (strcmp(straddr, "::1") != 0) {
21183 goto bad;
21184 }
21185 }
21186 inet6++;
21187 break;
21188 case AF_UNSPEC:
21189 goto bad;
21190 break;
21191 default:
21192 /* another family support? */
21193 break;
21194 }
21195 }
21196 }
21197
21198 if (!(inet4 == 0 || inet4 == 2))
21199 goto bad;
21200 if (!(inet6 == 0 || inet6 == 2))
21201 goto bad;
21202
21203 if (aitop)
21204 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021205 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021206
21207 bad:
21208 if (aitop)
21209 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021210 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021211}
21212
Martin v. Löwis11437992002-04-12 09:54:03 +000021213_ACEOF
21214rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021215if { (ac_try="$ac_link"
21216case "(($ac_try" in
21217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21218 *) ac_try_echo=$ac_try;;
21219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021221 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021222 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021224 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021225 { (case "(($ac_try" in
21226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21227 *) ac_try_echo=$ac_try;;
21228esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021230 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021231 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021233 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021234 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021236 echo "$as_me: program exited with status $ac_status" >&5
21237echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021238sed 's/^/| /' conftest.$ac_ext >&5
21239
Martin v. Löwis11437992002-04-12 09:54:03 +000021240( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021241ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243rm -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 +000021244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021245
21246
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021247fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021248
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021250
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021251if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021252then
21253 if test $ipv6 = yes
21254 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021255 echo 'Fatal: You must get working getaddrinfo() function.'
21256 echo ' or you can specify "--disable-ipv6"'.
21257 exit 1
21258 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021259else
Martin v. Löwis11437992002-04-12 09:54:03 +000021260
21261cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021262#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021263_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021264
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021266
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021267for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021268do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021269as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21270{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21271echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021272if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021273 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021274else
Martin v. Löwis11437992002-04-12 09:54:03 +000021275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021276/* confdefs.h. */
21277_ACEOF
21278cat confdefs.h >>conftest.$ac_ext
21279cat >>conftest.$ac_ext <<_ACEOF
21280/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021281/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21282 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21283#define $ac_func innocuous_$ac_func
21284
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021285/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021286 which can conflict with char $ac_func (); below.
21287 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021288 <limits.h> exists even on freestanding compilers. */
21289
21290#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021291# include <limits.h>
21292#else
21293# include <assert.h>
21294#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021295
21296#undef $ac_func
21297
Martin v. Löwiseba40652007-08-30 20:10:57 +000021298/* Override any GCC internal prototype to avoid an error.
21299 Use char because int might match the return type of a GCC
21300 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021301#ifdef __cplusplus
21302extern "C"
21303#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021304char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021305/* The GNU C library defines this for functions which it implements
21306 to always fail with ENOSYS. Some functions are actually named
21307 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021308#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021309choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021310#endif
21311
Skip Montanaro6dead952003-09-25 14:50:04 +000021312int
21313main ()
21314{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021315return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021316 ;
21317 return 0;
21318}
21319_ACEOF
21320rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021321if { (ac_try="$ac_link"
21322case "(($ac_try" in
21323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21324 *) ac_try_echo=$ac_try;;
21325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021327 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021329 grep -v '^ *+' conftest.er1 >conftest.err
21330 rm -f conftest.er1
21331 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021333 (exit $ac_status); } && {
21334 test -z "$ac_c_werror_flag" ||
21335 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021336 } && test -s conftest$ac_exeext &&
21337 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021338 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021339else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021341sed 's/^/| /' conftest.$ac_ext >&5
21342
Martin v. Löwiseba40652007-08-30 20:10:57 +000021343 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021345
21346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021347 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021348fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021349ac_res=`eval echo '${'$as_ac_var'}'`
21350 { echo "$as_me:$LINENO: result: $ac_res" >&5
21351echo "${ECHO_T}$ac_res" >&6; }
21352if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021353 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021354#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021355_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021356
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021357fi
21358done
21359
Michael W. Hudson54241132001-12-07 15:38:26 +000021360
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021361# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021362{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21363echo $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 +000021364if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021365 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021366else
Martin v. Löwis11437992002-04-12 09:54:03 +000021367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021368/* confdefs.h. */
21369_ACEOF
21370cat confdefs.h >>conftest.$ac_ext
21371cat >>conftest.$ac_ext <<_ACEOF
21372/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021373#include <sys/types.h>
21374#include <sys/time.h>
21375#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021376
Martin v. Löwis11437992002-04-12 09:54:03 +000021377int
21378main ()
21379{
21380if ((struct tm *) 0)
21381return 0;
21382 ;
21383 return 0;
21384}
21385_ACEOF
21386rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021387if { (ac_try="$ac_compile"
21388case "(($ac_try" in
21389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21390 *) ac_try_echo=$ac_try;;
21391esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021393 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021395 grep -v '^ *+' conftest.er1 >conftest.err
21396 rm -f conftest.er1
21397 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021399 (exit $ac_status); } && {
21400 test -z "$ac_c_werror_flag" ||
21401 test ! -s conftest.err
21402 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021403 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021404else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021406sed 's/^/| /' conftest.$ac_ext >&5
21407
Martin v. Löwiseba40652007-08-30 20:10:57 +000021408 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021410
21411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021412fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021413{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21414echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021415if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021416
21417cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021418#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021419_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021420
21421fi
21422
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021423{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21424echo $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 +000021425if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021426 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021427else
Martin v. Löwis11437992002-04-12 09:54:03 +000021428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021429/* confdefs.h. */
21430_ACEOF
21431cat confdefs.h >>conftest.$ac_ext
21432cat >>conftest.$ac_ext <<_ACEOF
21433/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021434#include <sys/types.h>
21435#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021436
Martin v. Löwis11437992002-04-12 09:54:03 +000021437int
21438main ()
21439{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021440struct tm tm;
21441 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021442 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021443 ;
21444 return 0;
21445}
21446_ACEOF
21447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021448if { (ac_try="$ac_compile"
21449case "(($ac_try" in
21450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21451 *) ac_try_echo=$ac_try;;
21452esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021456 grep -v '^ *+' conftest.er1 >conftest.err
21457 rm -f conftest.er1
21458 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021460 (exit $ac_status); } && {
21461 test -z "$ac_c_werror_flag" ||
21462 test ! -s conftest.err
21463 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021464 ac_cv_struct_tm=time.h
21465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021467sed 's/^/| /' conftest.$ac_ext >&5
21468
Martin v. Löwiseba40652007-08-30 20:10:57 +000021469 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021471
21472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021473fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021474{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21475echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021476if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021477
21478cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021479#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021480_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021481
21482fi
21483
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021484{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21485echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021486if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021487 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021488else
Martin v. Löwis11437992002-04-12 09:54:03 +000021489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021490/* confdefs.h. */
21491_ACEOF
21492cat confdefs.h >>conftest.$ac_ext
21493cat >>conftest.$ac_ext <<_ACEOF
21494/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021495#include <sys/types.h>
21496#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021497
21498
Martin v. Löwis11437992002-04-12 09:54:03 +000021499int
21500main ()
21501{
21502static struct tm ac_aggr;
21503if (ac_aggr.tm_zone)
21504return 0;
21505 ;
21506 return 0;
21507}
21508_ACEOF
21509rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021510if { (ac_try="$ac_compile"
21511case "(($ac_try" in
21512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21513 *) ac_try_echo=$ac_try;;
21514esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021518 grep -v '^ *+' conftest.er1 >conftest.err
21519 rm -f conftest.er1
21520 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021522 (exit $ac_status); } && {
21523 test -z "$ac_c_werror_flag" ||
21524 test ! -s conftest.err
21525 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021526 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021527else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021529sed 's/^/| /' conftest.$ac_ext >&5
21530
Martin v. Löwiseba40652007-08-30 20:10:57 +000021531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021532/* confdefs.h. */
21533_ACEOF
21534cat confdefs.h >>conftest.$ac_ext
21535cat >>conftest.$ac_ext <<_ACEOF
21536/* end confdefs.h. */
21537#include <sys/types.h>
21538#include <$ac_cv_struct_tm>
21539
21540
21541int
21542main ()
21543{
21544static struct tm ac_aggr;
21545if (sizeof ac_aggr.tm_zone)
21546return 0;
21547 ;
21548 return 0;
21549}
21550_ACEOF
21551rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021552if { (ac_try="$ac_compile"
21553case "(($ac_try" in
21554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21555 *) ac_try_echo=$ac_try;;
21556esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021558 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021560 grep -v '^ *+' conftest.er1 >conftest.err
21561 rm -f conftest.er1
21562 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021564 (exit $ac_status); } && {
21565 test -z "$ac_c_werror_flag" ||
21566 test ! -s conftest.err
21567 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021568 ac_cv_member_struct_tm_tm_zone=yes
21569else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021571sed 's/^/| /' conftest.$ac_ext >&5
21572
Martin v. Löwiseba40652007-08-30 20:10:57 +000021573 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021575
21576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021578
21579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021580fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021581{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21582echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21583if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021584
21585cat >>confdefs.h <<_ACEOF
21586#define HAVE_STRUCT_TM_TM_ZONE 1
21587_ACEOF
21588
21589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021590fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021591
Martin v. Löwis11437992002-04-12 09:54:03 +000021592if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21593
21594cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021595#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021596_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021597
21598else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021599 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21600echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021601if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021602 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021603else
21604 cat >conftest.$ac_ext <<_ACEOF
21605/* confdefs.h. */
21606_ACEOF
21607cat confdefs.h >>conftest.$ac_ext
21608cat >>conftest.$ac_ext <<_ACEOF
21609/* end confdefs.h. */
21610#include <time.h>
21611
21612int
21613main ()
21614{
21615#ifndef tzname
21616 (void) tzname;
21617#endif
21618
21619 ;
21620 return 0;
21621}
21622_ACEOF
21623rm -f conftest.$ac_objext
21624if { (ac_try="$ac_compile"
21625case "(($ac_try" in
21626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21627 *) ac_try_echo=$ac_try;;
21628esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630 (eval "$ac_compile") 2>conftest.er1
21631 ac_status=$?
21632 grep -v '^ *+' conftest.er1 >conftest.err
21633 rm -f conftest.er1
21634 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636 (exit $ac_status); } && {
21637 test -z "$ac_c_werror_flag" ||
21638 test ! -s conftest.err
21639 } && test -s conftest.$ac_objext; then
21640 ac_cv_have_decl_tzname=yes
21641else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021642 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021643sed 's/^/| /' conftest.$ac_ext >&5
21644
21645 ac_cv_have_decl_tzname=no
21646fi
21647
21648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21649fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021650{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21651echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21652if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021653
21654cat >>confdefs.h <<_ACEOF
21655#define HAVE_DECL_TZNAME 1
21656_ACEOF
21657
21658
21659else
21660 cat >>confdefs.h <<_ACEOF
21661#define HAVE_DECL_TZNAME 0
21662_ACEOF
21663
21664
21665fi
21666
21667
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021668 { echo "$as_me:$LINENO: checking for tzname" >&5
21669echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021670if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021671 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021672else
Martin v. Löwis11437992002-04-12 09:54:03 +000021673 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021674/* confdefs.h. */
21675_ACEOF
21676cat confdefs.h >>conftest.$ac_ext
21677cat >>conftest.$ac_ext <<_ACEOF
21678/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021679#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021680#if !HAVE_DECL_TZNAME
21681extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021683
Martin v. Löwis11437992002-04-12 09:54:03 +000021684int
21685main ()
21686{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021687return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021688 ;
21689 return 0;
21690}
21691_ACEOF
21692rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021693if { (ac_try="$ac_link"
21694case "(($ac_try" in
21695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21696 *) ac_try_echo=$ac_try;;
21697esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021699 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021701 grep -v '^ *+' conftest.er1 >conftest.err
21702 rm -f conftest.er1
21703 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021705 (exit $ac_status); } && {
21706 test -z "$ac_c_werror_flag" ||
21707 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021708 } && test -s conftest$ac_exeext &&
21709 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021710 ac_cv_var_tzname=yes
21711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021713sed 's/^/| /' conftest.$ac_ext >&5
21714
Martin v. Löwiseba40652007-08-30 20:10:57 +000021715 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021717
21718rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021719 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021720fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021721{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21722echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021723 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021724
21725cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021726#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021727_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021728
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021729 fi
21730fi
21731
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021732{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21733echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021734if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021735 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021736else
21737 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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021743$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021744int
21745main ()
21746{
21747static struct stat ac_aggr;
21748if (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
Martin v. Löwis11437992002-04-12 09:54:03 +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
Martin v. Löwis11437992002-04-12 09:54:03 +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 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021777/* confdefs.h. */
21778_ACEOF
21779cat confdefs.h >>conftest.$ac_ext
21780cat >>conftest.$ac_ext <<_ACEOF
21781/* end confdefs.h. */
21782$ac_includes_default
21783int
21784main ()
21785{
21786static struct stat ac_aggr;
21787if (sizeof ac_aggr.st_rdev)
21788return 0;
21789 ;
21790 return 0;
21791}
21792_ACEOF
21793rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021794if { (ac_try="$ac_compile"
21795case "(($ac_try" in
21796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21797 *) ac_try_echo=$ac_try;;
21798esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021800 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021802 grep -v '^ *+' conftest.er1 >conftest.err
21803 rm -f conftest.er1
21804 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021806 (exit $ac_status); } && {
21807 test -z "$ac_c_werror_flag" ||
21808 test ! -s conftest.err
21809 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021810 ac_cv_member_struct_stat_st_rdev=yes
21811else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021812 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021813sed 's/^/| /' conftest.$ac_ext >&5
21814
Martin v. Löwiseba40652007-08-30 20:10:57 +000021815 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021817
21818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021820
21821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021822fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021823{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21824echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21825if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021826
21827cat >>confdefs.h <<_ACEOF
21828#define HAVE_STRUCT_STAT_ST_RDEV 1
21829_ACEOF
21830
21831
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021832fi
21833
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021834{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21835echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021836if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021837 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021838else
Martin v. Löwis11437992002-04-12 09:54:03 +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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021845$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021846int
21847main ()
21848{
21849static struct stat ac_aggr;
21850if (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
Martin v. Löwis11437992002-04-12 09:54:03 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000021873 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021874else
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 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021879/* confdefs.h. */
21880_ACEOF
21881cat confdefs.h >>conftest.$ac_ext
21882cat >>conftest.$ac_ext <<_ACEOF
21883/* end confdefs.h. */
21884$ac_includes_default
21885int
21886main ()
21887{
21888static struct stat ac_aggr;
21889if (sizeof ac_aggr.st_blksize)
21890return 0;
21891 ;
21892 return 0;
21893}
21894_ACEOF
21895rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021896if { (ac_try="$ac_compile"
21897case "(($ac_try" in
21898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21899 *) ac_try_echo=$ac_try;;
21900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021902 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021904 grep -v '^ *+' conftest.er1 >conftest.err
21905 rm -f conftest.er1
21906 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021908 (exit $ac_status); } && {
21909 test -z "$ac_c_werror_flag" ||
21910 test ! -s conftest.err
21911 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021912 ac_cv_member_struct_stat_st_blksize=yes
21913else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021915sed 's/^/| /' conftest.$ac_ext >&5
21916
Martin v. Löwiseba40652007-08-30 20:10:57 +000021917 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021919
21920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021922
21923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021924fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021925{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21926echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21927if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021928
Martin v. Löwis11437992002-04-12 09:54:03 +000021929cat >>confdefs.h <<_ACEOF
21930#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21931_ACEOF
21932
21933
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021934fi
21935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021936{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21937echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021938if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021939 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021940else
21941 cat >conftest.$ac_ext <<_ACEOF
21942/* 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 (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 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021981/* confdefs.h. */
21982_ACEOF
21983cat confdefs.h >>conftest.$ac_ext
21984cat >>conftest.$ac_ext <<_ACEOF
21985/* end confdefs.h. */
21986$ac_includes_default
21987int
21988main ()
21989{
21990static struct stat ac_aggr;
21991if (sizeof ac_aggr.st_flags)
21992return 0;
21993 ;
21994 return 0;
21995}
21996_ACEOF
21997rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021998if { (ac_try="$ac_compile"
21999case "(($ac_try" in
22000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22001 *) ac_try_echo=$ac_try;;
22002esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022004 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022005 ac_status=$?
22006 grep -v '^ *+' conftest.er1 >conftest.err
22007 rm -f conftest.er1
22008 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022010 (exit $ac_status); } && {
22011 test -z "$ac_c_werror_flag" ||
22012 test ! -s conftest.err
22013 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022014 ac_cv_member_struct_stat_st_flags=yes
22015else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022016 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022017sed 's/^/| /' conftest.$ac_ext >&5
22018
Martin v. Löwiseba40652007-08-30 20:10:57 +000022019 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022021
22022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022024
22025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022026fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022027{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
22028echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
22029if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022030
22031cat >>confdefs.h <<_ACEOF
22032#define HAVE_STRUCT_STAT_ST_FLAGS 1
22033_ACEOF
22034
22035
22036fi
22037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022038{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22039echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022040if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022041 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022042else
22043 cat >conftest.$ac_ext <<_ACEOF
22044/* 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 (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 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022083/* confdefs.h. */
22084_ACEOF
22085cat confdefs.h >>conftest.$ac_ext
22086cat >>conftest.$ac_ext <<_ACEOF
22087/* end confdefs.h. */
22088$ac_includes_default
22089int
22090main ()
22091{
22092static struct stat ac_aggr;
22093if (sizeof ac_aggr.st_gen)
22094return 0;
22095 ;
22096 return 0;
22097}
22098_ACEOF
22099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022100if { (ac_try="$ac_compile"
22101case "(($ac_try" in
22102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22103 *) ac_try_echo=$ac_try;;
22104esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022107 ac_status=$?
22108 grep -v '^ *+' conftest.er1 >conftest.err
22109 rm -f conftest.er1
22110 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022112 (exit $ac_status); } && {
22113 test -z "$ac_c_werror_flag" ||
22114 test ! -s conftest.err
22115 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022116 ac_cv_member_struct_stat_st_gen=yes
22117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022118 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022119sed 's/^/| /' conftest.$ac_ext >&5
22120
Martin v. Löwiseba40652007-08-30 20:10:57 +000022121 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022123
22124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022126
22127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022128fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022129{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22130echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22131if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022132
22133cat >>confdefs.h <<_ACEOF
22134#define HAVE_STRUCT_STAT_ST_GEN 1
22135_ACEOF
22136
22137
22138fi
22139
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022140{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22141echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022142if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022143 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022144else
22145 cat >conftest.$ac_ext <<_ACEOF
22146/* 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 (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 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022185/* confdefs.h. */
22186_ACEOF
22187cat confdefs.h >>conftest.$ac_ext
22188cat >>conftest.$ac_ext <<_ACEOF
22189/* end confdefs.h. */
22190$ac_includes_default
22191int
22192main ()
22193{
22194static struct stat ac_aggr;
22195if (sizeof ac_aggr.st_birthtime)
22196return 0;
22197 ;
22198 return 0;
22199}
22200_ACEOF
22201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022202if { (ac_try="$ac_compile"
22203case "(($ac_try" in
22204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22205 *) ac_try_echo=$ac_try;;
22206esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022209 ac_status=$?
22210 grep -v '^ *+' conftest.er1 >conftest.err
22211 rm -f conftest.er1
22212 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022214 (exit $ac_status); } && {
22215 test -z "$ac_c_werror_flag" ||
22216 test ! -s conftest.err
22217 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022218 ac_cv_member_struct_stat_st_birthtime=yes
22219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022220 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022221sed 's/^/| /' conftest.$ac_ext >&5
22222
Martin v. Löwiseba40652007-08-30 20:10:57 +000022223 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022225
22226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022228
22229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022230fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022231{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22232echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22233if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022234
22235cat >>confdefs.h <<_ACEOF
22236#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22237_ACEOF
22238
22239
22240fi
22241
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022242{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22243echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022244if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022246else
Martin v. Löwis11437992002-04-12 09:54:03 +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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022253$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022254int
22255main ()
22256{
22257static struct stat ac_aggr;
22258if (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
Martin v. Löwis11437992002-04-12 09:54:03 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000022281 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022282else
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 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022287/* confdefs.h. */
22288_ACEOF
22289cat confdefs.h >>conftest.$ac_ext
22290cat >>conftest.$ac_ext <<_ACEOF
22291/* end confdefs.h. */
22292$ac_includes_default
22293int
22294main ()
22295{
22296static struct stat ac_aggr;
22297if (sizeof ac_aggr.st_blocks)
22298return 0;
22299 ;
22300 return 0;
22301}
22302_ACEOF
22303rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022304if { (ac_try="$ac_compile"
22305case "(($ac_try" in
22306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22307 *) ac_try_echo=$ac_try;;
22308esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022310 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022312 grep -v '^ *+' conftest.er1 >conftest.err
22313 rm -f conftest.er1
22314 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022316 (exit $ac_status); } && {
22317 test -z "$ac_c_werror_flag" ||
22318 test ! -s conftest.err
22319 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022320 ac_cv_member_struct_stat_st_blocks=yes
22321else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022323sed 's/^/| /' conftest.$ac_ext >&5
22324
Martin v. Löwiseba40652007-08-30 20:10:57 +000022325 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022327
22328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022330
22331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022332fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022333{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22334echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22335if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022336
Martin v. Löwis11437992002-04-12 09:54:03 +000022337cat >>confdefs.h <<_ACEOF
22338#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22339_ACEOF
22340
22341
22342cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022343#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022344_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022345
22346else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022347 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022348 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022349 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22350 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022351esac
22352
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022353fi
22354
Michael W. Hudson54241132001-12-07 15:38:26 +000022355
Martin v. Löwis11437992002-04-12 09:54:03 +000022356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022357{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22358echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022359if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022360 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022361else
Martin v. Löwis11437992002-04-12 09:54:03 +000022362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022363/* confdefs.h. */
22364_ACEOF
22365cat confdefs.h >>conftest.$ac_ext
22366cat >>conftest.$ac_ext <<_ACEOF
22367/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022368#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022369int
22370main ()
22371{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022372return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022373 ;
22374 return 0;
22375}
22376_ACEOF
22377rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022378if { (ac_try="$ac_compile"
22379case "(($ac_try" in
22380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22381 *) ac_try_echo=$ac_try;;
22382esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022384 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022386 grep -v '^ *+' conftest.er1 >conftest.err
22387 rm -f conftest.er1
22388 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022390 (exit $ac_status); } && {
22391 test -z "$ac_c_werror_flag" ||
22392 test ! -s conftest.err
22393 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022394 ac_cv_header_time_altzone=yes
22395else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022397sed 's/^/| /' conftest.$ac_ext >&5
22398
Martin v. Löwiseba40652007-08-30 20:10:57 +000022399 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022400fi
22401
Martin v. Löwiseba40652007-08-30 20:10:57 +000022402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22403fi
22404
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022405{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22406echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022407if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022408
22409cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022410#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022411_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022412
22413fi
22414
Guido van Rossumda88dad1995-01-26 00:46:29 +000022415was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022416{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22417echo $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 +000022418cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022419/* confdefs.h. */
22420_ACEOF
22421cat confdefs.h >>conftest.$ac_ext
22422cat >>conftest.$ac_ext <<_ACEOF
22423/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022424
22425#include <sys/types.h>
22426#include <sys/select.h>
22427#include <sys/time.h>
22428
Martin v. Löwis11437992002-04-12 09:54:03 +000022429int
22430main ()
22431{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022432;
Martin v. Löwis11437992002-04-12 09:54:03 +000022433 ;
22434 return 0;
22435}
22436_ACEOF
22437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022438if { (ac_try="$ac_compile"
22439case "(($ac_try" in
22440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22441 *) ac_try_echo=$ac_try;;
22442esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022446 grep -v '^ *+' conftest.er1 >conftest.err
22447 rm -f conftest.er1
22448 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022450 (exit $ac_status); } && {
22451 test -z "$ac_c_werror_flag" ||
22452 test ! -s conftest.err
22453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022454
22455
22456cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022457#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022458_ACEOF
22459
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022460 was_it_defined=yes
22461
Guido van Rossumf78abae1997-01-21 22:02:36 +000022462else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022464sed 's/^/| /' conftest.$ac_ext >&5
22465
Brett Cannon19fab762007-06-02 03:02:29 +000022466
Martin v. Löwiseba40652007-08-30 20:10:57 +000022467fi
22468
22469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022470{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22471echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022472
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022473{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22474echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022475if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022476 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022477else
Martin v. Löwis11437992002-04-12 09:54:03 +000022478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022479/* confdefs.h. */
22480_ACEOF
22481cat confdefs.h >>conftest.$ac_ext
22482cat >>conftest.$ac_ext <<_ACEOF
22483/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022484
22485# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022486int
22487main ()
22488{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022489struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022490 ;
22491 return 0;
22492}
22493_ACEOF
22494rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022495if { (ac_try="$ac_compile"
22496case "(($ac_try" in
22497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22498 *) ac_try_echo=$ac_try;;
22499esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022503 grep -v '^ *+' conftest.er1 >conftest.err
22504 rm -f conftest.er1
22505 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022507 (exit $ac_status); } && {
22508 test -z "$ac_c_werror_flag" ||
22509 test ! -s conftest.err
22510 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022511 ac_cv_struct_addrinfo=yes
22512else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022514sed 's/^/| /' conftest.$ac_ext >&5
22515
Martin v. Löwiseba40652007-08-30 20:10:57 +000022516 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022517fi
22518
Martin v. Löwiseba40652007-08-30 20:10:57 +000022519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22520fi
22521
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022522{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22523echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022524if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022525
22526cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022527#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022528_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022529
22530fi
22531
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022532{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22533echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022534if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022535 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022536else
Martin v. Löwis11437992002-04-12 09:54:03 +000022537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022538/* confdefs.h. */
22539_ACEOF
22540cat confdefs.h >>conftest.$ac_ext
22541cat >>conftest.$ac_ext <<_ACEOF
22542/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022543
22544# include <sys/types.h>
22545# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022546int
22547main ()
22548{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022549struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022550 ;
22551 return 0;
22552}
22553_ACEOF
22554rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022555if { (ac_try="$ac_compile"
22556case "(($ac_try" in
22557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22558 *) ac_try_echo=$ac_try;;
22559esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022561 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022563 grep -v '^ *+' conftest.er1 >conftest.err
22564 rm -f conftest.er1
22565 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022567 (exit $ac_status); } && {
22568 test -z "$ac_c_werror_flag" ||
22569 test ! -s conftest.err
22570 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022571 ac_cv_struct_sockaddr_storage=yes
22572else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022574sed 's/^/| /' conftest.$ac_ext >&5
22575
Martin v. Löwiseba40652007-08-30 20:10:57 +000022576 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022577fi
22578
Martin v. Löwiseba40652007-08-30 20:10:57 +000022579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22580fi
22581
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022582{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22583echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022584if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022585
22586cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022587#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022588_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022589
22590fi
22591
Guido van Rossum627b2d71993-12-24 10:39:16 +000022592# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022593
Michael W. Hudson54241132001-12-07 15:38:26 +000022594
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022595{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22596echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022597if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022598 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022599else
Martin v. Löwis11437992002-04-12 09:54:03 +000022600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022601/* confdefs.h. */
22602_ACEOF
22603cat confdefs.h >>conftest.$ac_ext
22604cat >>conftest.$ac_ext <<_ACEOF
22605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022606$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022607int
22608main ()
22609{
22610static int test_array [1 - 2 * !(((char) -1) < 0)];
22611test_array [0] = 0
22612
22613 ;
22614 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022615}
Martin v. Löwis11437992002-04-12 09:54:03 +000022616_ACEOF
22617rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022618if { (ac_try="$ac_compile"
22619case "(($ac_try" in
22620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22621 *) ac_try_echo=$ac_try;;
22622esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022626 grep -v '^ *+' conftest.er1 >conftest.err
22627 rm -f conftest.er1
22628 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022630 (exit $ac_status); } && {
22631 test -z "$ac_c_werror_flag" ||
22632 test ! -s conftest.err
22633 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022634 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022637sed 's/^/| /' conftest.$ac_ext >&5
22638
Martin v. Löwiseba40652007-08-30 20:10:57 +000022639 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022641
22642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022643fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022644{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22645echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022646if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022647 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022648#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022649_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022650
22651fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022652
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022653{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22654echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022655if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022656 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022657else
22658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022659/* confdefs.h. */
22660_ACEOF
22661cat confdefs.h >>conftest.$ac_ext
22662cat >>conftest.$ac_ext <<_ACEOF
22663/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022664
Martin v. Löwis11437992002-04-12 09:54:03 +000022665int
22666main ()
22667{
22668/* FIXME: Include the comments suggested by Paul. */
22669#ifndef __cplusplus
22670 /* Ultrix mips cc rejects this. */
22671 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022672 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022673 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022674 char const *const *pcpcc;
22675 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022676 /* NEC SVR4.0.2 mips cc rejects this. */
22677 struct point {int x, y;};
22678 static struct point const zero = {0,0};
22679 /* AIX XL C 1.02.0.0 rejects this.
22680 It does not let you subtract one const X* pointer from another in
22681 an arm of an if-expression whose if-part is not a constant
22682 expression */
22683 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022684 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022685 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022686 ++pcpcc;
22687 ppc = (char**) pcpcc;
22688 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022689 { /* SCO 3.2v4 cc rejects this. */
22690 char *t;
22691 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022692
Martin v. Löwis11437992002-04-12 09:54:03 +000022693 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022694 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022695 }
22696 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22697 int x[] = {25, 17};
22698 const int *foo = &x[0];
22699 ++foo;
22700 }
22701 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22702 typedef const int *iptr;
22703 iptr p = 0;
22704 ++p;
22705 }
22706 { /* AIX XL C 1.02.0.0 rejects this saying
22707 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22708 struct s { int j; const int *ap[3]; };
22709 struct s *b; b->j = 5;
22710 }
22711 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22712 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022713 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022714 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022715 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022716#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022717
Martin v. Löwis11437992002-04-12 09:54:03 +000022718 ;
22719 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022720}
Martin v. Löwis11437992002-04-12 09:54:03 +000022721_ACEOF
22722rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022723if { (ac_try="$ac_compile"
22724case "(($ac_try" in
22725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22726 *) ac_try_echo=$ac_try;;
22727esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022731 grep -v '^ *+' conftest.er1 >conftest.err
22732 rm -f conftest.er1
22733 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022735 (exit $ac_status); } && {
22736 test -z "$ac_c_werror_flag" ||
22737 test ! -s conftest.err
22738 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022739 ac_cv_c_const=yes
22740else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022742sed 's/^/| /' conftest.$ac_ext >&5
22743
Martin v. Löwiseba40652007-08-30 20:10:57 +000022744 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022746
22747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022748fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022749{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22750echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022751if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022752
22753cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022754#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022755_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022756
22757fi
22758
Michael W. Hudson54241132001-12-07 15:38:26 +000022759
Guido van Rossumda88dad1995-01-26 00:46:29 +000022760works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022761{ echo "$as_me:$LINENO: checking for working volatile" >&5
22762echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022764/* confdefs.h. */
22765_ACEOF
22766cat confdefs.h >>conftest.$ac_ext
22767cat >>conftest.$ac_ext <<_ACEOF
22768/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022769
Martin v. Löwis11437992002-04-12 09:54:03 +000022770int
22771main ()
22772{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022773volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022774 ;
22775 return 0;
22776}
22777_ACEOF
22778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022779if { (ac_try="$ac_compile"
22780case "(($ac_try" in
22781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22782 *) ac_try_echo=$ac_try;;
22783esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022787 grep -v '^ *+' conftest.er1 >conftest.err
22788 rm -f conftest.er1
22789 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022791 (exit $ac_status); } && {
22792 test -z "$ac_c_werror_flag" ||
22793 test ! -s conftest.err
22794 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022795 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022796else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022798sed 's/^/| /' conftest.$ac_ext >&5
22799
Martin v. Löwis11437992002-04-12 09:54:03 +000022800
22801cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022802#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022803_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022804
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022805
Guido van Rossum627b2d71993-12-24 10:39:16 +000022806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022807
22808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022809{ echo "$as_me:$LINENO: result: $works" >&5
22810echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022811
Guido van Rossumda88dad1995-01-26 00:46:29 +000022812works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022813{ echo "$as_me:$LINENO: checking for working signed char" >&5
22814echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022815cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022816/* confdefs.h. */
22817_ACEOF
22818cat confdefs.h >>conftest.$ac_ext
22819cat >>conftest.$ac_ext <<_ACEOF
22820/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022821
Martin v. Löwis11437992002-04-12 09:54:03 +000022822int
22823main ()
22824{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022825signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022826 ;
22827 return 0;
22828}
22829_ACEOF
22830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022831if { (ac_try="$ac_compile"
22832case "(($ac_try" in
22833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22834 *) ac_try_echo=$ac_try;;
22835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022839 grep -v '^ *+' conftest.er1 >conftest.err
22840 rm -f conftest.er1
22841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022843 (exit $ac_status); } && {
22844 test -z "$ac_c_werror_flag" ||
22845 test ! -s conftest.err
22846 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022847 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022850sed 's/^/| /' conftest.$ac_ext >&5
22851
Martin v. Löwis11437992002-04-12 09:54:03 +000022852
22853cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022854#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022855_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022856
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022857
Guido van Rossum7f43da71994-08-01 12:15:30 +000022858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022859
22860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022861{ echo "$as_me:$LINENO: result: $works" >&5
22862echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022863
Guido van Rossumda88dad1995-01-26 00:46:29 +000022864have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022865{ echo "$as_me:$LINENO: checking for prototypes" >&5
22866echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022868/* confdefs.h. */
22869_ACEOF
22870cat confdefs.h >>conftest.$ac_ext
22871cat >>conftest.$ac_ext <<_ACEOF
22872/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022873int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022874int
22875main ()
22876{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022877return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022878 ;
22879 return 0;
22880}
22881_ACEOF
22882rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022883if { (ac_try="$ac_compile"
22884case "(($ac_try" in
22885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22886 *) ac_try_echo=$ac_try;;
22887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022891 grep -v '^ *+' conftest.er1 >conftest.err
22892 rm -f conftest.er1
22893 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022895 (exit $ac_status); } && {
22896 test -z "$ac_c_werror_flag" ||
22897 test ! -s conftest.err
22898 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022899
22900
22901cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022902#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022903_ACEOF
22904
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022905 have_prototypes=yes
22906
Guido van Rossumf78abae1997-01-21 22:02:36 +000022907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022909sed 's/^/| /' conftest.$ac_ext >&5
22910
Martin v. Löwiseba40652007-08-30 20:10:57 +000022911
Guido van Rossum7f43da71994-08-01 12:15:30 +000022912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022913
22914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022915{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22916echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022917
Guido van Rossumda88dad1995-01-26 00:46:29 +000022918works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022919{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22920echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022922/* confdefs.h. */
22923_ACEOF
22924cat confdefs.h >>conftest.$ac_ext
22925cat >>conftest.$ac_ext <<_ACEOF
22926/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022927
22928#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022929int foo(int x, ...) {
22930 va_list va;
22931 va_start(va, x);
22932 va_arg(va, int);
22933 va_arg(va, char *);
22934 va_arg(va, double);
22935 return 0;
22936}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022937
Martin v. Löwis11437992002-04-12 09:54:03 +000022938int
22939main ()
22940{
Guido van Rossum90eea071996-08-30 20:58:57 +000022941return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022942 ;
22943 return 0;
22944}
22945_ACEOF
22946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022947if { (ac_try="$ac_compile"
22948case "(($ac_try" in
22949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22950 *) ac_try_echo=$ac_try;;
22951esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022955 grep -v '^ *+' conftest.er1 >conftest.err
22956 rm -f conftest.er1
22957 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022959 (exit $ac_status); } && {
22960 test -z "$ac_c_werror_flag" ||
22961 test ! -s conftest.err
22962 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022963
22964
22965cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022966#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022967_ACEOF
22968
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022969 works=yes
22970
Guido van Rossumf78abae1997-01-21 22:02:36 +000022971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022973sed 's/^/| /' conftest.$ac_ext >&5
22974
Martin v. Löwiseba40652007-08-30 20:10:57 +000022975
Guido van Rossum627b2d71993-12-24 10:39:16 +000022976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022977
22978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022979{ echo "$as_me:$LINENO: result: $works" >&5
22980echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022981
Martin v. Löwisd6320502004-08-12 13:45:08 +000022982# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022983{ echo "$as_me:$LINENO: checking for socketpair" >&5
22984echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022985cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022986/* confdefs.h. */
22987_ACEOF
22988cat confdefs.h >>conftest.$ac_ext
22989cat >>conftest.$ac_ext <<_ACEOF
22990/* end confdefs.h. */
22991
22992#include <sys/types.h>
22993#include <sys/socket.h>
22994
22995int
22996main ()
22997{
22998void *x=socketpair
22999 ;
23000 return 0;
23001}
23002_ACEOF
23003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023004if { (ac_try="$ac_compile"
23005case "(($ac_try" in
23006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23007 *) ac_try_echo=$ac_try;;
23008esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000023011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023012 grep -v '^ *+' conftest.er1 >conftest.err
23013 rm -f conftest.er1
23014 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023016 (exit $ac_status); } && {
23017 test -z "$ac_c_werror_flag" ||
23018 test ! -s conftest.err
23019 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000023020
23021cat >>confdefs.h <<\_ACEOF
23022#define HAVE_SOCKETPAIR 1
23023_ACEOF
23024
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023025 { echo "$as_me:$LINENO: result: yes" >&5
23026echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023027else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023028 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000023029sed 's/^/| /' conftest.$ac_ext >&5
23030
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023031 { echo "$as_me:$LINENO: result: no" >&5
23032echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023033
23034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023035
23036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000023037
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023038# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023039{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23040echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023042/* confdefs.h. */
23043_ACEOF
23044cat confdefs.h >>conftest.$ac_ext
23045cat >>conftest.$ac_ext <<_ACEOF
23046/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023047#include <sys/types.h>
23048#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023049int
23050main ()
23051{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023052struct sockaddr x;
23053x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023054 ;
23055 return 0;
23056}
23057_ACEOF
23058rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023059if { (ac_try="$ac_compile"
23060case "(($ac_try" in
23061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23062 *) ac_try_echo=$ac_try;;
23063esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023065 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023067 grep -v '^ *+' conftest.er1 >conftest.err
23068 rm -f conftest.er1
23069 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023071 (exit $ac_status); } && {
23072 test -z "$ac_c_werror_flag" ||
23073 test ! -s conftest.err
23074 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023075 { echo "$as_me:$LINENO: result: yes" >&5
23076echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023077
23078cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023079#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023080_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023081
23082else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023084sed 's/^/| /' conftest.$ac_ext >&5
23085
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023086 { echo "$as_me:$LINENO: result: no" >&5
23087echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023089
23090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023091
Guido van Rossumda88dad1995-01-26 00:46:29 +000023092va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023093{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23094echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023095cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023096/* confdefs.h. */
23097_ACEOF
23098cat confdefs.h >>conftest.$ac_ext
23099cat >>conftest.$ac_ext <<_ACEOF
23100/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023101
23102#ifdef HAVE_STDARG_PROTOTYPES
23103#include <stdarg.h>
23104#else
23105#include <varargs.h>
23106#endif
23107
Martin v. Löwis11437992002-04-12 09:54:03 +000023108int
23109main ()
23110{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023111va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023112 ;
23113 return 0;
23114}
23115_ACEOF
23116rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023117if { (ac_try="$ac_compile"
23118case "(($ac_try" in
23119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23120 *) ac_try_echo=$ac_try;;
23121esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023125 grep -v '^ *+' conftest.er1 >conftest.err
23126 rm -f conftest.er1
23127 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023129 (exit $ac_status); } && {
23130 test -z "$ac_c_werror_flag" ||
23131 test ! -s conftest.err
23132 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023133 :
23134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023136sed 's/^/| /' conftest.$ac_ext >&5
23137
Martin v. Löwis11437992002-04-12 09:54:03 +000023138
23139
23140cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023141#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023142_ACEOF
23143
Guido van Rossumda88dad1995-01-26 00:46:29 +000023144 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023145
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023147
23148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023149{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23150echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023151
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023152# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023153
23154
23155
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023156{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23157echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023158if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023159 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023160else
Martin v. Löwis11437992002-04-12 09:54:03 +000023161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023162/* confdefs.h. */
23163_ACEOF
23164cat confdefs.h >>conftest.$ac_ext
23165cat >>conftest.$ac_ext <<_ACEOF
23166/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023167/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23168 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23169#define gethostbyname_r innocuous_gethostbyname_r
23170
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023171/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023172 which can conflict with char gethostbyname_r (); below.
23173 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023174 <limits.h> exists even on freestanding compilers. */
23175
23176#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023177# include <limits.h>
23178#else
23179# include <assert.h>
23180#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023181
23182#undef gethostbyname_r
23183
Martin v. Löwiseba40652007-08-30 20:10:57 +000023184/* Override any GCC internal prototype to avoid an error.
23185 Use char because int might match the return type of a GCC
23186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023187#ifdef __cplusplus
23188extern "C"
23189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023190char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023191/* The GNU C library defines this for functions which it implements
23192 to always fail with ENOSYS. Some functions are actually named
23193 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023194#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023195choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023196#endif
23197
Skip Montanaro6dead952003-09-25 14:50:04 +000023198int
23199main ()
23200{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023201return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023202 ;
23203 return 0;
23204}
23205_ACEOF
23206rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023207if { (ac_try="$ac_link"
23208case "(($ac_try" in
23209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23210 *) ac_try_echo=$ac_try;;
23211esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023213 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023215 grep -v '^ *+' conftest.er1 >conftest.err
23216 rm -f conftest.er1
23217 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023219 (exit $ac_status); } && {
23220 test -z "$ac_c_werror_flag" ||
23221 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023222 } && test -s conftest$ac_exeext &&
23223 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023224 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023227sed 's/^/| /' conftest.$ac_ext >&5
23228
Martin v. Löwiseba40652007-08-30 20:10:57 +000023229 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023231
23232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023233 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023234fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023235{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23236echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23237if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023238
Martin v. Löwis11437992002-04-12 09:54:03 +000023239 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023240#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023241_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023242
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023243 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23244echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023245 OLD_CFLAGS=$CFLAGS
23246 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023248/* confdefs.h. */
23249_ACEOF
23250cat confdefs.h >>conftest.$ac_ext
23251cat >>conftest.$ac_ext <<_ACEOF
23252/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023253
23254# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023255
Martin v. Löwis11437992002-04-12 09:54:03 +000023256int
23257main ()
23258{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023259
23260 char *name;
23261 struct hostent *he, *res;
23262 char buffer[2048];
23263 int buflen = 2048;
23264 int h_errnop;
23265
23266 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023267
23268 ;
23269 return 0;
23270}
23271_ACEOF
23272rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023273if { (ac_try="$ac_compile"
23274case "(($ac_try" in
23275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23276 *) ac_try_echo=$ac_try;;
23277esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023281 grep -v '^ *+' conftest.er1 >conftest.err
23282 rm -f conftest.er1
23283 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023285 (exit $ac_status); } && {
23286 test -z "$ac_c_werror_flag" ||
23287 test ! -s conftest.err
23288 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023289
23290 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023291#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023292_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023293
Martin v. Löwis11437992002-04-12 09:54:03 +000023294
23295cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023296#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023297_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023298
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023299 { echo "$as_me:$LINENO: result: yes" >&5
23300echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023301
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023304sed 's/^/| /' conftest.$ac_ext >&5
23305
Martin v. Löwis11437992002-04-12 09:54:03 +000023306
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023307 { echo "$as_me:$LINENO: result: no" >&5
23308echo "${ECHO_T}no" >&6; }
23309 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23310echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023312/* confdefs.h. */
23313_ACEOF
23314cat confdefs.h >>conftest.$ac_ext
23315cat >>conftest.$ac_ext <<_ACEOF
23316/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023317
23318# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023319
Martin v. Löwis11437992002-04-12 09:54:03 +000023320int
23321main ()
23322{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023323
23324 char *name;
23325 struct hostent *he;
23326 char buffer[2048];
23327 int buflen = 2048;
23328 int h_errnop;
23329
23330 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023331
23332 ;
23333 return 0;
23334}
23335_ACEOF
23336rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023337if { (ac_try="$ac_compile"
23338case "(($ac_try" in
23339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23340 *) ac_try_echo=$ac_try;;
23341esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023345 grep -v '^ *+' conftest.er1 >conftest.err
23346 rm -f conftest.er1
23347 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023349 (exit $ac_status); } && {
23350 test -z "$ac_c_werror_flag" ||
23351 test ! -s conftest.err
23352 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023353
23354 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023355#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023356_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023357
Martin v. Löwis11437992002-04-12 09:54:03 +000023358
23359cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023360#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023361_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023362
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023363 { echo "$as_me:$LINENO: result: yes" >&5
23364echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023365
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023368sed 's/^/| /' conftest.$ac_ext >&5
23369
Martin v. Löwis11437992002-04-12 09:54:03 +000023370
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023371 { echo "$as_me:$LINENO: result: no" >&5
23372echo "${ECHO_T}no" >&6; }
23373 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23374echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023376/* confdefs.h. */
23377_ACEOF
23378cat confdefs.h >>conftest.$ac_ext
23379cat >>conftest.$ac_ext <<_ACEOF
23380/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023381
23382# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023383
Martin v. Löwis11437992002-04-12 09:54:03 +000023384int
23385main ()
23386{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023387
23388 char *name;
23389 struct hostent *he;
23390 struct hostent_data data;
23391
23392 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023393
23394 ;
23395 return 0;
23396}
23397_ACEOF
23398rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023399if { (ac_try="$ac_compile"
23400case "(($ac_try" in
23401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23402 *) ac_try_echo=$ac_try;;
23403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023407 grep -v '^ *+' conftest.er1 >conftest.err
23408 rm -f conftest.er1
23409 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023411 (exit $ac_status); } && {
23412 test -z "$ac_c_werror_flag" ||
23413 test ! -s conftest.err
23414 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023415
23416 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023417#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023418_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023419
Martin v. Löwis11437992002-04-12 09:54:03 +000023420
23421cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023422#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023423_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023424
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023425 { echo "$as_me:$LINENO: result: yes" >&5
23426echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023427
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023428else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023430sed 's/^/| /' conftest.$ac_ext >&5
23431
Martin v. Löwis11437992002-04-12 09:54:03 +000023432
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023433 { echo "$as_me:$LINENO: result: no" >&5
23434echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023435
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023437
23438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023439
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023441
23442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023445
23446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023447 CFLAGS=$OLD_CFLAGS
23448
23449else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023450
Martin v. Löwis11437992002-04-12 09:54:03 +000023451
23452for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023453do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023454as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23455{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23456echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023457if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023458 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023459else
Martin v. Löwis11437992002-04-12 09:54:03 +000023460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023461/* confdefs.h. */
23462_ACEOF
23463cat confdefs.h >>conftest.$ac_ext
23464cat >>conftest.$ac_ext <<_ACEOF
23465/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023466/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23467 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23468#define $ac_func innocuous_$ac_func
23469
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023470/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023471 which can conflict with char $ac_func (); below.
23472 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023473 <limits.h> exists even on freestanding compilers. */
23474
23475#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023476# include <limits.h>
23477#else
23478# include <assert.h>
23479#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023480
23481#undef $ac_func
23482
Martin v. Löwiseba40652007-08-30 20:10:57 +000023483/* Override any GCC internal prototype to avoid an error.
23484 Use char because int might match the return type of a GCC
23485 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023486#ifdef __cplusplus
23487extern "C"
23488#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023489char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023490/* The GNU C library defines this for functions which it implements
23491 to always fail with ENOSYS. Some functions are actually named
23492 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023493#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023494choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023495#endif
23496
Skip Montanaro6dead952003-09-25 14:50:04 +000023497int
23498main ()
23499{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023500return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023501 ;
23502 return 0;
23503}
23504_ACEOF
23505rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023506if { (ac_try="$ac_link"
23507case "(($ac_try" in
23508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23509 *) ac_try_echo=$ac_try;;
23510esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023512 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023514 grep -v '^ *+' conftest.er1 >conftest.err
23515 rm -f conftest.er1
23516 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023518 (exit $ac_status); } && {
23519 test -z "$ac_c_werror_flag" ||
23520 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023521 } && test -s conftest$ac_exeext &&
23522 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023523 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023526sed 's/^/| /' conftest.$ac_ext >&5
23527
Martin v. Löwiseba40652007-08-30 20:10:57 +000023528 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023530
23531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023532 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023533fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023534ac_res=`eval echo '${'$as_ac_var'}'`
23535 { echo "$as_me:$LINENO: result: $ac_res" >&5
23536echo "${ECHO_T}$ac_res" >&6; }
23537if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023538 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023539#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023540_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023541
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023542fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023543done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023544
Michael W. Hudson54241132001-12-07 15:38:26 +000023545
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023546fi
23547
Michael W. Hudson54241132001-12-07 15:38:26 +000023548
23549
23550
23551
23552
23553
Guido van Rossum627b2d71993-12-24 10:39:16 +000023554# checks for system services
23555# (none yet)
23556
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023557# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023558{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23559echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023560if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023561 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023562else
Martin v. Löwis11437992002-04-12 09:54:03 +000023563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023564/* confdefs.h. */
23565_ACEOF
23566cat confdefs.h >>conftest.$ac_ext
23567cat >>conftest.$ac_ext <<_ACEOF
23568/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023569/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23570 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23571#define __fpu_control innocuous___fpu_control
23572
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023573/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023574 which can conflict with char __fpu_control (); below.
23575 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023576 <limits.h> exists even on freestanding compilers. */
23577
23578#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023579# include <limits.h>
23580#else
23581# include <assert.h>
23582#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023583
23584#undef __fpu_control
23585
Martin v. Löwiseba40652007-08-30 20:10:57 +000023586/* Override any GCC internal prototype to avoid an error.
23587 Use char because int might match the return type of a GCC
23588 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023589#ifdef __cplusplus
23590extern "C"
23591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023592char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023593/* The GNU C library defines this for functions which it implements
23594 to always fail with ENOSYS. Some functions are actually named
23595 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023596#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023597choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023598#endif
23599
Skip Montanaro6dead952003-09-25 14:50:04 +000023600int
23601main ()
23602{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023603return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023604 ;
23605 return 0;
23606}
23607_ACEOF
23608rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023609if { (ac_try="$ac_link"
23610case "(($ac_try" in
23611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23612 *) ac_try_echo=$ac_try;;
23613esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023615 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023617 grep -v '^ *+' conftest.er1 >conftest.err
23618 rm -f conftest.er1
23619 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023621 (exit $ac_status); } && {
23622 test -z "$ac_c_werror_flag" ||
23623 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023624 } && test -s conftest$ac_exeext &&
23625 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023626 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023627else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023629sed 's/^/| /' conftest.$ac_ext >&5
23630
Martin v. Löwiseba40652007-08-30 20:10:57 +000023631 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023633
23634rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023635 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023636fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023637{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23638echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23639if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023640 :
23641else
Martin v. Löwis11437992002-04-12 09:54:03 +000023642
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023643{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23644echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023645if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023646 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023647else
Martin v. Löwis11437992002-04-12 09:54:03 +000023648 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023649LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023650cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023651/* confdefs.h. */
23652_ACEOF
23653cat confdefs.h >>conftest.$ac_ext
23654cat >>conftest.$ac_ext <<_ACEOF
23655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023656
Martin v. Löwiseba40652007-08-30 20:10:57 +000023657/* Override any GCC internal prototype to avoid an error.
23658 Use char because int might match the return type of a GCC
23659 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023660#ifdef __cplusplus
23661extern "C"
23662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023663char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023664int
23665main ()
23666{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023667return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023668 ;
23669 return 0;
23670}
23671_ACEOF
23672rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023673if { (ac_try="$ac_link"
23674case "(($ac_try" in
23675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23676 *) ac_try_echo=$ac_try;;
23677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023679 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023681 grep -v '^ *+' conftest.er1 >conftest.err
23682 rm -f conftest.er1
23683 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023685 (exit $ac_status); } && {
23686 test -z "$ac_c_werror_flag" ||
23687 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023688 } && test -s conftest$ac_exeext &&
23689 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023690 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023691else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023693sed 's/^/| /' conftest.$ac_ext >&5
23694
Martin v. Löwiseba40652007-08-30 20:10:57 +000023695 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023697
23698rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023700LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023701fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023702{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23703echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23704if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023705 cat >>confdefs.h <<_ACEOF
23706#define HAVE_LIBIEEE 1
23707_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023708
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023709 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023710
Guido van Rossum627b2d71993-12-24 10:39:16 +000023711fi
23712
Michael W. Hudson54241132001-12-07 15:38:26 +000023713
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023714fi
23715
Michael W. Hudson54241132001-12-07 15:38:26 +000023716
Guido van Rossum7f253911997-05-09 02:42:48 +000023717# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023718{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23719echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023720
Martin v. Löwiseba40652007-08-30 20:10:57 +000023721# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023722if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023723 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023724if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023725then
23726
23727cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023728#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023729_ACEOF
23730
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023731 { echo "$as_me:$LINENO: result: yes" >&5
23732echo "${ECHO_T}yes" >&6; }
23733else { echo "$as_me:$LINENO: result: no" >&5
23734echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023735fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023736else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023737 { echo "$as_me:$LINENO: result: no" >&5
23738echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023739fi
23740
Guido van Rossum7f253911997-05-09 02:42:48 +000023741
Guido van Rossum7f43da71994-08-01 12:15:30 +000023742# check for --with-libm=...
23743
Guido van Rossum563e7081996-09-10 18:20:48 +000023744case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023745Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023746BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023747*) LIBM=-lm
23748esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023749{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23750echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023751
Martin v. Löwiseba40652007-08-30 20:10:57 +000023752# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023753if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023754 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023755if test "$withval" = no
23756then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023757 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23758echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023759elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023760then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023761 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23762echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23763else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23764echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023765 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023766fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023768 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23769echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023770fi
23771
Guido van Rossum7f43da71994-08-01 12:15:30 +000023772
23773# check for --with-libc=...
23774
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023775{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23776echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023777
Martin v. Löwiseba40652007-08-30 20:10:57 +000023778# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023779if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023780 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023781if test "$withval" = no
23782then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023783 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23784echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023785elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023786then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023787 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23788echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23789else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23790echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023791 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023792fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023794 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23795echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023796fi
23797
Guido van Rossum7f43da71994-08-01 12:15:30 +000023798
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023799# **************************************************
23800# * Check for various properties of floating point *
23801# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023802
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023803{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23804echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23805if test "${ac_cv_little_endian_double+set}" = set; then
23806 echo $ECHO_N "(cached) $ECHO_C" >&6
23807else
23808
23809if test "$cross_compiling" = yes; then
23810 ac_cv_little_endian_double=no
23811else
23812 cat >conftest.$ac_ext <<_ACEOF
23813/* confdefs.h. */
23814_ACEOF
23815cat confdefs.h >>conftest.$ac_ext
23816cat >>conftest.$ac_ext <<_ACEOF
23817/* end confdefs.h. */
23818
23819#include <string.h>
23820int main() {
23821 double x = 9006104071832581.0;
23822 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23823 return 0;
23824 else
23825 return 1;
23826}
23827
23828_ACEOF
23829rm -f conftest$ac_exeext
23830if { (ac_try="$ac_link"
23831case "(($ac_try" in
23832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23833 *) ac_try_echo=$ac_try;;
23834esac
23835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23836 (eval "$ac_link") 2>&5
23837 ac_status=$?
23838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23839 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23840 { (case "(($ac_try" in
23841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23842 *) ac_try_echo=$ac_try;;
23843esac
23844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23845 (eval "$ac_try") 2>&5
23846 ac_status=$?
23847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23848 (exit $ac_status); }; }; then
23849 ac_cv_little_endian_double=yes
23850else
23851 echo "$as_me: program exited with status $ac_status" >&5
23852echo "$as_me: failed program was:" >&5
23853sed 's/^/| /' conftest.$ac_ext >&5
23854
23855( exit $ac_status )
23856ac_cv_little_endian_double=no
23857fi
23858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23859fi
23860
23861
23862fi
23863
23864{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23865echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23866if test "$ac_cv_little_endian_double" = yes
23867then
23868
23869cat >>confdefs.h <<\_ACEOF
23870#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23871_ACEOF
23872
23873fi
23874
23875{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23876echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23877if test "${ac_cv_big_endian_double+set}" = set; then
23878 echo $ECHO_N "(cached) $ECHO_C" >&6
23879else
23880
23881if test "$cross_compiling" = yes; then
23882 ac_cv_big_endian_double=no
23883else
23884 cat >conftest.$ac_ext <<_ACEOF
23885/* confdefs.h. */
23886_ACEOF
23887cat confdefs.h >>conftest.$ac_ext
23888cat >>conftest.$ac_ext <<_ACEOF
23889/* end confdefs.h. */
23890
23891#include <string.h>
23892int main() {
23893 double x = 9006104071832581.0;
23894 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23895 return 0;
23896 else
23897 return 1;
23898}
23899
23900_ACEOF
23901rm -f conftest$ac_exeext
23902if { (ac_try="$ac_link"
23903case "(($ac_try" in
23904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23905 *) ac_try_echo=$ac_try;;
23906esac
23907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23908 (eval "$ac_link") 2>&5
23909 ac_status=$?
23910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23912 { (case "(($ac_try" in
23913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23914 *) ac_try_echo=$ac_try;;
23915esac
23916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23917 (eval "$ac_try") 2>&5
23918 ac_status=$?
23919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23920 (exit $ac_status); }; }; then
23921 ac_cv_big_endian_double=yes
23922else
23923 echo "$as_me: program exited with status $ac_status" >&5
23924echo "$as_me: failed program was:" >&5
23925sed 's/^/| /' conftest.$ac_ext >&5
23926
23927( exit $ac_status )
23928ac_cv_big_endian_double=no
23929fi
23930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23931fi
23932
23933
23934fi
23935
23936{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23937echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23938if test "$ac_cv_big_endian_double" = yes
23939then
23940
23941cat >>confdefs.h <<\_ACEOF
23942#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23943_ACEOF
23944
23945fi
23946
23947# Some ARM platforms use a mixed-endian representation for doubles.
23948# While Python doesn't currently have full support for these platforms
23949# (see e.g., issue 1762561), we can at least make sure that float <-> string
23950# conversions work.
23951{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23952echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23953if test "${ac_cv_mixed_endian_double+set}" = set; then
23954 echo $ECHO_N "(cached) $ECHO_C" >&6
23955else
23956
23957if test "$cross_compiling" = yes; then
23958 ac_cv_mixed_endian_double=no
23959else
23960 cat >conftest.$ac_ext <<_ACEOF
23961/* confdefs.h. */
23962_ACEOF
23963cat confdefs.h >>conftest.$ac_ext
23964cat >>conftest.$ac_ext <<_ACEOF
23965/* end confdefs.h. */
23966
23967#include <string.h>
23968int main() {
23969 double x = 9006104071832581.0;
23970 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23971 return 0;
23972 else
23973 return 1;
23974}
23975
23976_ACEOF
23977rm -f conftest$ac_exeext
23978if { (ac_try="$ac_link"
23979case "(($ac_try" in
23980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23981 *) ac_try_echo=$ac_try;;
23982esac
23983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23984 (eval "$ac_link") 2>&5
23985 ac_status=$?
23986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23987 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23988 { (case "(($ac_try" in
23989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23990 *) ac_try_echo=$ac_try;;
23991esac
23992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23993 (eval "$ac_try") 2>&5
23994 ac_status=$?
23995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23996 (exit $ac_status); }; }; then
23997 ac_cv_mixed_endian_double=yes
23998else
23999 echo "$as_me: program exited with status $ac_status" >&5
24000echo "$as_me: failed program was:" >&5
24001sed 's/^/| /' conftest.$ac_ext >&5
24002
24003( exit $ac_status )
24004ac_cv_mixed_endian_double=no
24005fi
24006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24007fi
24008
24009
24010fi
24011
24012{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
24013echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
24014if test "$ac_cv_mixed_endian_double" = yes
24015then
24016
24017cat >>confdefs.h <<\_ACEOF
24018#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
24019_ACEOF
24020
24021fi
24022
24023# The short float repr introduced in Python 3.1 requires the
24024# correctly-rounded string <-> double conversion functions from
24025# Python/dtoa.c, which in turn require that the FPU uses 53-bit
24026# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000024027# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024028# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000024029
24030# This inline assembler syntax may also work for suncc and icc,
24031# so we try it on all platforms.
24032
24033{ 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 +000024034echo $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 +000024035cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024036/* confdefs.h. */
24037_ACEOF
24038cat confdefs.h >>conftest.$ac_ext
24039cat >>conftest.$ac_ext <<_ACEOF
24040/* end confdefs.h. */
24041
24042int
24043main ()
24044{
24045
Mark Dickinsona548dee2009-11-15 13:12:43 +000024046 unsigned short cw;
24047 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24048 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024049
24050 ;
24051 return 0;
24052}
24053_ACEOF
24054rm -f conftest.$ac_objext
24055if { (ac_try="$ac_compile"
24056case "(($ac_try" in
24057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24058 *) ac_try_echo=$ac_try;;
24059esac
24060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24061 (eval "$ac_compile") 2>conftest.er1
24062 ac_status=$?
24063 grep -v '^ *+' conftest.er1 >conftest.err
24064 rm -f conftest.er1
24065 cat conftest.err >&5
24066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24067 (exit $ac_status); } && {
24068 test -z "$ac_c_werror_flag" ||
24069 test ! -s conftest.err
24070 } && test -s conftest.$ac_objext; then
24071 have_gcc_asm_for_x87=yes
24072else
24073 echo "$as_me: failed program was:" >&5
24074sed 's/^/| /' conftest.$ac_ext >&5
24075
24076 have_gcc_asm_for_x87=no
24077fi
24078
24079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024080{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024081echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024082if test "$have_gcc_asm_for_x87" = yes
24083then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024084
24085cat >>confdefs.h <<\_ACEOF
24086#define HAVE_GCC_ASM_FOR_X87 1
24087_ACEOF
24088
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024089fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024090
Mark Dickinson04b27232009-01-04 12:29:36 +000024091# Detect whether system arithmetic is subject to x87-style double
24092# rounding issues. The result of this test has little meaning on non
24093# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24094# mode is round-to-nearest and double rounding issues are present, and
24095# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024096{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24097echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024098# $BASECFLAGS may affect the result
24099ac_save_cc="$CC"
24100CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024101if test "$cross_compiling" = yes; then
24102 ac_cv_x87_double_rounding=no
24103else
24104 cat >conftest.$ac_ext <<_ACEOF
24105/* confdefs.h. */
24106_ACEOF
24107cat confdefs.h >>conftest.$ac_ext
24108cat >>conftest.$ac_ext <<_ACEOF
24109/* end confdefs.h. */
24110
24111#include <stdlib.h>
24112#include <math.h>
24113int main() {
24114 volatile double x, y, z;
24115 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24116 x = 0.99999999999999989; /* 1-2**-53 */
24117 y = 1./x;
24118 if (y != 1.)
24119 exit(0);
24120 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24121 x = 1e16;
24122 y = 2.99999;
24123 z = x + y;
24124 if (z != 1e16+4.)
24125 exit(0);
24126 /* both tests show evidence of double rounding */
24127 exit(1);
24128}
24129
24130_ACEOF
24131rm -f conftest$ac_exeext
24132if { (ac_try="$ac_link"
24133case "(($ac_try" in
24134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24135 *) ac_try_echo=$ac_try;;
24136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024138 (eval "$ac_link") 2>&5
24139 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24142 { (case "(($ac_try" in
24143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24144 *) ac_try_echo=$ac_try;;
24145esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024147 (eval "$ac_try") 2>&5
24148 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024150 (exit $ac_status); }; }; then
24151 ac_cv_x87_double_rounding=no
24152else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024153 echo "$as_me: program exited with status $ac_status" >&5
24154echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024155sed 's/^/| /' conftest.$ac_ext >&5
24156
24157( exit $ac_status )
24158ac_cv_x87_double_rounding=yes
24159fi
24160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24161fi
24162
24163
Mark Dickinson99abd142009-10-24 13:44:16 +000024164CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024165{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24166echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024167if test "$ac_cv_x87_double_rounding" = yes
24168then
24169
24170cat >>confdefs.h <<\_ACEOF
24171#define X87_DOUBLE_ROUNDING 1
24172_ACEOF
24173
24174fi
24175
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024176# ************************************
24177# * Check for mathematical functions *
24178# ************************************
24179
24180LIBS_SAVE=$LIBS
24181LIBS="$LIBS $LIBM"
24182
Mark Dickinson265d7382008-04-21 22:32:24 +000024183# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24184# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024185{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24186echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024187if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024188 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024189else
24190
24191if test "$cross_compiling" = yes; then
24192 ac_cv_tanh_preserves_zero_sign=no
24193else
24194 cat >conftest.$ac_ext <<_ACEOF
24195/* confdefs.h. */
24196_ACEOF
24197cat confdefs.h >>conftest.$ac_ext
24198cat >>conftest.$ac_ext <<_ACEOF
24199/* end confdefs.h. */
24200
24201#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024202#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024203int main() {
24204 /* return 0 if either negative zeros don't exist
24205 on this platform or if negative zeros exist
24206 and tanh(-0.) == -0. */
24207 if (atan2(0., -1.) == atan2(-0., -1.) ||
24208 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24209 else exit(1);
24210}
24211
24212_ACEOF
24213rm -f conftest$ac_exeext
24214if { (ac_try="$ac_link"
24215case "(($ac_try" in
24216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24217 *) ac_try_echo=$ac_try;;
24218esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024220 (eval "$ac_link") 2>&5
24221 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024223 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24224 { (case "(($ac_try" in
24225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24226 *) ac_try_echo=$ac_try;;
24227esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024229 (eval "$ac_try") 2>&5
24230 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024232 (exit $ac_status); }; }; then
24233 ac_cv_tanh_preserves_zero_sign=yes
24234else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024235 echo "$as_me: program exited with status $ac_status" >&5
24236echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024237sed 's/^/| /' conftest.$ac_ext >&5
24238
24239( exit $ac_status )
24240ac_cv_tanh_preserves_zero_sign=no
24241fi
24242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24243fi
24244
24245
24246fi
24247
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024248{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24249echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024250if test "$ac_cv_tanh_preserves_zero_sign" = yes
24251then
24252
24253cat >>confdefs.h <<\_ACEOF
24254#define TANH_PRESERVES_ZERO_SIGN 1
24255_ACEOF
24256
24257fi
24258
Martin v. Löwis11437992002-04-12 09:54:03 +000024259
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024260
Michael W. Hudson54241132001-12-07 15:38:26 +000024261
Christian Heimes0a8143f2007-12-18 23:22:54 +000024262
24263
24264
24265
24266
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024267
Mark Dickinson65898e02009-09-05 10:27:00 +000024268for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24269do
24270as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24271{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24272echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24273if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24274 echo $ECHO_N "(cached) $ECHO_C" >&6
24275else
24276 cat >conftest.$ac_ext <<_ACEOF
24277/* confdefs.h. */
24278_ACEOF
24279cat confdefs.h >>conftest.$ac_ext
24280cat >>conftest.$ac_ext <<_ACEOF
24281/* end confdefs.h. */
24282/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24283 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24284#define $ac_func innocuous_$ac_func
24285
24286/* System header to define __stub macros and hopefully few prototypes,
24287 which can conflict with char $ac_func (); below.
24288 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24289 <limits.h> exists even on freestanding compilers. */
24290
24291#ifdef __STDC__
24292# include <limits.h>
24293#else
24294# include <assert.h>
24295#endif
24296
24297#undef $ac_func
24298
24299/* Override any GCC internal prototype to avoid an error.
24300 Use char because int might match the return type of a GCC
24301 builtin and then its argument prototype would still apply. */
24302#ifdef __cplusplus
24303extern "C"
24304#endif
24305char $ac_func ();
24306/* The GNU C library defines this for functions which it implements
24307 to always fail with ENOSYS. Some functions are actually named
24308 something starting with __ and the normal name is an alias. */
24309#if defined __stub_$ac_func || defined __stub___$ac_func
24310choke me
24311#endif
24312
24313int
24314main ()
24315{
24316return $ac_func ();
24317 ;
24318 return 0;
24319}
24320_ACEOF
24321rm -f conftest.$ac_objext conftest$ac_exeext
24322if { (ac_try="$ac_link"
24323case "(($ac_try" in
24324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24325 *) ac_try_echo=$ac_try;;
24326esac
24327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24328 (eval "$ac_link") 2>conftest.er1
24329 ac_status=$?
24330 grep -v '^ *+' conftest.er1 >conftest.err
24331 rm -f conftest.er1
24332 cat conftest.err >&5
24333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24334 (exit $ac_status); } && {
24335 test -z "$ac_c_werror_flag" ||
24336 test ! -s conftest.err
24337 } && test -s conftest$ac_exeext &&
24338 $as_test_x conftest$ac_exeext; then
24339 eval "$as_ac_var=yes"
24340else
24341 echo "$as_me: failed program was:" >&5
24342sed 's/^/| /' conftest.$ac_ext >&5
24343
24344 eval "$as_ac_var=no"
24345fi
24346
24347rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24348 conftest$ac_exeext conftest.$ac_ext
24349fi
24350ac_res=`eval echo '${'$as_ac_var'}'`
24351 { echo "$as_me:$LINENO: result: $ac_res" >&5
24352echo "${ECHO_T}$ac_res" >&6; }
24353if test `eval echo '${'$as_ac_var'}'` = yes; then
24354 cat >>confdefs.h <<_ACEOF
24355#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24356_ACEOF
24357
24358fi
24359done
24360
24361
24362
24363
24364
24365
24366for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024367do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024368as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24369{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24370echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024371if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024372 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024373else
24374 cat >conftest.$ac_ext <<_ACEOF
24375/* confdefs.h. */
24376_ACEOF
24377cat confdefs.h >>conftest.$ac_ext
24378cat >>conftest.$ac_ext <<_ACEOF
24379/* end confdefs.h. */
24380/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24381 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24382#define $ac_func innocuous_$ac_func
24383
24384/* System header to define __stub macros and hopefully few prototypes,
24385 which can conflict with char $ac_func (); below.
24386 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24387 <limits.h> exists even on freestanding compilers. */
24388
24389#ifdef __STDC__
24390# include <limits.h>
24391#else
24392# include <assert.h>
24393#endif
24394
24395#undef $ac_func
24396
24397/* Override any GCC internal prototype to avoid an error.
24398 Use char because int might match the return type of a GCC
24399 builtin and then its argument prototype would still apply. */
24400#ifdef __cplusplus
24401extern "C"
24402#endif
24403char $ac_func ();
24404/* The GNU C library defines this for functions which it implements
24405 to always fail with ENOSYS. Some functions are actually named
24406 something starting with __ and the normal name is an alias. */
24407#if defined __stub_$ac_func || defined __stub___$ac_func
24408choke me
24409#endif
24410
24411int
24412main ()
24413{
24414return $ac_func ();
24415 ;
24416 return 0;
24417}
24418_ACEOF
24419rm -f conftest.$ac_objext conftest$ac_exeext
24420if { (ac_try="$ac_link"
24421case "(($ac_try" in
24422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24423 *) ac_try_echo=$ac_try;;
24424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024426 (eval "$ac_link") 2>conftest.er1
24427 ac_status=$?
24428 grep -v '^ *+' conftest.er1 >conftest.err
24429 rm -f conftest.er1
24430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024432 (exit $ac_status); } && {
24433 test -z "$ac_c_werror_flag" ||
24434 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024435 } && test -s conftest$ac_exeext &&
24436 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024437 eval "$as_ac_var=yes"
24438else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024439 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024440sed 's/^/| /' conftest.$ac_ext >&5
24441
24442 eval "$as_ac_var=no"
24443fi
24444
24445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24446 conftest$ac_exeext conftest.$ac_ext
24447fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024448ac_res=`eval echo '${'$as_ac_var'}'`
24449 { echo "$as_me:$LINENO: result: $ac_res" >&5
24450echo "${ECHO_T}$ac_res" >&6; }
24451if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024452 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024453#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024454_ACEOF
24455
24456fi
24457done
24458
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024459{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24460echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024461if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024462 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024463else
24464 cat >conftest.$ac_ext <<_ACEOF
24465/* confdefs.h. */
24466_ACEOF
24467cat confdefs.h >>conftest.$ac_ext
24468cat >>conftest.$ac_ext <<_ACEOF
24469/* end confdefs.h. */
24470#include <math.h>
24471
24472int
24473main ()
24474{
24475#ifndef isinf
24476 (void) isinf;
24477#endif
24478
24479 ;
24480 return 0;
24481}
24482_ACEOF
24483rm -f conftest.$ac_objext
24484if { (ac_try="$ac_compile"
24485case "(($ac_try" in
24486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24487 *) ac_try_echo=$ac_try;;
24488esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024490 (eval "$ac_compile") 2>conftest.er1
24491 ac_status=$?
24492 grep -v '^ *+' conftest.er1 >conftest.err
24493 rm -f conftest.er1
24494 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024496 (exit $ac_status); } && {
24497 test -z "$ac_c_werror_flag" ||
24498 test ! -s conftest.err
24499 } && test -s conftest.$ac_objext; then
24500 ac_cv_have_decl_isinf=yes
24501else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024502 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024503sed 's/^/| /' conftest.$ac_ext >&5
24504
24505 ac_cv_have_decl_isinf=no
24506fi
24507
24508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24509fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024510{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24511echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24512if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024513
24514cat >>confdefs.h <<_ACEOF
24515#define HAVE_DECL_ISINF 1
24516_ACEOF
24517
24518
24519else
24520 cat >>confdefs.h <<_ACEOF
24521#define HAVE_DECL_ISINF 0
24522_ACEOF
24523
24524
24525fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024526{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24527echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024528if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024529 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024530else
24531 cat >conftest.$ac_ext <<_ACEOF
24532/* confdefs.h. */
24533_ACEOF
24534cat confdefs.h >>conftest.$ac_ext
24535cat >>conftest.$ac_ext <<_ACEOF
24536/* end confdefs.h. */
24537#include <math.h>
24538
24539int
24540main ()
24541{
24542#ifndef isnan
24543 (void) isnan;
24544#endif
24545
24546 ;
24547 return 0;
24548}
24549_ACEOF
24550rm -f conftest.$ac_objext
24551if { (ac_try="$ac_compile"
24552case "(($ac_try" in
24553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24554 *) ac_try_echo=$ac_try;;
24555esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024557 (eval "$ac_compile") 2>conftest.er1
24558 ac_status=$?
24559 grep -v '^ *+' conftest.er1 >conftest.err
24560 rm -f conftest.er1
24561 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024563 (exit $ac_status); } && {
24564 test -z "$ac_c_werror_flag" ||
24565 test ! -s conftest.err
24566 } && test -s conftest.$ac_objext; then
24567 ac_cv_have_decl_isnan=yes
24568else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024569 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024570sed 's/^/| /' conftest.$ac_ext >&5
24571
24572 ac_cv_have_decl_isnan=no
24573fi
24574
24575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24576fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024577{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24578echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24579if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024580
24581cat >>confdefs.h <<_ACEOF
24582#define HAVE_DECL_ISNAN 1
24583_ACEOF
24584
24585
24586else
24587 cat >>confdefs.h <<_ACEOF
24588#define HAVE_DECL_ISNAN 0
24589_ACEOF
24590
24591
24592fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024593{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24594echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024595if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024596 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024597else
24598 cat >conftest.$ac_ext <<_ACEOF
24599/* confdefs.h. */
24600_ACEOF
24601cat confdefs.h >>conftest.$ac_ext
24602cat >>conftest.$ac_ext <<_ACEOF
24603/* end confdefs.h. */
24604#include <math.h>
24605
24606int
24607main ()
24608{
24609#ifndef isfinite
24610 (void) isfinite;
24611#endif
24612
24613 ;
24614 return 0;
24615}
24616_ACEOF
24617rm -f conftest.$ac_objext
24618if { (ac_try="$ac_compile"
24619case "(($ac_try" in
24620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24621 *) ac_try_echo=$ac_try;;
24622esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024624 (eval "$ac_compile") 2>conftest.er1
24625 ac_status=$?
24626 grep -v '^ *+' conftest.er1 >conftest.err
24627 rm -f conftest.er1
24628 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024630 (exit $ac_status); } && {
24631 test -z "$ac_c_werror_flag" ||
24632 test ! -s conftest.err
24633 } && test -s conftest.$ac_objext; then
24634 ac_cv_have_decl_isfinite=yes
24635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024636 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024637sed 's/^/| /' conftest.$ac_ext >&5
24638
24639 ac_cv_have_decl_isfinite=no
24640fi
24641
24642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24643fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024644{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24645echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24646if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024647
24648cat >>confdefs.h <<_ACEOF
24649#define HAVE_DECL_ISFINITE 1
24650_ACEOF
24651
24652
24653else
24654 cat >>confdefs.h <<_ACEOF
24655#define HAVE_DECL_ISFINITE 0
24656_ACEOF
24657
24658
24659fi
24660
24661
Christian Heimes0a8143f2007-12-18 23:22:54 +000024662
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024663LIBS=$LIBS_SAVE
24664
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024665# For multiprocessing module, check that sem_open
24666# actually works. For FreeBSD versions <= 7.2,
24667# the kernel module that provides POSIX semaphores
24668# isn't loaded by default, so an attempt to call
24669# sem_open results in a 'Signal 12' error.
24670{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24671echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24672if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24673 echo $ECHO_N "(cached) $ECHO_C" >&6
24674else
24675 if test "$cross_compiling" = yes; then
24676 ac_cv_posix_semaphores_enabled=yes
24677else
24678 cat >conftest.$ac_ext <<_ACEOF
24679/* confdefs.h. */
24680_ACEOF
24681cat confdefs.h >>conftest.$ac_ext
24682cat >>conftest.$ac_ext <<_ACEOF
24683/* end confdefs.h. */
24684
24685#include <unistd.h>
24686#include <fcntl.h>
24687#include <stdio.h>
24688#include <semaphore.h>
24689#include <sys/stat.h>
24690
24691int main(void) {
24692 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24693 if (a == SEM_FAILED) {
24694 perror("sem_open");
24695 return 1;
24696 }
24697 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024698 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024699 return 0;
24700}
24701
24702_ACEOF
24703rm -f conftest$ac_exeext
24704if { (ac_try="$ac_link"
24705case "(($ac_try" in
24706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24707 *) ac_try_echo=$ac_try;;
24708esac
24709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24710 (eval "$ac_link") 2>&5
24711 ac_status=$?
24712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24713 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24714 { (case "(($ac_try" in
24715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24716 *) ac_try_echo=$ac_try;;
24717esac
24718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24719 (eval "$ac_try") 2>&5
24720 ac_status=$?
24721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24722 (exit $ac_status); }; }; then
24723 ac_cv_posix_semaphores_enabled=yes
24724else
24725 echo "$as_me: program exited with status $ac_status" >&5
24726echo "$as_me: failed program was:" >&5
24727sed 's/^/| /' conftest.$ac_ext >&5
24728
24729( exit $ac_status )
24730ac_cv_posix_semaphores_enabled=no
24731fi
24732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24733fi
24734
24735
24736
24737fi
24738
24739{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24740echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24741if test $ac_cv_posix_semaphores_enabled = no
24742then
24743
24744cat >>confdefs.h <<\_ACEOF
24745#define POSIX_SEMAPHORES_NOT_ENABLED 1
24746_ACEOF
24747
24748fi
24749
24750# Multiprocessing check for broken sem_getvalue
24751{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24752echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24753if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24754 echo $ECHO_N "(cached) $ECHO_C" >&6
24755else
24756 if test "$cross_compiling" = yes; then
24757 ac_cv_broken_sem_getvalue=yes
24758else
24759 cat >conftest.$ac_ext <<_ACEOF
24760/* confdefs.h. */
24761_ACEOF
24762cat confdefs.h >>conftest.$ac_ext
24763cat >>conftest.$ac_ext <<_ACEOF
24764/* end confdefs.h. */
24765
24766#include <unistd.h>
24767#include <fcntl.h>
24768#include <stdio.h>
24769#include <semaphore.h>
24770#include <sys/stat.h>
24771
24772int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024773 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024774 int count;
24775 int res;
24776 if(a==SEM_FAILED){
24777 perror("sem_open");
24778 return 1;
24779
24780 }
24781 res = sem_getvalue(a, &count);
24782 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024783 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024784 return res==-1 ? 1 : 0;
24785}
24786
24787_ACEOF
24788rm -f conftest$ac_exeext
24789if { (ac_try="$ac_link"
24790case "(($ac_try" in
24791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24792 *) ac_try_echo=$ac_try;;
24793esac
24794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24795 (eval "$ac_link") 2>&5
24796 ac_status=$?
24797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24798 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24799 { (case "(($ac_try" in
24800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24801 *) ac_try_echo=$ac_try;;
24802esac
24803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24804 (eval "$ac_try") 2>&5
24805 ac_status=$?
24806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24807 (exit $ac_status); }; }; then
24808 ac_cv_broken_sem_getvalue=no
24809else
24810 echo "$as_me: program exited with status $ac_status" >&5
24811echo "$as_me: failed program was:" >&5
24812sed 's/^/| /' conftest.$ac_ext >&5
24813
24814( exit $ac_status )
24815ac_cv_broken_sem_getvalue=yes
24816fi
24817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24818fi
24819
24820
24821
24822fi
24823
24824{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24825echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24826if test $ac_cv_broken_sem_getvalue = yes
24827then
24828
24829cat >>confdefs.h <<\_ACEOF
24830#define HAVE_BROKEN_SEM_GETVALUE 1
24831_ACEOF
24832
24833fi
24834
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024835# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024836{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24837echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024838# Check whether --enable-big-digits was given.
24839if test "${enable_big_digits+set}" = set; then
24840 enableval=$enable_big_digits; case $enable_big_digits in
24841yes)
24842 enable_big_digits=30 ;;
24843no)
24844 enable_big_digits=15 ;;
2484515|30)
24846 ;;
24847*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024848 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24849echo "$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 +000024850 { (exit 1); exit 1; }; } ;;
24851esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024852{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24853echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024854
24855cat >>confdefs.h <<_ACEOF
24856#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24857_ACEOF
24858
24859
24860else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024861 { echo "$as_me:$LINENO: result: no value specified" >&5
24862echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024863fi
24864
24865
Guido van Rossumef2255b2000-03-10 22:30:29 +000024866# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024867if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024868 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24869echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024870if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024871 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024872fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024873{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24874echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024875else
Martin v. Löwis11437992002-04-12 09:54:03 +000024876 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024877{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24878echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024880/* confdefs.h. */
24881_ACEOF
24882cat confdefs.h >>conftest.$ac_ext
24883cat >>conftest.$ac_ext <<_ACEOF
24884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024885$ac_includes_default
24886#include <wchar.h>
24887_ACEOF
24888rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024897 grep -v '^ *+' conftest.er1 >conftest.err
24898 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); } && {
24902 test -z "$ac_c_werror_flag" ||
24903 test ! -s conftest.err
24904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024905 ac_header_compiler=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öwiseba40652007-08-30 20:10:57 +000024910 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024912
24913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024914{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24915echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024916
24917# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024918{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24919echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024920cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024921/* confdefs.h. */
24922_ACEOF
24923cat confdefs.h >>conftest.$ac_ext
24924cat >>conftest.$ac_ext <<_ACEOF
24925/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024926#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024927_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024928if { (ac_try="$ac_cpp conftest.$ac_ext"
24929case "(($ac_try" in
24930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24931 *) ac_try_echo=$ac_try;;
24932esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024934 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024935 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024936 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024937 rm -f conftest.er1
24938 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024940 (exit $ac_status); } >/dev/null && {
24941 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24942 test ! -s conftest.err
24943 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024944 ac_header_preproc=yes
24945else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024947sed 's/^/| /' conftest.$ac_ext >&5
24948
Martin v. Löwis11437992002-04-12 09:54:03 +000024949 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024951
Martin v. Löwis11437992002-04-12 09:54:03 +000024952rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024953{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24954echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024955
24956# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024957case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24958 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024959 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24960echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24961 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24962echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024963 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024964 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024965 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024966 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24967echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24968 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24969echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24970 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24971echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24972 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24973echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24974 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24975echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24976 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24977echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024978 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024979## -------------------------------------- ##
24980## Report this to http://bugs.python.org/ ##
24981## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024982_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024983 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024984 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024985esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024986{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24987echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024988if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024989 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024990else
24991 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024992fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024993{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24994echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024995
24996fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024997if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024998
24999
25000cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000025001#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025002_ACEOF
25003
Martin v. Löwisc45929e2002-04-06 10:10:49 +000025004 wchar_h="yes"
25005
Guido van Rossumef2255b2000-03-10 22:30:29 +000025006else
Martin v. Löwis11437992002-04-12 09:54:03 +000025007 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000025008
25009fi
25010
Michael W. Hudson54241132001-12-07 15:38:26 +000025011
Martin v. Löwis11437992002-04-12 09:54:03 +000025012
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025013# determine wchar_t size
25014if test "$wchar_h" = yes
25015then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025016 { echo "$as_me:$LINENO: checking for wchar_t" >&5
25017echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
25018if test "${ac_cv_type_wchar_t+set}" = set; then
25019 echo $ECHO_N "(cached) $ECHO_C" >&6
25020else
25021 cat >conftest.$ac_ext <<_ACEOF
25022/* confdefs.h. */
25023_ACEOF
25024cat confdefs.h >>conftest.$ac_ext
25025cat >>conftest.$ac_ext <<_ACEOF
25026/* end confdefs.h. */
25027#include <wchar.h>
25028
25029typedef wchar_t ac__type_new_;
25030int
25031main ()
25032{
25033if ((ac__type_new_ *) 0)
25034 return 0;
25035if (sizeof (ac__type_new_))
25036 return 0;
25037 ;
25038 return 0;
25039}
25040_ACEOF
25041rm -f conftest.$ac_objext
25042if { (ac_try="$ac_compile"
25043case "(($ac_try" in
25044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25045 *) ac_try_echo=$ac_try;;
25046esac
25047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25048 (eval "$ac_compile") 2>conftest.er1
25049 ac_status=$?
25050 grep -v '^ *+' conftest.er1 >conftest.err
25051 rm -f conftest.er1
25052 cat conftest.err >&5
25053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25054 (exit $ac_status); } && {
25055 test -z "$ac_c_werror_flag" ||
25056 test ! -s conftest.err
25057 } && test -s conftest.$ac_objext; then
25058 ac_cv_type_wchar_t=yes
25059else
25060 echo "$as_me: failed program was:" >&5
25061sed 's/^/| /' conftest.$ac_ext >&5
25062
25063 ac_cv_type_wchar_t=no
25064fi
25065
25066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25067fi
25068{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25069echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25070
25071# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025072# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25073# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25074# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025075{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25076echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025077if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025078 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025079else
Martin v. Löwis11437992002-04-12 09:54:03 +000025080 if test "$cross_compiling" = yes; then
25081 # Depending upon the size, compute the lo and hi bounds.
25082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025083/* confdefs.h. */
25084_ACEOF
25085cat confdefs.h >>conftest.$ac_ext
25086cat >>conftest.$ac_ext <<_ACEOF
25087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025088#include <wchar.h>
25089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025090 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025091int
25092main ()
25093{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025095test_array [0] = 0
25096
25097 ;
25098 return 0;
25099}
25100_ACEOF
25101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025102if { (ac_try="$ac_compile"
25103case "(($ac_try" in
25104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25105 *) ac_try_echo=$ac_try;;
25106esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025110 grep -v '^ *+' conftest.er1 >conftest.err
25111 rm -f conftest.er1
25112 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025114 (exit $ac_status); } && {
25115 test -z "$ac_c_werror_flag" ||
25116 test ! -s conftest.err
25117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025118 ac_lo=0 ac_mid=0
25119 while :; do
25120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025121/* confdefs.h. */
25122_ACEOF
25123cat confdefs.h >>conftest.$ac_ext
25124cat >>conftest.$ac_ext <<_ACEOF
25125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025126#include <wchar.h>
25127
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025128 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025129int
25130main ()
25131{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025132static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025133test_array [0] = 0
25134
25135 ;
25136 return 0;
25137}
25138_ACEOF
25139rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025140if { (ac_try="$ac_compile"
25141case "(($ac_try" in
25142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25143 *) ac_try_echo=$ac_try;;
25144esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025146 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025148 grep -v '^ *+' conftest.er1 >conftest.err
25149 rm -f conftest.er1
25150 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025152 (exit $ac_status); } && {
25153 test -z "$ac_c_werror_flag" ||
25154 test ! -s conftest.err
25155 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025156 ac_hi=$ac_mid; break
25157else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025159sed 's/^/| /' conftest.$ac_ext >&5
25160
Martin v. Löwiseba40652007-08-30 20:10:57 +000025161 ac_lo=`expr $ac_mid + 1`
25162 if test $ac_lo -le $ac_mid; then
25163 ac_lo= ac_hi=
25164 break
25165 fi
25166 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025168
25169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025170 done
25171else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025173sed 's/^/| /' conftest.$ac_ext >&5
25174
Martin v. Löwiseba40652007-08-30 20:10:57 +000025175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025176/* confdefs.h. */
25177_ACEOF
25178cat confdefs.h >>conftest.$ac_ext
25179cat >>conftest.$ac_ext <<_ACEOF
25180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025181#include <wchar.h>
25182
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025183 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025184int
25185main ()
25186{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025187static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025188test_array [0] = 0
25189
25190 ;
25191 return 0;
25192}
25193_ACEOF
25194rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025195if { (ac_try="$ac_compile"
25196case "(($ac_try" in
25197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25198 *) ac_try_echo=$ac_try;;
25199esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025201 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025203 grep -v '^ *+' conftest.er1 >conftest.err
25204 rm -f conftest.er1
25205 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025207 (exit $ac_status); } && {
25208 test -z "$ac_c_werror_flag" ||
25209 test ! -s conftest.err
25210 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025211 ac_hi=-1 ac_mid=-1
25212 while :; do
25213 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025214/* confdefs.h. */
25215_ACEOF
25216cat confdefs.h >>conftest.$ac_ext
25217cat >>conftest.$ac_ext <<_ACEOF
25218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025219#include <wchar.h>
25220
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025221 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025222int
25223main ()
25224{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025226test_array [0] = 0
25227
25228 ;
25229 return 0;
25230}
25231_ACEOF
25232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025233if { (ac_try="$ac_compile"
25234case "(($ac_try" in
25235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25236 *) ac_try_echo=$ac_try;;
25237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025241 grep -v '^ *+' conftest.er1 >conftest.err
25242 rm -f conftest.er1
25243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025245 (exit $ac_status); } && {
25246 test -z "$ac_c_werror_flag" ||
25247 test ! -s conftest.err
25248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025249 ac_lo=$ac_mid; break
25250else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025252sed 's/^/| /' conftest.$ac_ext >&5
25253
Martin v. Löwiseba40652007-08-30 20:10:57 +000025254 ac_hi=`expr '(' $ac_mid ')' - 1`
25255 if test $ac_mid -le $ac_hi; then
25256 ac_lo= ac_hi=
25257 break
25258 fi
25259 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025261
25262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025263 done
25264else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025266sed 's/^/| /' conftest.$ac_ext >&5
25267
Martin v. Löwiseba40652007-08-30 20:10:57 +000025268 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025270
25271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025273
25274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025275# Binary search between lo and hi bounds.
25276while test "x$ac_lo" != "x$ac_hi"; do
25277 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25278 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025279/* confdefs.h. */
25280_ACEOF
25281cat confdefs.h >>conftest.$ac_ext
25282cat >>conftest.$ac_ext <<_ACEOF
25283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025284#include <wchar.h>
25285
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025286 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025287int
25288main ()
25289{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025290static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025291test_array [0] = 0
25292
25293 ;
25294 return 0;
25295}
25296_ACEOF
25297rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025298if { (ac_try="$ac_compile"
25299case "(($ac_try" in
25300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25301 *) ac_try_echo=$ac_try;;
25302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025304 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025306 grep -v '^ *+' conftest.er1 >conftest.err
25307 rm -f conftest.er1
25308 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025310 (exit $ac_status); } && {
25311 test -z "$ac_c_werror_flag" ||
25312 test ! -s conftest.err
25313 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025314 ac_hi=$ac_mid
25315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025317sed 's/^/| /' conftest.$ac_ext >&5
25318
Martin v. Löwiseba40652007-08-30 20:10:57 +000025319 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025321
25322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025323done
25324case $ac_lo in
25325?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025326'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025327 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025328See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025329echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025330See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025331 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025332 else
25333 ac_cv_sizeof_wchar_t=0
25334 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025335esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025336else
Martin v. Löwis11437992002-04-12 09:54:03 +000025337 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025338/* confdefs.h. */
25339_ACEOF
25340cat confdefs.h >>conftest.$ac_ext
25341cat >>conftest.$ac_ext <<_ACEOF
25342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025343#include <wchar.h>
25344
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025345 typedef wchar_t ac__type_sizeof_;
25346static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25347static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025348#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025349#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025350int
25351main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025352{
Martin v. Löwis11437992002-04-12 09:54:03 +000025353
25354 FILE *f = fopen ("conftest.val", "w");
25355 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025356 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025357 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025358 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025359 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025360 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025361 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025362 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025363 }
25364 else
25365 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025366 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025367 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025368 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025369 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025370 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025371 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025372
25373 ;
25374 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025375}
Martin v. Löwis11437992002-04-12 09:54:03 +000025376_ACEOF
25377rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025378if { (ac_try="$ac_link"
25379case "(($ac_try" in
25380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25381 *) ac_try_echo=$ac_try;;
25382esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025384 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025385 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025387 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025388 { (case "(($ac_try" in
25389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25390 *) ac_try_echo=$ac_try;;
25391esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025393 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025394 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025396 (exit $ac_status); }; }; then
25397 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025398else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025399 echo "$as_me: program exited with status $ac_status" >&5
25400echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025401sed 's/^/| /' conftest.$ac_ext >&5
25402
Martin v. Löwis11437992002-04-12 09:54:03 +000025403( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025404if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025405 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025406See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025407echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025408See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025409 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025410 else
25411 ac_cv_sizeof_wchar_t=0
25412 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025414rm -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 +000025415fi
25416rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025417fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025418{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25419echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025420
25421
25422
Martin v. Löwis11437992002-04-12 09:54:03 +000025423cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025424#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025425_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025426
Michael W. Hudson54241132001-12-07 15:38:26 +000025427
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025428fi
25429
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025430{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25431echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025432have_ucs4_tcl=no
25433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025434/* confdefs.h. */
25435_ACEOF
25436cat confdefs.h >>conftest.$ac_ext
25437cat >>conftest.$ac_ext <<_ACEOF
25438/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025439
25440#include <tcl.h>
25441#if TCL_UTF_MAX != 6
25442# error "NOT UCS4_TCL"
25443#endif
25444int
25445main ()
25446{
25447
25448 ;
25449 return 0;
25450}
25451_ACEOF
25452rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025453if { (ac_try="$ac_compile"
25454case "(($ac_try" in
25455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25456 *) ac_try_echo=$ac_try;;
25457esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025461 grep -v '^ *+' conftest.er1 >conftest.err
25462 rm -f conftest.er1
25463 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025465 (exit $ac_status); } && {
25466 test -z "$ac_c_werror_flag" ||
25467 test ! -s conftest.err
25468 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025469
25470
25471cat >>confdefs.h <<\_ACEOF
25472#define HAVE_UCS4_TCL 1
25473_ACEOF
25474
25475 have_ucs4_tcl=yes
25476
25477else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025479sed 's/^/| /' conftest.$ac_ext >&5
25480
Martin v. Löwiseba40652007-08-30 20:10:57 +000025481
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025483
25484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025485{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25486echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025487
Skip Montanaro6dead952003-09-25 14:50:04 +000025488# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025489if test "$wchar_h" = yes
25490then
25491 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025492 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25493echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025494 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025495 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025496else
25497
25498 if test "$cross_compiling" = yes; then
25499 ac_cv_wchar_t_signed=yes
25500else
25501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025502/* confdefs.h. */
25503_ACEOF
25504cat confdefs.h >>conftest.$ac_ext
25505cat >>conftest.$ac_ext <<_ACEOF
25506/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025507
25508 #include <wchar.h>
25509 int main()
25510 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025511 /* Success: exit code 0 */
25512 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025513 }
25514
25515_ACEOF
25516rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025517if { (ac_try="$ac_link"
25518case "(($ac_try" in
25519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25520 *) ac_try_echo=$ac_try;;
25521esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025523 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025524 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025526 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025527 { (case "(($ac_try" in
25528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25529 *) ac_try_echo=$ac_try;;
25530esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025532 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025533 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025535 (exit $ac_status); }; }; then
25536 ac_cv_wchar_t_signed=yes
25537else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025538 echo "$as_me: program exited with status $ac_status" >&5
25539echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025540sed 's/^/| /' conftest.$ac_ext >&5
25541
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025542( exit $ac_status )
25543ac_cv_wchar_t_signed=no
25544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025545rm -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 +000025546fi
25547
Martin v. Löwiseba40652007-08-30 20:10:57 +000025548
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025549fi
25550
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025551 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25552echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025553fi
25554
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025555{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25556echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025557# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025558if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025559 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025560else
25561 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025562fi
25563
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025564
25565if test $enable_unicode = yes
25566then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025567 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025568 case "$have_ucs4_tcl" in
25569 yes) enable_unicode="ucs4"
25570 ;;
25571 *) enable_unicode="ucs2"
25572 ;;
25573 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025574fi
25575
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025576
25577
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025578case "$enable_unicode" in
25579ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025580 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025581#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025582_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025583
25584 ;;
25585ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025586 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025587#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025588_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025589
25590 ;;
Benjamin Peterson8b650542010-02-27 00:11:42 +000025591*) { { echo "$as_me:$LINENO: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&5
25592echo "$as_me: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&2;}
25593 { (exit 1); exit 1; }; } ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025594esac
25595
Michael W. Hudson54241132001-12-07 15:38:26 +000025596
Martin v. Löwis11437992002-04-12 09:54:03 +000025597
25598
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025599
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025600if test "$enable_unicode" = "no"
25601then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025602 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025603 { echo "$as_me:$LINENO: result: not used" >&5
25604echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025605else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025606 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025607
25608cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025609#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025610_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025611
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025612
25613 # wchar_t is only usable if it maps to an unsigned type
25614 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025615 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025616 then
25617 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025618
Martin v. Löwis11437992002-04-12 09:54:03 +000025619cat >>confdefs.h <<\_ACEOF
25620#define HAVE_USABLE_WCHAR_T 1
25621_ACEOF
25622
25623 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025624#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025625_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025626
25627 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25628 then
25629 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025630 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025631#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025632_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025633
25634 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25635 then
25636 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025637 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025638#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025639_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025640
25641 else
25642 PY_UNICODE_TYPE="no type found"
25643 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025644 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25645echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025646fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025647
25648# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025649{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25650echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025651if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025653else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025654 # See if sys/param.h defines the BYTE_ORDER macro.
25655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025656/* confdefs.h. */
25657_ACEOF
25658cat confdefs.h >>conftest.$ac_ext
25659cat >>conftest.$ac_ext <<_ACEOF
25660/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025661#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025662#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025663
Martin v. Löwis11437992002-04-12 09:54:03 +000025664int
25665main ()
25666{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025667#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25668 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25669 bogus endian macros
25670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025671
25672 ;
25673 return 0;
25674}
25675_ACEOF
25676rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025677if { (ac_try="$ac_compile"
25678case "(($ac_try" in
25679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25680 *) ac_try_echo=$ac_try;;
25681esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025685 grep -v '^ *+' conftest.er1 >conftest.err
25686 rm -f conftest.er1
25687 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025689 (exit $ac_status); } && {
25690 test -z "$ac_c_werror_flag" ||
25691 test ! -s conftest.err
25692 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025693 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025695/* confdefs.h. */
25696_ACEOF
25697cat confdefs.h >>conftest.$ac_ext
25698cat >>conftest.$ac_ext <<_ACEOF
25699/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025700#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025701#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025702
Martin v. Löwis11437992002-04-12 09:54:03 +000025703int
25704main ()
25705{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025706#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025707 not big endian
25708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025709
25710 ;
25711 return 0;
25712}
25713_ACEOF
25714rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025715if { (ac_try="$ac_compile"
25716case "(($ac_try" in
25717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25718 *) ac_try_echo=$ac_try;;
25719esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025723 grep -v '^ *+' conftest.er1 >conftest.err
25724 rm -f conftest.er1
25725 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025727 (exit $ac_status); } && {
25728 test -z "$ac_c_werror_flag" ||
25729 test ! -s conftest.err
25730 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025731 ac_cv_c_bigendian=yes
25732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025734sed 's/^/| /' conftest.$ac_ext >&5
25735
Martin v. Löwiseba40652007-08-30 20:10:57 +000025736 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025738
25739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025740else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025742sed 's/^/| /' conftest.$ac_ext >&5
25743
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025744 # It does not; compile a test program.
25745if test "$cross_compiling" = yes; then
25746 # try to guess the endianness by grepping values into an object file
25747 ac_cv_c_bigendian=unknown
25748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025749/* confdefs.h. */
25750_ACEOF
25751cat confdefs.h >>conftest.$ac_ext
25752cat >>conftest.$ac_ext <<_ACEOF
25753/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025754short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25755short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25756void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25757short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25758short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25759void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025760int
25761main ()
25762{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025763 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025764 ;
25765 return 0;
25766}
25767_ACEOF
25768rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025769if { (ac_try="$ac_compile"
25770case "(($ac_try" in
25771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25772 *) ac_try_echo=$ac_try;;
25773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025777 grep -v '^ *+' conftest.er1 >conftest.err
25778 rm -f conftest.er1
25779 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025781 (exit $ac_status); } && {
25782 test -z "$ac_c_werror_flag" ||
25783 test ! -s conftest.err
25784 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025785 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025786 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025788if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25789 if test "$ac_cv_c_bigendian" = unknown; then
25790 ac_cv_c_bigendian=no
25791 else
25792 # finding both strings is unlikely to happen, but who knows?
25793 ac_cv_c_bigendian=unknown
25794 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025795fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025796else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025798sed 's/^/| /' conftest.$ac_ext >&5
25799
Martin v. Löwiseba40652007-08-30 20:10:57 +000025800
Martin v. Löwis11437992002-04-12 09:54:03 +000025801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025802
25803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025804else
25805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025806/* confdefs.h. */
25807_ACEOF
25808cat confdefs.h >>conftest.$ac_ext
25809cat >>conftest.$ac_ext <<_ACEOF
25810/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025811$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025812int
25813main ()
25814{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025815
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025816 /* Are we little or big endian? From Harbison&Steele. */
25817 union
25818 {
25819 long int l;
25820 char c[sizeof (long int)];
25821 } u;
25822 u.l = 1;
25823 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025824
25825 ;
25826 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025827}
Martin v. Löwis11437992002-04-12 09:54:03 +000025828_ACEOF
25829rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025830if { (ac_try="$ac_link"
25831case "(($ac_try" in
25832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25833 *) ac_try_echo=$ac_try;;
25834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025836 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025837 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025839 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025840 { (case "(($ac_try" in
25841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25842 *) ac_try_echo=$ac_try;;
25843esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025845 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025846 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025848 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025849 ac_cv_c_bigendian=no
25850else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025851 echo "$as_me: program exited with status $ac_status" >&5
25852echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025853sed 's/^/| /' conftest.$ac_ext >&5
25854
Martin v. Löwis11437992002-04-12 09:54:03 +000025855( exit $ac_status )
25856ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025858rm -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 +000025859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025860
25861
Martin v. Löwis11437992002-04-12 09:54:03 +000025862fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025863
25864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25865fi
25866{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25867echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25868case $ac_cv_c_bigendian in
25869 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025870
25871cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025872#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025873_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025874 ;;
25875 no)
25876 ;;
25877 *)
25878 { { echo "$as_me:$LINENO: error: unknown endianness
25879presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25880echo "$as_me: error: unknown endianness
25881presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025882 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025883esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025884
Michael W. Hudson54241132001-12-07 15:38:26 +000025885
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025886# Check whether right shifting a negative integer extends the sign bit
25887# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025888{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25889echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025890if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025891 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025892else
Martin v. Löwis11437992002-04-12 09:54:03 +000025893
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025894if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025895 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025896else
Martin v. Löwis11437992002-04-12 09:54:03 +000025897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025898/* confdefs.h. */
25899_ACEOF
25900cat confdefs.h >>conftest.$ac_ext
25901cat >>conftest.$ac_ext <<_ACEOF
25902/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025903
25904int main()
25905{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025906 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025907}
25908
Martin v. Löwis11437992002-04-12 09:54:03 +000025909_ACEOF
25910rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025911if { (ac_try="$ac_link"
25912case "(($ac_try" in
25913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25914 *) ac_try_echo=$ac_try;;
25915esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025917 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025918 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025921 { (case "(($ac_try" in
25922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25923 *) ac_try_echo=$ac_try;;
25924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025926 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025927 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025929 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025930 ac_cv_rshift_extends_sign=yes
25931else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025932 echo "$as_me: program exited with status $ac_status" >&5
25933echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025934sed 's/^/| /' conftest.$ac_ext >&5
25935
Martin v. Löwis11437992002-04-12 09:54:03 +000025936( exit $ac_status )
25937ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025939rm -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 +000025940fi
25941
Martin v. Löwiseba40652007-08-30 20:10:57 +000025942
25943fi
25944
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025945{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25946echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025947if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025948then
Martin v. Löwis11437992002-04-12 09:54:03 +000025949
25950cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025951#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025952_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025953
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025954fi
25955
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025956# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025957{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25958echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025959if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025960 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025961else
Martin v. Löwis11437992002-04-12 09:54:03 +000025962
25963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025964/* confdefs.h. */
25965_ACEOF
25966cat confdefs.h >>conftest.$ac_ext
25967cat >>conftest.$ac_ext <<_ACEOF
25968/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025969#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025970int
25971main ()
25972{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025973
25974 FILE *f = fopen("/dev/null", "r");
25975 flockfile(f);
25976 getc_unlocked(f);
25977 funlockfile(f);
25978
Martin v. Löwis11437992002-04-12 09:54:03 +000025979 ;
25980 return 0;
25981}
25982_ACEOF
25983rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025984if { (ac_try="$ac_link"
25985case "(($ac_try" in
25986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25987 *) ac_try_echo=$ac_try;;
25988esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025990 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025992 grep -v '^ *+' conftest.er1 >conftest.err
25993 rm -f conftest.er1
25994 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025996 (exit $ac_status); } && {
25997 test -z "$ac_c_werror_flag" ||
25998 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025999 } && test -s conftest$ac_exeext &&
26000 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026001 ac_cv_have_getc_unlocked=yes
26002else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026004sed 's/^/| /' conftest.$ac_ext >&5
26005
Martin v. Löwiseba40652007-08-30 20:10:57 +000026006 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026008
26009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026010 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026011fi
26012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026013{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
26014echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026015if test "$ac_cv_have_getc_unlocked" = yes
26016then
Martin v. Löwis11437992002-04-12 09:54:03 +000026017
26018cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026019#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026020_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026021
26022fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026023
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026024# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000026025# save the value of LIBS so we don't actually link Python with readline
26026LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026027
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026028# On some systems we need to link readline to a termcap compatible
26029# library. NOTE: Keep the precedence of listed libraries synchronised
26030# with setup.py.
26031py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026032{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
26033echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026034for py_libtermcap in "" ncursesw ncurses curses termcap; do
26035 if test -z "$py_libtermcap"; then
26036 READLINE_LIBS="-lreadline"
26037 else
26038 READLINE_LIBS="-lreadline -l$py_libtermcap"
26039 fi
26040 LIBS="$READLINE_LIBS $LIBS_no_readline"
26041 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026042/* confdefs.h. */
26043_ACEOF
26044cat confdefs.h >>conftest.$ac_ext
26045cat >>conftest.$ac_ext <<_ACEOF
26046/* end confdefs.h. */
26047
Martin v. Löwiseba40652007-08-30 20:10:57 +000026048/* Override any GCC internal prototype to avoid an error.
26049 Use char because int might match the return type of a GCC
26050 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026051#ifdef __cplusplus
26052extern "C"
26053#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026054char readline ();
26055int
26056main ()
26057{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026058return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026059 ;
26060 return 0;
26061}
26062_ACEOF
26063rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026064if { (ac_try="$ac_link"
26065case "(($ac_try" in
26066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26067 *) ac_try_echo=$ac_try;;
26068esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026070 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026071 ac_status=$?
26072 grep -v '^ *+' conftest.er1 >conftest.err
26073 rm -f conftest.er1
26074 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026076 (exit $ac_status); } && {
26077 test -z "$ac_c_werror_flag" ||
26078 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026079 } && test -s conftest$ac_exeext &&
26080 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026081 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026082else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026083 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026084sed 's/^/| /' conftest.$ac_ext >&5
26085
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026086
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026088
26089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026090 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026091 if test $py_cv_lib_readline = yes; then
26092 break
26093 fi
26094done
26095# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26096#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026097if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026098 { echo "$as_me:$LINENO: result: none" >&5
26099echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026100else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026101 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26102echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026103
26104cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026105#define HAVE_LIBREADLINE 1
26106_ACEOF
26107
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026108fi
26109
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026110# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026111{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26112echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026113if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026114 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026115else
26116 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026117LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026118cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026119/* confdefs.h. */
26120_ACEOF
26121cat confdefs.h >>conftest.$ac_ext
26122cat >>conftest.$ac_ext <<_ACEOF
26123/* end confdefs.h. */
26124
Martin v. Löwiseba40652007-08-30 20:10:57 +000026125/* Override any GCC internal prototype to avoid an error.
26126 Use char because int might match the return type of a GCC
26127 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026128#ifdef __cplusplus
26129extern "C"
26130#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026131char rl_callback_handler_install ();
26132int
26133main ()
26134{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026135return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026136 ;
26137 return 0;
26138}
26139_ACEOF
26140rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026141if { (ac_try="$ac_link"
26142case "(($ac_try" in
26143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26144 *) ac_try_echo=$ac_try;;
26145esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026147 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026149 grep -v '^ *+' conftest.er1 >conftest.err
26150 rm -f conftest.er1
26151 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026153 (exit $ac_status); } && {
26154 test -z "$ac_c_werror_flag" ||
26155 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026156 } && test -s conftest$ac_exeext &&
26157 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026158 ac_cv_lib_readline_rl_callback_handler_install=yes
26159else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026160 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026161sed 's/^/| /' conftest.$ac_ext >&5
26162
Martin v. Löwiseba40652007-08-30 20:10:57 +000026163 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026165
26166rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026167 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026168LIBS=$ac_check_lib_save_LIBS
26169fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026170{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26171echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26172if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026173
26174cat >>confdefs.h <<\_ACEOF
26175#define HAVE_RL_CALLBACK 1
26176_ACEOF
26177
26178fi
26179
26180
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026181# check for readline 2.2
26182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026183/* confdefs.h. */
26184_ACEOF
26185cat confdefs.h >>conftest.$ac_ext
26186cat >>conftest.$ac_ext <<_ACEOF
26187/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026188#include <readline/readline.h>
26189_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026190if { (ac_try="$ac_cpp conftest.$ac_ext"
26191case "(($ac_try" in
26192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26193 *) ac_try_echo=$ac_try;;
26194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026196 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026197 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026198 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026199 rm -f conftest.er1
26200 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026202 (exit $ac_status); } >/dev/null && {
26203 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26204 test ! -s conftest.err
26205 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026206 have_readline=yes
26207else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026209sed 's/^/| /' conftest.$ac_ext >&5
26210
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026211 have_readline=no
26212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026213
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026214rm -f conftest.err conftest.$ac_ext
26215if test $have_readline = yes
26216then
26217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026218/* confdefs.h. */
26219_ACEOF
26220cat confdefs.h >>conftest.$ac_ext
26221cat >>conftest.$ac_ext <<_ACEOF
26222/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026223#include <readline/readline.h>
26224
26225_ACEOF
26226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026227 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026228
26229cat >>confdefs.h <<\_ACEOF
26230#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26231_ACEOF
26232
26233fi
Ronald Oussoren75912852010-04-08 08:13:31 +000026234rm -f -r conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026235
26236 cat >conftest.$ac_ext <<_ACEOF
26237/* confdefs.h. */
26238_ACEOF
26239cat confdefs.h >>conftest.$ac_ext
26240cat >>conftest.$ac_ext <<_ACEOF
26241/* end confdefs.h. */
26242#include <readline/readline.h>
26243
26244_ACEOF
26245if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26246 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26247
26248cat >>confdefs.h <<\_ACEOF
26249#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26250_ACEOF
26251
26252fi
Ronald Oussoren75912852010-04-08 08:13:31 +000026253rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026254
26255fi
26256
Martin v. Löwis0daad592001-09-30 21:09:59 +000026257# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026258{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26259echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026260if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026261 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026262else
Martin v. Löwis11437992002-04-12 09:54:03 +000026263 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026264LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026265cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026266/* confdefs.h. */
26267_ACEOF
26268cat confdefs.h >>conftest.$ac_ext
26269cat >>conftest.$ac_ext <<_ACEOF
26270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026271
Martin v. Löwiseba40652007-08-30 20:10:57 +000026272/* Override any GCC internal prototype to avoid an error.
26273 Use char because int might match the return type of a GCC
26274 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026275#ifdef __cplusplus
26276extern "C"
26277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026278char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026279int
26280main ()
26281{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026282return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026283 ;
26284 return 0;
26285}
26286_ACEOF
26287rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026288if { (ac_try="$ac_link"
26289case "(($ac_try" in
26290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26291 *) ac_try_echo=$ac_try;;
26292esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026294 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026296 grep -v '^ *+' conftest.er1 >conftest.err
26297 rm -f conftest.er1
26298 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026300 (exit $ac_status); } && {
26301 test -z "$ac_c_werror_flag" ||
26302 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026303 } && test -s conftest$ac_exeext &&
26304 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026305 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026306else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026308sed 's/^/| /' conftest.$ac_ext >&5
26309
Martin v. Löwiseba40652007-08-30 20:10:57 +000026310 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026312
26313rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026315LIBS=$ac_check_lib_save_LIBS
26316fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026317{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26318echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26319if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026320
Martin v. Löwis11437992002-04-12 09:54:03 +000026321cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026322#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026323_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026324
Martin v. Löwis0daad592001-09-30 21:09:59 +000026325fi
26326
Michael W. Hudson54241132001-12-07 15:38:26 +000026327
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026328# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026329{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26330echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026331if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026332 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026333else
26334 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026335LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026336cat >conftest.$ac_ext <<_ACEOF
26337/* confdefs.h. */
26338_ACEOF
26339cat confdefs.h >>conftest.$ac_ext
26340cat >>conftest.$ac_ext <<_ACEOF
26341/* end confdefs.h. */
26342
26343/* Override any GCC internal prototype to avoid an error.
26344 Use char because int might match the return type of a GCC
26345 builtin and then its argument prototype would still apply. */
26346#ifdef __cplusplus
26347extern "C"
26348#endif
26349char rl_completion_display_matches_hook ();
26350int
26351main ()
26352{
26353return rl_completion_display_matches_hook ();
26354 ;
26355 return 0;
26356}
26357_ACEOF
26358rm -f conftest.$ac_objext conftest$ac_exeext
26359if { (ac_try="$ac_link"
26360case "(($ac_try" in
26361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26362 *) ac_try_echo=$ac_try;;
26363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026365 (eval "$ac_link") 2>conftest.er1
26366 ac_status=$?
26367 grep -v '^ *+' conftest.er1 >conftest.err
26368 rm -f conftest.er1
26369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026371 (exit $ac_status); } && {
26372 test -z "$ac_c_werror_flag" ||
26373 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026374 } && test -s conftest$ac_exeext &&
26375 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026376 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26377else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026378 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026379sed 's/^/| /' conftest.$ac_ext >&5
26380
26381 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26382fi
26383
26384rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26385 conftest$ac_exeext conftest.$ac_ext
26386LIBS=$ac_check_lib_save_LIBS
26387fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026388{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26389echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26390if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026391
26392cat >>confdefs.h <<\_ACEOF
26393#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26394_ACEOF
26395
26396fi
26397
26398
Martin v. Löwis0daad592001-09-30 21:09:59 +000026399# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026400{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26401echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026402if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026403 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026404else
Martin v. Löwis11437992002-04-12 09:54:03 +000026405 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026406LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026407cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026408/* confdefs.h. */
26409_ACEOF
26410cat confdefs.h >>conftest.$ac_ext
26411cat >>conftest.$ac_ext <<_ACEOF
26412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026413
Martin v. Löwiseba40652007-08-30 20:10:57 +000026414/* Override any GCC internal prototype to avoid an error.
26415 Use char because int might match the return type of a GCC
26416 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026417#ifdef __cplusplus
26418extern "C"
26419#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026420char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026421int
26422main ()
26423{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026424return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026425 ;
26426 return 0;
26427}
26428_ACEOF
26429rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026430if { (ac_try="$ac_link"
26431case "(($ac_try" in
26432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26433 *) ac_try_echo=$ac_try;;
26434esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026436 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026438 grep -v '^ *+' conftest.er1 >conftest.err
26439 rm -f conftest.er1
26440 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026442 (exit $ac_status); } && {
26443 test -z "$ac_c_werror_flag" ||
26444 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026445 } && test -s conftest$ac_exeext &&
26446 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026447 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026450sed 's/^/| /' conftest.$ac_ext >&5
26451
Martin v. Löwiseba40652007-08-30 20:10:57 +000026452 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026454
26455rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026456 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026457LIBS=$ac_check_lib_save_LIBS
26458fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026459{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26460echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26461if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026462
Martin v. Löwis11437992002-04-12 09:54:03 +000026463cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026464#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026465_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026466
Guido van Rossum353ae582001-07-10 16:45:32 +000026467fi
26468
Jack Jansendd19cf82001-12-06 22:36:17 +000026469
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026470# also in readline 4.2
26471cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026472/* confdefs.h. */
26473_ACEOF
26474cat confdefs.h >>conftest.$ac_ext
26475cat >>conftest.$ac_ext <<_ACEOF
26476/* end confdefs.h. */
26477#include <readline/readline.h>
26478_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026479if { (ac_try="$ac_cpp conftest.$ac_ext"
26480case "(($ac_try" in
26481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26482 *) ac_try_echo=$ac_try;;
26483esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026485 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026486 ac_status=$?
26487 grep -v '^ *+' conftest.er1 >conftest.err
26488 rm -f conftest.er1
26489 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026491 (exit $ac_status); } >/dev/null && {
26492 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26493 test ! -s conftest.err
26494 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026495 have_readline=yes
26496else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026497 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026498sed 's/^/| /' conftest.$ac_ext >&5
26499
26500 have_readline=no
26501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026502
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026503rm -f conftest.err conftest.$ac_ext
26504if test $have_readline = yes
26505then
26506 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026507/* confdefs.h. */
26508_ACEOF
26509cat confdefs.h >>conftest.$ac_ext
26510cat >>conftest.$ac_ext <<_ACEOF
26511/* end confdefs.h. */
26512#include <readline/readline.h>
26513
26514_ACEOF
26515if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26516 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26517
26518cat >>confdefs.h <<\_ACEOF
26519#define HAVE_RL_CATCH_SIGNAL 1
26520_ACEOF
26521
26522fi
Ronald Oussoren75912852010-04-08 08:13:31 +000026523rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026524
26525fi
26526
Martin v. Löwis82bca632006-02-10 20:49:30 +000026527# End of readline checks: restore LIBS
26528LIBS=$LIBS_no_readline
26529
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026530{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26531echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026532if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026533 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026534else
Martin v. Löwis11437992002-04-12 09:54:03 +000026535
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026536if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026537 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026538else
Martin v. Löwis11437992002-04-12 09:54:03 +000026539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026540/* confdefs.h. */
26541_ACEOF
26542cat confdefs.h >>conftest.$ac_ext
26543cat >>conftest.$ac_ext <<_ACEOF
26544/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026545
26546int main()
26547{
26548 int val1 = nice(1);
26549 if (val1 != -1 && val1 == nice(2))
26550 exit(0);
26551 exit(1);
26552}
26553
Martin v. Löwis11437992002-04-12 09:54:03 +000026554_ACEOF
26555rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026556if { (ac_try="$ac_link"
26557case "(($ac_try" in
26558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26559 *) ac_try_echo=$ac_try;;
26560esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026562 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026563 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026565 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026566 { (case "(($ac_try" in
26567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26568 *) ac_try_echo=$ac_try;;
26569esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026571 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026572 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026574 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026575 ac_cv_broken_nice=yes
26576else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026577 echo "$as_me: program exited with status $ac_status" >&5
26578echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026579sed 's/^/| /' conftest.$ac_ext >&5
26580
Martin v. Löwis11437992002-04-12 09:54:03 +000026581( exit $ac_status )
26582ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026584rm -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 +000026585fi
26586
Martin v. Löwiseba40652007-08-30 20:10:57 +000026587
26588fi
26589
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026590{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26591echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026592if test "$ac_cv_broken_nice" = yes
26593then
Martin v. Löwis11437992002-04-12 09:54:03 +000026594
26595cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026596#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026597_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026598
26599fi
26600
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026601{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26602echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026603if test "${ac_cv_broken_poll+set}" = set; then
26604 echo $ECHO_N "(cached) $ECHO_C" >&6
26605else
26606 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026607 ac_cv_broken_poll=no
26608else
26609 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026610/* confdefs.h. */
26611_ACEOF
26612cat confdefs.h >>conftest.$ac_ext
26613cat >>conftest.$ac_ext <<_ACEOF
26614/* end confdefs.h. */
26615
26616#include <poll.h>
26617
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026618int main()
26619{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026620 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026621 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026622
26623 close (42);
26624
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026625 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026626 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026627 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026628 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026629 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026630 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026631 return 1;
26632}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026633
26634_ACEOF
26635rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026636if { (ac_try="$ac_link"
26637case "(($ac_try" in
26638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26639 *) ac_try_echo=$ac_try;;
26640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026642 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026643 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026645 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026646 { (case "(($ac_try" in
26647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26648 *) ac_try_echo=$ac_try;;
26649esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026651 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026652 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026654 (exit $ac_status); }; }; then
26655 ac_cv_broken_poll=yes
26656else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026657 echo "$as_me: program exited with status $ac_status" >&5
26658echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026659sed 's/^/| /' conftest.$ac_ext >&5
26660
26661( exit $ac_status )
26662ac_cv_broken_poll=no
26663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026664rm -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 +000026665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026666
26667
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026668fi
26669
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026670{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26671echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026672if test "$ac_cv_broken_poll" = yes
26673then
26674
26675cat >>confdefs.h <<\_ACEOF
26676#define HAVE_BROKEN_POLL 1
26677_ACEOF
26678
26679fi
26680
Brett Cannon43802422005-02-10 20:48:03 +000026681# 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 +000026682# (which is not required by ISO C or UNIX spec) and/or if we support
26683# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026684{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26685echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026686if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026687 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026688else
26689 cat >conftest.$ac_ext <<_ACEOF
26690/* 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 (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 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026732/* confdefs.h. */
26733_ACEOF
26734cat confdefs.h >>conftest.$ac_ext
26735cat >>conftest.$ac_ext <<_ACEOF
26736/* end confdefs.h. */
26737#include <sys/types.h>
26738#include <$ac_cv_struct_tm>
26739
26740
26741int
26742main ()
26743{
26744static struct tm ac_aggr;
26745if (sizeof ac_aggr.tm_zone)
26746return 0;
26747 ;
26748 return 0;
26749}
26750_ACEOF
26751rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026752if { (ac_try="$ac_compile"
26753case "(($ac_try" in
26754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26755 *) ac_try_echo=$ac_try;;
26756esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026758 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026759 ac_status=$?
26760 grep -v '^ *+' conftest.er1 >conftest.err
26761 rm -f conftest.er1
26762 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026764 (exit $ac_status); } && {
26765 test -z "$ac_c_werror_flag" ||
26766 test ! -s conftest.err
26767 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026768 ac_cv_member_struct_tm_tm_zone=yes
26769else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026770 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026771sed 's/^/| /' conftest.$ac_ext >&5
26772
Martin v. Löwiseba40652007-08-30 20:10:57 +000026773 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026775
26776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026778
26779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026780fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026781{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26782echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26783if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026784
26785cat >>confdefs.h <<_ACEOF
26786#define HAVE_STRUCT_TM_TM_ZONE 1
26787_ACEOF
26788
26789
26790fi
26791
26792if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26793
26794cat >>confdefs.h <<\_ACEOF
26795#define HAVE_TM_ZONE 1
26796_ACEOF
26797
26798else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026799 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26800echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026801if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026803else
26804 cat >conftest.$ac_ext <<_ACEOF
26805/* confdefs.h. */
26806_ACEOF
26807cat confdefs.h >>conftest.$ac_ext
26808cat >>conftest.$ac_ext <<_ACEOF
26809/* end confdefs.h. */
26810#include <time.h>
26811
26812int
26813main ()
26814{
26815#ifndef tzname
26816 (void) tzname;
26817#endif
26818
26819 ;
26820 return 0;
26821}
26822_ACEOF
26823rm -f conftest.$ac_objext
26824if { (ac_try="$ac_compile"
26825case "(($ac_try" in
26826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26827 *) ac_try_echo=$ac_try;;
26828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026830 (eval "$ac_compile") 2>conftest.er1
26831 ac_status=$?
26832 grep -v '^ *+' conftest.er1 >conftest.err
26833 rm -f conftest.er1
26834 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026836 (exit $ac_status); } && {
26837 test -z "$ac_c_werror_flag" ||
26838 test ! -s conftest.err
26839 } && test -s conftest.$ac_objext; then
26840 ac_cv_have_decl_tzname=yes
26841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026842 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026843sed 's/^/| /' conftest.$ac_ext >&5
26844
26845 ac_cv_have_decl_tzname=no
26846fi
26847
26848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26849fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026850{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26851echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26852if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026853
26854cat >>confdefs.h <<_ACEOF
26855#define HAVE_DECL_TZNAME 1
26856_ACEOF
26857
26858
26859else
26860 cat >>confdefs.h <<_ACEOF
26861#define HAVE_DECL_TZNAME 0
26862_ACEOF
26863
26864
26865fi
26866
26867
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026868 { echo "$as_me:$LINENO: checking for tzname" >&5
26869echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026870if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026871 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026872else
26873 cat >conftest.$ac_ext <<_ACEOF
26874/* confdefs.h. */
26875_ACEOF
26876cat confdefs.h >>conftest.$ac_ext
26877cat >>conftest.$ac_ext <<_ACEOF
26878/* end confdefs.h. */
26879#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026880#if !HAVE_DECL_TZNAME
26881extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026882#endif
26883
26884int
26885main ()
26886{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026887return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026888 ;
26889 return 0;
26890}
26891_ACEOF
26892rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026893if { (ac_try="$ac_link"
26894case "(($ac_try" in
26895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26896 *) ac_try_echo=$ac_try;;
26897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026899 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026900 ac_status=$?
26901 grep -v '^ *+' conftest.er1 >conftest.err
26902 rm -f conftest.er1
26903 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026905 (exit $ac_status); } && {
26906 test -z "$ac_c_werror_flag" ||
26907 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026908 } && test -s conftest$ac_exeext &&
26909 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026910 ac_cv_var_tzname=yes
26911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026912 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026913sed 's/^/| /' conftest.$ac_ext >&5
26914
Martin v. Löwiseba40652007-08-30 20:10:57 +000026915 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026917
26918rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026919 conftest$ac_exeext conftest.$ac_ext
26920fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026921{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26922echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026923 if test $ac_cv_var_tzname = yes; then
26924
26925cat >>confdefs.h <<\_ACEOF
26926#define HAVE_TZNAME 1
26927_ACEOF
26928
26929 fi
26930fi
26931
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026932
Martin v. Löwis1d459062005-03-14 21:23:33 +000026933# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026934{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26935echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026936if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026937 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026938else
26939
26940if test "$cross_compiling" = yes; then
26941 ac_cv_working_tzset=no
26942else
26943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026944/* confdefs.h. */
26945_ACEOF
26946cat confdefs.h >>conftest.$ac_ext
26947cat >>conftest.$ac_ext <<_ACEOF
26948/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026949
26950#include <stdlib.h>
26951#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026952#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026953
26954#if HAVE_TZNAME
26955extern char *tzname[];
26956#endif
26957
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026958int main()
26959{
Brett Cannon18367812003-09-19 00:59:16 +000026960 /* Note that we need to ensure that not only does tzset(3)
26961 do 'something' with localtime, but it works as documented
26962 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026963 This includes making sure that tzname is set properly if
26964 tm->tm_zone does not exist since it is the alternative way
26965 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026966
26967 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026968 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026969 */
26970
Martin v. Löwis1d459062005-03-14 21:23:33 +000026971 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026972 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26973
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026974 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026975 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026976 if (localtime(&groundhogday)->tm_hour != 0)
26977 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026978#if HAVE_TZNAME
26979 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26980 if (strcmp(tzname[0], "UTC") ||
26981 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26982 exit(1);
26983#endif
Brett Cannon18367812003-09-19 00:59:16 +000026984
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026985 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026986 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026987 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026988 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026989#if HAVE_TZNAME
26990 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26991 exit(1);
26992#endif
Brett Cannon18367812003-09-19 00:59:16 +000026993
26994 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26995 tzset();
26996 if (localtime(&groundhogday)->tm_hour != 11)
26997 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026998#if HAVE_TZNAME
26999 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
27000 exit(1);
27001#endif
27002
27003#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000027004 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
27005 exit(1);
27006 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
27007 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027008#endif
Brett Cannon18367812003-09-19 00:59:16 +000027009
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027010 exit(0);
27011}
27012
27013_ACEOF
27014rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027015if { (ac_try="$ac_link"
27016case "(($ac_try" in
27017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27018 *) ac_try_echo=$ac_try;;
27019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027021 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027022 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027025 { (case "(($ac_try" in
27026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27027 *) ac_try_echo=$ac_try;;
27028esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027030 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027031 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027033 (exit $ac_status); }; }; then
27034 ac_cv_working_tzset=yes
27035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027036 echo "$as_me: program exited with status $ac_status" >&5
27037echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027038sed 's/^/| /' conftest.$ac_ext >&5
27039
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027040( exit $ac_status )
27041ac_cv_working_tzset=no
27042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027043rm -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 +000027044fi
27045
Martin v. Löwiseba40652007-08-30 20:10:57 +000027046
27047fi
27048
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027049{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27050echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027051if test "$ac_cv_working_tzset" = yes
27052then
27053
27054cat >>confdefs.h <<\_ACEOF
27055#define HAVE_WORKING_TZSET 1
27056_ACEOF
27057
27058fi
27059
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027060# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027061{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27062echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027063if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027064 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027065else
27066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027067/* confdefs.h. */
27068_ACEOF
27069cat confdefs.h >>conftest.$ac_ext
27070cat >>conftest.$ac_ext <<_ACEOF
27071/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027072#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027073int
27074main ()
27075{
27076
27077struct stat st;
27078st.st_mtim.tv_nsec = 1;
27079
27080 ;
27081 return 0;
27082}
27083_ACEOF
27084rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027085if { (ac_try="$ac_compile"
27086case "(($ac_try" in
27087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27088 *) ac_try_echo=$ac_try;;
27089esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027093 grep -v '^ *+' conftest.er1 >conftest.err
27094 rm -f conftest.er1
27095 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027097 (exit $ac_status); } && {
27098 test -z "$ac_c_werror_flag" ||
27099 test ! -s conftest.err
27100 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027101 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027102else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027104sed 's/^/| /' conftest.$ac_ext >&5
27105
Martin v. Löwiseba40652007-08-30 20:10:57 +000027106 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027107fi
27108
Martin v. Löwiseba40652007-08-30 20:10:57 +000027109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27110fi
27111
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027112{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27113echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027114if test "$ac_cv_stat_tv_nsec" = yes
27115then
27116
27117cat >>confdefs.h <<\_ACEOF
27118#define HAVE_STAT_TV_NSEC 1
27119_ACEOF
27120
27121fi
27122
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027123# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027124{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27125echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027126if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027127 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027128else
27129 cat >conftest.$ac_ext <<_ACEOF
27130/* confdefs.h. */
27131_ACEOF
27132cat confdefs.h >>conftest.$ac_ext
27133cat >>conftest.$ac_ext <<_ACEOF
27134/* end confdefs.h. */
27135#include <sys/stat.h>
27136int
27137main ()
27138{
27139
27140struct stat st;
27141st.st_mtimespec.tv_nsec = 1;
27142
27143 ;
27144 return 0;
27145}
27146_ACEOF
27147rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027148if { (ac_try="$ac_compile"
27149case "(($ac_try" in
27150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27151 *) ac_try_echo=$ac_try;;
27152esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027155 ac_status=$?
27156 grep -v '^ *+' conftest.er1 >conftest.err
27157 rm -f conftest.er1
27158 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027160 (exit $ac_status); } && {
27161 test -z "$ac_c_werror_flag" ||
27162 test ! -s conftest.err
27163 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027164 ac_cv_stat_tv_nsec2=yes
27165else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027166 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027167sed 's/^/| /' conftest.$ac_ext >&5
27168
Martin v. Löwiseba40652007-08-30 20:10:57 +000027169 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027170fi
27171
Martin v. Löwiseba40652007-08-30 20:10:57 +000027172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27173fi
27174
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027175{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27176echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027177if test "$ac_cv_stat_tv_nsec2" = yes
27178then
27179
27180cat >>confdefs.h <<\_ACEOF
27181#define HAVE_STAT_TV_NSEC2 1
27182_ACEOF
27183
27184fi
27185
Jack Jansen666b1e72001-10-31 12:11:48 +000027186# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027187{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27188echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027189if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027190 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027191else
Martin v. Löwis11437992002-04-12 09:54:03 +000027192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027193/* confdefs.h. */
27194_ACEOF
27195cat confdefs.h >>conftest.$ac_ext
27196cat >>conftest.$ac_ext <<_ACEOF
27197/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027198#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027199int
27200main ()
27201{
Jack Jansen666b1e72001-10-31 12:11:48 +000027202
27203 int rtn;
27204 rtn = mvwdelch(0,0,0);
27205
Martin v. Löwis11437992002-04-12 09:54:03 +000027206 ;
27207 return 0;
27208}
27209_ACEOF
27210rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027211if { (ac_try="$ac_compile"
27212case "(($ac_try" in
27213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27214 *) ac_try_echo=$ac_try;;
27215esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027219 grep -v '^ *+' conftest.er1 >conftest.err
27220 rm -f conftest.er1
27221 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027223 (exit $ac_status); } && {
27224 test -z "$ac_c_werror_flag" ||
27225 test ! -s conftest.err
27226 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027227 ac_cv_mvwdelch_is_expression=yes
27228else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027230sed 's/^/| /' conftest.$ac_ext >&5
27231
Martin v. Löwiseba40652007-08-30 20:10:57 +000027232 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027233fi
27234
Martin v. Löwiseba40652007-08-30 20:10:57 +000027235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27236fi
27237
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027238{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27239echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027240
27241if test "$ac_cv_mvwdelch_is_expression" = yes
27242then
Martin v. Löwis11437992002-04-12 09:54:03 +000027243
27244cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027245#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027246_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027247
27248fi
27249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027250{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27251echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027252if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027253 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027254else
Martin v. Löwis11437992002-04-12 09:54:03 +000027255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027256/* confdefs.h. */
27257_ACEOF
27258cat confdefs.h >>conftest.$ac_ext
27259cat >>conftest.$ac_ext <<_ACEOF
27260/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027261#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027262int
27263main ()
27264{
Jack Jansen666b1e72001-10-31 12:11:48 +000027265
27266 WINDOW *w;
27267 w->_flags = 0;
27268
Martin v. Löwis11437992002-04-12 09:54:03 +000027269 ;
27270 return 0;
27271}
27272_ACEOF
27273rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027274if { (ac_try="$ac_compile"
27275case "(($ac_try" in
27276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27277 *) ac_try_echo=$ac_try;;
27278esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027282 grep -v '^ *+' conftest.er1 >conftest.err
27283 rm -f conftest.er1
27284 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027286 (exit $ac_status); } && {
27287 test -z "$ac_c_werror_flag" ||
27288 test ! -s conftest.err
27289 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027290 ac_cv_window_has_flags=yes
27291else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027293sed 's/^/| /' conftest.$ac_ext >&5
27294
Martin v. Löwiseba40652007-08-30 20:10:57 +000027295 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027296fi
27297
Martin v. Löwiseba40652007-08-30 20:10:57 +000027298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27299fi
27300
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027301{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27302echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027303
Jack Jansen666b1e72001-10-31 12:11:48 +000027304
27305if test "$ac_cv_window_has_flags" = yes
27306then
Martin v. Löwis11437992002-04-12 09:54:03 +000027307
27308cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027309#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027310_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027311
27312fi
27313
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027314{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27315echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027316cat >conftest.$ac_ext <<_ACEOF
27317/* confdefs.h. */
27318_ACEOF
27319cat confdefs.h >>conftest.$ac_ext
27320cat >>conftest.$ac_ext <<_ACEOF
27321/* end confdefs.h. */
27322#include <curses.h>
27323int
27324main ()
27325{
27326void *x=is_term_resized
27327 ;
27328 return 0;
27329}
27330_ACEOF
27331rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027332if { (ac_try="$ac_compile"
27333case "(($ac_try" in
27334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27335 *) ac_try_echo=$ac_try;;
27336esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027338 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027339 ac_status=$?
27340 grep -v '^ *+' conftest.er1 >conftest.err
27341 rm -f conftest.er1
27342 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027344 (exit $ac_status); } && {
27345 test -z "$ac_c_werror_flag" ||
27346 test ! -s conftest.err
27347 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027348
27349cat >>confdefs.h <<\_ACEOF
27350#define HAVE_CURSES_IS_TERM_RESIZED 1
27351_ACEOF
27352
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027353 { echo "$as_me:$LINENO: result: yes" >&5
27354echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027355else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027356 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027357sed 's/^/| /' conftest.$ac_ext >&5
27358
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027359 { echo "$as_me:$LINENO: result: no" >&5
27360echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027361
27362fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027363
Martin v. Löwiseba40652007-08-30 20:10:57 +000027364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27365
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027366{ echo "$as_me:$LINENO: checking for resize_term" >&5
27367echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027368cat >conftest.$ac_ext <<_ACEOF
27369/* confdefs.h. */
27370_ACEOF
27371cat confdefs.h >>conftest.$ac_ext
27372cat >>conftest.$ac_ext <<_ACEOF
27373/* end confdefs.h. */
27374#include <curses.h>
27375int
27376main ()
27377{
27378void *x=resize_term
27379 ;
27380 return 0;
27381}
27382_ACEOF
27383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027384if { (ac_try="$ac_compile"
27385case "(($ac_try" in
27386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27387 *) ac_try_echo=$ac_try;;
27388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027390 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027391 ac_status=$?
27392 grep -v '^ *+' conftest.er1 >conftest.err
27393 rm -f conftest.er1
27394 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027396 (exit $ac_status); } && {
27397 test -z "$ac_c_werror_flag" ||
27398 test ! -s conftest.err
27399 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027400
27401cat >>confdefs.h <<\_ACEOF
27402#define HAVE_CURSES_RESIZE_TERM 1
27403_ACEOF
27404
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027405 { echo "$as_me:$LINENO: result: yes" >&5
27406echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027408 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027409sed 's/^/| /' conftest.$ac_ext >&5
27410
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027411 { echo "$as_me:$LINENO: result: no" >&5
27412echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027413
27414fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027415
Martin v. Löwiseba40652007-08-30 20:10:57 +000027416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27417
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027418{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27419echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027420cat >conftest.$ac_ext <<_ACEOF
27421/* confdefs.h. */
27422_ACEOF
27423cat confdefs.h >>conftest.$ac_ext
27424cat >>conftest.$ac_ext <<_ACEOF
27425/* end confdefs.h. */
27426#include <curses.h>
27427int
27428main ()
27429{
27430void *x=resizeterm
27431 ;
27432 return 0;
27433}
27434_ACEOF
27435rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027436if { (ac_try="$ac_compile"
27437case "(($ac_try" in
27438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27439 *) ac_try_echo=$ac_try;;
27440esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027442 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027443 ac_status=$?
27444 grep -v '^ *+' conftest.er1 >conftest.err
27445 rm -f conftest.er1
27446 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027448 (exit $ac_status); } && {
27449 test -z "$ac_c_werror_flag" ||
27450 test ! -s conftest.err
27451 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027452
27453cat >>confdefs.h <<\_ACEOF
27454#define HAVE_CURSES_RESIZETERM 1
27455_ACEOF
27456
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027457 { echo "$as_me:$LINENO: result: yes" >&5
27458echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027459else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027460 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027461sed 's/^/| /' conftest.$ac_ext >&5
27462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027463 { echo "$as_me:$LINENO: result: no" >&5
27464echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027465
27466fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027467
Martin v. Löwiseba40652007-08-30 20:10:57 +000027468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27469
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027470{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27471echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027472
27473if test -r /dev/ptmx
27474then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027475 { echo "$as_me:$LINENO: result: yes" >&5
27476echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027477
27478cat >>confdefs.h <<\_ACEOF
27479#define HAVE_DEV_PTMX 1
27480_ACEOF
27481
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027482else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027483 { echo "$as_me:$LINENO: result: no" >&5
27484echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027485fi
27486
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027487{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27488echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027489
27490if test -r /dev/ptc
27491then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027492 { echo "$as_me:$LINENO: result: yes" >&5
27493echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027494
27495cat >>confdefs.h <<\_ACEOF
27496#define HAVE_DEV_PTC 1
27497_ACEOF
27498
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027500 { echo "$as_me:$LINENO: result: no" >&5
27501echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027502fi
27503
Mark Dickinson82864d12009-11-15 16:18:58 +000027504if test "$have_long_long" = yes
27505then
27506 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27507echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27508 if test "${ac_cv_have_long_long_format+set}" = set; then
27509 echo $ECHO_N "(cached) $ECHO_C" >&6
27510else
27511 if test "$cross_compiling" = yes; then
27512 ac_cv_have_long_long_format=no
27513else
27514 cat >conftest.$ac_ext <<_ACEOF
27515/* confdefs.h. */
27516_ACEOF
27517cat confdefs.h >>conftest.$ac_ext
27518cat >>conftest.$ac_ext <<_ACEOF
27519/* end confdefs.h. */
27520
27521 #include <stdio.h>
27522 #include <stddef.h>
27523 #include <string.h>
27524
27525 #ifdef HAVE_SYS_TYPES_H
27526 #include <sys/types.h>
27527 #endif
27528
27529 int main()
27530 {
27531 char buffer[256];
27532
27533 if (sprintf(buffer, "%lld", (long long)123) < 0)
27534 return 1;
27535 if (strcmp(buffer, "123"))
27536 return 1;
27537
27538 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27539 return 1;
27540 if (strcmp(buffer, "-123"))
27541 return 1;
27542
27543 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27544 return 1;
27545 if (strcmp(buffer, "123"))
27546 return 1;
27547
27548 return 0;
27549 }
27550
27551_ACEOF
27552rm -f conftest$ac_exeext
27553if { (ac_try="$ac_link"
27554case "(($ac_try" in
27555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27556 *) ac_try_echo=$ac_try;;
27557esac
27558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27559 (eval "$ac_link") 2>&5
27560 ac_status=$?
27561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27562 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27563 { (case "(($ac_try" in
27564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27565 *) ac_try_echo=$ac_try;;
27566esac
27567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27568 (eval "$ac_try") 2>&5
27569 ac_status=$?
27570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27571 (exit $ac_status); }; }; then
27572 ac_cv_have_long_long_format=yes
27573else
27574 echo "$as_me: program exited with status $ac_status" >&5
27575echo "$as_me: failed program was:" >&5
27576sed 's/^/| /' conftest.$ac_ext >&5
27577
27578( exit $ac_status )
27579ac_cv_have_long_long_format=no
27580fi
27581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27582fi
27583
27584
27585
27586fi
27587
27588 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27589echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27590fi
27591
Mark Dickinson5ce84742009-12-31 20:48:04 +000027592if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027593then
27594
27595cat >>confdefs.h <<\_ACEOF
27596#define PY_FORMAT_LONG_LONG "ll"
27597_ACEOF
27598
27599fi
27600
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027601if test $ac_sys_system = Darwin
27602then
27603 LIBS="$LIBS -framework CoreFoundation"
27604fi
27605
Mark Dickinson82864d12009-11-15 16:18:58 +000027606
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027607{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27608echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027609if test "${ac_cv_have_size_t_format+set}" = set; then
27610 echo $ECHO_N "(cached) $ECHO_C" >&6
27611else
27612 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027613 ac_cv_have_size_t_format="cross -- assuming yes"
27614
Brett Cannon09d12362006-05-11 05:11:33 +000027615else
27616 cat >conftest.$ac_ext <<_ACEOF
27617/* confdefs.h. */
27618_ACEOF
27619cat confdefs.h >>conftest.$ac_ext
27620cat >>conftest.$ac_ext <<_ACEOF
27621/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027622
Brett Cannon09d12362006-05-11 05:11:33 +000027623#include <stdio.h>
27624#include <stddef.h>
27625#include <string.h>
27626
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027627#ifdef HAVE_SYS_TYPES_H
27628#include <sys/types.h>
27629#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027630
27631#ifdef HAVE_SSIZE_T
27632typedef ssize_t Py_ssize_t;
27633#elif SIZEOF_VOID_P == SIZEOF_LONG
27634typedef long Py_ssize_t;
27635#else
27636typedef int Py_ssize_t;
27637#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027638
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027639int main()
27640{
27641 char buffer[256];
27642
Brett Cannon09d12362006-05-11 05:11:33 +000027643 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27644 return 1;
27645
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027646 if (strcmp(buffer, "123"))
27647 return 1;
27648
27649 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27650 return 1;
27651
27652 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027653 return 1;
27654
27655 return 0;
27656}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027657
Brett Cannon09d12362006-05-11 05:11:33 +000027658_ACEOF
27659rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027660if { (ac_try="$ac_link"
27661case "(($ac_try" in
27662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27663 *) ac_try_echo=$ac_try;;
27664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027666 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027667 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027669 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027670 { (case "(($ac_try" in
27671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27672 *) ac_try_echo=$ac_try;;
27673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027675 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027676 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027678 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027679 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027680else
27681 echo "$as_me: program exited with status $ac_status" >&5
27682echo "$as_me: failed program was:" >&5
27683sed 's/^/| /' conftest.$ac_ext >&5
27684
27685( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027686ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027687fi
27688rm -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 +000027689fi
27690
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027691
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027692fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027693{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27694echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027695if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027696
27697cat >>confdefs.h <<\_ACEOF
27698#define PY_FORMAT_SIZE_T "z"
27699_ACEOF
27700
27701fi
27702
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027703{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27704echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027705if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027706 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027707else
Martin v. Löwis11437992002-04-12 09:54:03 +000027708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027709/* confdefs.h. */
27710_ACEOF
27711cat confdefs.h >>conftest.$ac_ext
27712cat >>conftest.$ac_ext <<_ACEOF
27713/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027714
27715#ifdef HAVE_SYS_TYPES_H
27716#include <sys/types.h>
27717#endif
27718#ifdef HAVE_SYS_SOCKET_H
27719#include <sys/socket.h>
27720#endif
27721
27722
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027723typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027724int
27725main ()
27726{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027727if ((ac__type_new_ *) 0)
27728 return 0;
27729if (sizeof (ac__type_new_))
27730 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027731 ;
27732 return 0;
27733}
27734_ACEOF
27735rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027736if { (ac_try="$ac_compile"
27737case "(($ac_try" in
27738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27739 *) ac_try_echo=$ac_try;;
27740esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027744 grep -v '^ *+' conftest.er1 >conftest.err
27745 rm -f conftest.er1
27746 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027748 (exit $ac_status); } && {
27749 test -z "$ac_c_werror_flag" ||
27750 test ! -s conftest.err
27751 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027752 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027753else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027755sed 's/^/| /' conftest.$ac_ext >&5
27756
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027757 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027759
27760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027761fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027762{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27763echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27764if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027765 :
27766else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027767
Martin v. Löwis01c04012002-11-11 14:58:44 +000027768cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027769#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027770_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027771
27772fi
27773
Michael W. Hudson54241132001-12-07 15:38:26 +000027774
Michael W. Hudson54241132001-12-07 15:38:26 +000027775
27776
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027777for h in `(cd $srcdir;echo Python/thread_*.h)`
27778do
27779 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27780done
27781
Michael W. Hudson54241132001-12-07 15:38:26 +000027782
Neal Norwitzd24499d2005-12-18 21:36:39 +000027783SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027784{ echo "$as_me:$LINENO: checking for build directories" >&5
27785echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027786for dir in $SRCDIRS; do
27787 if test ! -d $dir; then
27788 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027789 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027790done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027791{ echo "$as_me:$LINENO: result: done" >&5
27792echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027793
Guido van Rossum627b2d71993-12-24 10:39:16 +000027794# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027795ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027796
Martin v. Löwis11437992002-04-12 09:54:03 +000027797cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027798# This file is a shell script that caches the results of configure
27799# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027800# scripts and configure runs, see configure's option --config-cache.
27801# It is not useful on other systems. If it contains results you don't
27802# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027803#
Martin v. Löwis11437992002-04-12 09:54:03 +000027804# config.status only pays attention to the cache file if you give it
27805# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027806#
Skip Montanaro6dead952003-09-25 14:50:04 +000027807# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027808# loading this file, other *unset* `ac_cv_foo' will be assigned the
27809# following values.
27810
27811_ACEOF
27812
Guido van Rossumf78abae1997-01-21 22:02:36 +000027813# The following way of writing the cache mishandles newlines in values,
27814# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027815# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027816# Ultrix sh set writes to stderr and can't be redirected directly,
27817# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027818(
27819 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27820 eval ac_val=\$$ac_var
27821 case $ac_val in #(
27822 *${as_nl}*)
27823 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027824 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27825echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027826 esac
27827 case $ac_var in #(
27828 _ | IFS | as_nl) ;; #(
27829 *) $as_unset $ac_var ;;
27830 esac ;;
27831 esac
27832 done
27833
Martin v. Löwis11437992002-04-12 09:54:03 +000027834 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027835 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27836 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027837 # `set' does not quote correctly, so add quotes (double-quote
27838 # substitution turns \\\\ into \\, and sed turns \\ into \).
27839 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027840 "s/'/'\\\\''/g;
27841 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027842 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027843 *)
27844 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027845 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027846 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027847 esac |
27848 sort
27849) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027850 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027851 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027852 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027853 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027854 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27855 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027856 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27857 :end' >>confcache
27858if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27859 if test -w "$cache_file"; then
27860 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027861 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27862echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027863 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027864 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027865 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27866echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027867 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027868fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027869rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027870
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027871test "x$prefix" = xNONE && prefix=$ac_default_prefix
27872# Let make expand exec_prefix.
27873test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027874
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027875DEFS=-DHAVE_CONFIG_H
27876
Skip Montanaro6dead952003-09-25 14:50:04 +000027877ac_libobjs=
27878ac_ltlibobjs=
27879for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27880 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027881 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027882 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027883 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27884 # will be set to the directory where LIBOBJS objects are built.
27885 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27886 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027887done
27888LIBOBJS=$ac_libobjs
27889
27890LTLIBOBJS=$ac_ltlibobjs
27891
27892
Martin v. Löwis11437992002-04-12 09:54:03 +000027893
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027894: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027895ac_clean_files_save=$ac_clean_files
27896ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027897{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27898echo "$as_me: creating $CONFIG_STATUS" >&6;}
27899cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027900#! $SHELL
27901# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027902# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027903# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027904# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027905
Martin v. Löwis11437992002-04-12 09:54:03 +000027906debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027907ac_cs_recheck=false
27908ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027909SHELL=\${CONFIG_SHELL-$SHELL}
27910_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027911
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027912cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027913## --------------------- ##
27914## M4sh Initialization. ##
27915## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027916
Martin v. Löwiseba40652007-08-30 20:10:57 +000027917# Be more Bourne compatible
27918DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027919if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27920 emulate sh
27921 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027922 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027923 # is contrary to our usage. Disable this feature.
27924 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027925 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027926else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027927 case `(set -o) 2>/dev/null` in
27928 *posix*) set -o posix ;;
27929esac
27930
Martin v. Löwis11437992002-04-12 09:54:03 +000027931fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027932
Skip Montanaro6dead952003-09-25 14:50:04 +000027933
Martin v. Löwis11437992002-04-12 09:54:03 +000027934
27935
Martin v. Löwiseba40652007-08-30 20:10:57 +000027936# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027937# Avoid depending upon Character Ranges.
27938as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27939as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27940as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27941as_cr_digits='0123456789'
27942as_cr_alnum=$as_cr_Letters$as_cr_digits
27943
27944# The user is always right.
27945if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027946 echo "#! /bin/sh" >conf$$.sh
27947 echo "exit 0" >>conf$$.sh
27948 chmod +x conf$$.sh
27949 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27950 PATH_SEPARATOR=';'
27951 else
27952 PATH_SEPARATOR=:
27953 fi
27954 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027955fi
27956
Martin v. Löwiseba40652007-08-30 20:10:57 +000027957# Support unset when possible.
27958if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27959 as_unset=unset
27960else
27961 as_unset=false
27962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027963
Martin v. Löwiseba40652007-08-30 20:10:57 +000027964
27965# IFS
27966# We need space, tab and new line, in precisely that order. Quoting is
27967# there to prevent editors from complaining about space-tab.
27968# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27969# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027970as_nl='
27971'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027972IFS=" "" $as_nl"
27973
27974# Find who we are. Look in the path if we contain no directory separator.
27975case $0 in
27976 *[\\/]* ) as_myself=$0 ;;
27977 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027978for as_dir in $PATH
27979do
27980 IFS=$as_save_IFS
27981 test -z "$as_dir" && as_dir=.
27982 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27983done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027984IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027985
Martin v. Löwiseba40652007-08-30 20:10:57 +000027986 ;;
27987esac
27988# We did not find ourselves, most probably we were run as `sh COMMAND'
27989# in which case we are not to be found in the path.
27990if test "x$as_myself" = x; then
27991 as_myself=$0
27992fi
27993if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027994 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027995 { (exit 1); exit 1; }
27996fi
27997
27998# Work around bugs in pre-3.0 UWIN ksh.
27999for as_var in ENV MAIL MAILPATH
28000do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28001done
28002PS1='$ '
28003PS2='> '
28004PS4='+ '
28005
28006# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028007for as_var in \
28008 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
28009 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
28010 LC_TELEPHONE LC_TIME
28011do
28012 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
28013 eval $as_var=C; export $as_var
28014 else
28015 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28016 fi
28017done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028018
28019# Required to use basename.
28020if expr a : '\(a\)' >/dev/null 2>&1 &&
28021 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28022 as_expr=expr
28023else
28024 as_expr=false
28025fi
28026
28027if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28028 as_basename=basename
28029else
28030 as_basename=false
28031fi
28032
28033
28034# Name of the executable.
28035as_me=`$as_basename -- "$0" ||
28036$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28037 X"$0" : 'X\(//\)$' \| \
28038 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028039echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028040 sed '/^.*\/\([^/][^/]*\)\/*$/{
28041 s//\1/
28042 q
28043 }
28044 /^X\/\(\/\/\)$/{
28045 s//\1/
28046 q
28047 }
28048 /^X\/\(\/\).*/{
28049 s//\1/
28050 q
28051 }
28052 s/.*/./; q'`
28053
28054# CDPATH.
28055$as_unset CDPATH
28056
28057
28058
Martin v. Löwis11437992002-04-12 09:54:03 +000028059 as_lineno_1=$LINENO
28060 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028061 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028062 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028063
Martin v. Löwis11437992002-04-12 09:54:03 +000028064 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28065 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028066 # line-number line after each line using $LINENO; the second 'sed'
28067 # does the real work. The second script uses 'N' to pair each
28068 # line-number line with the line containing $LINENO, and appends
28069 # trailing '-' during substitution so that $LINENO is not a special
28070 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028071 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028072 # scripts with optimization help from Paolo Bonzini. Blame Lee
28073 # E. McMahon (1931-1989) for sed's syntax. :-)
28074 sed -n '
28075 p
28076 /[$]LINENO/=
28077 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028078 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028079 s/[$]LINENO.*/&-/
28080 t lineno
28081 b
28082 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028083 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028084 :loop
28085 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028086 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028087 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028088 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028089 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028090 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028091 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028092
Martin v. Löwis11437992002-04-12 09:54:03 +000028093 # Don't try to exec as it changes $[0], causing all sort of problems
28094 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028095 # original and so on. Autoconf is especially sensitive to this).
28096 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028097 # Exit status is that of the last command.
28098 exit
28099}
28100
28101
Martin v. Löwiseba40652007-08-30 20:10:57 +000028102if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28103 as_dirname=dirname
28104else
28105 as_dirname=false
28106fi
28107
28108ECHO_C= ECHO_N= ECHO_T=
28109case `echo -n x` in
28110-n*)
28111 case `echo 'x\c'` in
28112 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28113 *) ECHO_C='\c';;
28114 esac;;
28115*)
28116 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028118
Martin v. Löwiseba40652007-08-30 20:10:57 +000028119if expr a : '\(a\)' >/dev/null 2>&1 &&
28120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028121 as_expr=expr
28122else
28123 as_expr=false
28124fi
28125
28126rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028127if test -d conf$$.dir; then
28128 rm -f conf$$.dir/conf$$.file
28129else
28130 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028131 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028132fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028133echo >conf$$.file
28134if ln -s conf$$.file conf$$ 2>/dev/null; then
28135 as_ln_s='ln -s'
28136 # ... but there are two gotchas:
28137 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28138 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28139 # In both cases, we have to default to `cp -p'.
28140 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028141 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028142elif ln conf$$.file conf$$ 2>/dev/null; then
28143 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028144else
28145 as_ln_s='cp -p'
28146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028147rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28148rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028149
Skip Montanaro6dead952003-09-25 14:50:04 +000028150if mkdir -p . 2>/dev/null; then
28151 as_mkdir_p=:
28152else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028153 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028154 as_mkdir_p=false
28155fi
28156
Martin v. Löwiseba40652007-08-30 20:10:57 +000028157if test -x / >/dev/null 2>&1; then
28158 as_test_x='test -x'
28159else
28160 if ls -dL / >/dev/null 2>&1; then
28161 as_ls_L_option=L
28162 else
28163 as_ls_L_option=
28164 fi
28165 as_test_x='
28166 eval sh -c '\''
28167 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028168 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028169 else
28170 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028171 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028172 esac;
28173 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28174 ???[sx]*):;;*)false;;esac;fi
28175 '\'' sh
28176 '
28177fi
28178as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028179
28180# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028181as_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 +000028182
28183# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028184as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028185
28186
Martin v. Löwis11437992002-04-12 09:54:03 +000028187exec 6>&1
28188
Martin v. Löwiseba40652007-08-30 20:10:57 +000028189# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028190# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028191# values after options handling.
28192ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028193This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028194generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028195
28196 CONFIG_FILES = $CONFIG_FILES
28197 CONFIG_HEADERS = $CONFIG_HEADERS
28198 CONFIG_LINKS = $CONFIG_LINKS
28199 CONFIG_COMMANDS = $CONFIG_COMMANDS
28200 $ $0 $@
28201
Martin v. Löwiseba40652007-08-30 20:10:57 +000028202on `(hostname || uname -n) 2>/dev/null | sed 1q`
28203"
28204
Martin v. Löwis11437992002-04-12 09:54:03 +000028205_ACEOF
28206
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028207cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028208# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028209config_files="$ac_config_files"
28210config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028211
Martin v. Löwiseba40652007-08-30 20:10:57 +000028212_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028213
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028214cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028215ac_cs_usage="\
28216\`$as_me' instantiates files from templates according to the
28217current configuration.
28218
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028219Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028220
28221 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028222 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028223 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028224 -d, --debug don't remove temporary files
28225 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028226 --file=FILE[:TEMPLATE]
28227 instantiate the configuration file FILE
28228 --header=FILE[:TEMPLATE]
28229 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028230
28231Configuration files:
28232$config_files
28233
28234Configuration headers:
28235$config_headers
28236
28237Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028238
Martin v. Löwiseba40652007-08-30 20:10:57 +000028239_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028240cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028241ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028242python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028243configured by $0, generated by GNU Autoconf 2.61,
28244 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028245
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028246Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028247This config.status script is free software; the Free Software Foundation
28248gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028249
28250ac_pwd='$ac_pwd'
28251srcdir='$srcdir'
28252INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028253_ACEOF
28254
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028255cat >>$CONFIG_STATUS <<\_ACEOF
28256# If no file are specified by the user, then we need to provide default
28257# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028258ac_need_defaults=:
28259while test $# != 0
28260do
28261 case $1 in
28262 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028263 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28264 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028265 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028266 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028267 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028268 ac_option=$1
28269 ac_optarg=$2
28270 ac_shift=shift
28271 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028272 esac
28273
Skip Montanaro6dead952003-09-25 14:50:04 +000028274 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028275 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028276 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28277 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028278 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028279 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028280 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028281 debug=: ;;
28282 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028283 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028284 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028285 ac_need_defaults=false;;
28286 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028287 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028288 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028289 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028290 --he | --h)
28291 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028292 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028293Try \`$0 --help' for more information." >&2
28294 { (exit 1); exit 1; }; };;
28295 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028296 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28298 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28299 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028300
28301 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028302 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028303Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028304 { (exit 1); exit 1; }; } ;;
28305
Martin v. Löwiseba40652007-08-30 20:10:57 +000028306 *) ac_config_targets="$ac_config_targets $1"
28307 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028308
28309 esac
28310 shift
28311done
28312
Skip Montanaro6dead952003-09-25 14:50:04 +000028313ac_configure_extra_args=
28314
28315if $ac_cs_silent; then
28316 exec 6>/dev/null
28317 ac_configure_extra_args="$ac_configure_extra_args --silent"
28318fi
28319
28320_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028321cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028322if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028323 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28324 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028325 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028326 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028327fi
28328
Martin v. Löwis11437992002-04-12 09:54:03 +000028329_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028330cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028331exec 5>>config.log
28332{
28333 echo
28334 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28335## Running $as_me. ##
28336_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028337 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028338} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028339
Martin v. Löwiseba40652007-08-30 20:10:57 +000028340_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028341cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028342_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028343
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028344cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028345
28346# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028347for ac_config_target in $ac_config_targets
28348do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028349 case $ac_config_target in
28350 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28351 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28352 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28353 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028354 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28355 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028356 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28357 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028358 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028359
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028360 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28361echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028362 { (exit 1); exit 1; }; };;
28363 esac
28364done
28365
Martin v. Löwiseba40652007-08-30 20:10:57 +000028366
Martin v. Löwis11437992002-04-12 09:54:03 +000028367# If the user did not use the arguments to specify the items to instantiate,
28368# then the envvar interface is used. Set only those that are not.
28369# We use the long form for the default assignment because of an extremely
28370# bizarre bug on SunOS 4.1.3.
28371if $ac_need_defaults; then
28372 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28373 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28374fi
28375
Skip Montanaro6dead952003-09-25 14:50:04 +000028376# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028377# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028378# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028379# Hook for its removal unless debugging.
28380# Note that there is a small window in which the directory will not be cleaned:
28381# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028382$debug ||
28383{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028384 tmp=
28385 trap 'exit_status=$?
28386 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28387' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028388 trap '{ (exit 1); exit 1; }' 1 2 13 15
28389}
Martin v. Löwis11437992002-04-12 09:54:03 +000028390# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028391
Martin v. Löwis11437992002-04-12 09:54:03 +000028392{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028393 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028394 test -n "$tmp" && test -d "$tmp"
28395} ||
28396{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028397 tmp=./conf$$-$RANDOM
28398 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028399} ||
28400{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028401 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028402 { (exit 1); exit 1; }
28403}
28404
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028405#
28406# Set up the sed scripts for CONFIG_FILES section.
28407#
28408
28409# No need to generate the scripts if there are no CONFIG_FILES.
28410# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028411if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028412
28413_ACEOF
28414
Martin v. Löwiseba40652007-08-30 20:10:57 +000028415
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028416
Martin v. Löwiseba40652007-08-30 20:10:57 +000028417ac_delim='%!_!# '
28418for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028419 cat >conf$$subs.sed <<_ACEOF
28420SHELL!$SHELL$ac_delim
28421PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28422PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28423PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28424PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28425PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28426PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28427exec_prefix!$exec_prefix$ac_delim
28428prefix!$prefix$ac_delim
28429program_transform_name!$program_transform_name$ac_delim
28430bindir!$bindir$ac_delim
28431sbindir!$sbindir$ac_delim
28432libexecdir!$libexecdir$ac_delim
28433datarootdir!$datarootdir$ac_delim
28434datadir!$datadir$ac_delim
28435sysconfdir!$sysconfdir$ac_delim
28436sharedstatedir!$sharedstatedir$ac_delim
28437localstatedir!$localstatedir$ac_delim
28438includedir!$includedir$ac_delim
28439oldincludedir!$oldincludedir$ac_delim
28440docdir!$docdir$ac_delim
28441infodir!$infodir$ac_delim
28442htmldir!$htmldir$ac_delim
28443dvidir!$dvidir$ac_delim
28444pdfdir!$pdfdir$ac_delim
28445psdir!$psdir$ac_delim
28446libdir!$libdir$ac_delim
28447localedir!$localedir$ac_delim
28448mandir!$mandir$ac_delim
28449DEFS!$DEFS$ac_delim
28450ECHO_C!$ECHO_C$ac_delim
28451ECHO_N!$ECHO_N$ac_delim
28452ECHO_T!$ECHO_T$ac_delim
28453LIBS!$LIBS$ac_delim
28454build_alias!$build_alias$ac_delim
28455host_alias!$host_alias$ac_delim
28456target_alias!$target_alias$ac_delim
28457VERSION!$VERSION$ac_delim
28458SOVERSION!$SOVERSION$ac_delim
28459CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28460UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28461ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028462LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028463PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28464PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28465PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28466PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28467PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28468FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28469FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28470FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28471FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28472FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28473MACHDEP!$MACHDEP$ac_delim
28474SGI_ABI!$SGI_ABI$ac_delim
28475EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28476EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28477CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28478EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28479CC!$CC$ac_delim
28480CFLAGS!$CFLAGS$ac_delim
28481LDFLAGS!$LDFLAGS$ac_delim
28482CPPFLAGS!$CPPFLAGS$ac_delim
28483ac_ct_CC!$ac_ct_CC$ac_delim
28484EXEEXT!$EXEEXT$ac_delim
28485OBJEXT!$OBJEXT$ac_delim
28486CXX!$CXX$ac_delim
28487MAINCC!$MAINCC$ac_delim
28488CPP!$CPP$ac_delim
28489GREP!$GREP$ac_delim
28490EGREP!$EGREP$ac_delim
28491BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28492LIBRARY!$LIBRARY$ac_delim
28493LDLIBRARY!$LDLIBRARY$ac_delim
28494DLLLIBRARY!$DLLLIBRARY$ac_delim
28495BLDLIBRARY!$BLDLIBRARY$ac_delim
28496LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28497INSTSONAME!$INSTSONAME$ac_delim
28498RUNSHARED!$RUNSHARED$ac_delim
28499LINKCC!$LINKCC$ac_delim
28500GNULD!$GNULD$ac_delim
28501RANLIB!$RANLIB$ac_delim
28502AR!$AR$ac_delim
28503ARFLAGS!$ARFLAGS$ac_delim
28504SVNVERSION!$SVNVERSION$ac_delim
28505INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28506INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28507INSTALL_DATA!$INSTALL_DATA$ac_delim
28508LN!$LN$ac_delim
28509OPT!$OPT$ac_delim
28510BASECFLAGS!$BASECFLAGS$ac_delim
28511UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28512OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28513LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28514SO!$SO$ac_delim
28515LDSHARED!$LDSHARED$ac_delim
Ronald Oussoren75912852010-04-08 08:13:31 +000028516LDCXXSHARED!$LDCXXSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028517_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028518
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028519 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 +000028520 break
28521 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028522 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28523echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028524 { (exit 1); exit 1; }; }
28525 else
28526 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028527 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028528done
28529
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028530ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28531if test -n "$ac_eof"; then
28532 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28533 ac_eof=`expr $ac_eof + 1`
28534fi
28535
28536cat >>$CONFIG_STATUS <<_ACEOF
28537cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28538/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028539_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028540sed '
28541s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28542s/^/s,@/; s/!/@,|#_!!_#|/
28543:n
28544t n
28545s/'"$ac_delim"'$/,g/; t
28546s/$/\\/; p
28547N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28548' >>$CONFIG_STATUS <conf$$subs.sed
28549rm -f conf$$subs.sed
28550cat >>$CONFIG_STATUS <<_ACEOF
28551CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028552_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028553
28554
28555ac_delim='%!_!# '
28556for ac_last_try in false false false false false :; do
28557 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren75912852010-04-08 08:13:31 +000028558BLDSHARED!$BLDSHARED$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028559CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028560LINKFORSHARED!$LINKFORSHARED$ac_delim
28561CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28562SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028563PKG_CONFIG!$PKG_CONFIG$ac_delim
28564LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028565USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28566SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28567USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28568LDLAST!$LDLAST$ac_delim
28569THREADOBJ!$THREADOBJ$ac_delim
28570DLINCLDIR!$DLINCLDIR$ac_delim
28571DYNLOADFILE!$DYNLOADFILE$ac_delim
28572MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28573TRUE!$TRUE$ac_delim
28574LIBOBJS!$LIBOBJS$ac_delim
28575HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28576HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28577HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28578HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28579HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28580LIBM!$LIBM$ac_delim
28581LIBC!$LIBC$ac_delim
28582UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28583THREADHEADERS!$THREADHEADERS$ac_delim
28584SRCDIRS!$SRCDIRS$ac_delim
28585LTLIBOBJS!$LTLIBOBJS$ac_delim
28586_ACEOF
28587
Ronald Oussoren75912852010-04-08 08:13:31 +000028588 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028589 break
28590 elif $ac_last_try; then
28591 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28592echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028593 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028594 else
28595 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28596 fi
28597done
28598
28599ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28600if test -n "$ac_eof"; then
28601 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28602 ac_eof=`expr $ac_eof + 1`
28603fi
28604
28605cat >>$CONFIG_STATUS <<_ACEOF
28606cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28607/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028608_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028609sed '
28610s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28611s/^/s,@/; s/!/@,|#_!!_#|/
28612:n
28613t n
28614s/'"$ac_delim"'$/,g/; t
28615s/$/\\/; p
28616N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28617' >>$CONFIG_STATUS <conf$$subs.sed
28618rm -f conf$$subs.sed
28619cat >>$CONFIG_STATUS <<_ACEOF
28620:end
28621s/|#_!!_#|//g
28622CEOF$ac_eof
28623_ACEOF
28624
Martin v. Löwiseba40652007-08-30 20:10:57 +000028625
28626# VPATH may cause trouble with some makes, so we remove $(srcdir),
28627# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28628# trailing colons and then remove the whole line if VPATH becomes empty
28629# (actually we leave an empty line to preserve line numbers).
28630if test "x$srcdir" = x.; then
28631 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28632s/:*\$(srcdir):*/:/
28633s/:*\${srcdir}:*/:/
28634s/:*@srcdir@:*/:/
28635s/^\([^=]*=[ ]*\):*/\1/
28636s/:*$//
28637s/^[^=]*=[ ]*$//
28638}'
28639fi
28640
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028641cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028642fi # test -n "$CONFIG_FILES"
28643
Martin v. Löwiseba40652007-08-30 20:10:57 +000028644
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028645for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028646do
28647 case $ac_tag in
28648 :[FHLC]) ac_mode=$ac_tag; continue;;
28649 esac
28650 case $ac_mode$ac_tag in
28651 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028652 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28653echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028654 { (exit 1); exit 1; }; };;
28655 :[FH]-) ac_tag=-:-;;
28656 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28657 esac
28658 ac_save_IFS=$IFS
28659 IFS=:
28660 set x $ac_tag
28661 IFS=$ac_save_IFS
28662 shift
28663 ac_file=$1
28664 shift
28665
28666 case $ac_mode in
28667 :L) ac_source=$1;;
28668 :[FH])
28669 ac_file_inputs=
28670 for ac_f
28671 do
28672 case $ac_f in
28673 -) ac_f="$tmp/stdin";;
28674 *) # Look for the file first in the build tree, then in the source tree
28675 # (if the path is not absolute). The absolute path cannot be DOS-style,
28676 # because $ac_f cannot contain `:'.
28677 test -f "$ac_f" ||
28678 case $ac_f in
28679 [\\/$]*) false;;
28680 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28681 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028682 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28683echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028684 { (exit 1); exit 1; }; };;
28685 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028686 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028687 done
28688
28689 # Let's still pretend it is `configure' which instantiates (i.e., don't
28690 # use $as_me), people would be surprised to read:
28691 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028692 configure_input="Generated from "`IFS=:
28693 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028694 if test x"$ac_file" != x-; then
28695 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028696 { echo "$as_me:$LINENO: creating $ac_file" >&5
28697echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028698 fi
28699
28700 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028701 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028702 esac
28703 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028704 esac
28705
Martin v. Löwiseba40652007-08-30 20:10:57 +000028706 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028707$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028708 X"$ac_file" : 'X\(//\)[^/]' \| \
28709 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028710 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028711echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028712 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28713 s//\1/
28714 q
28715 }
28716 /^X\(\/\/\)[^/].*/{
28717 s//\1/
28718 q
28719 }
28720 /^X\(\/\/\)$/{
28721 s//\1/
28722 q
28723 }
28724 /^X\(\/\).*/{
28725 s//\1/
28726 q
28727 }
28728 s/.*/./; q'`
28729 { as_dir="$ac_dir"
28730 case $as_dir in #(
28731 -*) as_dir=./$as_dir;;
28732 esac
28733 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028734 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028735 while :; do
28736 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028737 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028738 *) as_qdir=$as_dir;;
28739 esac
28740 as_dirs="'$as_qdir' $as_dirs"
28741 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028742$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028743 X"$as_dir" : 'X\(//\)[^/]' \| \
28744 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028745 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028746echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028747 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28748 s//\1/
28749 q
28750 }
28751 /^X\(\/\/\)[^/].*/{
28752 s//\1/
28753 q
28754 }
28755 /^X\(\/\/\)$/{
28756 s//\1/
28757 q
28758 }
28759 /^X\(\/\).*/{
28760 s//\1/
28761 q
28762 }
28763 s/.*/./; q'`
28764 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028765 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028766 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028767 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28768echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028769 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028770 ac_builddir=.
28771
Martin v. Löwiseba40652007-08-30 20:10:57 +000028772case "$ac_dir" in
28773.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28774*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028775 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028776 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028777 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028778 case $ac_top_builddir_sub in
28779 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28780 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28781 esac ;;
28782esac
28783ac_abs_top_builddir=$ac_pwd
28784ac_abs_builddir=$ac_pwd$ac_dir_suffix
28785# for backward compatibility:
28786ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028787
28788case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028789 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028790 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028791 ac_top_srcdir=$ac_top_builddir_sub
28792 ac_abs_top_srcdir=$ac_pwd ;;
28793 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028794 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028795 ac_top_srcdir=$srcdir
28796 ac_abs_top_srcdir=$srcdir ;;
28797 *) # Relative name.
28798 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28799 ac_top_srcdir=$ac_top_build_prefix$srcdir
28800 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028801esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028802ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028803
Martin v. Löwis11437992002-04-12 09:54:03 +000028804
Martin v. Löwiseba40652007-08-30 20:10:57 +000028805 case $ac_mode in
28806 :F)
28807 #
28808 # CONFIG_FILE
28809 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028810
28811 case $INSTALL in
28812 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028813 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028814 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028815_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028816
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028817cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028818# If the template does not know about datarootdir, expand it.
28819# FIXME: This hack should be removed a few years after 2.60.
28820ac_datarootdir_hack=; ac_datarootdir_seen=
28821
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028822case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028823 p
28824 q
28825}
28826/@datadir@/p
28827/@docdir@/p
28828/@infodir@/p
28829/@localedir@/p
28830/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028831' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028832*datarootdir*) ac_datarootdir_seen=yes;;
28833*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028834 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28835echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028836_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028837cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028838 ac_datarootdir_hack='
28839 s&@datadir@&$datadir&g
28840 s&@docdir@&$docdir&g
28841 s&@infodir@&$infodir&g
28842 s&@localedir@&$localedir&g
28843 s&@mandir@&$mandir&g
28844 s&\\\${datarootdir}&$datarootdir&g' ;;
28845esac
28846_ACEOF
28847
28848# Neutralize VPATH when `$srcdir' = `.'.
28849# Shell code in configure.ac might set extrasub.
28850# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028851cat >>$CONFIG_STATUS <<_ACEOF
28852 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028853$extrasub
28854_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028855cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028856:t
28857/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028858s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028859s&@top_builddir@&$ac_top_builddir_sub&;t t
28860s&@srcdir@&$ac_srcdir&;t t
28861s&@abs_srcdir@&$ac_abs_srcdir&;t t
28862s&@top_srcdir@&$ac_top_srcdir&;t t
28863s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28864s&@builddir@&$ac_builddir&;t t
28865s&@abs_builddir@&$ac_abs_builddir&;t t
28866s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28867s&@INSTALL@&$ac_INSTALL&;t t
28868$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028869" $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 +000028870
Martin v. Löwiseba40652007-08-30 20:10:57 +000028871test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28872 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28873 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028874 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028875which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028876echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028877which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028878
Martin v. Löwiseba40652007-08-30 20:10:57 +000028879 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028880 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028881 -) cat "$tmp/out"; rm -f "$tmp/out";;
28882 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28883 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028884 ;;
28885 :H)
28886 #
28887 # CONFIG_HEADER
28888 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028889_ACEOF
28890
28891# Transform confdefs.h into a sed script `conftest.defines', that
28892# substitutes the proper values into config.h.in to produce config.h.
28893rm -f conftest.defines conftest.tail
28894# First, append a space to every undef/define line, to ease matching.
28895echo 's/$/ /' >conftest.defines
28896# Then, protect against being on the right side of a sed subst, or in
28897# an unquoted here document, in config.status. If some macros were
28898# called several times there might be several #defines for the same
28899# symbol, which is useless. But do not sort them, since the last
28900# AC_DEFINE must be honored.
28901ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28902# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28903# NAME is the cpp macro being defined, VALUE is the value it is being given.
28904# PARAMS is the parameter list in the macro definition--in most cases, it's
28905# just an empty string.
28906ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28907ac_dB='\\)[ (].*,\\1define\\2'
28908ac_dC=' '
28909ac_dD=' ,'
28910
28911uniq confdefs.h |
28912 sed -n '
28913 t rset
28914 :rset
28915 s/^[ ]*#[ ]*define[ ][ ]*//
28916 t ok
28917 d
28918 :ok
28919 s/[\\&,]/\\&/g
28920 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28921 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28922 ' >>conftest.defines
28923
28924# Remove the space that was appended to ease matching.
28925# Then replace #undef with comments. This is necessary, for
28926# example, in the case of _POSIX_SOURCE, which is predefined and required
28927# on some systems where configure will not decide to define it.
28928# (The regexp can be short, since the line contains either #define or #undef.)
28929echo 's/ $//
28930s,^[ #]*u.*,/* & */,' >>conftest.defines
28931
28932# Break up conftest.defines:
28933ac_max_sed_lines=50
28934
28935# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28936# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28937# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28938# et cetera.
28939ac_in='$ac_file_inputs'
28940ac_out='"$tmp/out1"'
28941ac_nxt='"$tmp/out2"'
28942
28943while :
28944do
28945 # Write a here document:
28946 cat >>$CONFIG_STATUS <<_ACEOF
28947 # First, check the format of the line:
28948 cat >"\$tmp/defines.sed" <<\\CEOF
28949/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28950/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28951b
28952:def
28953_ACEOF
28954 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28955 echo 'CEOF
28956 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28957 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28958 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28959 grep . conftest.tail >/dev/null || break
28960 rm -f conftest.defines
28961 mv conftest.tail conftest.defines
28962done
28963rm -f conftest.defines conftest.tail
28964
28965echo "ac_result=$ac_in" >>$CONFIG_STATUS
28966cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028967 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028968 echo "/* $configure_input */" >"$tmp/config.h"
28969 cat "$ac_result" >>"$tmp/config.h"
28970 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28971 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28972echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028973 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028974 rm -f $ac_file
28975 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028976 fi
28977 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028978 echo "/* $configure_input */"
28979 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028980 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028981 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028982 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028983
Martin v. Löwiseba40652007-08-30 20:10:57 +000028984
28985 esac
28986
28987done # for ac_tag
28988
Guido van Rossum627b2d71993-12-24 10:39:16 +000028989
Martin v. Löwis11437992002-04-12 09:54:03 +000028990{ (exit 0); exit 0; }
28991_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028992chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028993ac_clean_files=$ac_clean_files_save
28994
28995
28996# configure is writing to config.log, and then calls config.status.
28997# config.status does its own redirection, appending to config.log.
28998# Unfortunately, on DOS this fails, as config.log is still kept open
28999# by configure, so config.status won't be able to write to it; its
29000# output is simply discarded. So we exec the FD to /dev/null,
29001# effectively closing config.log, so it can be properly (re)opened and
29002# appended to by config.status. When coming back to configure, we
29003# need to make the FD available again.
29004if test "$no_create" != yes; then
29005 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000029006 ac_config_status_args=
29007 test "$silent" = yes &&
29008 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000029009 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000029010 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000029011 exec 5>>config.log
29012 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29013 # would make configure fail if this is the last instruction.
29014 $ac_cs_success || { (exit 1); exit 1; }
29015fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000029016
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029017
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029018echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029019if test ! -f Modules/Setup
29020then
29021 cp $srcdir/Modules/Setup.dist Modules/Setup
29022fi
29023
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029024echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029025if test ! -f Modules/Setup.local
29026then
29027 echo "# Edit this file for local setup changes" >Modules/Setup.local
29028fi
29029
29030echo "creating Makefile"
29031$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
29032 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000029033 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000029034
29035case $ac_sys_system in
29036BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029037 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029038
29039 Support for BeOS is deprecated as of Python 2.6.
29040 See PEP 11 for the gory details.
29041 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029042echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029043
29044 Support for BeOS is deprecated as of Python 2.6.
29045 See PEP 11 for the gory details.
29046 " >&2;}
29047 ;;
29048*) ;;
29049esac
29050
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029051mv config.c Modules