blob: a41c0d888e3d130c9fb2e9756562f14f75ac9376 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002# From configure.in Revision: 80574 .
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
Ronald Oussoren01d149f2010-04-30 11:20:14 +0000672FRAMEWORKINSTALLAPPSPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000673MACHDEP
674SGI_ABI
675EXTRAPLATDIR
676EXTRAMACHDEPPATH
677CONFIGURE_MACOSX_DEPLOYMENT_TARGET
678EXPORT_MACOSX_DEPLOYMENT_TARGET
679CC
680CFLAGS
681LDFLAGS
682CPPFLAGS
683ac_ct_CC
684EXEEXT
685OBJEXT
686CXX
687MAINCC
688CPP
689GREP
690EGREP
691BUILDEXEEXT
692LIBRARY
693LDLIBRARY
694DLLLIBRARY
695BLDLIBRARY
696LDLIBRARYDIR
697INSTSONAME
698RUNSHARED
699LINKCC
700GNULD
701RANLIB
702AR
703ARFLAGS
704SVNVERSION
705INSTALL_PROGRAM
706INSTALL_SCRIPT
707INSTALL_DATA
708LN
709OPT
710BASECFLAGS
711UNIVERSAL_ARCH_FLAGS
712OTHER_LIBTOOL_OPT
713LIBTOOL_CRUFT
714SO
715LDSHARED
Ronald Oussoren75912852010-04-08 08:13:31 +0000716LDCXXSHARED
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000717BLDSHARED
718CCSHARED
719LINKFORSHARED
720CFLAGSFORSHARED
721SHLIBS
Benjamin Peterson1c335e62010-01-01 15:16:29 +0000722PKG_CONFIG
723LIBFFI_INCLUDEDIR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000724USE_SIGNAL_MODULE
725SIGNAL_OBJS
726USE_THREAD_MODULE
727LDLAST
728THREADOBJ
729DLINCLDIR
730DYNLOADFILE
731MACHDEP_OBJS
732TRUE
733LIBOBJS
734HAVE_GETHOSTBYNAME_R_6_ARG
735HAVE_GETHOSTBYNAME_R_5_ARG
736HAVE_GETHOSTBYNAME_R_3_ARG
737HAVE_GETHOSTBYNAME_R
738HAVE_GETHOSTBYNAME
739LIBM
740LIBC
741UNICODE_OBJS
742THREADHEADERS
743SRCDIRS
744LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000745ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000746 ac_precious_vars='build_alias
747host_alias
748target_alias
749CC
750CFLAGS
751LDFLAGS
752LIBS
753CPPFLAGS
754CPP'
755
Guido van Rossum627b2d71993-12-24 10:39:16 +0000756
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000758ac_init_help=
759ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760# The variables have the same names as the options, with
761# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000762cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000765no_recursion=
766prefix=NONE
767program_prefix=NONE
768program_suffix=NONE
769program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000770silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000771site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000773verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000774x_includes=NONE
775x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000776
777# Installation directory options.
778# These are left unexpanded so users can "make install exec_prefix=/foo"
779# and all the variables that are supposed to be based on exec_prefix
780# by default will actually change.
781# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000782# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783bindir='${exec_prefix}/bin'
784sbindir='${exec_prefix}/sbin'
785libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000786datarootdir='${prefix}/share'
787datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000788sysconfdir='${prefix}/etc'
789sharedstatedir='${prefix}/com'
790localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000791includedir='${prefix}/include'
792oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000793docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
794infodir='${datarootdir}/info'
795htmldir='${docdir}'
796dvidir='${docdir}'
797pdfdir='${docdir}'
798psdir='${docdir}'
799libdir='${exec_prefix}/lib'
800localedir='${datarootdir}/locale'
801mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807 # If the previous option needs an argument, assign it.
808 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000809 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810 ac_prev=
811 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000812 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Martin v. Löwiseba40652007-08-30 20:10:57 +0000814 case $ac_option in
815 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
816 *) ac_optarg=yes ;;
817 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819 # Accept the important Cygnus configure options, so we can diagnose typos.
820
Martin v. Löwiseba40652007-08-30 20:10:57 +0000821 case $ac_dashdash$ac_option in
822 --)
823 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -bindir | --bindir | --bindi | --bind | --bin | --bi)
826 ac_prev=bindir ;;
827 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000829
830 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000831 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000832 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835 -cache-file | --cache-file | --cache-fil | --cache-fi \
836 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
837 ac_prev=cache_file ;;
838 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
839 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 cache_file=$ac_optarg ;;
841
842 --config-cache | -C)
843 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000847 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849
Martin v. Löwiseba40652007-08-30 20:10:57 +0000850 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
851 | --dataroo | --dataro | --datar)
852 ac_prev=datarootdir ;;
853 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
854 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
855 datarootdir=$ac_optarg ;;
856
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000858 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000860 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
861 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000863 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
864 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000865
866 -docdir | --docdir | --docdi | --doc | --do)
867 ac_prev=docdir ;;
868 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
869 docdir=$ac_optarg ;;
870
871 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
872 ac_prev=dvidir ;;
873 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
874 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875
876 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000877 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000879 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
880 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000881 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000882 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
883 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
886 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
887 | --exec | --exe | --ex)
888 ac_prev=exec_prefix ;;
889 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
890 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
891 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
894 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895 # Obsolete; use --with-gas.
896 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 -help | --help | --hel | --he | -h)
899 ac_init_help=long ;;
900 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
901 ac_init_help=recursive ;;
902 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
903 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
905 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Martin v. Löwiseba40652007-08-30 20:10:57 +0000910 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
911 ac_prev=htmldir ;;
912 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
913 | --ht=*)
914 htmldir=$ac_optarg ;;
915
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916 -includedir | --includedir | --includedi | --included | --include \
917 | --includ | --inclu | --incl | --inc)
918 ac_prev=includedir ;;
919 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
920 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -infodir | --infodir | --infodi | --infod | --info | --inf)
924 ac_prev=infodir ;;
925 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libdir | --libdir | --libdi | --libd)
929 ac_prev=libdir ;;
930 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
933 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
934 | --libexe | --libex | --libe)
935 ac_prev=libexecdir ;;
936 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
937 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 -localedir | --localedir | --localedi | --localed | --locale)
941 ac_prev=localedir ;;
942 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
943 localedir=$ac_optarg ;;
944
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000946 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947 ac_prev=localstatedir ;;
948 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000949 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
952 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
953 ac_prev=mandir ;;
954 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 # Obsolete; use --without-fp.
959 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
961 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963 no_create=yes ;;
964
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000965 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
966 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
967 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
970 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
971 | --oldin | --oldi | --old | --ol | --o)
972 ac_prev=oldincludedir ;;
973 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
974 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
975 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
979 ac_prev=prefix ;;
980 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-prefix | --program-prefix | --program-prefi | --program-pref \
984 | --program-pre | --program-pr | --program-p)
985 ac_prev=program_prefix ;;
986 -program-prefix=* | --program-prefix=* | --program-prefi=* \
987 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-suffix | --program-suffix | --program-suffi | --program-suff \
991 | --program-suf | --program-su | --program-s)
992 ac_prev=program_suffix ;;
993 -program-suffix=* | --program-suffix=* | --program-suffi=* \
994 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -program-transform-name | --program-transform-name \
998 | --program-transform-nam | --program-transform-na \
999 | --program-transform-n | --program-transform- \
1000 | --program-transform | --program-transfor \
1001 | --program-transfo | --program-transf \
1002 | --program-trans | --program-tran \
1003 | --progr-tra | --program-tr | --program-t)
1004 ac_prev=program_transform_name ;;
1005 -program-transform-name=* | --program-transform-name=* \
1006 | --program-transform-nam=* | --program-transform-na=* \
1007 | --program-transform-n=* | --program-transform-=* \
1008 | --program-transform=* | --program-transfor=* \
1009 | --program-transfo=* | --program-transf=* \
1010 | --program-trans=* | --program-tran=* \
1011 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
Martin v. Löwiseba40652007-08-30 20:10:57 +00001014 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1015 ac_prev=pdfdir ;;
1016 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1017 pdfdir=$ac_optarg ;;
1018
1019 -psdir | --psdir | --psdi | --psd | --ps)
1020 ac_prev=psdir ;;
1021 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1022 psdir=$ac_optarg ;;
1023
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1025 | -silent | --silent | --silen | --sile | --sil)
1026 silent=yes ;;
1027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1029 ac_prev=sbindir ;;
1030 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1031 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1035 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1036 | --sharedst | --shareds | --shared | --share | --shar \
1037 | --sha | --sh)
1038 ac_prev=sharedstatedir ;;
1039 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1040 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1041 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1042 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045 -site | --site | --sit)
1046 ac_prev=site ;;
1047 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001049
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1051 ac_prev=srcdir ;;
1052 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1056 | --syscon | --sysco | --sysc | --sys | --sy)
1057 ac_prev=sysconfdir ;;
1058 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1059 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
1067 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1068 verbose=yes ;;
1069
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 -version | --version | --versio | --versi | --vers | -V)
1071 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001074 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001076 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1077 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001079 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1080 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001083 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001085 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1086 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001088 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1089 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001091 --x)
1092 # Obsolete; use --with-x.
1093 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1096 | --x-incl | --x-inc | --x-in | --x-i)
1097 ac_prev=x_includes ;;
1098 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1099 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1103 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1104 ac_prev=x_libraries ;;
1105 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1106 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001109 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001110Try \`$0 --help' for more information." >&2
1111 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112 ;;
1113
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 *=*)
1115 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1116 # Reject names that are not valid shell variable names.
1117 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001118 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001120 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 export $ac_envvar ;;
1122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001125 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001127 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129 ;;
1130
1131 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001132done
1133
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001136 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138fi
1139
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001140# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1142 datadir sysconfdir sharedstatedir localstatedir includedir \
1143 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1144 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001146 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001148 [\\/$]* | ?:[\\/]* ) continue;;
1149 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001151 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001152 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001153done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# There might be people who depend on the old broken behavior: `$host'
1156# used to hold the argument of --host etc.
1157# FIXME: To remove some day.
1158build=$build_alias
1159host=$host_alias
1160target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001161
Martin v. Löwis11437992002-04-12 09:54:03 +00001162# FIXME: To remove some day.
1163if test "x$host_alias" != x; then
1164 if test "x$build_alias" = x; then
1165 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001166 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 +00001167 If a cross compiler is detected then cross compile mode will be used." >&2
1168 elif test "x$build_alias" != "x$host_alias"; then
1169 cross_compiling=yes
1170 fi
1171fi
1172
1173ac_tool_prefix=
1174test -n "$host_alias" && ac_tool_prefix=$host_alias-
1175
1176test "$silent" = yes && exec 6>/dev/null
1177
Guido van Rossum627b2d71993-12-24 10:39:16 +00001178
Martin v. Löwiseba40652007-08-30 20:10:57 +00001179ac_pwd=`pwd` && test -n "$ac_pwd" &&
1180ac_ls_di=`ls -di .` &&
1181ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001182 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001183 { (exit 1); exit 1; }; }
1184test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001185 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001186 { (exit 1); exit 1; }; }
1187
1188
Guido van Rossum627b2d71993-12-24 10:39:16 +00001189# Find the source files, if location was not specified.
1190if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001192 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001193 ac_confdir=`$as_dirname -- "$0" ||
1194$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1195 X"$0" : 'X\(//\)[^/]' \| \
1196 X"$0" : 'X\(//\)$' \| \
1197 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1198echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001199 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\/\)[^/].*/{
1204 s//\1/
1205 q
1206 }
1207 /^X\(\/\/\)$/{
1208 s//\1/
1209 q
1210 }
1211 /^X\(\/\).*/{
1212 s//\1/
1213 q
1214 }
1215 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001217 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218 srcdir=..
1219 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220else
1221 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223if test ! -r "$srcdir/$ac_unique_file"; then
1224 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001225 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001228ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1229ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001230 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001231 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001232 pwd)`
1233# When building in place, set srcdir=.
1234if test "$ac_abs_confdir" = "$ac_pwd"; then
1235 srcdir=.
1236fi
1237# Remove unnecessary trailing slashes from srcdir.
1238# Double slashes in file names in object file debugging info
1239# mess up M-x gdb in Emacs.
1240case $srcdir in
1241*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1242esac
1243for ac_var in $ac_precious_vars; do
1244 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1245 eval ac_env_${ac_var}_value=\$${ac_var}
1246 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1247 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1248done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250#
1251# Report the --help message.
1252#
1253if test "$ac_init_help" = "long"; then
1254 # Omit some internal or obsolete options to make the list less imposing.
1255 # This message is too long to be a string in the A/UX 3.1 sh.
1256 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001257\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001258
1259Usage: $0 [OPTION]... [VAR=VALUE]...
1260
1261To assign environment variables (e.g., CC, CFLAGS...), specify them as
1262VAR=VALUE. See below for descriptions of some of the useful variables.
1263
1264Defaults for the options are specified in brackets.
1265
1266Configuration:
1267 -h, --help display this help and exit
1268 --help=short display options specific to this package
1269 --help=recursive display the short help of all the included packages
1270 -V, --version display version information and exit
1271 -q, --quiet, --silent do not print \`checking...' messages
1272 --cache-file=FILE cache test results in FILE [disabled]
1273 -C, --config-cache alias for \`--cache-file=config.cache'
1274 -n, --no-create do not create output files
1275 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1276
Martin v. Löwis11437992002-04-12 09:54:03 +00001277Installation directories:
1278 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001279 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001281 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001282
1283By default, \`make install' will install all the files in
1284\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1285an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1286for instance \`--prefix=\$HOME'.
1287
1288For better control, use the options below.
1289
1290Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001291 --bindir=DIR user executables [EPREFIX/bin]
1292 --sbindir=DIR system admin executables [EPREFIX/sbin]
1293 --libexecdir=DIR program executables [EPREFIX/libexec]
1294 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1295 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1296 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1297 --libdir=DIR object code libraries [EPREFIX/lib]
1298 --includedir=DIR C header files [PREFIX/include]
1299 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1300 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1301 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1302 --infodir=DIR info documentation [DATAROOTDIR/info]
1303 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1304 --mandir=DIR man documentation [DATAROOTDIR/man]
1305 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1306 --htmldir=DIR html documentation [DOCDIR]
1307 --dvidir=DIR dvi documentation [DOCDIR]
1308 --pdfdir=DIR pdf documentation [DOCDIR]
1309 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001310_ACEOF
1311
1312 cat <<\_ACEOF
1313_ACEOF
1314fi
1315
1316if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001317 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001318 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001319 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001320 cat <<\_ACEOF
1321
1322Optional Features:
1323 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1324 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001325 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001326 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001327 --enable-framework[=INSTALLDIR]
1328 Build (MacOSX|Darwin) framework
1329 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001330 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001331 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1332 --enable-ipv6 Enable ipv6 (with ipv4) support
1333 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001334 --enable-big-digits[=BITS]
1335 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001336 --enable-unicode[=ucs[24]]
1337 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001338
1339Optional Packages:
1340 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1341 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001342 --with-universal-archs=ARCH
1343 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001344 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001345 --with-framework-name=FRAMEWORK
1346 specify an alternate name of the framework built
1347 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001348 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001349 --with-cxx-main=<compiler>
1350 compile main() and link python executable with C++
1351 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001352 --with-suffix=.exe set executable suffix
1353 --with-pydebug build with Py_DEBUG defined
1354 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001355 --with-system-expat build pyexpat module using an installed expat
1356 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001357 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001358 --with-dbmliborder=db1:db2:...
1359 order to check db backends for dbm. Valid value is a
1360 colon separated string with the backend names
1361 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with-signal-module disable/enable signal module
1363 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1364 --with(out)-threads[=DIRECTORY]
1365 disable/enable thread support
1366 --with(out)-thread[=DIRECTORY]
1367 deprecated; use --with(out)-threads
1368 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001369 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001370 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001371 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001372 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001373 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001374 --with-fpectl enable SIGFPE catching
1375 --with-libm=STRING math library
1376 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001377
1378Some influential environment variables:
1379 CC C compiler command
1380 CFLAGS C compiler flags
1381 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1382 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001383 LIBS libraries to pass to the linker, e.g. -l<library>
1384 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1385 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 CPP C preprocessor
1387
1388Use these variables to override the choices made by `configure' or to help
1389it to find libraries and programs with nonstandard names/locations.
1390
Georg Brandl464432d2009-05-20 18:24:08 +00001391Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001393ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001394fi
1395
1396if test "$ac_init_help" = "recursive"; then
1397 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001398 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001399 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 ac_builddir=.
1401
Martin v. Löwiseba40652007-08-30 20:10:57 +00001402case "$ac_dir" in
1403.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1404*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001405 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001406 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001407 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001408 case $ac_top_builddir_sub in
1409 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1410 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1411 esac ;;
1412esac
1413ac_abs_top_builddir=$ac_pwd
1414ac_abs_builddir=$ac_pwd$ac_dir_suffix
1415# for backward compatibility:
1416ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001417
1418case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001419 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001421 ac_top_srcdir=$ac_top_builddir_sub
1422 ac_abs_top_srcdir=$ac_pwd ;;
1423 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001425 ac_top_srcdir=$srcdir
1426 ac_abs_top_srcdir=$srcdir ;;
1427 *) # Relative name.
1428 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1429 ac_top_srcdir=$ac_top_build_prefix$srcdir
1430 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001431esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001432ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001433
Martin v. Löwiseba40652007-08-30 20:10:57 +00001434 cd "$ac_dir" || { ac_status=$?; continue; }
1435 # Check for guested configure.
1436 if test -f "$ac_srcdir/configure.gnu"; then
1437 echo &&
1438 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1439 elif test -f "$ac_srcdir/configure"; then
1440 echo &&
1441 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001443 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001444 fi || ac_status=$?
1445 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 done
1447fi
1448
Martin v. Löwiseba40652007-08-30 20:10:57 +00001449test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001450if $ac_init_version; then
1451 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001452python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001453generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001454
Martin v. Löwiseba40652007-08-30 20:10:57 +00001455Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014562002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001457This configure script is free software; the Free Software Foundation
1458gives unlimited permission to copy, distribute and modify it.
1459_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001460 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001462cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001463This file contains any messages produced by compilers while
1464running configure, to aid debugging if configure makes a mistake.
1465
Martin v. Löwis174440b2008-10-03 08:59:41 +00001466It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001467generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001468
1469 $ $0 $@
1470
1471_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001472exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001473{
1474cat <<_ASUNAME
1475## --------- ##
1476## Platform. ##
1477## --------- ##
1478
1479hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1480uname -m = `(uname -m) 2>/dev/null || echo unknown`
1481uname -r = `(uname -r) 2>/dev/null || echo unknown`
1482uname -s = `(uname -s) 2>/dev/null || echo unknown`
1483uname -v = `(uname -v) 2>/dev/null || echo unknown`
1484
1485/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1486/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1487
1488/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1489/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1490/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001491/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001492/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1493/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1494/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1495
1496_ASUNAME
1497
1498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1499for as_dir in $PATH
1500do
1501 IFS=$as_save_IFS
1502 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001503 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001504done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001505IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
1507} >&5
1508
1509cat >&5 <<_ACEOF
1510
1511
1512## ----------- ##
1513## Core tests. ##
1514## ----------- ##
1515
1516_ACEOF
1517
1518
1519# Keep a trace of the command line.
1520# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001521# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001523# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001524ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001525ac_configure_args0=
1526ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001527ac_must_keep_next=false
1528for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001529do
Skip Montanaro6dead952003-09-25 14:50:04 +00001530 for ac_arg
1531 do
1532 case $ac_arg in
1533 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1534 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1535 | -silent | --silent | --silen | --sile | --sil)
1536 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001537 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001538 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001539 esac
1540 case $ac_pass in
1541 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1542 2)
1543 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1544 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001545 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001546 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001547 case $ac_arg in
1548 *=* | --config-cache | -C | -disable-* | --disable-* \
1549 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1550 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1551 | -with-* | --with-* | -without-* | --without-* | --x)
1552 case "$ac_configure_args0 " in
1553 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1554 esac
1555 ;;
1556 -* ) ac_must_keep_next=true ;;
1557 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001558 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001560 ;;
1561 esac
1562 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001563done
Skip Montanaro6dead952003-09-25 14:50:04 +00001564$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1565$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 +00001566
1567# When interrupted or exit'd, cleanup temporary files, and complete
1568# config.log. We remove comments because anyway the quotes in there
1569# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001570# WARNING: Use '\'' to represent an apostrophe within the trap.
1571# 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 +00001572trap 'exit_status=$?
1573 # Save into config.log some information that might help in debugging.
1574 {
1575 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001576
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 cat <<\_ASBOX
1578## ---------------- ##
1579## Cache variables. ##
1580## ---------------- ##
1581_ASBOX
1582 echo
1583 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584(
1585 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1586 eval ac_val=\$$ac_var
1587 case $ac_val in #(
1588 *${as_nl}*)
1589 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001590 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1591echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592 esac
1593 case $ac_var in #(
1594 _ | IFS | as_nl) ;; #(
1595 *) $as_unset $ac_var ;;
1596 esac ;;
1597 esac
1598 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001600 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1601 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001603 "s/'\''/'\''\\\\'\'''\''/g;
1604 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1605 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001606 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001607 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001608 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001609 esac |
1610 sort
1611)
Martin v. Löwis11437992002-04-12 09:54:03 +00001612 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001613
1614 cat <<\_ASBOX
1615## ----------------- ##
1616## Output variables. ##
1617## ----------------- ##
1618_ASBOX
1619 echo
1620 for ac_var in $ac_subst_vars
1621 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001622 eval ac_val=\$$ac_var
1623 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001624 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001625 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001626 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001627 done | sort
1628 echo
1629
1630 if test -n "$ac_subst_files"; then
1631 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001632## ------------------- ##
1633## File substitutions. ##
1634## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001635_ASBOX
1636 echo
1637 for ac_var in $ac_subst_files
1638 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001639 eval ac_val=\$$ac_var
1640 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001641 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001642 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001643 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001644 done | sort
1645 echo
1646 fi
1647
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 if test -s confdefs.h; then
1649 cat <<\_ASBOX
1650## ----------- ##
1651## confdefs.h. ##
1652## ----------- ##
1653_ASBOX
1654 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001655 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 echo
1657 fi
1658 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001659 echo "$as_me: caught signal $ac_signal"
1660 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001662 rm -f core *.core core.conftest.* &&
1663 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001664 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001665' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001666for ac_signal in 1 2 13 15; do
1667 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1668done
1669ac_signal=0
1670
1671# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001672rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001673
1674# Predefined preprocessor variables.
1675
1676cat >>confdefs.h <<_ACEOF
1677#define PACKAGE_NAME "$PACKAGE_NAME"
1678_ACEOF
1679
1680
1681cat >>confdefs.h <<_ACEOF
1682#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1683_ACEOF
1684
1685
1686cat >>confdefs.h <<_ACEOF
1687#define PACKAGE_VERSION "$PACKAGE_VERSION"
1688_ACEOF
1689
1690
1691cat >>confdefs.h <<_ACEOF
1692#define PACKAGE_STRING "$PACKAGE_STRING"
1693_ACEOF
1694
1695
1696cat >>confdefs.h <<_ACEOF
1697#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1698_ACEOF
1699
1700
1701# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001702# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001703if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001704 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001705elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001706 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001707else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001708 set x "$ac_default_prefix/share/config.site" \
1709 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001711shift
1712for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001713do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001714 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001715 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1716echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001718 . "$ac_site_file"
1719 fi
1720done
1721
1722if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 # Some versions of bash will fail to source /dev/null (special
1724 # files actually), so we avoid doing that.
1725 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001726 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1727echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001729 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1730 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 esac
1732 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001733else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001734 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1735echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 >$cache_file
1737fi
1738
1739# Check that the precious variables saved in the cache have kept the same
1740# value.
1741ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001742for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1744 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001745 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1746 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 case $ac_old_set,$ac_new_set in
1748 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001749 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1750echo "$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 +00001751 ac_cache_corrupted=: ;;
1752 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001753 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1754echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 ac_cache_corrupted=: ;;
1756 ,);;
1757 *)
1758 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001759 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1760echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1761 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1762echo "$as_me: former value: $ac_old_val" >&2;}
1763 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1764echo "$as_me: current value: $ac_new_val" >&2;}
1765 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 fi;;
1767 esac
1768 # Pass precious variables to config.status.
1769 if test "$ac_new_set" = set; then
1770 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001771 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001772 *) ac_arg=$ac_var=$ac_new_val ;;
1773 esac
1774 case " $ac_configure_args " in
1775 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1776 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1777 esac
1778 fi
1779done
1780if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001781 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1782echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1783 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1784echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001785 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001786fi
1787
Martin v. Löwiseba40652007-08-30 20:10:57 +00001788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
Guido van Rossum7f43da71994-08-01 12:15:30 +00001812ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001813ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001814ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1815ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1816ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001817
Guido van Rossum627b2d71993-12-24 10:39:16 +00001818
Michael W. Hudson54241132001-12-07 15:38:26 +00001819
Martin v. Löwiseba40652007-08-30 20:10:57 +00001820ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
1822
Martin v. Löwis11437992002-04-12 09:54:03 +00001823
Georg Brandlbcd64a32009-03-31 21:45:18 +00001824if test "$prefix" != "/"; then
1825 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1826fi
1827
1828
Martin v. Löwis11437992002-04-12 09:54:03 +00001829
1830
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001831
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001832
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001833# We don't use PACKAGE_ variables, and they cause conflicts
1834# with other autoconf-based packages that include Python.h
1835grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1836rm confdefs.h
1837mv confdefs.h.new confdefs.h
1838
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001839
Martin v. Löwis174440b2008-10-03 08:59:41 +00001840VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001841
Martin v. Löwis1142de32002-03-29 16:28:31 +00001842
1843SOVERSION=1.0
1844
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001845# The later defininition of _XOPEN_SOURCE disables certain features
1846# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1847
1848cat >>confdefs.h <<\_ACEOF
1849#define _GNU_SOURCE 1
1850_ACEOF
1851
1852
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001853# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1854# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1855# them.
1856
1857cat >>confdefs.h <<\_ACEOF
1858#define _NETBSD_SOURCE 1
1859_ACEOF
1860
1861
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001862# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1863# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1864# them.
1865
1866cat >>confdefs.h <<\_ACEOF
1867#define __BSD_VISIBLE 1
1868_ACEOF
1869
1870
Martin v. Löwisd6320502004-08-12 13:45:08 +00001871# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1872# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1873
1874cat >>confdefs.h <<\_ACEOF
1875#define _BSD_TYPES 1
1876_ACEOF
1877
1878
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001879# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1880# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1881# them.
1882
1883cat >>confdefs.h <<\_ACEOF
1884#define _DARWIN_C_SOURCE 1
1885_ACEOF
1886
1887
1888
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001889define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001890
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001891# Arguments passed to configure.
1892
1893CONFIG_ARGS="$ac_configure_args"
1894
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001895{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1896echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001897# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001898if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001899 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001900 case $enableval in
1901 yes)
1902 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001903 if test ! -d "${enableval}"
1904 then
1905 enableval=/
1906 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001907 ;;
1908 esac
1909 case $enableval in
1910 no)
1911 UNIVERSALSDK=
1912 enable_universalsdk=
1913 ;;
1914 *)
1915 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001916 if test ! -d "${UNIVERSALSDK}"
1917 then
1918 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1919echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1920 { (exit 1); exit 1; }; }
1921 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001922 ;;
1923 esac
1924
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001925
Ronald Oussoren988117f2006-04-29 11:31:35 +00001926else
1927
1928 UNIVERSALSDK=
1929 enable_universalsdk=
1930
Martin v. Löwiseba40652007-08-30 20:10:57 +00001931fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001932
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001933if test -n "${UNIVERSALSDK}"
1934then
1935 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1936echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1937else
1938 { echo "$as_me:$LINENO: result: no" >&5
1939echo "${ECHO_T}no" >&6; }
1940fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001941
Martin v. Löwiseba40652007-08-30 20:10:57 +00001942
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001943
1944
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001945UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00001946
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001947{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1948echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001949
1950# Check whether --with-universal-archs was given.
1951if test "${with_universal_archs+set}" = set; then
1952 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001953 { echo "$as_me:$LINENO: result: $withval" >&5
1954echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001955 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001956 if test "${enable_universalsdk}" ; then
1957 :
1958 else
1959 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1960echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1961 { (exit 1); exit 1; }; }
1962 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001963
1964else
1965
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001966 { echo "$as_me:$LINENO: result: 32-bit" >&5
1967echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001968
1969fi
1970
1971
1972
1973
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001974
1975# Check whether --with-framework-name was given.
1976if test "${with_framework_name+set}" = set; then
1977 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001978 if test "${enable_framework}"; then
1979 :
1980 else
1981 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1982echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1983 { (exit 1); exit 1; }; }
1984 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001985 PYTHONFRAMEWORK=${withval}
1986 PYTHONFRAMEWORKDIR=${withval}.framework
1987 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1988
1989else
1990
1991 PYTHONFRAMEWORK=Python
1992 PYTHONFRAMEWORKDIR=Python.framework
1993 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1994
1995fi
1996
Martin v. Löwiseba40652007-08-30 20:10:57 +00001997# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001998if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001999 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002000 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002001 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002002 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002003 esac
2004 case $enableval in
2005 no)
2006 PYTHONFRAMEWORK=
2007 PYTHONFRAMEWORKDIR=no-framework
2008 PYTHONFRAMEWORKPREFIX=
2009 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002010 FRAMEWORKINSTALLFIRST=
2011 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002012 FRAMEWORKALTINSTALLFIRST=
2013 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002014 if test "x${prefix}" = "xNONE"; then
2015 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2016 else
2017 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2018 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002019 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002020 ;;
2021 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002022 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002023 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002024 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002025 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002026 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2027 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002028 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002029
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002030 if test "x${prefix}" = "xNONE" ; then
2031 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002032
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002033 else
2034 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2035 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002036
2037 case "${enableval}" in
2038 /System*)
2039 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2040 if test "${prefix}" = "NONE" ; then
2041 # See below
2042 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2043 fi
2044 ;;
2045
2046 /Library*)
2047 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2048 ;;
2049
2050 */Library/Frameworks)
2051 MDIR="`dirname "${enableval}"`"
2052 MDIR="`dirname "${MDIR}"`"
2053 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2054
2055 if test "${prefix}" = "NONE"; then
2056 # User hasn't specified the
2057 # --prefix option, but wants to install
2058 # the framework in a non-default location,
2059 # ensure that the compatibility links get
2060 # installed relative to that prefix as well
2061 # instead of in /usr/local.
2062 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2063 fi
2064 ;;
2065
2066 *)
2067 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2068 ;;
2069 esac
2070
Jack Jansen127e56e2001-09-11 14:41:54 +00002071 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002072
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002073 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002074 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002075 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002076
Martin v. Löwiseba40652007-08-30 20:10:57 +00002077 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002078
Martin v. Löwiseba40652007-08-30 20:10:57 +00002079 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002080
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002081 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2082
2083 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2084
Jack Jansene578a632001-08-15 01:27:14 +00002085 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002086
Guido van Rossum563e7081996-09-10 18:20:48 +00002087else
Martin v. Löwis11437992002-04-12 09:54:03 +00002088
Jack Jansene578a632001-08-15 01:27:14 +00002089 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002090 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002091 PYTHONFRAMEWORKPREFIX=
2092 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002093 FRAMEWORKINSTALLFIRST=
2094 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002095 FRAMEWORKALTINSTALLFIRST=
2096 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002097 if test "x${prefix}" = "xNONE" ; then
2098 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2099 else
2100 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2101 fi
Jack Jansene578a632001-08-15 01:27:14 +00002102 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002103
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002104
Martin v. Löwiseba40652007-08-30 20:10:57 +00002105fi
2106
Michael W. Hudson54241132001-12-07 15:38:26 +00002107
2108
2109
2110
Jack Jansene578a632001-08-15 01:27:14 +00002111
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002112
2113
Ronald Oussoren5b787322006-06-06 19:50:24 +00002114
2115
2116
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002117
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002118
Jack Jansene578a632001-08-15 01:27:14 +00002119##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002120## AC_HELP_STRING(--with-dyld,
2121## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002122##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002123# Set name for machine-dependent library files
2124
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002125{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2126echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002127if test -z "$MACHDEP"
2128then
Guido van Rossum563e7081996-09-10 18:20:48 +00002129 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002130 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002131 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002132 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002133 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002134 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002135 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002136 ac_md_system=`echo $ac_sys_system |
2137 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2138 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002139 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002140 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002141
Guido van Rossum07397971997-04-29 21:49:50 +00002142 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002143 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002144 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002145 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002146 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002147 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002148 esac
2149fi
Guido van Rossum91922671997-10-09 20:24:13 +00002150
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002151# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2152# disable features if it is defined, without any means to access these
2153# features as extensions. For these systems, we skip the definition of
2154# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2155# some feature, make sure there is no alternative way to access this
2156# feature. Also, when using wildcards, make sure you have verified the
2157# need for not defining _XOPEN_SOURCE on all systems matching the
2158# wildcard, and that the wildcard does not include future systems
2159# (which may remove their limitations).
2160case $ac_sys_system/$ac_sys_release in
2161 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2162 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002163 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002164 # In addition, Stefan Krah confirms that issue #1244610 exists through
2165 # OpenBSD 4.6, but is fixed in 4.7.
2166 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002167 define_xopen_source=no
2168 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2169 # also defined. This can be overridden by defining _BSD_SOURCE
2170 # As this has a different meaning on Linux, only define it on OpenBSD
2171
2172cat >>confdefs.h <<\_ACEOF
2173#define _BSD_SOURCE 1
2174_ACEOF
2175
2176 ;;
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002177 OpenBSD/4.[789])
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00002178 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2179 # also defined. This can be overridden by defining _BSD_SOURCE
2180 # As this has a different meaning on Linux, only define it on OpenBSD
2181
2182cat >>confdefs.h <<\_ACEOF
2183#define _BSD_SOURCE 1
2184_ACEOF
2185
2186 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002187 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2188 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2189 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002190 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 +00002191 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002192 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2193 # of union __?sigval. Reported by Stuart Bishop.
2194 SunOS/5.6)
2195 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002196 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2197 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002198 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002199 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002200 define_xopen_source=no;;
2201 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002202 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002203 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002204 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002205 # On FreeBSD 4, the math functions C89 does not cover are never defined
2206 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2207 FreeBSD/4.*)
2208 define_xopen_source=no;;
2209 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2210 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2211 # identifies itself as Darwin/7.*
2212 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2213 # disables platform specific features beyond repair.
2214 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2215 # has no effect, don't bother defining them
2216 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002217 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00002218 Darwin/1[0-9].*)
2219 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002220 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2221 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2222 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002223 AIX/4)
2224 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002225 AIX/5)
2226 if test `uname -r` -eq 1; then
2227 define_xopen_source=no
2228 fi
2229 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002230 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2231 # defining NI_NUMERICHOST.
2232 QNX/6.3.2)
2233 define_xopen_source=no
2234 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002235
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002236esac
2237
2238if test $define_xopen_source = yes
2239then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002240 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2241 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002242 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2243 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002244 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002245 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002246
2247cat >>confdefs.h <<\_ACEOF
2248#define _XOPEN_SOURCE 500
2249_ACEOF
2250
2251 ;;
2252 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002253
2254cat >>confdefs.h <<\_ACEOF
2255#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002256_ACEOF
2257
Skip Montanarof0d5f792004-08-15 14:08:23 +00002258 ;;
2259 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002260
2261 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2262 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2263 # several APIs are not declared. Since this is also needed in some
2264 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002265 # except for Solaris 10, where it must not be defined,
2266 # as it implies XPG4.2
2267 case $ac_sys_system/$ac_sys_release in
2268 SunOS/5.10)
2269 ;;
2270 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002271
2272cat >>confdefs.h <<\_ACEOF
2273#define _XOPEN_SOURCE_EXTENDED 1
2274_ACEOF
2275
Martin v. Löwis7dece662005-11-26 11:38:24 +00002276 ;;
2277 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002278
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002279
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002280cat >>confdefs.h <<\_ACEOF
2281#define _POSIX_C_SOURCE 200112L
2282_ACEOF
2283
2284
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002285fi
2286
Guido van Rossum91922671997-10-09 20:24:13 +00002287#
2288# SGI compilers allow the specification of the both the ABI and the
2289# ISA on the command line. Depending on the values of these switches,
2290# different and often incompatable code will be generated.
2291#
2292# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2293# thus supply support for various ABI/ISA combinations. The MACHDEP
2294# variable is also adjusted.
2295#
2296
2297if test ! -z "$SGI_ABI"
2298then
2299 CC="cc $SGI_ABI"
2300 LDFLAGS="$SGI_ABI $LDFLAGS"
2301 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2302fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002303{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2304echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002305
Jack Jansen83f898c2002-12-30 22:23:40 +00002306# And add extra plat-mac for darwin
2307
Jack Jansen7b59b422003-03-17 15:44:10 +00002308
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002309{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2310echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002311if test -z "$EXTRAPLATDIR"
2312then
2313 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002314 darwin)
2315 EXTRAPLATDIR="\$(PLATMACDIRS)"
2316 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2317 ;;
2318 *)
2319 EXTRAPLATDIR=""
2320 EXTRAMACHDEPPATH=""
2321 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002322 esac
2323fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002324{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2325echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002326
Jack Jansen6b08a402004-06-03 12:41:45 +00002327# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2328# it may influence the way we can build extensions, so distutils
2329# needs to check it
2330
Ronald Oussoren988117f2006-04-29 11:31:35 +00002331
Jack Jansen6b08a402004-06-03 12:41:45 +00002332CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002333EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002334
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002335{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2336echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002337ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002338{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2339echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002340
Guido van Rossum627b2d71993-12-24 10:39:16 +00002341# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002342
2343# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2344# for debug/optimization stuff. BASECFLAGS is for flags that are required
2345# just to get things to compile and link. Users are free to override OPT
2346# when running configure or make. The build should not break if they do.
2347# BASECFLAGS should generally not be messed with, however.
2348
2349# XXX shouldn't some/most/all of this code be merged with the stuff later
2350# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002351{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2352echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002353
Martin v. Löwiseba40652007-08-30 20:10:57 +00002354# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002355if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002357 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002358 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002359 without_gcc=yes;;
2360 yes) CC=gcc
2361 without_gcc=no;;
2362 *) CC=$withval
2363 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002364 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002365else
Martin v. Löwis11437992002-04-12 09:54:03 +00002366
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002367 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002368 AIX*) CC=cc_r
2369 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002370 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002371 case $BE_HOST_CPU in
2372 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002373 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002374 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002375 BASECFLAGS="$BASECFLAGS -export pragma"
2376 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002377 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002378 ;;
2379 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002380 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002381 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002382 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002383 ;;
2384 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002385 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2386echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002387 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002388 ;;
2389 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002390 AR="\$(srcdir)/Modules/ar_beos"
2391 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002392 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002393 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002394 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002395fi
2396
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002397{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2398echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002399
Guido van Rossum8b131c51995-03-09 14:10:13 +00002400# If the user switches compilers, we can't believe the cache
2401if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2402then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002403 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002404(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002405echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002406(it is also a good idea to do 'make clean' before compiling)" >&2;}
2407 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002408fi
2409
Victor Stinner6cbf90f2010-03-25 00:21:53 +00002410save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00002411ac_ext=c
2412ac_cpp='$CPP $CPPFLAGS'
2413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2415ac_compiler_gnu=$ac_cv_c_compiler_gnu
2416if test -n "$ac_tool_prefix"; then
2417 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2418set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002421if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002423else
2424 if test -n "$CC"; then
2425 ac_cv_prog_CC="$CC" # Let the user override the test.
2426else
Martin v. Löwis11437992002-04-12 09:54:03 +00002427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2428for as_dir in $PATH
2429do
2430 IFS=$as_save_IFS
2431 test -z "$as_dir" && as_dir=.
2432 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002433 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 +00002434 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002435 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 break 2
2437 fi
2438done
2439done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002440IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
Jack Jansendd19cf82001-12-06 22:36:17 +00002442fi
2443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002444CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002445if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002446 { echo "$as_me:$LINENO: result: $CC" >&5
2447echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002449 { echo "$as_me:$LINENO: result: no" >&5
2450echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002451fi
2452
Martin v. Löwiseba40652007-08-30 20:10:57 +00002453
Martin v. Löwis11437992002-04-12 09:54:03 +00002454fi
2455if test -z "$ac_cv_prog_CC"; then
2456 ac_ct_CC=$CC
2457 # Extract the first word of "gcc", so it can be a program name with args.
2458set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002459{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2460echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002461if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002462 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002463else
2464 if test -n "$ac_ct_CC"; then
2465 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2466else
2467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2468for as_dir in $PATH
2469do
2470 IFS=$as_save_IFS
2471 test -z "$as_dir" && as_dir=.
2472 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002473 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 +00002474 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002475 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 break 2
2477 fi
2478done
2479done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002480IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002481
2482fi
2483fi
2484ac_ct_CC=$ac_cv_prog_ac_ct_CC
2485if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002486 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2487echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002489 { echo "$as_me:$LINENO: result: no" >&5
2490echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002491fi
2492
Martin v. Löwiseba40652007-08-30 20:10:57 +00002493 if test "x$ac_ct_CC" = x; then
2494 CC=""
2495 else
2496 case $cross_compiling:$ac_tool_warned in
2497yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002498{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2499whose name does not start with the host triplet. If you think this
2500configuration is useful to you, please write to autoconf@gnu.org." >&5
2501echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2502whose name does not start with the host triplet. If you think this
2503configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002504ac_tool_warned=yes ;;
2505esac
2506 CC=$ac_ct_CC
2507 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002508else
2509 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002510fi
2511
Jack Jansendd19cf82001-12-06 22:36:17 +00002512if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002513 if test -n "$ac_tool_prefix"; then
2514 # 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 +00002515set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002516{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2517echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002518if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002519 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002520else
2521 if test -n "$CC"; then
2522 ac_cv_prog_CC="$CC" # Let the user override the test.
2523else
Martin v. Löwis11437992002-04-12 09:54:03 +00002524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2525for as_dir in $PATH
2526do
2527 IFS=$as_save_IFS
2528 test -z "$as_dir" && as_dir=.
2529 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002530 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 +00002531 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002532 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 break 2
2534 fi
2535done
2536done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
2539fi
2540fi
2541CC=$ac_cv_prog_CC
2542if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002543 { echo "$as_me:$LINENO: result: $CC" >&5
2544echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002546 { echo "$as_me:$LINENO: result: no" >&5
2547echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002548fi
2549
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002552fi
2553if test -z "$CC"; then
2554 # Extract the first word of "cc", so it can be a program name with args.
2555set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002556{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2557echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002558if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002559 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002560else
2561 if test -n "$CC"; then
2562 ac_cv_prog_CC="$CC" # Let the user override the test.
2563else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002564 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2566for as_dir in $PATH
2567do
2568 IFS=$as_save_IFS
2569 test -z "$as_dir" && as_dir=.
2570 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571 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 +00002572 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2573 ac_prog_rejected=yes
2574 continue
2575 fi
2576 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002577 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 break 2
2579 fi
2580done
2581done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002582IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002583
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002584if test $ac_prog_rejected = yes; then
2585 # We found a bogon in the path, so make sure we never use it.
2586 set dummy $ac_cv_prog_CC
2587 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002589 # We chose a different compiler from the bogus one.
2590 # However, it has the same basename, so the bogon will be chosen
2591 # first if we set CC to just the basename; use the full file name.
2592 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002593 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002594 fi
2595fi
2596fi
2597fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002598CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002599if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002600 { echo "$as_me:$LINENO: result: $CC" >&5
2601echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 { echo "$as_me:$LINENO: result: no" >&5
2604echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002605fi
2606
Martin v. Löwiseba40652007-08-30 20:10:57 +00002607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608fi
2609if test -z "$CC"; then
2610 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002611 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 do
2613 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2614set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002615{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2616echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002617if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002618 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002619else
2620 if test -n "$CC"; then
2621 ac_cv_prog_CC="$CC" # Let the user override the test.
2622else
Martin v. Löwis11437992002-04-12 09:54:03 +00002623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2624for as_dir in $PATH
2625do
2626 IFS=$as_save_IFS
2627 test -z "$as_dir" && as_dir=.
2628 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629 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 +00002630 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002631 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002633 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002634done
2635done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002637
2638fi
2639fi
2640CC=$ac_cv_prog_CC
2641if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002642 { echo "$as_me:$LINENO: result: $CC" >&5
2643echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002644else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645 { echo "$as_me:$LINENO: result: no" >&5
2646echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002647fi
2648
Martin v. Löwiseba40652007-08-30 20:10:57 +00002649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 test -n "$CC" && break
2651 done
2652fi
2653if test -z "$CC"; then
2654 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002655 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002656do
2657 # Extract the first word of "$ac_prog", so it can be a program name with args.
2658set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002659{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2660echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002661if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002662 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002663else
2664 if test -n "$ac_ct_CC"; then
2665 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2666else
2667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2668for as_dir in $PATH
2669do
2670 IFS=$as_save_IFS
2671 test -z "$as_dir" && as_dir=.
2672 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002673 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 +00002674 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002675 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 break 2
2677 fi
2678done
2679done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682fi
2683fi
2684ac_ct_CC=$ac_cv_prog_ac_ct_CC
2685if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002686 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2687echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002689 { echo "$as_me:$LINENO: result: no" >&5
2690echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002691fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 test -n "$ac_ct_CC" && break
2695done
Michael W. Hudson54241132001-12-07 15:38:26 +00002696
Martin v. Löwiseba40652007-08-30 20:10:57 +00002697 if test "x$ac_ct_CC" = x; then
2698 CC=""
2699 else
2700 case $cross_compiling:$ac_tool_warned in
2701yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002702{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2703whose name does not start with the host triplet. If you think this
2704configuration is useful to you, please write to autoconf@gnu.org." >&5
2705echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2706whose name does not start with the host triplet. If you think this
2707configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002708ac_tool_warned=yes ;;
2709esac
2710 CC=$ac_ct_CC
2711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002712fi
2713
2714fi
2715
2716
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002717test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002718See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002719echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002720See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002721 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002722
2723# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002724echo "$as_me:$LINENO: checking for C compiler version" >&5
2725ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002726{ (ac_try="$ac_compiler --version >&5"
2727case "(($ac_try" in
2728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2729 *) ac_try_echo=$ac_try;;
2730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002732 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002736{ (ac_try="$ac_compiler -v >&5"
2737case "(($ac_try" in
2738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2739 *) ac_try_echo=$ac_try;;
2740esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002742 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002746{ (ac_try="$ac_compiler -V >&5"
2747case "(($ac_try" in
2748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2749 *) ac_try_echo=$ac_try;;
2750esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002752 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 (exit $ac_status); }
2756
2757cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002758/* confdefs.h. */
2759_ACEOF
2760cat confdefs.h >>conftest.$ac_ext
2761cat >>conftest.$ac_ext <<_ACEOF
2762/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002763
Martin v. Löwis11437992002-04-12 09:54:03 +00002764int
2765main ()
2766{
2767
2768 ;
2769 return 0;
2770}
2771_ACEOF
2772ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002773ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002774# Try to create an executable without -o first, disregard a.out.
2775# It will help us diagnose broken compilers, and finding out an intuition
2776# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002777{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2778echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2779ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2780#
2781# List of possible output files, starting from the most likely.
2782# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2783# only as a last resort. b.out is created by i960 compilers.
2784ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2785#
2786# The IRIX 6 linker writes into existing files which may not be
2787# executable, retaining their permissions. Remove them first so a
2788# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002789ac_rmfiles=
2790for ac_file in $ac_files
2791do
2792 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002793 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2795 esac
2796done
2797rm -f $ac_rmfiles
2798
2799if { (ac_try="$ac_link_default"
2800case "(($ac_try" in
2801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2802 *) ac_try_echo=$ac_try;;
2803esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002805 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002806 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002808 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2810# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2811# in a Makefile. We should not override ac_cv_exeext if it was cached,
2812# so that the user can short-circuit this test for compilers unknown to
2813# Autoconf.
2814for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002815do
2816 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002817 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002818 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002819 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002820 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002821 # We found the default executable, but exeext='' is most
2822 # certainly right.
2823 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002824 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002825 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2826 then :; else
2827 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2828 fi
2829 # We set ac_cv_exeext here because the later test for it is not
2830 # safe: cross compilers may not add the suffix if given an `-o'
2831 # argument, so we may need to know it at that point already.
2832 # Even if this section looks crufty: it has the advantage of
2833 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002834 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002835 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002836 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 esac
2838done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002839test "$ac_cv_exeext" = no && ac_cv_exeext=
2840
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002841else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002842 ac_file=''
2843fi
2844
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002845{ echo "$as_me:$LINENO: result: $ac_file" >&5
2846echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002847if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002849sed 's/^/| /' conftest.$ac_ext >&5
2850
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002851{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002852See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002853echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002854See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002855 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002856fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002857
Martin v. Löwis11437992002-04-12 09:54:03 +00002858ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002859
Martin v. Löwiseba40652007-08-30 20:10:57 +00002860# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002861# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002862{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2863echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002864# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2865# If not cross compiling, check that we can run a simple program.
2866if test "$cross_compiling" != yes; then
2867 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002868 { (case "(($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_try") 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 cross_compiling=no
2878 else
2879 if test "$cross_compiling" = maybe; then
2880 cross_compiling=yes
2881 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002882 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002883If you meant to cross compile, use \`--host'.
2884See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002885echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002886If you meant to cross compile, use \`--host'.
2887See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002888 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 fi
2890 fi
2891fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002892{ echo "$as_me:$LINENO: result: yes" >&5
2893echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002894
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002895rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002896ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002897# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002898# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002899{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2900echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2901{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2902echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002903
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002904{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2905echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002906if { (ac_try="$ac_link"
2907case "(($ac_try" in
2908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2909 *) ac_try_echo=$ac_try;;
2910esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002912 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002913 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 (exit $ac_status); }; then
2916 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2917# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2918# work properly (i.e., refer to `conftest.exe'), while it won't with
2919# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002920for ac_file in conftest.exe conftest conftest.*; do
2921 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002922 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002923 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002924 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002925 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002926 * ) break;;
2927 esac
2928done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002929else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002930 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002931See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002932echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002933See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002934 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002935fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002938{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2939echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
2941rm -f conftest.$ac_ext
2942EXEEXT=$ac_cv_exeext
2943ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002944{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2945echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002946if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002947 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002948else
Martin v. Löwis11437992002-04-12 09:54:03 +00002949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002950/* confdefs.h. */
2951_ACEOF
2952cat confdefs.h >>conftest.$ac_ext
2953cat >>conftest.$ac_ext <<_ACEOF
2954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956int
2957main ()
2958{
2959
2960 ;
2961 return 0;
2962}
2963_ACEOF
2964rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002965if { (ac_try="$ac_compile"
2966case "(($ac_try" in
2967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2968 *) ac_try_echo=$ac_try;;
2969esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002971 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002972 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002974 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002975 for ac_file in conftest.o conftest.obj conftest.*; do
2976 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002977 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002978 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2980 break;;
2981 esac
2982done
2983else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002985sed 's/^/| /' conftest.$ac_ext >&5
2986
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002987{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002988See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002989echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002990See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002991 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002992fi
2993
2994rm -f conftest.$ac_cv_objext conftest.$ac_ext
2995fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002996{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2997echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002998OBJEXT=$ac_cv_objext
2999ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003000{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3001echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003002if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003003 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003004else
3005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003006/* confdefs.h. */
3007_ACEOF
3008cat confdefs.h >>conftest.$ac_ext
3009cat >>conftest.$ac_ext <<_ACEOF
3010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003011
Martin v. Löwis11437992002-04-12 09:54:03 +00003012int
3013main ()
3014{
3015#ifndef __GNUC__
3016 choke me
3017#endif
3018
3019 ;
3020 return 0;
3021}
3022_ACEOF
3023rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003024if { (ac_try="$ac_compile"
3025case "(($ac_try" in
3026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3027 *) ac_try_echo=$ac_try;;
3028esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003030 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003031 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003032 grep -v '^ *+' conftest.er1 >conftest.err
3033 rm -f conftest.er1
3034 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003036 (exit $ac_status); } && {
3037 test -z "$ac_c_werror_flag" ||
3038 test ! -s conftest.err
3039 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003040 ac_compiler_gnu=yes
3041else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003043sed 's/^/| /' conftest.$ac_ext >&5
3044
Martin v. Löwiseba40652007-08-30 20:10:57 +00003045 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003047
3048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003049ac_cv_c_compiler_gnu=$ac_compiler_gnu
3050
3051fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003052{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3053echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3054GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00003055ac_test_CFLAGS=${CFLAGS+set}
3056ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003057{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3058echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003059if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003061else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003062 ac_save_c_werror_flag=$ac_c_werror_flag
3063 ac_c_werror_flag=yes
3064 ac_cv_prog_cc_g=no
3065 CFLAGS="-g"
3066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003067/* confdefs.h. */
3068_ACEOF
3069cat confdefs.h >>conftest.$ac_ext
3070cat >>conftest.$ac_ext <<_ACEOF
3071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003072
Martin v. Löwis11437992002-04-12 09:54:03 +00003073int
3074main ()
3075{
3076
3077 ;
3078 return 0;
3079}
3080_ACEOF
3081rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003082if { (ac_try="$ac_compile"
3083case "(($ac_try" in
3084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3085 *) ac_try_echo=$ac_try;;
3086esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003088 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003090 grep -v '^ *+' conftest.er1 >conftest.err
3091 rm -f conftest.er1
3092 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003094 (exit $ac_status); } && {
3095 test -z "$ac_c_werror_flag" ||
3096 test ! -s conftest.err
3097 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003098 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003099else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003101sed 's/^/| /' conftest.$ac_ext >&5
3102
Martin v. Löwiseba40652007-08-30 20:10:57 +00003103 CFLAGS=""
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 :
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 ac_c_werror_flag=$ac_save_c_werror_flag
3142 CFLAGS="-g"
3143 cat >conftest.$ac_ext <<_ACEOF
3144/* confdefs.h. */
3145_ACEOF
3146cat confdefs.h >>conftest.$ac_ext
3147cat >>conftest.$ac_ext <<_ACEOF
3148/* end confdefs.h. */
3149
3150int
3151main ()
3152{
3153
3154 ;
3155 return 0;
3156}
3157_ACEOF
3158rm -f conftest.$ac_objext
3159if { (ac_try="$ac_compile"
3160case "(($ac_try" in
3161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3162 *) ac_try_echo=$ac_try;;
3163esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003165 (eval "$ac_compile") 2>conftest.er1
3166 ac_status=$?
3167 grep -v '^ *+' conftest.er1 >conftest.err
3168 rm -f conftest.er1
3169 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003171 (exit $ac_status); } && {
3172 test -z "$ac_c_werror_flag" ||
3173 test ! -s conftest.err
3174 } && test -s conftest.$ac_objext; then
3175 ac_cv_prog_cc_g=yes
3176else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003177 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003178sed 's/^/| /' conftest.$ac_ext >&5
3179
3180
Guido van Rossum627b2d71993-12-24 10:39:16 +00003181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182
3183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003185
3186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3187fi
3188
3189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3190 ac_c_werror_flag=$ac_save_c_werror_flag
3191fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003192{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3193echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003194if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003195 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003196elif test $ac_cv_prog_cc_g = yes; then
3197 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003198 CFLAGS="-g -O2"
3199 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003200 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003201 fi
3202else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003203 if test "$GCC" = yes; then
3204 CFLAGS="-O2"
3205 else
3206 CFLAGS=
3207 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003208fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003209{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3210echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003211if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003212 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003213else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003214 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003215ac_save_CC=$CC
3216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003217/* confdefs.h. */
3218_ACEOF
3219cat confdefs.h >>conftest.$ac_ext
3220cat >>conftest.$ac_ext <<_ACEOF
3221/* end confdefs.h. */
3222#include <stdarg.h>
3223#include <stdio.h>
3224#include <sys/types.h>
3225#include <sys/stat.h>
3226/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3227struct buf { int x; };
3228FILE * (*rcsopen) (struct buf *, struct stat *, int);
3229static char *e (p, i)
3230 char **p;
3231 int i;
3232{
3233 return p[i];
3234}
3235static char *f (char * (*g) (char **, int), char **p, ...)
3236{
3237 char *s;
3238 va_list v;
3239 va_start (v,p);
3240 s = g (p, va_arg (v,int));
3241 va_end (v);
3242 return s;
3243}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003244
3245/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3246 function prototypes and stuff, but not '\xHH' hex character constants.
3247 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003248 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003249 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3250 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003252int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3253
Martin v. Löwiseba40652007-08-30 20:10:57 +00003254/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3255 inside strings and character constants. */
3256#define FOO(x) 'x'
3257int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3258
Skip Montanaro6dead952003-09-25 14:50:04 +00003259int test (int i, double x);
3260struct s1 {int (*f) (int a);};
3261struct s2 {int (*f) (double a);};
3262int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3263int argc;
3264char **argv;
3265int
3266main ()
3267{
3268return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3269 ;
3270 return 0;
3271}
3272_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003273for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3274 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003275do
3276 CC="$ac_save_CC $ac_arg"
3277 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003278if { (ac_try="$ac_compile"
3279case "(($ac_try" in
3280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3281 *) ac_try_echo=$ac_try;;
3282esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003284 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003286 grep -v '^ *+' conftest.er1 >conftest.err
3287 rm -f conftest.er1
3288 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003290 (exit $ac_status); } && {
3291 test -z "$ac_c_werror_flag" ||
3292 test ! -s conftest.err
3293 } && test -s conftest.$ac_objext; then
3294 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003295else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003297sed 's/^/| /' conftest.$ac_ext >&5
3298
Martin v. Löwiseba40652007-08-30 20:10:57 +00003299
Skip Montanaro6dead952003-09-25 14:50:04 +00003300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003301
3302rm -f core conftest.err conftest.$ac_objext
3303 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003304done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003305rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003306CC=$ac_save_CC
3307
3308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309# AC_CACHE_VAL
3310case "x$ac_cv_prog_cc_c89" in
3311 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003312 { echo "$as_me:$LINENO: result: none needed" >&5
3313echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003314 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003315 { echo "$as_me:$LINENO: result: unsupported" >&5
3316echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003317 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003318 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003319 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3320echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003321esac
3322
Skip Montanaro6dead952003-09-25 14:50:04 +00003323
Martin v. Löwis11437992002-04-12 09:54:03 +00003324ac_ext=c
3325ac_cpp='$CPP $CPPFLAGS'
3326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3328ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003329
Victor Stinner6cbf90f2010-03-25 00:21:53 +00003330CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003331
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003332
3333
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003334{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3335echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003336
Martin v. Löwiseba40652007-08-30 20:10:57 +00003337# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003338if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003339 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003340
3341 case $withval in
3342 no) with_cxx_main=no
3343 MAINCC='$(CC)';;
3344 yes) with_cxx_main=yes
3345 MAINCC='$(CXX)';;
3346 *) with_cxx_main=yes
3347 MAINCC=$withval
3348 if test -z "$CXX"
3349 then
3350 CXX=$withval
3351 fi;;
3352 esac
3353else
3354
3355 with_cxx_main=no
3356 MAINCC='$(CC)'
3357
Martin v. Löwiseba40652007-08-30 20:10:57 +00003358fi
3359
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003360{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3361echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003362
3363preset_cxx="$CXX"
3364if test -z "$CXX"
3365then
3366 case "$CC" in
3367 gcc) # Extract the first word of "g++", so it can be a program name with args.
3368set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003369{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3370echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003371if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003372 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003373else
3374 case $CXX in
3375 [\\/]* | ?:[\\/]*)
3376 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3377 ;;
3378 *)
3379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3380for as_dir in notfound
3381do
3382 IFS=$as_save_IFS
3383 test -z "$as_dir" && as_dir=.
3384 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003385 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 +00003386 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003387 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003388 break 2
3389 fi
3390done
3391done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003393
3394 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3395 ;;
3396esac
3397fi
3398CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003399if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003400 { echo "$as_me:$LINENO: result: $CXX" >&5
3401echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003403 { echo "$as_me:$LINENO: result: no" >&5
3404echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003406
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003407 ;;
3408 cc) # Extract the first word of "c++", so it can be a program name with args.
3409set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003410{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3411echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003412if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003413 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003414else
3415 case $CXX in
3416 [\\/]* | ?:[\\/]*)
3417 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3418 ;;
3419 *)
3420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3421for as_dir in notfound
3422do
3423 IFS=$as_save_IFS
3424 test -z "$as_dir" && as_dir=.
3425 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003426 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 +00003427 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003428 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003429 break 2
3430 fi
3431done
3432done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003433IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003434
3435 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3436 ;;
3437esac
3438fi
3439CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003440if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003441 { echo "$as_me:$LINENO: result: $CXX" >&5
3442echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003444 { echo "$as_me:$LINENO: result: no" >&5
3445echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003447
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003448 ;;
3449 esac
3450 if test "$CXX" = "notfound"
3451 then
3452 CXX=""
3453 fi
3454fi
3455if test -z "$CXX"
3456then
3457 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3458do
3459 # Extract the first word of "$ac_prog", so it can be a program name with args.
3460set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003461{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3462echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003463if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003465else
3466 if test -n "$CXX"; then
3467 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3468else
3469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3470for as_dir in $PATH
3471do
3472 IFS=$as_save_IFS
3473 test -z "$as_dir" && as_dir=.
3474 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003475 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 +00003476 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003477 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003478 break 2
3479 fi
3480done
3481done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003482IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003483
3484fi
3485fi
3486CXX=$ac_cv_prog_CXX
3487if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003488 { echo "$as_me:$LINENO: result: $CXX" >&5
3489echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003491 { echo "$as_me:$LINENO: result: no" >&5
3492echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003493fi
3494
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003496 test -n "$CXX" && break
3497done
3498test -n "$CXX" || CXX="notfound"
3499
3500 if test "$CXX" = "notfound"
3501 then
3502 CXX=""
3503 fi
3504fi
3505if test "$preset_cxx" != "$CXX"
3506then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003507 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003508
3509 By default, distutils will build C++ extension modules with \"$CXX\".
3510 If this is not intended, then set CXX on the configure command line.
3511 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003512echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003513
3514 By default, distutils will build C++ extension modules with \"$CXX\".
3515 If this is not intended, then set CXX on the configure command line.
3516 " >&2;}
3517fi
3518
3519
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003520# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003521
3522ac_ext=c
3523ac_cpp='$CPP $CPPFLAGS'
3524ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3525ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3526ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003527{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3528echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003529# On Suns, sometimes $CPP names a directory.
3530if test -n "$CPP" && test -d "$CPP"; then
3531 CPP=
3532fi
3533if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003535 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003536else
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 # Double quotes because CPP needs to be expanded
3538 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3539 do
3540 ac_preproc_ok=false
3541for ac_c_preproc_warn_flag in '' yes
3542do
3543 # Use a header file that comes with gcc, so configuring glibc
3544 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003545 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3546 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003547 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 # not just through cpp. "Syntax error" is here to catch this case.
3549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003550/* confdefs.h. */
3551_ACEOF
3552cat confdefs.h >>conftest.$ac_ext
3553cat >>conftest.$ac_ext <<_ACEOF
3554/* end confdefs.h. */
3555#ifdef __STDC__
3556# include <limits.h>
3557#else
3558# include <assert.h>
3559#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003560 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003561_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003562if { (ac_try="$ac_cpp conftest.$ac_ext"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003570 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 rm -f conftest.er1
3572 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003574 (exit $ac_status); } >/dev/null && {
3575 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3576 test ! -s conftest.err
3577 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003578 :
3579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003581sed 's/^/| /' conftest.$ac_ext >&5
3582
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 # Broken: fails on valid input.
3584continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003585fi
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
Jack Jansendd19cf82001-12-06 22:36:17 +00003588
Martin v. Löwiseba40652007-08-30 20:10:57 +00003589 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # can be detected and how.
3591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003592/* confdefs.h. */
3593_ACEOF
3594cat confdefs.h >>conftest.$ac_ext
3595cat >>conftest.$ac_ext <<_ACEOF
3596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003597#include <ac_nonexistent.h>
3598_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003599if { (ac_try="$ac_cpp conftest.$ac_ext"
3600case "(($ac_try" in
3601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3602 *) ac_try_echo=$ac_try;;
3603esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003607 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 rm -f conftest.er1
3609 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003611 (exit $ac_status); } >/dev/null && {
3612 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3613 test ! -s conftest.err
3614 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 # Broken: success on invalid input.
3616continue
3617else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003619sed 's/^/| /' conftest.$ac_ext >&5
3620
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 # Passes both tests.
3622ac_preproc_ok=:
3623break
3624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626rm -f conftest.err conftest.$ac_ext
3627
3628done
3629# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3630rm -f conftest.err conftest.$ac_ext
3631if $ac_preproc_ok; then
3632 break
3633fi
3634
3635 done
3636 ac_cv_prog_CPP=$CPP
3637
3638fi
3639 CPP=$ac_cv_prog_CPP
3640else
3641 ac_cv_prog_CPP=$CPP
3642fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003643{ echo "$as_me:$LINENO: result: $CPP" >&5
3644echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003645ac_preproc_ok=false
3646for ac_c_preproc_warn_flag in '' yes
3647do
3648 # Use a header file that comes with gcc, so configuring glibc
3649 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003650 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3651 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003652 # On the NeXT, cc -E runs the code through the compiler's parser,
3653 # not just through cpp. "Syntax error" is here to catch this case.
3654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003655/* confdefs.h. */
3656_ACEOF
3657cat confdefs.h >>conftest.$ac_ext
3658cat >>conftest.$ac_ext <<_ACEOF
3659/* end confdefs.h. */
3660#ifdef __STDC__
3661# include <limits.h>
3662#else
3663# include <assert.h>
3664#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003665 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003666_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003667if { (ac_try="$ac_cpp conftest.$ac_ext"
3668case "(($ac_try" in
3669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3670 *) ac_try_echo=$ac_try;;
3671esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003674 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003675 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 rm -f conftest.er1
3677 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003679 (exit $ac_status); } >/dev/null && {
3680 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3681 test ! -s conftest.err
3682 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 :
3684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003686sed 's/^/| /' conftest.$ac_ext >&5
3687
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 # Broken: fails on valid input.
3689continue
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
Martin v. Löwiseba40652007-08-30 20:10:57 +00003694 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 # can be detected and how.
3696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003697/* confdefs.h. */
3698_ACEOF
3699cat confdefs.h >>conftest.$ac_ext
3700cat >>conftest.$ac_ext <<_ACEOF
3701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003702#include <ac_nonexistent.h>
3703_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003704if { (ac_try="$ac_cpp conftest.$ac_ext"
3705case "(($ac_try" in
3706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3707 *) ac_try_echo=$ac_try;;
3708esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003712 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 rm -f conftest.er1
3714 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716 (exit $ac_status); } >/dev/null && {
3717 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3718 test ! -s conftest.err
3719 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 # Broken: success on invalid input.
3721continue
3722else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003724sed 's/^/| /' conftest.$ac_ext >&5
3725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 # Passes both tests.
3727ac_preproc_ok=:
3728break
3729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003730
Martin v. Löwis11437992002-04-12 09:54:03 +00003731rm -f conftest.err conftest.$ac_ext
3732
3733done
3734# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3735rm -f conftest.err conftest.$ac_ext
3736if $ac_preproc_ok; then
3737 :
3738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003739 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003740See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003741echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003742See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003743 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003744fi
3745
3746ac_ext=c
3747ac_cpp='$CPP $CPPFLAGS'
3748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3750ac_compiler_gnu=$ac_cv_c_compiler_gnu
3751
3752
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003753{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3754echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003755if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003756 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003757else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003758 # Extract the first word of "grep ggrep" to use in msg output
3759if test -z "$GREP"; then
3760set dummy grep ggrep; ac_prog_name=$2
3761if test "${ac_cv_path_GREP+set}" = set; then
3762 echo $ECHO_N "(cached) $ECHO_C" >&6
3763else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003764 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003765# Loop through the user's path and test for each of PROGNAME-LIST
3766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003767for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3768do
3769 IFS=$as_save_IFS
3770 test -z "$as_dir" && as_dir=.
3771 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003772 for ac_exec_ext in '' $ac_executable_extensions; do
3773 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3774 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3775 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003776 # Check for GNU $ac_path_GREP
3777case `"$ac_path_GREP" --version 2>&1` in
3778*GNU*)
3779 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3780*)
3781 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003782 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783 while :
3784 do
3785 cat "conftest.in" "conftest.in" >"conftest.tmp"
3786 mv "conftest.tmp" "conftest.in"
3787 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003788 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003789 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3790 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3791 ac_count=`expr $ac_count + 1`
3792 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3793 # Best one so far, save it but keep looking for a better one
3794 ac_cv_path_GREP="$ac_path_GREP"
3795 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003796 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003797 # 10*(2^10) chars as input seems more than enough
3798 test $ac_count -gt 10 && break
3799 done
3800 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3801esac
3802
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003803
3804 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003805 done
3806done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003807
3808done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003809IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003810
3811
3812fi
3813
3814GREP="$ac_cv_path_GREP"
3815if test -z "$GREP"; then
3816 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3817echo "$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 +00003818 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003819fi
3820
Martin v. Löwiseba40652007-08-30 20:10:57 +00003821else
3822 ac_cv_path_GREP=$GREP
3823fi
3824
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003825
Martin v. Löwiseba40652007-08-30 20:10:57 +00003826fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003827{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3828echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003829 GREP="$ac_cv_path_GREP"
3830
3831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003832{ echo "$as_me:$LINENO: checking for egrep" >&5
3833echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003834if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003835 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003836else
3837 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3838 then ac_cv_path_EGREP="$GREP -E"
3839 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003840 # Extract the first word of "egrep" to use in msg output
3841if test -z "$EGREP"; then
3842set dummy egrep; ac_prog_name=$2
3843if test "${ac_cv_path_EGREP+set}" = set; then
3844 echo $ECHO_N "(cached) $ECHO_C" >&6
3845else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003846 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003847# Loop through the user's path and test for each of PROGNAME-LIST
3848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003849for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3850do
3851 IFS=$as_save_IFS
3852 test -z "$as_dir" && as_dir=.
3853 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003854 for ac_exec_ext in '' $ac_executable_extensions; do
3855 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3856 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3857 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858 # Check for GNU $ac_path_EGREP
3859case `"$ac_path_EGREP" --version 2>&1` in
3860*GNU*)
3861 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3862*)
3863 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003864 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003865 while :
3866 do
3867 cat "conftest.in" "conftest.in" >"conftest.tmp"
3868 mv "conftest.tmp" "conftest.in"
3869 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003870 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003871 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3872 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3873 ac_count=`expr $ac_count + 1`
3874 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3875 # Best one so far, save it but keep looking for a better one
3876 ac_cv_path_EGREP="$ac_path_EGREP"
3877 ac_path_EGREP_max=$ac_count
3878 fi
3879 # 10*(2^10) chars as input seems more than enough
3880 test $ac_count -gt 10 && break
3881 done
3882 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3883esac
3884
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003885
3886 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003887 done
3888done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003889
3890done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003891IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003892
3893
3894fi
3895
3896EGREP="$ac_cv_path_EGREP"
3897if test -z "$EGREP"; then
3898 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3899echo "$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 +00003900 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003901fi
3902
Martin v. Löwiseba40652007-08-30 20:10:57 +00003903else
3904 ac_cv_path_EGREP=$EGREP
3905fi
3906
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003907
Martin v. Löwiseba40652007-08-30 20:10:57 +00003908 fi
3909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003910{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3911echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003912 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003913
3914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003915
3916{ echo "$as_me:$LINENO: checking for AIX" >&5
3917echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3918cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003919/* confdefs.h. */
3920_ACEOF
3921cat confdefs.h >>conftest.$ac_ext
3922cat >>conftest.$ac_ext <<_ACEOF
3923/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003924#ifdef _AIX
3925 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003926#endif
3927
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003928_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3930 $EGREP "yes" >/dev/null 2>&1; then
3931 { echo "$as_me:$LINENO: result: yes" >&5
3932echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003933cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003934#define _ALL_SOURCE 1
3935_ACEOF
3936
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003937else
3938 { echo "$as_me:$LINENO: result: no" >&5
3939echo "${ECHO_T}no" >&6; }
3940fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003941rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003942
3943
3944
3945# Check for unsupported systems
3946case $ac_sys_system/$ac_sys_release in
3947atheos*|Linux*/1*)
3948 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3949 echo See README for details.
3950 exit 1;;
3951esac
3952
3953
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003954{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3955echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003956
3957# Check whether --with-suffix was given.
3958if test "${with_suffix+set}" = set; then
3959 withval=$with_suffix;
3960 case $withval in
3961 no) EXEEXT=;;
3962 yes) EXEEXT=.exe;;
3963 *) EXEEXT=$withval;;
3964 esac
3965fi
3966
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003967{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3968echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003969
3970# Test whether we're running on a non-case-sensitive system, in which
3971# case we give a warning if no ext is given
3972
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003973{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3974echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003975if test ! -d CaseSensitiveTestDir; then
3976mkdir CaseSensitiveTestDir
3977fi
3978
3979if test -d casesensitivetestdir
3980then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003981 { echo "$as_me:$LINENO: result: yes" >&5
3982echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003983 BUILDEXEEXT=.exe
3984else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003985 { echo "$as_me:$LINENO: result: no" >&5
3986echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003987 BUILDEXEEXT=$EXEEXT
3988fi
3989rmdir CaseSensitiveTestDir
3990
3991case $MACHDEP in
3992bsdos*)
3993 case $CC in
3994 gcc) CC="$CC -D_HAVE_BSDI";;
3995 esac;;
3996esac
3997
3998case $ac_sys_system in
3999hp*|HP*)
4000 case $CC in
4001 cc|*/cc) CC="$CC -Ae";;
4002 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004003SunOS*)
4004 # Some functions have a prototype only with that define, e.g. confstr
4005
4006cat >>confdefs.h <<\_ACEOF
4007#define __EXTENSIONS__ 1
4008_ACEOF
4009
4010 ;;
4011esac
4012
4013
4014
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004015{ echo "$as_me:$LINENO: checking LIBRARY" >&5
4016echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004017if test -z "$LIBRARY"
4018then
4019 LIBRARY='libpython$(VERSION).a'
4020fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004021{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
4022echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004023
4024# LDLIBRARY is the name of the library to link against (as opposed to the
4025# name of the library into which to insert object files). BLDLIBRARY is also
4026# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4027# is blank as the main program is not linked directly against LDLIBRARY.
4028# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4029# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4030# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4031# DLLLIBRARY is the shared (i.e., DLL) library.
4032#
4033# RUNSHARED is used to run shared python without installed libraries
4034#
4035# INSTSONAME is the name of the shared library that will be use to install
4036# on the system - some systems like version suffix, others don't
4037
4038
4039
4040
4041
4042
4043LDLIBRARY="$LIBRARY"
4044BLDLIBRARY='$(LDLIBRARY)'
4045INSTSONAME='$(LDLIBRARY)'
4046DLLLIBRARY=''
4047LDLIBRARYDIR=''
4048RUNSHARED=''
4049
4050# LINKCC is the command that links the python executable -- default is $(CC).
4051# If CXX is set, and if it is needed to link a main function that was
4052# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4053# python might then depend on the C++ runtime
4054# This is altered for AIX in order to build the export list before
4055# linking.
4056
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004057{ echo "$as_me:$LINENO: checking LINKCC" >&5
4058echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004059if test -z "$LINKCC"
4060then
4061 LINKCC='$(PURIFY) $(MAINCC)'
4062 case $ac_sys_system in
4063 AIX*)
4064 exp_extra="\"\""
4065 if test $ac_sys_release -ge 5 -o \
4066 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4067 exp_extra="."
4068 fi
4069 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004070 QNX*)
4071 # qcc must be used because the other compilers do not
4072 # support -N.
4073 LINKCC=qcc;;
4074 esac
4075fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004076{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4077echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004078
4079# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4080# make sure we default having it set to "no": this is used by
4081# distutils.unixccompiler to know if it should add --enable-new-dtags
4082# to linker command lines, and failing to detect GNU ld simply results
4083# in the same bahaviour as before.
4084
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004085{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4086echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004087ac_prog=ld
4088if test "$GCC" = yes; then
4089 ac_prog=`$CC -print-prog-name=ld`
4090fi
4091case `"$ac_prog" -V 2>&1 < /dev/null` in
4092 *GNU*)
4093 GNULD=yes;;
4094 *)
4095 GNULD=no;;
4096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004097{ echo "$as_me:$LINENO: result: $GNULD" >&5
4098echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004099
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004100{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4101echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004102# Check whether --enable-shared was given.
4103if test "${enable_shared+set}" = set; then
4104 enableval=$enable_shared;
4105fi
4106
4107
4108if test -z "$enable_shared"
4109then
4110 case $ac_sys_system in
4111 CYGWIN* | atheos*)
4112 enable_shared="yes";;
4113 *)
4114 enable_shared="no";;
4115 esac
4116fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004117{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4118echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004119
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004120{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4121echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004122# Check whether --enable-profiling was given.
4123if test "${enable_profiling+set}" = set; then
4124 enableval=$enable_profiling; ac_save_cc="$CC"
4125 CC="$CC -pg"
4126 if test "$cross_compiling" = yes; then
4127 ac_enable_profiling="no"
4128else
4129 cat >conftest.$ac_ext <<_ACEOF
4130/* confdefs.h. */
4131_ACEOF
4132cat confdefs.h >>conftest.$ac_ext
4133cat >>conftest.$ac_ext <<_ACEOF
4134/* end confdefs.h. */
4135int main() { return 0; }
4136_ACEOF
4137rm -f conftest$ac_exeext
4138if { (ac_try="$ac_link"
4139case "(($ac_try" in
4140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4141 *) ac_try_echo=$ac_try;;
4142esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004144 (eval "$ac_link") 2>&5
4145 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004147 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4148 { (case "(($ac_try" in
4149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4150 *) ac_try_echo=$ac_try;;
4151esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004153 (eval "$ac_try") 2>&5
4154 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004156 (exit $ac_status); }; }; then
4157 ac_enable_profiling="yes"
4158else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004159 echo "$as_me: program exited with status $ac_status" >&5
4160echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004161sed 's/^/| /' conftest.$ac_ext >&5
4162
4163( exit $ac_status )
4164ac_enable_profiling="no"
4165fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4167fi
4168
4169
4170 CC="$ac_save_cc"
4171fi
4172
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004173{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4174echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004175
4176case "$ac_enable_profiling" in
4177 "yes")
4178 BASECFLAGS="-pg $BASECFLAGS"
4179 LDFLAGS="-pg $LDFLAGS"
4180 ;;
4181esac
4182
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004183{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4184echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004185
4186# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4187# library that we build, but we do not want to link against it (we
4188# will find it with a -framework option). For this reason there is an
4189# extra variable BLDLIBRARY against which Python and the extension
4190# modules are linked, BLDLIBRARY. This is normally the same as
4191# LDLIBRARY, but empty for MacOSX framework builds.
4192if test "$enable_framework"
4193then
4194 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4195 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4196 BLDLIBRARY=''
4197else
4198 BLDLIBRARY='$(LDLIBRARY)'
4199fi
4200
4201# Other platforms follow
4202if test $enable_shared = "yes"; then
4203
4204cat >>confdefs.h <<\_ACEOF
4205#define Py_ENABLE_SHARED 1
4206_ACEOF
4207
4208 case $ac_sys_system in
4209 BeOS*)
4210 LDLIBRARY='libpython$(VERSION).so'
4211 ;;
4212 CYGWIN*)
4213 LDLIBRARY='libpython$(VERSION).dll.a'
4214 DLLLIBRARY='libpython$(VERSION).dll'
4215 ;;
4216 SunOS*)
4217 LDLIBRARY='libpython$(VERSION).so'
4218 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4219 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4220 INSTSONAME="$LDLIBRARY".$SOVERSION
4221 ;;
4222 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4223 LDLIBRARY='libpython$(VERSION).so'
4224 BLDLIBRARY='-L. -lpython$(VERSION)'
4225 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4226 case $ac_sys_system in
4227 FreeBSD*)
4228 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4229 ;;
4230 esac
4231 INSTSONAME="$LDLIBRARY".$SOVERSION
4232 ;;
4233 hp*|HP*)
4234 case `uname -m` in
4235 ia64)
4236 LDLIBRARY='libpython$(VERSION).so'
4237 ;;
4238 *)
4239 LDLIBRARY='libpython$(VERSION).sl'
4240 ;;
4241 esac
4242 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4243 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4244 ;;
4245 OSF*)
4246 LDLIBRARY='libpython$(VERSION).so'
4247 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4248 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4249 ;;
4250 atheos*)
4251 LDLIBRARY='libpython$(VERSION).so'
4252 BLDLIBRARY='-L. -lpython$(VERSION)'
4253 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4254 ;;
4255 Darwin*)
4256 LDLIBRARY='libpython$(VERSION).dylib'
4257 BLDLIBRARY='-L. -lpython$(VERSION)'
4258 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4259 ;;
4260
4261 esac
4262else # shared is disabled
4263 case $ac_sys_system in
4264 CYGWIN*)
4265 BLDLIBRARY='$(LIBRARY)'
4266 LDLIBRARY='libpython$(VERSION).dll.a'
4267 ;;
4268 esac
4269fi
4270
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004271{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4272echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004273
4274if test -n "$ac_tool_prefix"; then
4275 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4276set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004279if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004280 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004281else
4282 if test -n "$RANLIB"; then
4283 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4284else
4285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4286for as_dir in $PATH
4287do
4288 IFS=$as_save_IFS
4289 test -z "$as_dir" && as_dir=.
4290 for ac_exec_ext in '' $ac_executable_extensions; do
4291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4292 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004294 break 2
4295 fi
4296done
4297done
4298IFS=$as_save_IFS
4299
4300fi
4301fi
4302RANLIB=$ac_cv_prog_RANLIB
4303if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004304 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4305echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004306else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004307 { echo "$as_me:$LINENO: result: no" >&5
4308echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004309fi
4310
4311
4312fi
4313if test -z "$ac_cv_prog_RANLIB"; then
4314 ac_ct_RANLIB=$RANLIB
4315 # Extract the first word of "ranlib", so it can be a program name with args.
4316set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004317{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4318echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004319if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004320 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004321else
4322 if test -n "$ac_ct_RANLIB"; then
4323 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4324else
4325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326for as_dir in $PATH
4327do
4328 IFS=$as_save_IFS
4329 test -z "$as_dir" && as_dir=.
4330 for ac_exec_ext in '' $ac_executable_extensions; do
4331 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4332 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004333 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004334 break 2
4335 fi
4336done
4337done
4338IFS=$as_save_IFS
4339
4340fi
4341fi
4342ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4343if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004344 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4345echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004346else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004347 { echo "$as_me:$LINENO: result: no" >&5
4348echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004349fi
4350
4351 if test "x$ac_ct_RANLIB" = x; then
4352 RANLIB=":"
4353 else
4354 case $cross_compiling:$ac_tool_warned in
4355yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004356{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4357whose name does not start with the host triplet. If you think this
4358configuration is useful to you, please write to autoconf@gnu.org." >&5
4359echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4360whose name does not start with the host triplet. If you think this
4361configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004362ac_tool_warned=yes ;;
4363esac
4364 RANLIB=$ac_ct_RANLIB
4365 fi
4366else
4367 RANLIB="$ac_cv_prog_RANLIB"
4368fi
4369
4370
4371for ac_prog in ar aal
4372do
4373 # Extract the first word of "$ac_prog", so it can be a program name with args.
4374set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004377if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004378 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004379else
4380 if test -n "$AR"; then
4381 ac_cv_prog_AR="$AR" # Let the user override the test.
4382else
4383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4384for as_dir in $PATH
4385do
4386 IFS=$as_save_IFS
4387 test -z "$as_dir" && as_dir=.
4388 for ac_exec_ext in '' $ac_executable_extensions; do
4389 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4390 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004391 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004392 break 2
4393 fi
4394done
4395done
4396IFS=$as_save_IFS
4397
4398fi
4399fi
4400AR=$ac_cv_prog_AR
4401if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004402 { echo "$as_me:$LINENO: result: $AR" >&5
4403echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004404else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004405 { echo "$as_me:$LINENO: result: no" >&5
4406echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004407fi
4408
4409
4410 test -n "$AR" && break
4411done
4412test -n "$AR" || AR="ar"
4413
4414
4415# tweak ARFLAGS only if the user didn't set it on the command line
4416
4417if test -z "$ARFLAGS"
4418then
4419 ARFLAGS="rc"
4420fi
4421
4422
4423# Extract the first word of "svnversion", so it can be a program name with args.
4424set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004425{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4426echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004427if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004428 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004429else
4430 if test -n "$SVNVERSION"; then
4431 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4432else
4433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4434for as_dir in $PATH
4435do
4436 IFS=$as_save_IFS
4437 test -z "$as_dir" && as_dir=.
4438 for ac_exec_ext in '' $ac_executable_extensions; do
4439 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4440 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004441 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004442 break 2
4443 fi
4444done
4445done
4446IFS=$as_save_IFS
4447
4448 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4449fi
4450fi
4451SVNVERSION=$ac_cv_prog_SVNVERSION
4452if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004453 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4454echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004455else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004456 { echo "$as_me:$LINENO: result: no" >&5
4457echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004458fi
4459
4460
4461if test $SVNVERSION = found
4462then
4463 SVNVERSION="svnversion \$(srcdir)"
4464else
4465 SVNVERSION="echo Unversioned directory"
4466fi
4467
4468case $MACHDEP in
4469bsdos*|hp*|HP*)
4470 # install -d does not work on BSDI or HP-UX
4471 if test -z "$INSTALL"
4472 then
4473 INSTALL="${srcdir}/install-sh -c"
4474 fi
4475esac
4476ac_aux_dir=
4477for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4478 if test -f "$ac_dir/install-sh"; then
4479 ac_aux_dir=$ac_dir
4480 ac_install_sh="$ac_aux_dir/install-sh -c"
4481 break
4482 elif test -f "$ac_dir/install.sh"; then
4483 ac_aux_dir=$ac_dir
4484 ac_install_sh="$ac_aux_dir/install.sh -c"
4485 break
4486 elif test -f "$ac_dir/shtool"; then
4487 ac_aux_dir=$ac_dir
4488 ac_install_sh="$ac_aux_dir/shtool install -c"
4489 break
4490 fi
4491done
4492if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004493 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4494echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004495 { (exit 1); exit 1; }; }
4496fi
4497
4498# These three variables are undocumented and unsupported,
4499# and are intended to be withdrawn in a future Autoconf release.
4500# They can cause serious problems if a builder's source tree is in a directory
4501# whose full name contains unusual characters.
4502ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4503ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4504ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4505
4506
4507# Find a good install program. We prefer a C program (faster),
4508# so one script is as good as another. But avoid the broken or
4509# incompatible versions:
4510# SysV /etc/install, /usr/sbin/install
4511# SunOS /usr/etc/install
4512# IRIX /sbin/install
4513# AIX /bin/install
4514# AmigaOS /C/install, which installs bootblocks on floppy discs
4515# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4516# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4517# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4518# OS/2's system install, which has a completely different semantic
4519# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004520{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4521echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004522if test -z "$INSTALL"; then
4523if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004524 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004525else
4526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527for as_dir in $PATH
4528do
4529 IFS=$as_save_IFS
4530 test -z "$as_dir" && as_dir=.
4531 # Account for people who put trailing slashes in PATH elements.
4532case $as_dir/ in
4533 ./ | .// | /cC/* | \
4534 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4535 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4536 /usr/ucb/* ) ;;
4537 *)
4538 # OSF1 and SCO ODT 3.0 have their own names for install.
4539 # Don't use installbsd from OSF since it installs stuff as root
4540 # by default.
4541 for ac_prog in ginstall scoinst install; do
4542 for ac_exec_ext in '' $ac_executable_extensions; do
4543 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4544 if test $ac_prog = install &&
4545 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4546 # AIX install. It has an incompatible calling convention.
4547 :
4548 elif test $ac_prog = install &&
4549 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4550 # program-specific install script used by HP pwplus--don't use.
4551 :
4552 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004553 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4554 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004555 fi
4556 fi
4557 done
4558 done
4559 ;;
4560esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004561done
4562IFS=$as_save_IFS
4563
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004564
4565fi
4566 if test "${ac_cv_path_install+set}" = set; then
4567 INSTALL=$ac_cv_path_install
4568 else
4569 # As a last resort, use the slow shell script. Don't cache a
4570 # value for INSTALL within a source directory, because that will
4571 # break other packages using the cache if that directory is
4572 # removed, or if the value is a relative name.
4573 INSTALL=$ac_install_sh
4574 fi
4575fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004576{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4577echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004578
4579# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4580# It thinks the first close brace ends the variable substitution.
4581test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4582
4583test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4584
4585test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4586
4587
4588# Not every filesystem supports hard links
4589
4590if test -z "$LN" ; then
4591 case $ac_sys_system in
4592 BeOS*) LN="ln -s";;
4593 CYGWIN*) LN="ln -s";;
4594 atheos*) LN="ln -s";;
4595 *) LN=ln;;
4596 esac
4597fi
4598
4599# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004600{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4601echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004602
4603# Check whether --with-pydebug was given.
4604if test "${with_pydebug+set}" = set; then
4605 withval=$with_pydebug;
4606if test "$withval" != no
4607then
4608
4609cat >>confdefs.h <<\_ACEOF
4610#define Py_DEBUG 1
4611_ACEOF
4612
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004613 { echo "$as_me:$LINENO: result: yes" >&5
4614echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004615 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004616else { echo "$as_me:$LINENO: result: no" >&5
4617echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004618fi
4619else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004620 { echo "$as_me:$LINENO: result: no" >&5
4621echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004622fi
4623
4624
4625# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4626# merged with this chunk of code?
4627
4628# Optimizer/debugger flags
4629# ------------------------
4630# (The following bit of code is complicated enough - please keep things
4631# indented properly. Just pretend you're editing Python code. ;-)
4632
4633# There are two parallel sets of case statements below, one that checks to
4634# see if OPT was set and one that does BASECFLAGS setting based upon
4635# compiler and platform. BASECFLAGS tweaks need to be made even if the
4636# user set OPT.
4637
4638# tweak OPT based on compiler and platform, only if the user didn't set
4639# it on the command line
4640
Benjamin Petersond4b721b2010-03-23 20:58:37 +00004641if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004642then
4643 case $GCC in
4644 yes)
4645 if test "$CC" != 'g++' ; then
4646 STRICT_PROTO="-Wstrict-prototypes"
4647 fi
4648 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4649 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4650 WRAP="-fwrapv"
4651 fi
4652 case $ac_cv_prog_cc_g in
4653 yes)
4654 if test "$Py_DEBUG" = 'true' ; then
4655 # Optimization messes up debuggers, so turn it off for
4656 # debug builds.
4657 OPT="-g -Wall $STRICT_PROTO"
4658 else
4659 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4660 fi
4661 ;;
4662 *)
4663 OPT="-O3 -Wall $STRICT_PROTO"
4664 ;;
4665 esac
4666 case $ac_sys_system in
4667 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4668 ;;
4669 esac
4670 ;;
4671
4672 *)
4673 OPT="-O"
4674 ;;
4675 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004676fi
4677
4678
4679
4680# The -arch flags for universal builds on OSX
4681UNIVERSAL_ARCH_FLAGS=
4682
4683
4684# tweak BASECFLAGS based on compiler and platform
4685case $GCC in
4686yes)
4687 # Python violates C99 rules, by casting between incompatible
4688 # pointer types. GCC may generate bad code as a result of that,
4689 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004690 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4691echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004692 ac_save_cc="$CC"
4693 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004694 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4695 echo $ECHO_N "(cached) $ECHO_C" >&6
4696else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004697 cat >conftest.$ac_ext <<_ACEOF
4698/* confdefs.h. */
4699_ACEOF
4700cat confdefs.h >>conftest.$ac_ext
4701cat >>conftest.$ac_ext <<_ACEOF
4702/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004703
4704int
4705main ()
4706{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004707int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004708 ;
4709 return 0;
4710}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004711_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004712rm -f conftest.$ac_objext
4713if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004714case "(($ac_try" in
4715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4716 *) ac_try_echo=$ac_try;;
4717esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004719 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004720 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004721 grep -v '^ *+' conftest.er1 >conftest.err
4722 rm -f conftest.er1
4723 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004725 (exit $ac_status); } && {
4726 test -z "$ac_c_werror_flag" ||
4727 test ! -s conftest.err
4728 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004729 ac_cv_no_strict_aliasing_ok=yes
4730else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004731 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004732sed 's/^/| /' conftest.$ac_ext >&5
4733
Gregory P. Smith373469a2009-11-01 21:03:38 +00004734 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004735fi
4736
Gregory P. Smith373469a2009-11-01 21:03:38 +00004737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004738fi
4739
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004740 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004741 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4742echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004743 if test $ac_cv_no_strict_aliasing_ok = yes
4744 then
4745 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4746 fi
4747
4748 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4749 # support. Without this, treatment of subnormals doesn't follow
4750 # the standard.
4751 case $ac_sys_machine in
4752 alpha*)
4753 BASECFLAGS="$BASECFLAGS -mieee"
4754 ;;
4755 esac
4756
4757 case $ac_sys_system in
4758 SCO_SV*)
4759 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4760 ;;
4761 # is there any other compiler on Darwin besides gcc?
4762 Darwin*)
4763 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4764 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004765 if test "${CC}" = gcc
4766 then
4767 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4768echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4769 case "${UNIVERSALSDK}" in
4770 */MacOSX10.4u.sdk)
4771 # Build using 10.4 SDK, force usage of gcc when the
4772 # compiler is gcc, otherwise the user will get very
4773 # confusing error messages when building on OSX 10.6
4774 CC=gcc-4.0
4775 CPP=cpp-4.0
4776 ;;
4777 esac
4778 { echo "$as_me:$LINENO: result: $CC" >&5
4779echo "${ECHO_T}$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004780 fi
4781
4782 # Calculate the right deployment target for this build.
4783 #
4784 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4785 if test ${cur_target} '>' 10.2; then
4786 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004787 if test ${enable_universalsdk}; then
4788 if test "${UNIVERSAL_ARCHS}" = "all"; then
4789 # Ensure that the default platform for a
4790 # 4-way universal build is OSX 10.5,
4791 # that's the first OS release where
4792 # 4-way builds make sense.
4793 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004794
4795 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4796 cur_target='10.5'
4797
4798 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4799 cur_target='10.5'
4800
4801 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4802 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004803 fi
4804 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00004805 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00004806 # On Intel macs default to a deployment
4807 # target of 10.4, that's the first OSX
4808 # release with Intel support.
4809 cur_target="10.4"
4810 fi
4811 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004812 fi
4813 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4814
4815 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4816 # environment with a value that is the same as what we'll use
4817 # in the Makefile to ensure that we'll get the same compiler
4818 # environment during configure and build time.
4819 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4820 export MACOSX_DEPLOYMENT_TARGET
4821 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4822
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004823 if test "${enable_universalsdk}"; then
4824 UNIVERSAL_ARCH_FLAGS=""
4825 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4826 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4827 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00004828 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004829
4830 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4831 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4832 LIPO_32BIT_FLAGS=""
4833 ARCH_RUN_32BIT="true"
4834
4835 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4836 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4837 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004838 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004839
4840 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4841 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4842 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004843 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004844
4845 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4846 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4847 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00004848 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004849
4850 else
4851 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4852echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
4853 { (exit 1); exit 1; }; }
4854
4855 fi
4856
4857
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00004858 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
4859 if test "${UNIVERSALSDK}" != "/"
4860 then
4861 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
4862 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
4863 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004864 fi
4865
4866 fi
4867
4868
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004869 ;;
4870 OSF*)
4871 BASECFLAGS="$BASECFLAGS -mieee"
4872 ;;
4873 esac
4874 ;;
4875
4876*)
4877 case $ac_sys_system in
4878 OpenUNIX*|UnixWare*)
4879 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4880 ;;
4881 OSF*)
4882 BASECFLAGS="$BASECFLAGS -ieee -std"
4883 ;;
4884 SCO_SV*)
4885 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4886 ;;
4887 esac
4888 ;;
4889esac
4890
4891if test "$Py_DEBUG" = 'true'; then
4892 :
4893else
4894 OPT="-DNDEBUG $OPT"
4895fi
4896
4897if test "$ac_arch_flags"
4898then
4899 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4900fi
4901
4902# disable check for icc since it seems to pass, but generates a warning
4903if test "$CC" = icc
4904then
4905 ac_cv_opt_olimit_ok=no
4906fi
4907
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004908{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4909echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004910if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004911 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004912else
4913 ac_save_cc="$CC"
4914CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004915cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004916/* confdefs.h. */
4917_ACEOF
4918cat confdefs.h >>conftest.$ac_ext
4919cat >>conftest.$ac_ext <<_ACEOF
4920/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004921
4922int
4923main ()
4924{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004925int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004926 ;
4927 return 0;
4928}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004929_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004930rm -f conftest.$ac_objext
4931if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004932case "(($ac_try" in
4933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4934 *) ac_try_echo=$ac_try;;
4935esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004937 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004938 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004939 grep -v '^ *+' conftest.er1 >conftest.err
4940 rm -f conftest.er1
4941 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004943 (exit $ac_status); } && {
4944 test -z "$ac_c_werror_flag" ||
4945 test ! -s conftest.err
4946 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004947 ac_cv_opt_olimit_ok=yes
4948else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004949 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004950sed 's/^/| /' conftest.$ac_ext >&5
4951
Gregory P. Smith373469a2009-11-01 21:03:38 +00004952 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004953fi
4954
Gregory P. Smith373469a2009-11-01 21:03:38 +00004955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004956CC="$ac_save_cc"
4957fi
4958
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004959{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4960echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004961if test $ac_cv_opt_olimit_ok = yes; then
4962 case $ac_sys_system in
4963 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4964 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4965 # environment?
4966 Darwin*)
4967 ;;
4968 *)
4969 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4970 ;;
4971 esac
4972else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004973 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4974echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004975 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004976 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004977else
4978 ac_save_cc="$CC"
4979 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004980 cat >conftest.$ac_ext <<_ACEOF
4981/* confdefs.h. */
4982_ACEOF
4983cat confdefs.h >>conftest.$ac_ext
4984cat >>conftest.$ac_ext <<_ACEOF
4985/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004986
4987int
4988main ()
4989{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004990int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004991 ;
4992 return 0;
4993}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004994_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004995rm -f conftest.$ac_objext
4996if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004997case "(($ac_try" in
4998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4999 *) ac_try_echo=$ac_try;;
5000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00005002 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00005004 grep -v '^ *+' conftest.er1 >conftest.err
5005 rm -f conftest.er1
5006 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00005008 (exit $ac_status); } && {
5009 test -z "$ac_c_werror_flag" ||
5010 test ! -s conftest.err
5011 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005012 ac_cv_olimit_ok=yes
5013else
Gregory P. Smith373469a2009-11-01 21:03:38 +00005014 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005015sed 's/^/| /' conftest.$ac_ext >&5
5016
Gregory P. Smith373469a2009-11-01 21:03:38 +00005017 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005018fi
5019
Gregory P. Smith373469a2009-11-01 21:03:38 +00005020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005021 CC="$ac_save_cc"
5022fi
5023
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005024 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5025echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005026 if test $ac_cv_olimit_ok = yes; then
5027 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5028 fi
5029fi
5030
5031# Check whether GCC supports PyArg_ParseTuple format
5032if test "$GCC" = "yes"
5033then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005034 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5035echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005036 save_CFLAGS=$CFLAGS
5037 CFLAGS="$CFLAGS -Werror"
5038 cat >conftest.$ac_ext <<_ACEOF
5039/* confdefs.h. */
5040_ACEOF
5041cat confdefs.h >>conftest.$ac_ext
5042cat >>conftest.$ac_ext <<_ACEOF
5043/* end confdefs.h. */
5044
5045 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5046
5047int
5048main ()
5049{
5050
5051 ;
5052 return 0;
5053}
5054_ACEOF
5055rm -f conftest.$ac_objext
5056if { (ac_try="$ac_compile"
5057case "(($ac_try" in
5058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5059 *) ac_try_echo=$ac_try;;
5060esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005062 (eval "$ac_compile") 2>conftest.er1
5063 ac_status=$?
5064 grep -v '^ *+' conftest.er1 >conftest.err
5065 rm -f conftest.er1
5066 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005068 (exit $ac_status); } && {
5069 test -z "$ac_c_werror_flag" ||
5070 test ! -s conftest.err
5071 } && test -s conftest.$ac_objext; then
5072
5073cat >>confdefs.h <<\_ACEOF
5074#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5075_ACEOF
5076
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005077 { echo "$as_me:$LINENO: result: yes" >&5
5078echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005080 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005081sed 's/^/| /' conftest.$ac_ext >&5
5082
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005083 { echo "$as_me:$LINENO: result: no" >&5
5084echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005085
5086fi
5087
5088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5089 CFLAGS=$save_CFLAGS
5090fi
5091
5092# On some compilers, pthreads are available without further options
5093# (e.g. MacOS X). On some of these systems, the compiler will not
5094# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5095# So we have to see first whether pthreads are available without
5096# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005097{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5098echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005099if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005100 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005101else
5102 if test "$cross_compiling" = yes; then
5103 ac_cv_pthread_is_default=no
5104else
5105 cat >conftest.$ac_ext <<_ACEOF
5106/* confdefs.h. */
5107_ACEOF
5108cat confdefs.h >>conftest.$ac_ext
5109cat >>conftest.$ac_ext <<_ACEOF
5110/* end confdefs.h. */
5111
5112#include <pthread.h>
5113
5114void* routine(void* p){return NULL;}
5115
5116int main(){
5117 pthread_t p;
5118 if(pthread_create(&p,NULL,routine,NULL)!=0)
5119 return 1;
5120 (void)pthread_detach(p);
5121 return 0;
5122}
5123
5124_ACEOF
5125rm -f conftest$ac_exeext
5126if { (ac_try="$ac_link"
5127case "(($ac_try" in
5128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5129 *) ac_try_echo=$ac_try;;
5130esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005132 (eval "$ac_link") 2>&5
5133 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5136 { (case "(($ac_try" in
5137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5138 *) ac_try_echo=$ac_try;;
5139esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141 (eval "$ac_try") 2>&5
5142 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005144 (exit $ac_status); }; }; then
5145
5146 ac_cv_pthread_is_default=yes
5147 ac_cv_kthread=no
5148 ac_cv_pthread=no
5149
5150else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005151 echo "$as_me: program exited with status $ac_status" >&5
5152echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005153sed 's/^/| /' conftest.$ac_ext >&5
5154
5155( exit $ac_status )
5156ac_cv_pthread_is_default=no
5157fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5159fi
5160
5161
5162
5163fi
5164
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005165{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5166echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005167
5168
5169if test $ac_cv_pthread_is_default = yes
5170then
5171 ac_cv_kpthread=no
5172else
5173# -Kpthread, if available, provides the right #defines
5174# and linker options to make pthread_create available
5175# Some compilers won't report that they do not support -Kpthread,
5176# so we need to run a program to see whether it really made the
5177# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005178{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5179echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005180if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005181 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005182else
5183 ac_save_cc="$CC"
5184CC="$CC -Kpthread"
5185if test "$cross_compiling" = yes; then
5186 ac_cv_kpthread=no
5187else
5188 cat >conftest.$ac_ext <<_ACEOF
5189/* confdefs.h. */
5190_ACEOF
5191cat confdefs.h >>conftest.$ac_ext
5192cat >>conftest.$ac_ext <<_ACEOF
5193/* end confdefs.h. */
5194
5195#include <pthread.h>
5196
5197void* routine(void* p){return NULL;}
5198
5199int main(){
5200 pthread_t p;
5201 if(pthread_create(&p,NULL,routine,NULL)!=0)
5202 return 1;
5203 (void)pthread_detach(p);
5204 return 0;
5205}
5206
5207_ACEOF
5208rm -f conftest$ac_exeext
5209if { (ac_try="$ac_link"
5210case "(($ac_try" in
5211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5212 *) ac_try_echo=$ac_try;;
5213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005215 (eval "$ac_link") 2>&5
5216 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5219 { (case "(($ac_try" in
5220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5221 *) ac_try_echo=$ac_try;;
5222esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005224 (eval "$ac_try") 2>&5
5225 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005227 (exit $ac_status); }; }; then
5228 ac_cv_kpthread=yes
5229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005230 echo "$as_me: program exited with status $ac_status" >&5
5231echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005232sed 's/^/| /' conftest.$ac_ext >&5
5233
5234( exit $ac_status )
5235ac_cv_kpthread=no
5236fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5238fi
5239
5240
5241CC="$ac_save_cc"
5242fi
5243
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005244{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5245echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005246fi
5247
5248if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5249then
5250# -Kthread, if available, provides the right #defines
5251# and linker options to make pthread_create available
5252# Some compilers won't report that they do not support -Kthread,
5253# so we need to run a program to see whether it really made the
5254# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005255{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5256echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005257if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005258 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005259else
5260 ac_save_cc="$CC"
5261CC="$CC -Kthread"
5262if test "$cross_compiling" = yes; then
5263 ac_cv_kthread=no
5264else
5265 cat >conftest.$ac_ext <<_ACEOF
5266/* confdefs.h. */
5267_ACEOF
5268cat confdefs.h >>conftest.$ac_ext
5269cat >>conftest.$ac_ext <<_ACEOF
5270/* end confdefs.h. */
5271
5272#include <pthread.h>
5273
5274void* routine(void* p){return NULL;}
5275
5276int main(){
5277 pthread_t p;
5278 if(pthread_create(&p,NULL,routine,NULL)!=0)
5279 return 1;
5280 (void)pthread_detach(p);
5281 return 0;
5282}
5283
5284_ACEOF
5285rm -f conftest$ac_exeext
5286if { (ac_try="$ac_link"
5287case "(($ac_try" in
5288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5289 *) ac_try_echo=$ac_try;;
5290esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005292 (eval "$ac_link") 2>&5
5293 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5296 { (case "(($ac_try" in
5297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5298 *) ac_try_echo=$ac_try;;
5299esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005301 (eval "$ac_try") 2>&5
5302 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005304 (exit $ac_status); }; }; then
5305 ac_cv_kthread=yes
5306else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005307 echo "$as_me: program exited with status $ac_status" >&5
5308echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005309sed 's/^/| /' conftest.$ac_ext >&5
5310
5311( exit $ac_status )
5312ac_cv_kthread=no
5313fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5315fi
5316
5317
5318CC="$ac_save_cc"
5319fi
5320
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005321{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5322echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005323fi
5324
5325if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5326then
5327# -pthread, if available, provides the right #defines
5328# and linker options to make pthread_create available
5329# Some compilers won't report that they do not support -pthread,
5330# so we need to run a program to see whether it really made the
5331# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005332{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5333echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005334if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005335 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005336else
5337 ac_save_cc="$CC"
5338CC="$CC -pthread"
5339if test "$cross_compiling" = yes; then
5340 ac_cv_pthread=no
5341else
5342 cat >conftest.$ac_ext <<_ACEOF
5343/* confdefs.h. */
5344_ACEOF
5345cat confdefs.h >>conftest.$ac_ext
5346cat >>conftest.$ac_ext <<_ACEOF
5347/* end confdefs.h. */
5348
5349#include <pthread.h>
5350
5351void* routine(void* p){return NULL;}
5352
5353int main(){
5354 pthread_t p;
5355 if(pthread_create(&p,NULL,routine,NULL)!=0)
5356 return 1;
5357 (void)pthread_detach(p);
5358 return 0;
5359}
5360
5361_ACEOF
5362rm -f conftest$ac_exeext
5363if { (ac_try="$ac_link"
5364case "(($ac_try" in
5365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5366 *) ac_try_echo=$ac_try;;
5367esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005369 (eval "$ac_link") 2>&5
5370 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005372 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5373 { (case "(($ac_try" in
5374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5375 *) ac_try_echo=$ac_try;;
5376esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378 (eval "$ac_try") 2>&5
5379 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005381 (exit $ac_status); }; }; then
5382 ac_cv_pthread=yes
5383else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005384 echo "$as_me: program exited with status $ac_status" >&5
5385echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005386sed 's/^/| /' conftest.$ac_ext >&5
5387
5388( exit $ac_status )
5389ac_cv_pthread=no
5390fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5392fi
5393
5394
5395CC="$ac_save_cc"
5396fi
5397
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005398{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5399echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005400fi
5401
5402# If we have set a CC compiler flag for thread support then
5403# check if it works for CXX, too.
5404ac_cv_cxx_thread=no
5405if test ! -z "$CXX"
5406then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005407{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5408echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005409ac_save_cxx="$CXX"
5410
5411if test "$ac_cv_kpthread" = "yes"
5412then
5413 CXX="$CXX -Kpthread"
5414 ac_cv_cxx_thread=yes
5415elif test "$ac_cv_kthread" = "yes"
5416then
5417 CXX="$CXX -Kthread"
5418 ac_cv_cxx_thread=yes
5419elif test "$ac_cv_pthread" = "yes"
5420then
5421 CXX="$CXX -pthread"
5422 ac_cv_cxx_thread=yes
5423fi
5424
5425if test $ac_cv_cxx_thread = yes
5426then
5427 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5428 $CXX -c conftest.$ac_ext 2>&5
5429 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5430 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5431 then
5432 ac_cv_cxx_thread=yes
5433 else
5434 ac_cv_cxx_thread=no
5435 fi
5436 rm -fr conftest*
5437fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005438{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5439echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005440fi
5441CXX="$ac_save_cxx"
5442
5443
5444# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005445{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5446echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005447if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005448 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005449else
5450 cat >conftest.$ac_ext <<_ACEOF
5451/* confdefs.h. */
5452_ACEOF
5453cat confdefs.h >>conftest.$ac_ext
5454cat >>conftest.$ac_ext <<_ACEOF
5455/* end confdefs.h. */
5456#include <stdlib.h>
5457#include <stdarg.h>
5458#include <string.h>
5459#include <float.h>
5460
5461int
5462main ()
5463{
5464
5465 ;
5466 return 0;
5467}
5468_ACEOF
5469rm -f conftest.$ac_objext
5470if { (ac_try="$ac_compile"
5471case "(($ac_try" in
5472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5473 *) ac_try_echo=$ac_try;;
5474esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005476 (eval "$ac_compile") 2>conftest.er1
5477 ac_status=$?
5478 grep -v '^ *+' conftest.er1 >conftest.err
5479 rm -f conftest.er1
5480 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005482 (exit $ac_status); } && {
5483 test -z "$ac_c_werror_flag" ||
5484 test ! -s conftest.err
5485 } && test -s conftest.$ac_objext; then
5486 ac_cv_header_stdc=yes
5487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005488 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005489sed 's/^/| /' conftest.$ac_ext >&5
5490
5491 ac_cv_header_stdc=no
5492fi
5493
5494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5495
5496if test $ac_cv_header_stdc = yes; then
5497 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5498 cat >conftest.$ac_ext <<_ACEOF
5499/* confdefs.h. */
5500_ACEOF
5501cat confdefs.h >>conftest.$ac_ext
5502cat >>conftest.$ac_ext <<_ACEOF
5503/* end confdefs.h. */
5504#include <string.h>
5505
5506_ACEOF
5507if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5508 $EGREP "memchr" >/dev/null 2>&1; then
5509 :
5510else
5511 ac_cv_header_stdc=no
5512fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00005513rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005514
5515fi
5516
5517if test $ac_cv_header_stdc = yes; then
5518 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5519 cat >conftest.$ac_ext <<_ACEOF
5520/* confdefs.h. */
5521_ACEOF
5522cat confdefs.h >>conftest.$ac_ext
5523cat >>conftest.$ac_ext <<_ACEOF
5524/* end confdefs.h. */
5525#include <stdlib.h>
5526
5527_ACEOF
5528if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5529 $EGREP "free" >/dev/null 2>&1; then
5530 :
5531else
5532 ac_cv_header_stdc=no
5533fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00005534rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005535
5536fi
5537
5538if test $ac_cv_header_stdc = yes; then
5539 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5540 if test "$cross_compiling" = yes; then
5541 :
5542else
5543 cat >conftest.$ac_ext <<_ACEOF
5544/* confdefs.h. */
5545_ACEOF
5546cat confdefs.h >>conftest.$ac_ext
5547cat >>conftest.$ac_ext <<_ACEOF
5548/* end confdefs.h. */
5549#include <ctype.h>
5550#include <stdlib.h>
5551#if ((' ' & 0x0FF) == 0x020)
5552# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5553# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5554#else
5555# define ISLOWER(c) \
5556 (('a' <= (c) && (c) <= 'i') \
5557 || ('j' <= (c) && (c) <= 'r') \
5558 || ('s' <= (c) && (c) <= 'z'))
5559# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5560#endif
5561
5562#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5563int
5564main ()
5565{
5566 int i;
5567 for (i = 0; i < 256; i++)
5568 if (XOR (islower (i), ISLOWER (i))
5569 || toupper (i) != TOUPPER (i))
5570 return 2;
5571 return 0;
5572}
5573_ACEOF
5574rm -f conftest$ac_exeext
5575if { (ac_try="$ac_link"
5576case "(($ac_try" in
5577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5578 *) ac_try_echo=$ac_try;;
5579esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005581 (eval "$ac_link") 2>&5
5582 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005584 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5585 { (case "(($ac_try" in
5586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5587 *) ac_try_echo=$ac_try;;
5588esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005590 (eval "$ac_try") 2>&5
5591 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005593 (exit $ac_status); }; }; then
5594 :
5595else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005596 echo "$as_me: program exited with status $ac_status" >&5
5597echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005598sed 's/^/| /' conftest.$ac_ext >&5
5599
5600( exit $ac_status )
5601ac_cv_header_stdc=no
5602fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5604fi
5605
5606
5607fi
5608fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005609{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5610echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005611if test $ac_cv_header_stdc = yes; then
5612
5613cat >>confdefs.h <<\_ACEOF
5614#define STDC_HEADERS 1
5615_ACEOF
5616
5617fi
5618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005619# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5630 inttypes.h stdint.h unistd.h
5631do
5632as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5633{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5634echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5635if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5636 echo $ECHO_N "(cached) $ECHO_C" >&6
5637else
5638 cat >conftest.$ac_ext <<_ACEOF
5639/* confdefs.h. */
5640_ACEOF
5641cat confdefs.h >>conftest.$ac_ext
5642cat >>conftest.$ac_ext <<_ACEOF
5643/* end confdefs.h. */
5644$ac_includes_default
5645
5646#include <$ac_header>
5647_ACEOF
5648rm -f conftest.$ac_objext
5649if { (ac_try="$ac_compile"
5650case "(($ac_try" in
5651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5652 *) ac_try_echo=$ac_try;;
5653esac
5654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5655 (eval "$ac_compile") 2>conftest.er1
5656 ac_status=$?
5657 grep -v '^ *+' conftest.er1 >conftest.err
5658 rm -f conftest.er1
5659 cat conftest.err >&5
5660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5661 (exit $ac_status); } && {
5662 test -z "$ac_c_werror_flag" ||
5663 test ! -s conftest.err
5664 } && test -s conftest.$ac_objext; then
5665 eval "$as_ac_Header=yes"
5666else
5667 echo "$as_me: failed program was:" >&5
5668sed 's/^/| /' conftest.$ac_ext >&5
5669
5670 eval "$as_ac_Header=no"
5671fi
5672
5673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674fi
5675ac_res=`eval echo '${'$as_ac_Header'}'`
5676 { echo "$as_me:$LINENO: result: $ac_res" >&5
5677echo "${ECHO_T}$ac_res" >&6; }
5678if test `eval echo '${'$as_ac_Header'}'` = yes; then
5679 cat >>confdefs.h <<_ACEOF
5680#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5681_ACEOF
5682
5683fi
5684
5685done
5686
5687
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005688
Martin v. Löwis11437992002-04-12 09:54:03 +00005689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
Anthony Baxter8a560de2004-10-13 15:30:56 +00005724
Martin v. Löwisc3001752005-01-23 09:27:24 +00005725
Martin v. Löwis11017b12006-01-14 18:12:57 +00005726
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005727
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005728
5729
5730
5731
5732
5733
5734
5735
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005736
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005737
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005738
5739
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005740
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005741
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005742
5743
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005744for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5745fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005746ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005747shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005748unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005749sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5750sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005751sys/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 +00005752sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005753sys/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 +00005754sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005755bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005756do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005757as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005758if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005759 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5760echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005761if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005762 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005763fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005764ac_res=`eval echo '${'$as_ac_Header'}'`
5765 { echo "$as_me:$LINENO: result: $ac_res" >&5
5766echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005767else
Martin v. Löwis11437992002-04-12 09:54:03 +00005768 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005769{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5770echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005771cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005772/* confdefs.h. */
5773_ACEOF
5774cat confdefs.h >>conftest.$ac_ext
5775cat >>conftest.$ac_ext <<_ACEOF
5776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005777$ac_includes_default
5778#include <$ac_header>
5779_ACEOF
5780rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005781if { (ac_try="$ac_compile"
5782case "(($ac_try" in
5783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5784 *) ac_try_echo=$ac_try;;
5785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005789 grep -v '^ *+' conftest.er1 >conftest.err
5790 rm -f conftest.er1
5791 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005793 (exit $ac_status); } && {
5794 test -z "$ac_c_werror_flag" ||
5795 test ! -s conftest.err
5796 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005797 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005798else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005800sed 's/^/| /' conftest.$ac_ext >&5
5801
Martin v. Löwiseba40652007-08-30 20:10:57 +00005802 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005804
5805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005806{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5807echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005808
5809# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005810{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5811echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005812cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005813/* confdefs.h. */
5814_ACEOF
5815cat confdefs.h >>conftest.$ac_ext
5816cat >>conftest.$ac_ext <<_ACEOF
5817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005818#include <$ac_header>
5819_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005820if { (ac_try="$ac_cpp conftest.$ac_ext"
5821case "(($ac_try" in
5822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5823 *) ac_try_echo=$ac_try;;
5824esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005826 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005827 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005828 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005829 rm -f conftest.er1
5830 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005832 (exit $ac_status); } >/dev/null && {
5833 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5834 test ! -s conftest.err
5835 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005836 ac_header_preproc=yes
5837else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005839sed 's/^/| /' conftest.$ac_ext >&5
5840
Martin v. Löwis11437992002-04-12 09:54:03 +00005841 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005843
Martin v. Löwis11437992002-04-12 09:54:03 +00005844rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005845{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5846echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005847
5848# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005849case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5850 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005851 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5852echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5853 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5854echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005855 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005856 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005857 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005858 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5859echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5860 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5861echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5862 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5863echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5864 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5865echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5866 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5867echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5868 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5869echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005871## -------------------------------------- ##
5872## Report this to http://bugs.python.org/ ##
5873## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005874_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005875 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005876 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005877esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005878{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5879echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005880if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005881 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005882else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005883 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005884fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005885ac_res=`eval echo '${'$as_ac_Header'}'`
5886 { echo "$as_me:$LINENO: result: $ac_res" >&5
5887echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005888
5889fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005890if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005891 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005892#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005893_ACEOF
5894
5895fi
5896
Guido van Rossum627b2d71993-12-24 10:39:16 +00005897done
5898
Martin v. Löwis11437992002-04-12 09:54:03 +00005899
5900
5901
5902
5903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005904ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005905for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005906 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5907{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5908echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005909if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005911else
Martin v. Löwis11437992002-04-12 09:54:03 +00005912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005913/* confdefs.h. */
5914_ACEOF
5915cat confdefs.h >>conftest.$ac_ext
5916cat >>conftest.$ac_ext <<_ACEOF
5917/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005918#include <sys/types.h>
5919#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005920
Martin v. Löwis11437992002-04-12 09:54:03 +00005921int
5922main ()
5923{
5924if ((DIR *) 0)
5925return 0;
5926 ;
5927 return 0;
5928}
5929_ACEOF
5930rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931if { (ac_try="$ac_compile"
5932case "(($ac_try" in
5933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5934 *) ac_try_echo=$ac_try;;
5935esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005939 grep -v '^ *+' conftest.er1 >conftest.err
5940 rm -f conftest.er1
5941 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005943 (exit $ac_status); } && {
5944 test -z "$ac_c_werror_flag" ||
5945 test ! -s conftest.err
5946 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005947 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005948else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005950sed 's/^/| /' conftest.$ac_ext >&5
5951
Martin v. Löwiseba40652007-08-30 20:10:57 +00005952 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005954
5955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005956fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005957ac_res=`eval echo '${'$as_ac_Header'}'`
5958 { echo "$as_me:$LINENO: result: $ac_res" >&5
5959echo "${ECHO_T}$ac_res" >&6; }
5960if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005961 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005962#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005963_ACEOF
5964
5965ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005966fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005967
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005968done
5969# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5970if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005971 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5972echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005973if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005974 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005975else
Martin v. Löwis11437992002-04-12 09:54:03 +00005976 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005978/* confdefs.h. */
5979_ACEOF
5980cat confdefs.h >>conftest.$ac_ext
5981cat >>conftest.$ac_ext <<_ACEOF
5982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005983
Martin v. Löwiseba40652007-08-30 20:10:57 +00005984/* Override any GCC internal prototype to avoid an error.
5985 Use char because int might match the return type of a GCC
5986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005987#ifdef __cplusplus
5988extern "C"
5989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005990char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005991int
5992main ()
5993{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005994return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005995 ;
5996 return 0;
5997}
5998_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005999for ac_lib in '' dir; do
6000 if test -z "$ac_lib"; then
6001 ac_res="none required"
6002 else
6003 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006004 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006005 fi
6006 rm -f conftest.$ac_objext conftest$ac_exeext
6007if { (ac_try="$ac_link"
6008case "(($ac_try" in
6009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6010 *) ac_try_echo=$ac_try;;
6011esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006013 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006014 ac_status=$?
6015 grep -v '^ *+' conftest.er1 >conftest.err
6016 rm -f conftest.er1
6017 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006019 (exit $ac_status); } && {
6020 test -z "$ac_c_werror_flag" ||
6021 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006022 } && test -s conftest$ac_exeext &&
6023 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006024 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006025else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006026 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006027sed 's/^/| /' conftest.$ac_ext >&5
6028
Martin v. Löwiseba40652007-08-30 20:10:57 +00006029
Brett Cannon19fab762007-06-02 03:02:29 +00006030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006031
6032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6033 conftest$ac_exeext
6034 if test "${ac_cv_search_opendir+set}" = set; then
6035 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006037done
6038if test "${ac_cv_search_opendir+set}" = set; then
6039 :
6040else
6041 ac_cv_search_opendir=no
6042fi
6043rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006044LIBS=$ac_func_search_save_LIBS
6045fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006046{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6047echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006048ac_res=$ac_cv_search_opendir
6049if test "$ac_res" != no; then
6050 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006052fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006053
Michael W. Hudson54241132001-12-07 15:38:26 +00006054else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006055 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
6056echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006057if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006058 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006059else
6060 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006061cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006062/* confdefs.h. */
6063_ACEOF
6064cat confdefs.h >>conftest.$ac_ext
6065cat >>conftest.$ac_ext <<_ACEOF
6066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006067
Martin v. Löwiseba40652007-08-30 20:10:57 +00006068/* Override any GCC internal prototype to avoid an error.
6069 Use char because int might match the return type of a GCC
6070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006071#ifdef __cplusplus
6072extern "C"
6073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006074char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006075int
6076main ()
6077{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006078return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006079 ;
6080 return 0;
6081}
6082_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006083for ac_lib in '' x; do
6084 if test -z "$ac_lib"; then
6085 ac_res="none required"
6086 else
6087 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006088 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006089 fi
6090 rm -f conftest.$ac_objext conftest$ac_exeext
6091if { (ac_try="$ac_link"
6092case "(($ac_try" in
6093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6094 *) ac_try_echo=$ac_try;;
6095esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006097 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006098 ac_status=$?
6099 grep -v '^ *+' conftest.er1 >conftest.err
6100 rm -f conftest.er1
6101 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006103 (exit $ac_status); } && {
6104 test -z "$ac_c_werror_flag" ||
6105 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006106 } && test -s conftest$ac_exeext &&
6107 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006108 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006109else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006110 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006111sed 's/^/| /' conftest.$ac_ext >&5
6112
Martin v. Löwiseba40652007-08-30 20:10:57 +00006113
Brett Cannon19fab762007-06-02 03:02:29 +00006114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006115
6116rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6117 conftest$ac_exeext
6118 if test "${ac_cv_search_opendir+set}" = set; then
6119 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006121done
6122if test "${ac_cv_search_opendir+set}" = set; then
6123 :
6124else
6125 ac_cv_search_opendir=no
6126fi
6127rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006128LIBS=$ac_func_search_save_LIBS
6129fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006130{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6131echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006132ac_res=$ac_cv_search_opendir
6133if test "$ac_res" != no; then
6134 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006136fi
6137
6138fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006139
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006140{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6141echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006143 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144else
6145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006146/* confdefs.h. */
6147_ACEOF
6148cat confdefs.h >>conftest.$ac_ext
6149cat >>conftest.$ac_ext <<_ACEOF
6150/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006152int
6153main ()
6154{
6155return makedev(0, 0);
6156 ;
6157 return 0;
6158}
6159_ACEOF
6160rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161if { (ac_try="$ac_link"
6162case "(($ac_try" in
6163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6164 *) ac_try_echo=$ac_try;;
6165esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006167 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006169 grep -v '^ *+' conftest.er1 >conftest.err
6170 rm -f conftest.er1
6171 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006173 (exit $ac_status); } && {
6174 test -z "$ac_c_werror_flag" ||
6175 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006176 } && test -s conftest$ac_exeext &&
6177 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178 ac_cv_header_sys_types_h_makedev=yes
6179else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006181sed 's/^/| /' conftest.$ac_ext >&5
6182
Martin v. Löwiseba40652007-08-30 20:10:57 +00006183 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006185
6186rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188
6189fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006190{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6191echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006192
6193if test $ac_cv_header_sys_types_h_makedev = no; then
6194if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006195 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6196echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006198 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006200{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6201echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202else
6203 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006204{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6205echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006207/* confdefs.h. */
6208_ACEOF
6209cat confdefs.h >>conftest.$ac_ext
6210cat >>conftest.$ac_ext <<_ACEOF
6211/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212$ac_includes_default
6213#include <sys/mkdev.h>
6214_ACEOF
6215rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006216if { (ac_try="$ac_compile"
6217case "(($ac_try" in
6218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6219 *) ac_try_echo=$ac_try;;
6220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006224 grep -v '^ *+' conftest.er1 >conftest.err
6225 rm -f conftest.er1
6226 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006228 (exit $ac_status); } && {
6229 test -z "$ac_c_werror_flag" ||
6230 test ! -s conftest.err
6231 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232 ac_header_compiler=yes
6233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006235sed 's/^/| /' conftest.$ac_ext >&5
6236
Martin v. Löwiseba40652007-08-30 20:10:57 +00006237 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006239
6240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006241{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6242echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243
6244# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006245{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6246echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006248/* confdefs.h. */
6249_ACEOF
6250cat confdefs.h >>conftest.$ac_ext
6251cat >>conftest.$ac_ext <<_ACEOF
6252/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253#include <sys/mkdev.h>
6254_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006255if { (ac_try="$ac_cpp conftest.$ac_ext"
6256case "(($ac_try" in
6257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6258 *) ac_try_echo=$ac_try;;
6259esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006261 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006263 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264 rm -f conftest.er1
6265 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267 (exit $ac_status); } >/dev/null && {
6268 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6269 test ! -s conftest.err
6270 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271 ac_header_preproc=yes
6272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006274sed 's/^/| /' conftest.$ac_ext >&5
6275
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276 ac_header_preproc=no
6277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006278
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006280{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6281echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006284case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6285 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006286 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6287echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6288 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6289echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006290 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006291 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006292 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006293 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6294echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6295 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6296echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6297 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6298echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6299 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6300echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6301 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6302echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6303 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6304echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006305 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006306## -------------------------------------- ##
6307## Report this to http://bugs.python.org/ ##
6308## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006309_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006310 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006311 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006312esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006313{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6314echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006316 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317else
6318 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6319fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006320{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6321echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322
6323fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006324if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006325
6326cat >>confdefs.h <<\_ACEOF
6327#define MAJOR_IN_MKDEV 1
6328_ACEOF
6329
6330fi
6331
6332
6333
6334 if test $ac_cv_header_sys_mkdev_h = no; then
6335 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006336 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6337echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006338if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006339 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006340fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006341{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6342echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006343else
6344 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006345{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6346echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006347cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006348/* confdefs.h. */
6349_ACEOF
6350cat confdefs.h >>conftest.$ac_ext
6351cat >>conftest.$ac_ext <<_ACEOF
6352/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006353$ac_includes_default
6354#include <sys/sysmacros.h>
6355_ACEOF
6356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006357if { (ac_try="$ac_compile"
6358case "(($ac_try" in
6359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6360 *) ac_try_echo=$ac_try;;
6361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006365 grep -v '^ *+' conftest.er1 >conftest.err
6366 rm -f conftest.er1
6367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006369 (exit $ac_status); } && {
6370 test -z "$ac_c_werror_flag" ||
6371 test ! -s conftest.err
6372 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006373 ac_header_compiler=yes
6374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006376sed 's/^/| /' conftest.$ac_ext >&5
6377
Martin v. Löwiseba40652007-08-30 20:10:57 +00006378 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006380
6381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006382{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6383echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006384
6385# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006386{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6387echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006389/* confdefs.h. */
6390_ACEOF
6391cat confdefs.h >>conftest.$ac_ext
6392cat >>conftest.$ac_ext <<_ACEOF
6393/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006394#include <sys/sysmacros.h>
6395_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006396if { (ac_try="$ac_cpp conftest.$ac_ext"
6397case "(($ac_try" in
6398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6399 *) ac_try_echo=$ac_try;;
6400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006402 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006403 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006404 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006405 rm -f conftest.er1
6406 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006408 (exit $ac_status); } >/dev/null && {
6409 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6410 test ! -s conftest.err
6411 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006412 ac_header_preproc=yes
6413else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006415sed 's/^/| /' conftest.$ac_ext >&5
6416
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006417 ac_header_preproc=no
6418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006419
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006420rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006421{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6422echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006423
6424# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006425case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6426 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006427 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6428echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6429 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6430echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006431 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006432 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006433 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006434 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6435echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6436 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6437echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6438 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6439echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6440 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6441echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6442 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6443echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6444 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6445echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006446 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006447## -------------------------------------- ##
6448## Report this to http://bugs.python.org/ ##
6449## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006450_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006451 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006452 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006453esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006454{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6455echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006456if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006457 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006458else
6459 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6460fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006461{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6462echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006463
6464fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006465if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006466
6467cat >>confdefs.h <<\_ACEOF
6468#define MAJOR_IN_SYSMACROS 1
6469_ACEOF
6470
6471fi
6472
6473
6474 fi
6475fi
6476
Michael W. Hudson54241132001-12-07 15:38:26 +00006477
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006478# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006479
6480for ac_header in term.h
6481do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006482as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6483{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6484echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006485if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006486 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006487else
6488 cat >conftest.$ac_ext <<_ACEOF
6489/* confdefs.h. */
6490_ACEOF
6491cat confdefs.h >>conftest.$ac_ext
6492cat >>conftest.$ac_ext <<_ACEOF
6493/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006494
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006495#ifdef HAVE_CURSES_H
6496#include <curses.h>
6497#endif
6498
6499
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006500#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006501_ACEOF
6502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006503if { (ac_try="$ac_compile"
6504case "(($ac_try" in
6505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6506 *) ac_try_echo=$ac_try;;
6507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006510 ac_status=$?
6511 grep -v '^ *+' conftest.er1 >conftest.err
6512 rm -f conftest.er1
6513 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006515 (exit $ac_status); } && {
6516 test -z "$ac_c_werror_flag" ||
6517 test ! -s conftest.err
6518 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006519 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006520else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006521 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006522sed 's/^/| /' conftest.$ac_ext >&5
6523
Martin v. Löwiseba40652007-08-30 20:10:57 +00006524 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006526
6527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006528fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006529ac_res=`eval echo '${'$as_ac_Header'}'`
6530 { echo "$as_me:$LINENO: result: $ac_res" >&5
6531echo "${ECHO_T}$ac_res" >&6; }
6532if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006533 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006534#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006535_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006536
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006537fi
6538
6539done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006540
6541
Martin v. Löwis11017b12006-01-14 18:12:57 +00006542# On Linux, netlink.h requires asm/types.h
6543
6544for ac_header in linux/netlink.h
6545do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006546as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6547{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6548echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006549if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006550 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006551else
6552 cat >conftest.$ac_ext <<_ACEOF
6553/* confdefs.h. */
6554_ACEOF
6555cat confdefs.h >>conftest.$ac_ext
6556cat >>conftest.$ac_ext <<_ACEOF
6557/* end confdefs.h. */
6558
6559#ifdef HAVE_ASM_TYPES_H
6560#include <asm/types.h>
6561#endif
6562#ifdef HAVE_SYS_SOCKET_H
6563#include <sys/socket.h>
6564#endif
6565
6566
6567#include <$ac_header>
6568_ACEOF
6569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006570if { (ac_try="$ac_compile"
6571case "(($ac_try" in
6572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6573 *) ac_try_echo=$ac_try;;
6574esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006577 ac_status=$?
6578 grep -v '^ *+' conftest.er1 >conftest.err
6579 rm -f conftest.er1
6580 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006582 (exit $ac_status); } && {
6583 test -z "$ac_c_werror_flag" ||
6584 test ! -s conftest.err
6585 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006586 eval "$as_ac_Header=yes"
6587else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006588 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006589sed 's/^/| /' conftest.$ac_ext >&5
6590
Martin v. Löwiseba40652007-08-30 20:10:57 +00006591 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006593
6594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006595fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006596ac_res=`eval echo '${'$as_ac_Header'}'`
6597 { echo "$as_me:$LINENO: result: $ac_res" >&5
6598echo "${ECHO_T}$ac_res" >&6; }
6599if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006600 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006601#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006602_ACEOF
6603
6604fi
6605
6606done
6607
6608
Guido van Rossum627b2d71993-12-24 10:39:16 +00006609# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006610was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006611{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6612echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006613cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006614/* confdefs.h. */
6615_ACEOF
6616cat confdefs.h >>conftest.$ac_ext
6617cat >>conftest.$ac_ext <<_ACEOF
6618/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006619#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006620
6621_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006623 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006624 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006625else
Martin v. Löwis11437992002-04-12 09:54:03 +00006626
6627
6628cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006629#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006630_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006631
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006632
Guido van Rossum627b2d71993-12-24 10:39:16 +00006633fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00006634rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006635
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006636{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6637echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006638
Neal Norwitz11690112002-07-30 01:08:28 +00006639# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006640{ echo "$as_me:$LINENO: checking for makedev" >&5
6641echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006643/* confdefs.h. */
6644_ACEOF
6645cat confdefs.h >>conftest.$ac_ext
6646cat >>conftest.$ac_ext <<_ACEOF
6647/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006648
6649#if defined(MAJOR_IN_MKDEV)
6650#include <sys/mkdev.h>
6651#elif defined(MAJOR_IN_SYSMACROS)
6652#include <sys/sysmacros.h>
6653#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006654#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006655#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006656int
6657main ()
6658{
6659 makedev(0, 0)
6660 ;
6661 return 0;
6662}
6663_ACEOF
6664rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006665if { (ac_try="$ac_link"
6666case "(($ac_try" in
6667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6668 *) ac_try_echo=$ac_try;;
6669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006671 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006673 grep -v '^ *+' conftest.er1 >conftest.err
6674 rm -f conftest.er1
6675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006677 (exit $ac_status); } && {
6678 test -z "$ac_c_werror_flag" ||
6679 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006680 } && test -s conftest$ac_exeext &&
6681 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006682 ac_cv_has_makedev=yes
6683else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006685sed 's/^/| /' conftest.$ac_ext >&5
6686
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689
6690rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006691 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006692if test "$ac_cv_has_makedev" = "no"; then
6693 # we didn't link, try if _OSF_SOURCE will allow us to link
6694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006695/* confdefs.h. */
6696_ACEOF
6697cat confdefs.h >>conftest.$ac_ext
6698cat >>conftest.$ac_ext <<_ACEOF
6699/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006700
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006701#define _OSF_SOURCE 1
6702#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006703
Neal Norwitz11690112002-07-30 01:08:28 +00006704int
6705main ()
6706{
6707 makedev(0, 0)
6708 ;
6709 return 0;
6710}
6711_ACEOF
6712rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006713if { (ac_try="$ac_link"
6714case "(($ac_try" in
6715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6716 *) ac_try_echo=$ac_try;;
6717esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006719 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006721 grep -v '^ *+' conftest.er1 >conftest.err
6722 rm -f conftest.er1
6723 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006725 (exit $ac_status); } && {
6726 test -z "$ac_c_werror_flag" ||
6727 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006728 } && test -s conftest$ac_exeext &&
6729 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006730 ac_cv_has_makedev=yes
6731else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006733sed 's/^/| /' conftest.$ac_ext >&5
6734
Martin v. Löwiseba40652007-08-30 20:10:57 +00006735 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006737
6738rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006739 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006740 if test "$ac_cv_has_makedev" = "yes"; then
6741
6742cat >>confdefs.h <<\_ACEOF
6743#define _OSF_SOURCE 1
6744_ACEOF
6745
6746 fi
6747fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006748{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6749echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006750if test "$ac_cv_has_makedev" = "yes"; then
6751
6752cat >>confdefs.h <<\_ACEOF
6753#define HAVE_MAKEDEV 1
6754_ACEOF
6755
6756fi
6757
Martin v. Löwis399a6892002-10-04 10:22:02 +00006758# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6759# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6760# defined, but the compiler does not support pragma redefine_extname,
6761# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6762# structures (such as rlimit64) without declaring them. As a
6763# work-around, disable LFS on such configurations
6764
6765use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006766{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6767echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006768cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006769/* confdefs.h. */
6770_ACEOF
6771cat confdefs.h >>conftest.$ac_ext
6772cat >>conftest.$ac_ext <<_ACEOF
6773/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006774
6775#define _LARGEFILE_SOURCE 1
6776#define _FILE_OFFSET_BITS 64
6777#include <sys/resource.h>
6778
Martin v. Löwis399a6892002-10-04 10:22:02 +00006779int
6780main ()
6781{
6782struct rlimit foo;
6783 ;
6784 return 0;
6785}
6786_ACEOF
6787rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006788if { (ac_try="$ac_compile"
6789case "(($ac_try" in
6790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6791 *) ac_try_echo=$ac_try;;
6792esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006796 grep -v '^ *+' conftest.er1 >conftest.err
6797 rm -f conftest.er1
6798 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006800 (exit $ac_status); } && {
6801 test -z "$ac_c_werror_flag" ||
6802 test ! -s conftest.err
6803 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006804 sol_lfs_bug=no
6805else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006807sed 's/^/| /' conftest.$ac_ext >&5
6808
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811
6812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006813{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6814echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006815if test "$sol_lfs_bug" = "yes"; then
6816 use_lfs=no
6817fi
6818
6819if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006820# Two defines needed to enable largefile support on various platforms
6821# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006822
Martin v. Löwis11437992002-04-12 09:54:03 +00006823cat >>confdefs.h <<\_ACEOF
6824#define _LARGEFILE_SOURCE 1
6825_ACEOF
6826
6827
6828cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006829#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006830_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006831
Martin v. Löwis399a6892002-10-04 10:22:02 +00006832fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006833
Guido van Rossum84e7b241996-08-19 21:59:00 +00006834# Add some code to confdefs.h so that the test for off_t works on SCO
6835cat >> confdefs.h <<\EOF
6836#if defined(SCO_DS)
6837#undef _OFF_T
6838#endif
6839EOF
6840
Guido van Rossumef2255b2000-03-10 22:30:29 +00006841# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006842{ echo "$as_me:$LINENO: checking for mode_t" >&5
6843echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006844if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006845 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006846else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006847 cat >conftest.$ac_ext <<_ACEOF
6848/* confdefs.h. */
6849_ACEOF
6850cat confdefs.h >>conftest.$ac_ext
6851cat >>conftest.$ac_ext <<_ACEOF
6852/* end confdefs.h. */
6853$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006854typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006855int
6856main ()
6857{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006858if ((ac__type_new_ *) 0)
6859 return 0;
6860if (sizeof (ac__type_new_))
6861 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006862 ;
6863 return 0;
6864}
6865_ACEOF
6866rm -f conftest.$ac_objext
6867if { (ac_try="$ac_compile"
6868case "(($ac_try" in
6869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6870 *) ac_try_echo=$ac_try;;
6871esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006873 (eval "$ac_compile") 2>conftest.er1
6874 ac_status=$?
6875 grep -v '^ *+' conftest.er1 >conftest.err
6876 rm -f conftest.er1
6877 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006879 (exit $ac_status); } && {
6880 test -z "$ac_c_werror_flag" ||
6881 test ! -s conftest.err
6882 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006883 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006884else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006886sed 's/^/| /' conftest.$ac_ext >&5
6887
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006888 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006890
6891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006892fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006893{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6894echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6895if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006896 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006897else
Martin v. Löwis11437992002-04-12 09:54:03 +00006898
6899cat >>confdefs.h <<_ACEOF
6900#define mode_t int
6901_ACEOF
6902
6903fi
6904
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006905{ echo "$as_me:$LINENO: checking for off_t" >&5
6906echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006907if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006908 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006909else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006910 cat >conftest.$ac_ext <<_ACEOF
6911/* confdefs.h. */
6912_ACEOF
6913cat confdefs.h >>conftest.$ac_ext
6914cat >>conftest.$ac_ext <<_ACEOF
6915/* end confdefs.h. */
6916$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006917typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006918int
6919main ()
6920{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006921if ((ac__type_new_ *) 0)
6922 return 0;
6923if (sizeof (ac__type_new_))
6924 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006925 ;
6926 return 0;
6927}
6928_ACEOF
6929rm -f conftest.$ac_objext
6930if { (ac_try="$ac_compile"
6931case "(($ac_try" in
6932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6933 *) ac_try_echo=$ac_try;;
6934esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006936 (eval "$ac_compile") 2>conftest.er1
6937 ac_status=$?
6938 grep -v '^ *+' conftest.er1 >conftest.err
6939 rm -f conftest.er1
6940 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006942 (exit $ac_status); } && {
6943 test -z "$ac_c_werror_flag" ||
6944 test ! -s conftest.err
6945 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006946 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006947else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006949sed 's/^/| /' conftest.$ac_ext >&5
6950
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006951 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006953
6954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006955fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006956{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6957echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6958if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006959 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006960else
Martin v. Löwis11437992002-04-12 09:54:03 +00006961
6962cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006963#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006964_ACEOF
6965
6966fi
6967
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006968{ echo "$as_me:$LINENO: checking for pid_t" >&5
6969echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006970if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006971 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006972else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006973 cat >conftest.$ac_ext <<_ACEOF
6974/* confdefs.h. */
6975_ACEOF
6976cat confdefs.h >>conftest.$ac_ext
6977cat >>conftest.$ac_ext <<_ACEOF
6978/* end confdefs.h. */
6979$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006980typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006981int
6982main ()
6983{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006984if ((ac__type_new_ *) 0)
6985 return 0;
6986if (sizeof (ac__type_new_))
6987 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006988 ;
6989 return 0;
6990}
6991_ACEOF
6992rm -f conftest.$ac_objext
6993if { (ac_try="$ac_compile"
6994case "(($ac_try" in
6995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6996 *) ac_try_echo=$ac_try;;
6997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006999 (eval "$ac_compile") 2>conftest.er1
7000 ac_status=$?
7001 grep -v '^ *+' conftest.er1 >conftest.err
7002 rm -f conftest.er1
7003 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007005 (exit $ac_status); } && {
7006 test -z "$ac_c_werror_flag" ||
7007 test ! -s conftest.err
7008 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007009 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007012sed 's/^/| /' conftest.$ac_ext >&5
7013
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007014 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007016
7017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007018fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007019{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7020echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
7021if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007022 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007023else
Martin v. Löwis11437992002-04-12 09:54:03 +00007024
7025cat >>confdefs.h <<_ACEOF
7026#define pid_t int
7027_ACEOF
7028
7029fi
7030
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007031{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7032echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007033if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007034 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007035else
7036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007037/* confdefs.h. */
7038_ACEOF
7039cat confdefs.h >>conftest.$ac_ext
7040cat >>conftest.$ac_ext <<_ACEOF
7041/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007042#include <sys/types.h>
7043#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007044
Martin v. Löwis11437992002-04-12 09:54:03 +00007045int
7046main ()
7047{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007048return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007049 ;
7050 return 0;
7051}
7052_ACEOF
7053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007054if { (ac_try="$ac_compile"
7055case "(($ac_try" in
7056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7057 *) ac_try_echo=$ac_try;;
7058esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007062 grep -v '^ *+' conftest.er1 >conftest.err
7063 rm -f conftest.er1
7064 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007066 (exit $ac_status); } && {
7067 test -z "$ac_c_werror_flag" ||
7068 test ! -s conftest.err
7069 } && test -s conftest.$ac_objext; then
7070 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007071else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007073sed 's/^/| /' conftest.$ac_ext >&5
7074
Martin v. Löwiseba40652007-08-30 20:10:57 +00007075 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007077
7078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007080{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7081echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007082
Martin v. Löwis11437992002-04-12 09:54:03 +00007083cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007084#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007085_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007086
Michael W. Hudson54241132001-12-07 15:38:26 +00007087
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007088{ echo "$as_me:$LINENO: checking for size_t" >&5
7089echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007090if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007092else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007093 cat >conftest.$ac_ext <<_ACEOF
7094/* confdefs.h. */
7095_ACEOF
7096cat confdefs.h >>conftest.$ac_ext
7097cat >>conftest.$ac_ext <<_ACEOF
7098/* end confdefs.h. */
7099$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007100typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007101int
7102main ()
7103{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007104if ((ac__type_new_ *) 0)
7105 return 0;
7106if (sizeof (ac__type_new_))
7107 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007108 ;
7109 return 0;
7110}
7111_ACEOF
7112rm -f conftest.$ac_objext
7113if { (ac_try="$ac_compile"
7114case "(($ac_try" in
7115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7116 *) ac_try_echo=$ac_try;;
7117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007119 (eval "$ac_compile") 2>conftest.er1
7120 ac_status=$?
7121 grep -v '^ *+' conftest.er1 >conftest.err
7122 rm -f conftest.er1
7123 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007125 (exit $ac_status); } && {
7126 test -z "$ac_c_werror_flag" ||
7127 test ! -s conftest.err
7128 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007129 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007130else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007132sed 's/^/| /' conftest.$ac_ext >&5
7133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007134 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007136
7137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007138fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007139{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7140echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7141if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007142 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007143else
Martin v. Löwis11437992002-04-12 09:54:03 +00007144
7145cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007146#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007147_ACEOF
7148
7149fi
7150
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007151{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7152echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007153if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007154 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007155else
7156 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007157/* confdefs.h. */
7158_ACEOF
7159cat confdefs.h >>conftest.$ac_ext
7160cat >>conftest.$ac_ext <<_ACEOF
7161/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007162#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007163
7164_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007166 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007167 ac_cv_type_uid_t=yes
7168else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007169 ac_cv_type_uid_t=no
7170fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00007171rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007173fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007174{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7175echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007176if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007177
Martin v. Löwis11437992002-04-12 09:54:03 +00007178cat >>confdefs.h <<\_ACEOF
7179#define uid_t int
7180_ACEOF
7181
7182
7183cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007184#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007185_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007186
7187fi
7188
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007189
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007190 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7191echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007192if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007193 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007194else
7195 ac_cv_c_uint32_t=no
7196 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7197 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7198 cat >conftest.$ac_ext <<_ACEOF
7199/* confdefs.h. */
7200_ACEOF
7201cat confdefs.h >>conftest.$ac_ext
7202cat >>conftest.$ac_ext <<_ACEOF
7203/* end confdefs.h. */
7204$ac_includes_default
7205int
7206main ()
7207{
7208static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7209test_array [0] = 0
7210
7211 ;
7212 return 0;
7213}
7214_ACEOF
7215rm -f conftest.$ac_objext
7216if { (ac_try="$ac_compile"
7217case "(($ac_try" in
7218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7219 *) ac_try_echo=$ac_try;;
7220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007222 (eval "$ac_compile") 2>conftest.er1
7223 ac_status=$?
7224 grep -v '^ *+' conftest.er1 >conftest.err
7225 rm -f conftest.er1
7226 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007228 (exit $ac_status); } && {
7229 test -z "$ac_c_werror_flag" ||
7230 test ! -s conftest.err
7231 } && test -s conftest.$ac_objext; then
7232 case $ac_type in
7233 uint32_t) ac_cv_c_uint32_t=yes ;;
7234 *) ac_cv_c_uint32_t=$ac_type ;;
7235esac
7236
7237else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007238 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007239sed 's/^/| /' conftest.$ac_ext >&5
7240
7241
7242fi
7243
7244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7245 test "$ac_cv_c_uint32_t" != no && break
7246 done
7247fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007248{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7249echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007250 case $ac_cv_c_uint32_t in #(
7251 no|yes) ;; #(
7252 *)
7253
7254cat >>confdefs.h <<\_ACEOF
7255#define _UINT32_T 1
7256_ACEOF
7257
7258
7259cat >>confdefs.h <<_ACEOF
7260#define uint32_t $ac_cv_c_uint32_t
7261_ACEOF
7262;;
7263 esac
7264
7265
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007266 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7267echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007268if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007269 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007270else
7271 ac_cv_c_uint64_t=no
7272 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7273 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7274 cat >conftest.$ac_ext <<_ACEOF
7275/* confdefs.h. */
7276_ACEOF
7277cat confdefs.h >>conftest.$ac_ext
7278cat >>conftest.$ac_ext <<_ACEOF
7279/* end confdefs.h. */
7280$ac_includes_default
7281int
7282main ()
7283{
7284static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7285test_array [0] = 0
7286
7287 ;
7288 return 0;
7289}
7290_ACEOF
7291rm -f conftest.$ac_objext
7292if { (ac_try="$ac_compile"
7293case "(($ac_try" in
7294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7295 *) ac_try_echo=$ac_try;;
7296esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007298 (eval "$ac_compile") 2>conftest.er1
7299 ac_status=$?
7300 grep -v '^ *+' conftest.er1 >conftest.err
7301 rm -f conftest.er1
7302 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007304 (exit $ac_status); } && {
7305 test -z "$ac_c_werror_flag" ||
7306 test ! -s conftest.err
7307 } && test -s conftest.$ac_objext; then
7308 case $ac_type in
7309 uint64_t) ac_cv_c_uint64_t=yes ;;
7310 *) ac_cv_c_uint64_t=$ac_type ;;
7311esac
7312
7313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007314 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007315sed 's/^/| /' conftest.$ac_ext >&5
7316
7317
7318fi
7319
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7321 test "$ac_cv_c_uint64_t" != no && break
7322 done
7323fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007324{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7325echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007326 case $ac_cv_c_uint64_t in #(
7327 no|yes) ;; #(
7328 *)
7329
7330cat >>confdefs.h <<\_ACEOF
7331#define _UINT64_T 1
7332_ACEOF
7333
7334
7335cat >>confdefs.h <<_ACEOF
7336#define uint64_t $ac_cv_c_uint64_t
7337_ACEOF
7338;;
7339 esac
7340
7341
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007342 { echo "$as_me:$LINENO: checking for int32_t" >&5
7343echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007344if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007345 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007346else
7347 ac_cv_c_int32_t=no
7348 for ac_type in 'int32_t' 'int' 'long int' \
7349 'long long int' 'short int' 'signed char'; do
7350 cat >conftest.$ac_ext <<_ACEOF
7351/* confdefs.h. */
7352_ACEOF
7353cat confdefs.h >>conftest.$ac_ext
7354cat >>conftest.$ac_ext <<_ACEOF
7355/* end confdefs.h. */
7356$ac_includes_default
7357int
7358main ()
7359{
7360static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7361test_array [0] = 0
7362
7363 ;
7364 return 0;
7365}
7366_ACEOF
7367rm -f conftest.$ac_objext
7368if { (ac_try="$ac_compile"
7369case "(($ac_try" in
7370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7371 *) ac_try_echo=$ac_try;;
7372esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007374 (eval "$ac_compile") 2>conftest.er1
7375 ac_status=$?
7376 grep -v '^ *+' conftest.er1 >conftest.err
7377 rm -f conftest.er1
7378 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007380 (exit $ac_status); } && {
7381 test -z "$ac_c_werror_flag" ||
7382 test ! -s conftest.err
7383 } && test -s conftest.$ac_objext; then
7384 cat >conftest.$ac_ext <<_ACEOF
7385/* confdefs.h. */
7386_ACEOF
7387cat confdefs.h >>conftest.$ac_ext
7388cat >>conftest.$ac_ext <<_ACEOF
7389/* end confdefs.h. */
7390$ac_includes_default
7391int
7392main ()
7393{
7394static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007395 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007396test_array [0] = 0
7397
7398 ;
7399 return 0;
7400}
7401_ACEOF
7402rm -f conftest.$ac_objext
7403if { (ac_try="$ac_compile"
7404case "(($ac_try" in
7405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7406 *) ac_try_echo=$ac_try;;
7407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007409 (eval "$ac_compile") 2>conftest.er1
7410 ac_status=$?
7411 grep -v '^ *+' conftest.er1 >conftest.err
7412 rm -f conftest.er1
7413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007415 (exit $ac_status); } && {
7416 test -z "$ac_c_werror_flag" ||
7417 test ! -s conftest.err
7418 } && test -s conftest.$ac_objext; then
7419 :
7420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007421 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007422sed 's/^/| /' conftest.$ac_ext >&5
7423
7424 case $ac_type in
7425 int32_t) ac_cv_c_int32_t=yes ;;
7426 *) ac_cv_c_int32_t=$ac_type ;;
7427esac
7428
7429fi
7430
7431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007433 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007434sed 's/^/| /' conftest.$ac_ext >&5
7435
7436
7437fi
7438
7439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7440 test "$ac_cv_c_int32_t" != no && break
7441 done
7442fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007443{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7444echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007445 case $ac_cv_c_int32_t in #(
7446 no|yes) ;; #(
7447 *)
7448
7449cat >>confdefs.h <<_ACEOF
7450#define int32_t $ac_cv_c_int32_t
7451_ACEOF
7452;;
7453 esac
7454
7455
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007456 { echo "$as_me:$LINENO: checking for int64_t" >&5
7457echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007458if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007459 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007460else
7461 ac_cv_c_int64_t=no
7462 for ac_type in 'int64_t' 'int' 'long int' \
7463 'long long int' 'short int' 'signed char'; do
7464 cat >conftest.$ac_ext <<_ACEOF
7465/* confdefs.h. */
7466_ACEOF
7467cat confdefs.h >>conftest.$ac_ext
7468cat >>conftest.$ac_ext <<_ACEOF
7469/* end confdefs.h. */
7470$ac_includes_default
7471int
7472main ()
7473{
7474static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7475test_array [0] = 0
7476
7477 ;
7478 return 0;
7479}
7480_ACEOF
7481rm -f conftest.$ac_objext
7482if { (ac_try="$ac_compile"
7483case "(($ac_try" in
7484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7485 *) ac_try_echo=$ac_try;;
7486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007488 (eval "$ac_compile") 2>conftest.er1
7489 ac_status=$?
7490 grep -v '^ *+' conftest.er1 >conftest.err
7491 rm -f conftest.er1
7492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007494 (exit $ac_status); } && {
7495 test -z "$ac_c_werror_flag" ||
7496 test ! -s conftest.err
7497 } && test -s conftest.$ac_objext; then
7498 cat >conftest.$ac_ext <<_ACEOF
7499/* confdefs.h. */
7500_ACEOF
7501cat confdefs.h >>conftest.$ac_ext
7502cat >>conftest.$ac_ext <<_ACEOF
7503/* end confdefs.h. */
7504$ac_includes_default
7505int
7506main ()
7507{
7508static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007509 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007510test_array [0] = 0
7511
7512 ;
7513 return 0;
7514}
7515_ACEOF
7516rm -f conftest.$ac_objext
7517if { (ac_try="$ac_compile"
7518case "(($ac_try" in
7519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7520 *) ac_try_echo=$ac_try;;
7521esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007523 (eval "$ac_compile") 2>conftest.er1
7524 ac_status=$?
7525 grep -v '^ *+' conftest.er1 >conftest.err
7526 rm -f conftest.er1
7527 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007529 (exit $ac_status); } && {
7530 test -z "$ac_c_werror_flag" ||
7531 test ! -s conftest.err
7532 } && test -s conftest.$ac_objext; then
7533 :
7534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007535 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007536sed 's/^/| /' conftest.$ac_ext >&5
7537
7538 case $ac_type in
7539 int64_t) ac_cv_c_int64_t=yes ;;
7540 *) ac_cv_c_int64_t=$ac_type ;;
7541esac
7542
7543fi
7544
7545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007547 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007548sed 's/^/| /' conftest.$ac_ext >&5
7549
7550
7551fi
7552
7553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7554 test "$ac_cv_c_int64_t" != no && break
7555 done
7556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007557{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7558echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007559 case $ac_cv_c_int64_t in #(
7560 no|yes) ;; #(
7561 *)
7562
7563cat >>confdefs.h <<_ACEOF
7564#define int64_t $ac_cv_c_int64_t
7565_ACEOF
7566;;
7567 esac
7568
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007569{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7570echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007571if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007572 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007573else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007574 cat >conftest.$ac_ext <<_ACEOF
7575/* confdefs.h. */
7576_ACEOF
7577cat confdefs.h >>conftest.$ac_ext
7578cat >>conftest.$ac_ext <<_ACEOF
7579/* end confdefs.h. */
7580$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007581typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007582int
7583main ()
7584{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007585if ((ac__type_new_ *) 0)
7586 return 0;
7587if (sizeof (ac__type_new_))
7588 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest.$ac_objext
7594if { (ac_try="$ac_compile"
7595case "(($ac_try" in
7596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7597 *) ac_try_echo=$ac_try;;
7598esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007600 (eval "$ac_compile") 2>conftest.er1
7601 ac_status=$?
7602 grep -v '^ *+' conftest.er1 >conftest.err
7603 rm -f conftest.er1
7604 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007606 (exit $ac_status); } && {
7607 test -z "$ac_c_werror_flag" ||
7608 test ! -s conftest.err
7609 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007610 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007612 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007613sed 's/^/| /' conftest.$ac_ext >&5
7614
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007615 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007617
7618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007619fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007620{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7621echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7622if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007623
7624cat >>confdefs.h <<\_ACEOF
7625#define HAVE_SSIZE_T 1
7626_ACEOF
7627
7628fi
7629
Jack Jansendd19cf82001-12-06 22:36:17 +00007630
Michael W. Hudson54241132001-12-07 15:38:26 +00007631# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007632# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007633{ echo "$as_me:$LINENO: checking for int" >&5
7634echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7635if test "${ac_cv_type_int+set}" = set; then
7636 echo $ECHO_N "(cached) $ECHO_C" >&6
7637else
7638 cat >conftest.$ac_ext <<_ACEOF
7639/* confdefs.h. */
7640_ACEOF
7641cat confdefs.h >>conftest.$ac_ext
7642cat >>conftest.$ac_ext <<_ACEOF
7643/* end confdefs.h. */
7644$ac_includes_default
7645typedef int ac__type_new_;
7646int
7647main ()
7648{
7649if ((ac__type_new_ *) 0)
7650 return 0;
7651if (sizeof (ac__type_new_))
7652 return 0;
7653 ;
7654 return 0;
7655}
7656_ACEOF
7657rm -f conftest.$ac_objext
7658if { (ac_try="$ac_compile"
7659case "(($ac_try" in
7660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7661 *) ac_try_echo=$ac_try;;
7662esac
7663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7664 (eval "$ac_compile") 2>conftest.er1
7665 ac_status=$?
7666 grep -v '^ *+' conftest.er1 >conftest.err
7667 rm -f conftest.er1
7668 cat conftest.err >&5
7669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7670 (exit $ac_status); } && {
7671 test -z "$ac_c_werror_flag" ||
7672 test ! -s conftest.err
7673 } && test -s conftest.$ac_objext; then
7674 ac_cv_type_int=yes
7675else
7676 echo "$as_me: failed program was:" >&5
7677sed 's/^/| /' conftest.$ac_ext >&5
7678
7679 ac_cv_type_int=no
7680fi
7681
7682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7683fi
7684{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7685echo "${ECHO_T}$ac_cv_type_int" >&6; }
7686
Martin v. Löwiseba40652007-08-30 20:10:57 +00007687# The cast to long int works around a bug in the HP C Compiler
7688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7690# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007691{ echo "$as_me:$LINENO: checking size of int" >&5
7692echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007693if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007694 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007695else
Martin v. Löwis11437992002-04-12 09:54:03 +00007696 if test "$cross_compiling" = yes; then
7697 # Depending upon the size, compute the lo and hi bounds.
7698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007699/* confdefs.h. */
7700_ACEOF
7701cat confdefs.h >>conftest.$ac_ext
7702cat >>conftest.$ac_ext <<_ACEOF
7703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007704$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007705 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007706int
7707main ()
7708{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007709static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007710test_array [0] = 0
7711
7712 ;
7713 return 0;
7714}
7715_ACEOF
7716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717if { (ac_try="$ac_compile"
7718case "(($ac_try" in
7719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7720 *) ac_try_echo=$ac_try;;
7721esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007725 grep -v '^ *+' conftest.er1 >conftest.err
7726 rm -f conftest.er1
7727 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007729 (exit $ac_status); } && {
7730 test -z "$ac_c_werror_flag" ||
7731 test ! -s conftest.err
7732 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007733 ac_lo=0 ac_mid=0
7734 while :; do
7735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007736/* confdefs.h. */
7737_ACEOF
7738cat confdefs.h >>conftest.$ac_ext
7739cat >>conftest.$ac_ext <<_ACEOF
7740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007741$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007742 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007743int
7744main ()
7745{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007746static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007747test_array [0] = 0
7748
7749 ;
7750 return 0;
7751}
7752_ACEOF
7753rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754if { (ac_try="$ac_compile"
7755case "(($ac_try" in
7756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7757 *) ac_try_echo=$ac_try;;
7758esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007762 grep -v '^ *+' conftest.er1 >conftest.err
7763 rm -f conftest.er1
7764 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766 (exit $ac_status); } && {
7767 test -z "$ac_c_werror_flag" ||
7768 test ! -s conftest.err
7769 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 ac_hi=$ac_mid; break
7771else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007773sed 's/^/| /' conftest.$ac_ext >&5
7774
Martin v. Löwiseba40652007-08-30 20:10:57 +00007775 ac_lo=`expr $ac_mid + 1`
7776 if test $ac_lo -le $ac_mid; then
7777 ac_lo= ac_hi=
7778 break
7779 fi
7780 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007782
7783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007784 done
7785else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007787sed 's/^/| /' conftest.$ac_ext >&5
7788
Martin v. Löwiseba40652007-08-30 20:10:57 +00007789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* confdefs.h. */
7791_ACEOF
7792cat confdefs.h >>conftest.$ac_ext
7793cat >>conftest.$ac_ext <<_ACEOF
7794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007796 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007797int
7798main ()
7799{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007801test_array [0] = 0
7802
7803 ;
7804 return 0;
7805}
7806_ACEOF
7807rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007808if { (ac_try="$ac_compile"
7809case "(($ac_try" in
7810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7811 *) ac_try_echo=$ac_try;;
7812esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007816 grep -v '^ *+' conftest.er1 >conftest.err
7817 rm -f conftest.er1
7818 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007820 (exit $ac_status); } && {
7821 test -z "$ac_c_werror_flag" ||
7822 test ! -s conftest.err
7823 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_hi=-1 ac_mid=-1
7825 while :; do
7826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007827/* confdefs.h. */
7828_ACEOF
7829cat confdefs.h >>conftest.$ac_ext
7830cat >>conftest.$ac_ext <<_ACEOF
7831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007832$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007833 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007834int
7835main ()
7836{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007837static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007838test_array [0] = 0
7839
7840 ;
7841 return 0;
7842}
7843_ACEOF
7844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007845if { (ac_try="$ac_compile"
7846case "(($ac_try" in
7847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7848 *) ac_try_echo=$ac_try;;
7849esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007853 grep -v '^ *+' conftest.er1 >conftest.err
7854 rm -f conftest.er1
7855 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007857 (exit $ac_status); } && {
7858 test -z "$ac_c_werror_flag" ||
7859 test ! -s conftest.err
7860 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ac_lo=$ac_mid; break
7862else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007864sed 's/^/| /' conftest.$ac_ext >&5
7865
Martin v. Löwiseba40652007-08-30 20:10:57 +00007866 ac_hi=`expr '(' $ac_mid ')' - 1`
7867 if test $ac_mid -le $ac_hi; then
7868 ac_lo= ac_hi=
7869 break
7870 fi
7871 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007873
7874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 done
7876else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007878sed 's/^/| /' conftest.$ac_ext >&5
7879
Martin v. Löwiseba40652007-08-30 20:10:57 +00007880 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007882
7883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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 +00007887# Binary search between lo and hi bounds.
7888while test "x$ac_lo" != "x$ac_hi"; do
7889 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007891/* confdefs.h. */
7892_ACEOF
7893cat confdefs.h >>conftest.$ac_ext
7894cat >>conftest.$ac_ext <<_ACEOF
7895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007896$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007897 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007898int
7899main ()
7900{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007901static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007902test_array [0] = 0
7903
7904 ;
7905 return 0;
7906}
7907_ACEOF
7908rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909if { (ac_try="$ac_compile"
7910case "(($ac_try" in
7911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7912 *) ac_try_echo=$ac_try;;
7913esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007917 grep -v '^ *+' conftest.er1 >conftest.err
7918 rm -f conftest.er1
7919 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007921 (exit $ac_status); } && {
7922 test -z "$ac_c_werror_flag" ||
7923 test ! -s conftest.err
7924 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 ac_hi=$ac_mid
7926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007928sed 's/^/| /' conftest.$ac_ext >&5
7929
Martin v. Löwiseba40652007-08-30 20:10:57 +00007930 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932
7933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007934done
7935case $ac_lo in
7936?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007937'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007938 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007939See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007940echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007941See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007942 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007943 else
7944 ac_cv_sizeof_int=0
7945 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007946esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007947else
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007949/* confdefs.h. */
7950_ACEOF
7951cat confdefs.h >>conftest.$ac_ext
7952cat >>conftest.$ac_ext <<_ACEOF
7953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007954$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007955 typedef int ac__type_sizeof_;
7956static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7957static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007958#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007959#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007960int
7961main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007962{
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
7964 FILE *f = fopen ("conftest.val", "w");
7965 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007966 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007967 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007969 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007970 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007971 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007972 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 }
7974 else
7975 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007976 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007977 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007978 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007979 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007982
7983 ;
7984 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007985}
Martin v. Löwis11437992002-04-12 09:54:03 +00007986_ACEOF
7987rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007988if { (ac_try="$ac_link"
7989case "(($ac_try" in
7990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7991 *) ac_try_echo=$ac_try;;
7992esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007994 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007998 { (case "(($ac_try" in
7999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8000 *) ac_try_echo=$ac_try;;
8001esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008003 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 (exit $ac_status); }; }; then
8007 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008008else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008009 echo "$as_me: program exited with status $ac_status" >&5
8010echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008011sed 's/^/| /' conftest.$ac_ext >&5
8012
Martin v. Löwis11437992002-04-12 09:54:03 +00008013( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008014if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008015 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008016See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008017echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008018See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008019 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008020 else
8021 ac_cv_sizeof_int=0
8022 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008024rm -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 +00008025fi
8026rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008027fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008028{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8029echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008030
8031
8032
Martin v. Löwis11437992002-04-12 09:54:03 +00008033cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008034#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008035_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008036
8037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008038{ echo "$as_me:$LINENO: checking for long" >&5
8039echo $ECHO_N "checking for long... $ECHO_C" >&6; }
8040if test "${ac_cv_type_long+set}" = set; then
8041 echo $ECHO_N "(cached) $ECHO_C" >&6
8042else
8043 cat >conftest.$ac_ext <<_ACEOF
8044/* confdefs.h. */
8045_ACEOF
8046cat confdefs.h >>conftest.$ac_ext
8047cat >>conftest.$ac_ext <<_ACEOF
8048/* end confdefs.h. */
8049$ac_includes_default
8050typedef long ac__type_new_;
8051int
8052main ()
8053{
8054if ((ac__type_new_ *) 0)
8055 return 0;
8056if (sizeof (ac__type_new_))
8057 return 0;
8058 ;
8059 return 0;
8060}
8061_ACEOF
8062rm -f conftest.$ac_objext
8063if { (ac_try="$ac_compile"
8064case "(($ac_try" in
8065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8066 *) ac_try_echo=$ac_try;;
8067esac
8068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8069 (eval "$ac_compile") 2>conftest.er1
8070 ac_status=$?
8071 grep -v '^ *+' conftest.er1 >conftest.err
8072 rm -f conftest.er1
8073 cat conftest.err >&5
8074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8075 (exit $ac_status); } && {
8076 test -z "$ac_c_werror_flag" ||
8077 test ! -s conftest.err
8078 } && test -s conftest.$ac_objext; then
8079 ac_cv_type_long=yes
8080else
8081 echo "$as_me: failed program was:" >&5
8082sed 's/^/| /' conftest.$ac_ext >&5
8083
8084 ac_cv_type_long=no
8085fi
8086
8087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8088fi
8089{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8090echo "${ECHO_T}$ac_cv_type_long" >&6; }
8091
Martin v. Löwiseba40652007-08-30 20:10:57 +00008092# The cast to long int works around a bug in the HP C Compiler
8093# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8094# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8095# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008096{ echo "$as_me:$LINENO: checking size of long" >&5
8097echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008098if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008099 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008100else
Martin v. Löwis11437992002-04-12 09:54:03 +00008101 if test "$cross_compiling" = yes; then
8102 # Depending upon the size, compute the lo and hi bounds.
8103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008104/* confdefs.h. */
8105_ACEOF
8106cat confdefs.h >>conftest.$ac_ext
8107cat >>conftest.$ac_ext <<_ACEOF
8108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008109$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008110 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008111int
8112main ()
8113{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008114static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008115test_array [0] = 0
8116
8117 ;
8118 return 0;
8119}
8120_ACEOF
8121rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122if { (ac_try="$ac_compile"
8123case "(($ac_try" in
8124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8125 *) ac_try_echo=$ac_try;;
8126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008130 grep -v '^ *+' conftest.er1 >conftest.err
8131 rm -f conftest.er1
8132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008134 (exit $ac_status); } && {
8135 test -z "$ac_c_werror_flag" ||
8136 test ! -s conftest.err
8137 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ac_lo=0 ac_mid=0
8139 while :; do
8140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008141/* confdefs.h. */
8142_ACEOF
8143cat confdefs.h >>conftest.$ac_ext
8144cat >>conftest.$ac_ext <<_ACEOF
8145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008146$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008147 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008148int
8149main ()
8150{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008152test_array [0] = 0
8153
8154 ;
8155 return 0;
8156}
8157_ACEOF
8158rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008159if { (ac_try="$ac_compile"
8160case "(($ac_try" in
8161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8162 *) ac_try_echo=$ac_try;;
8163esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008167 grep -v '^ *+' conftest.er1 >conftest.err
8168 rm -f conftest.er1
8169 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171 (exit $ac_status); } && {
8172 test -z "$ac_c_werror_flag" ||
8173 test ! -s conftest.err
8174 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008175 ac_hi=$ac_mid; break
8176else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008178sed 's/^/| /' conftest.$ac_ext >&5
8179
Martin v. Löwiseba40652007-08-30 20:10:57 +00008180 ac_lo=`expr $ac_mid + 1`
8181 if test $ac_lo -le $ac_mid; then
8182 ac_lo= ac_hi=
8183 break
8184 fi
8185 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008187
8188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 done
8190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008192sed 's/^/| /' conftest.$ac_ext >&5
8193
Martin v. Löwiseba40652007-08-30 20:10:57 +00008194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008195/* confdefs.h. */
8196_ACEOF
8197cat confdefs.h >>conftest.$ac_ext
8198cat >>conftest.$ac_ext <<_ACEOF
8199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008200$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008201 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008202int
8203main ()
8204{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008205static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008206test_array [0] = 0
8207
8208 ;
8209 return 0;
8210}
8211_ACEOF
8212rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008213if { (ac_try="$ac_compile"
8214case "(($ac_try" in
8215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8216 *) ac_try_echo=$ac_try;;
8217esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008219 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008221 grep -v '^ *+' conftest.er1 >conftest.err
8222 rm -f conftest.er1
8223 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008225 (exit $ac_status); } && {
8226 test -z "$ac_c_werror_flag" ||
8227 test ! -s conftest.err
8228 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 ac_hi=-1 ac_mid=-1
8230 while :; do
8231 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008232/* confdefs.h. */
8233_ACEOF
8234cat confdefs.h >>conftest.$ac_ext
8235cat >>conftest.$ac_ext <<_ACEOF
8236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008237$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008238 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008239int
8240main ()
8241{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008242static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008243test_array [0] = 0
8244
8245 ;
8246 return 0;
8247}
8248_ACEOF
8249rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008250if { (ac_try="$ac_compile"
8251case "(($ac_try" in
8252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8253 *) ac_try_echo=$ac_try;;
8254esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008258 grep -v '^ *+' conftest.er1 >conftest.err
8259 rm -f conftest.er1
8260 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008262 (exit $ac_status); } && {
8263 test -z "$ac_c_werror_flag" ||
8264 test ! -s conftest.err
8265 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 ac_lo=$ac_mid; break
8267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008269sed 's/^/| /' conftest.$ac_ext >&5
8270
Martin v. Löwiseba40652007-08-30 20:10:57 +00008271 ac_hi=`expr '(' $ac_mid ')' - 1`
8272 if test $ac_mid -le $ac_hi; then
8273 ac_lo= ac_hi=
8274 break
8275 fi
8276 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008278
8279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 done
8281else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008283sed 's/^/| /' conftest.$ac_ext >&5
8284
Martin v. Löwiseba40652007-08-30 20:10:57 +00008285 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008287
8288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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 +00008292# Binary search between lo and hi bounds.
8293while test "x$ac_lo" != "x$ac_hi"; do
8294 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008296/* confdefs.h. */
8297_ACEOF
8298cat confdefs.h >>conftest.$ac_ext
8299cat >>conftest.$ac_ext <<_ACEOF
8300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008301$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008302 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008303int
8304main ()
8305{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008306static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008307test_array [0] = 0
8308
8309 ;
8310 return 0;
8311}
8312_ACEOF
8313rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314if { (ac_try="$ac_compile"
8315case "(($ac_try" in
8316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8317 *) ac_try_echo=$ac_try;;
8318esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008320 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008322 grep -v '^ *+' conftest.er1 >conftest.err
8323 rm -f conftest.er1
8324 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008326 (exit $ac_status); } && {
8327 test -z "$ac_c_werror_flag" ||
8328 test ! -s conftest.err
8329 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 ac_hi=$ac_mid
8331else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008333sed 's/^/| /' conftest.$ac_ext >&5
8334
Martin v. Löwiseba40652007-08-30 20:10:57 +00008335 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008337
8338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008339done
8340case $ac_lo in
8341?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008342'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008343 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008344See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008345echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008346See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008347 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008348 else
8349 ac_cv_sizeof_long=0
8350 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008351esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008352else
Martin v. Löwis11437992002-04-12 09:54:03 +00008353 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008354/* confdefs.h. */
8355_ACEOF
8356cat confdefs.h >>conftest.$ac_ext
8357cat >>conftest.$ac_ext <<_ACEOF
8358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008359$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008360 typedef long ac__type_sizeof_;
8361static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8362static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008363#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008364#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008365int
8366main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008367{
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
8369 FILE *f = fopen ("conftest.val", "w");
8370 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008371 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008372 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008374 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008375 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008376 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008377 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008378 }
8379 else
8380 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008381 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008382 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008383 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008384 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008385 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
8388 ;
8389 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008390}
Martin v. Löwis11437992002-04-12 09:54:03 +00008391_ACEOF
8392rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008393if { (ac_try="$ac_link"
8394case "(($ac_try" in
8395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8396 *) ac_try_echo=$ac_try;;
8397esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008399 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008403 { (case "(($ac_try" in
8404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8405 *) ac_try_echo=$ac_try;;
8406esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008408 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 (exit $ac_status); }; }; then
8412 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008413else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008414 echo "$as_me: program exited with status $ac_status" >&5
8415echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008416sed 's/^/| /' conftest.$ac_ext >&5
8417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008419if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008420 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008421See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008422echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008423See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008424 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008425 else
8426 ac_cv_sizeof_long=0
8427 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008429rm -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 +00008430fi
8431rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008432fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008433{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8434echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008435
8436
8437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008439#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008440_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008441
8442
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008443{ echo "$as_me:$LINENO: checking for void *" >&5
8444echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8445if test "${ac_cv_type_void_p+set}" = set; then
8446 echo $ECHO_N "(cached) $ECHO_C" >&6
8447else
8448 cat >conftest.$ac_ext <<_ACEOF
8449/* confdefs.h. */
8450_ACEOF
8451cat confdefs.h >>conftest.$ac_ext
8452cat >>conftest.$ac_ext <<_ACEOF
8453/* end confdefs.h. */
8454$ac_includes_default
8455typedef void * ac__type_new_;
8456int
8457main ()
8458{
8459if ((ac__type_new_ *) 0)
8460 return 0;
8461if (sizeof (ac__type_new_))
8462 return 0;
8463 ;
8464 return 0;
8465}
8466_ACEOF
8467rm -f conftest.$ac_objext
8468if { (ac_try="$ac_compile"
8469case "(($ac_try" in
8470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8471 *) ac_try_echo=$ac_try;;
8472esac
8473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8474 (eval "$ac_compile") 2>conftest.er1
8475 ac_status=$?
8476 grep -v '^ *+' conftest.er1 >conftest.err
8477 rm -f conftest.er1
8478 cat conftest.err >&5
8479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8480 (exit $ac_status); } && {
8481 test -z "$ac_c_werror_flag" ||
8482 test ! -s conftest.err
8483 } && test -s conftest.$ac_objext; then
8484 ac_cv_type_void_p=yes
8485else
8486 echo "$as_me: failed program was:" >&5
8487sed 's/^/| /' conftest.$ac_ext >&5
8488
8489 ac_cv_type_void_p=no
8490fi
8491
8492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8493fi
8494{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8495echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8496
Martin v. Löwiseba40652007-08-30 20:10:57 +00008497# The cast to long int works around a bug in the HP C Compiler
8498# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8499# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8500# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008501{ echo "$as_me:$LINENO: checking size of void *" >&5
8502echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008503if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008504 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008505else
Martin v. Löwis11437992002-04-12 09:54:03 +00008506 if test "$cross_compiling" = yes; then
8507 # Depending upon the size, compute the lo and hi bounds.
8508cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008509/* confdefs.h. */
8510_ACEOF
8511cat confdefs.h >>conftest.$ac_ext
8512cat >>conftest.$ac_ext <<_ACEOF
8513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008514$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008515 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008516int
8517main ()
8518{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008519static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008520test_array [0] = 0
8521
8522 ;
8523 return 0;
8524}
8525_ACEOF
8526rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008527if { (ac_try="$ac_compile"
8528case "(($ac_try" in
8529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8530 *) ac_try_echo=$ac_try;;
8531esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008535 grep -v '^ *+' conftest.er1 >conftest.err
8536 rm -f conftest.er1
8537 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008539 (exit $ac_status); } && {
8540 test -z "$ac_c_werror_flag" ||
8541 test ! -s conftest.err
8542 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008543 ac_lo=0 ac_mid=0
8544 while :; do
8545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008546/* confdefs.h. */
8547_ACEOF
8548cat confdefs.h >>conftest.$ac_ext
8549cat >>conftest.$ac_ext <<_ACEOF
8550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008551$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008552 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008553int
8554main ()
8555{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008556static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008557test_array [0] = 0
8558
8559 ;
8560 return 0;
8561}
8562_ACEOF
8563rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564if { (ac_try="$ac_compile"
8565case "(($ac_try" in
8566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8567 *) ac_try_echo=$ac_try;;
8568esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008572 grep -v '^ *+' conftest.er1 >conftest.err
8573 rm -f conftest.er1
8574 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576 (exit $ac_status); } && {
8577 test -z "$ac_c_werror_flag" ||
8578 test ! -s conftest.err
8579 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 ac_hi=$ac_mid; break
8581else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008583sed 's/^/| /' conftest.$ac_ext >&5
8584
Martin v. Löwiseba40652007-08-30 20:10:57 +00008585 ac_lo=`expr $ac_mid + 1`
8586 if test $ac_lo -le $ac_mid; then
8587 ac_lo= ac_hi=
8588 break
8589 fi
8590 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008592
8593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 done
8595else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008597sed 's/^/| /' conftest.$ac_ext >&5
8598
Martin v. Löwiseba40652007-08-30 20:10:57 +00008599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008600/* confdefs.h. */
8601_ACEOF
8602cat confdefs.h >>conftest.$ac_ext
8603cat >>conftest.$ac_ext <<_ACEOF
8604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008605$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008606 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008607int
8608main ()
8609{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008610static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008611test_array [0] = 0
8612
8613 ;
8614 return 0;
8615}
8616_ACEOF
8617rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618if { (ac_try="$ac_compile"
8619case "(($ac_try" in
8620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8621 *) ac_try_echo=$ac_try;;
8622esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008626 grep -v '^ *+' conftest.er1 >conftest.err
8627 rm -f conftest.er1
8628 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008630 (exit $ac_status); } && {
8631 test -z "$ac_c_werror_flag" ||
8632 test ! -s conftest.err
8633 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ac_hi=-1 ac_mid=-1
8635 while :; do
8636 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008637/* confdefs.h. */
8638_ACEOF
8639cat confdefs.h >>conftest.$ac_ext
8640cat >>conftest.$ac_ext <<_ACEOF
8641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008642$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008643 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008644int
8645main ()
8646{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008647static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008648test_array [0] = 0
8649
8650 ;
8651 return 0;
8652}
8653_ACEOF
8654rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008655if { (ac_try="$ac_compile"
8656case "(($ac_try" in
8657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8658 *) ac_try_echo=$ac_try;;
8659esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008661 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008663 grep -v '^ *+' conftest.er1 >conftest.err
8664 rm -f conftest.er1
8665 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008667 (exit $ac_status); } && {
8668 test -z "$ac_c_werror_flag" ||
8669 test ! -s conftest.err
8670 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ac_lo=$ac_mid; break
8672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008674sed 's/^/| /' conftest.$ac_ext >&5
8675
Martin v. Löwiseba40652007-08-30 20:10:57 +00008676 ac_hi=`expr '(' $ac_mid ')' - 1`
8677 if test $ac_mid -le $ac_hi; then
8678 ac_lo= ac_hi=
8679 break
8680 fi
8681 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008683
8684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 done
8686else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008688sed 's/^/| /' conftest.$ac_ext >&5
8689
Martin v. Löwiseba40652007-08-30 20:10:57 +00008690 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692
8693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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 +00008697# Binary search between lo and hi bounds.
8698while test "x$ac_lo" != "x$ac_hi"; do
8699 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008701/* confdefs.h. */
8702_ACEOF
8703cat confdefs.h >>conftest.$ac_ext
8704cat >>conftest.$ac_ext <<_ACEOF
8705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008706$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008707 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008708int
8709main ()
8710{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008712test_array [0] = 0
8713
8714 ;
8715 return 0;
8716}
8717_ACEOF
8718rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719if { (ac_try="$ac_compile"
8720case "(($ac_try" in
8721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8722 *) ac_try_echo=$ac_try;;
8723esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008727 grep -v '^ *+' conftest.er1 >conftest.err
8728 rm -f conftest.er1
8729 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008731 (exit $ac_status); } && {
8732 test -z "$ac_c_werror_flag" ||
8733 test ! -s conftest.err
8734 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 ac_hi=$ac_mid
8736else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008738sed 's/^/| /' conftest.$ac_ext >&5
8739
Martin v. Löwiseba40652007-08-30 20:10:57 +00008740 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008742
8743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008744done
8745case $ac_lo in
8746?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008747'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008748 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008749See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008750echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008751See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008752 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008753 else
8754 ac_cv_sizeof_void_p=0
8755 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008756esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008757else
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008759/* confdefs.h. */
8760_ACEOF
8761cat confdefs.h >>conftest.$ac_ext
8762cat >>conftest.$ac_ext <<_ACEOF
8763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008764$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008765 typedef void * ac__type_sizeof_;
8766static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8767static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008768#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008769#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008770int
8771main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008772{
Martin v. Löwis11437992002-04-12 09:54:03 +00008773
8774 FILE *f = fopen ("conftest.val", "w");
8775 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008776 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008777 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008779 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008780 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008781 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008782 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008783 }
8784 else
8785 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008786 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008787 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008788 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008789 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008792
8793 ;
8794 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008795}
Martin v. Löwis11437992002-04-12 09:54:03 +00008796_ACEOF
8797rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008798if { (ac_try="$ac_link"
8799case "(($ac_try" in
8800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8801 *) ac_try_echo=$ac_try;;
8802esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008804 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808 { (case "(($ac_try" in
8809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8810 *) ac_try_echo=$ac_try;;
8811esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008813 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 (exit $ac_status); }; }; then
8817 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008818else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008819 echo "$as_me: program exited with status $ac_status" >&5
8820echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008821sed 's/^/| /' conftest.$ac_ext >&5
8822
Martin v. Löwis11437992002-04-12 09:54:03 +00008823( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008824if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008825 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008826See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008827echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008828See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008829 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008830 else
8831 ac_cv_sizeof_void_p=0
8832 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008834rm -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 +00008835fi
8836rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008837fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008838{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8839echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008840
8841
8842
Martin v. Löwis11437992002-04-12 09:54:03 +00008843cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008844#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008845_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008846
8847
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008848{ echo "$as_me:$LINENO: checking for short" >&5
8849echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8850if test "${ac_cv_type_short+set}" = set; then
8851 echo $ECHO_N "(cached) $ECHO_C" >&6
8852else
8853 cat >conftest.$ac_ext <<_ACEOF
8854/* confdefs.h. */
8855_ACEOF
8856cat confdefs.h >>conftest.$ac_ext
8857cat >>conftest.$ac_ext <<_ACEOF
8858/* end confdefs.h. */
8859$ac_includes_default
8860typedef short ac__type_new_;
8861int
8862main ()
8863{
8864if ((ac__type_new_ *) 0)
8865 return 0;
8866if (sizeof (ac__type_new_))
8867 return 0;
8868 ;
8869 return 0;
8870}
8871_ACEOF
8872rm -f conftest.$ac_objext
8873if { (ac_try="$ac_compile"
8874case "(($ac_try" in
8875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8876 *) ac_try_echo=$ac_try;;
8877esac
8878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8879 (eval "$ac_compile") 2>conftest.er1
8880 ac_status=$?
8881 grep -v '^ *+' conftest.er1 >conftest.err
8882 rm -f conftest.er1
8883 cat conftest.err >&5
8884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8885 (exit $ac_status); } && {
8886 test -z "$ac_c_werror_flag" ||
8887 test ! -s conftest.err
8888 } && test -s conftest.$ac_objext; then
8889 ac_cv_type_short=yes
8890else
8891 echo "$as_me: failed program was:" >&5
8892sed 's/^/| /' conftest.$ac_ext >&5
8893
8894 ac_cv_type_short=no
8895fi
8896
8897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8898fi
8899{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8900echo "${ECHO_T}$ac_cv_type_short" >&6; }
8901
Martin v. Löwiseba40652007-08-30 20:10:57 +00008902# The cast to long int works around a bug in the HP C Compiler
8903# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8904# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8905# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008906{ echo "$as_me:$LINENO: checking size of short" >&5
8907echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008908if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008909 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008910else
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 if test "$cross_compiling" = yes; then
8912 # Depending upon the size, compute the lo and hi bounds.
8913cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008914/* confdefs.h. */
8915_ACEOF
8916cat confdefs.h >>conftest.$ac_ext
8917cat >>conftest.$ac_ext <<_ACEOF
8918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008919$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008920 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008921int
8922main ()
8923{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008924static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008925test_array [0] = 0
8926
8927 ;
8928 return 0;
8929}
8930_ACEOF
8931rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008932if { (ac_try="$ac_compile"
8933case "(($ac_try" in
8934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8935 *) ac_try_echo=$ac_try;;
8936esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008940 grep -v '^ *+' conftest.er1 >conftest.err
8941 rm -f conftest.er1
8942 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008944 (exit $ac_status); } && {
8945 test -z "$ac_c_werror_flag" ||
8946 test ! -s conftest.err
8947 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 ac_lo=0 ac_mid=0
8949 while :; do
8950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008951/* confdefs.h. */
8952_ACEOF
8953cat confdefs.h >>conftest.$ac_ext
8954cat >>conftest.$ac_ext <<_ACEOF
8955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008956$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008957 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008958int
8959main ()
8960{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008961static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008962test_array [0] = 0
8963
8964 ;
8965 return 0;
8966}
8967_ACEOF
8968rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969if { (ac_try="$ac_compile"
8970case "(($ac_try" in
8971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8972 *) ac_try_echo=$ac_try;;
8973esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008977 grep -v '^ *+' conftest.er1 >conftest.err
8978 rm -f conftest.er1
8979 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981 (exit $ac_status); } && {
8982 test -z "$ac_c_werror_flag" ||
8983 test ! -s conftest.err
8984 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ac_hi=$ac_mid; break
8986else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008988sed 's/^/| /' conftest.$ac_ext >&5
8989
Martin v. Löwiseba40652007-08-30 20:10:57 +00008990 ac_lo=`expr $ac_mid + 1`
8991 if test $ac_lo -le $ac_mid; then
8992 ac_lo= ac_hi=
8993 break
8994 fi
8995 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997
8998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 done
9000else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009002sed 's/^/| /' conftest.$ac_ext >&5
9003
Martin v. Löwiseba40652007-08-30 20:10:57 +00009004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* confdefs.h. */
9006_ACEOF
9007cat confdefs.h >>conftest.$ac_ext
9008cat >>conftest.$ac_ext <<_ACEOF
9009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009010$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009011 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009012int
9013main ()
9014{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009015static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009016test_array [0] = 0
9017
9018 ;
9019 return 0;
9020}
9021_ACEOF
9022rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009023if { (ac_try="$ac_compile"
9024case "(($ac_try" in
9025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9026 *) ac_try_echo=$ac_try;;
9027esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009029 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009031 grep -v '^ *+' conftest.er1 >conftest.err
9032 rm -f conftest.er1
9033 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009035 (exit $ac_status); } && {
9036 test -z "$ac_c_werror_flag" ||
9037 test ! -s conftest.err
9038 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ac_hi=-1 ac_mid=-1
9040 while :; do
9041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009042/* confdefs.h. */
9043_ACEOF
9044cat confdefs.h >>conftest.$ac_ext
9045cat >>conftest.$ac_ext <<_ACEOF
9046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009047$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009048 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009049int
9050main ()
9051{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009052static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009053test_array [0] = 0
9054
9055 ;
9056 return 0;
9057}
9058_ACEOF
9059rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009060if { (ac_try="$ac_compile"
9061case "(($ac_try" in
9062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9063 *) ac_try_echo=$ac_try;;
9064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009066 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009068 grep -v '^ *+' conftest.er1 >conftest.err
9069 rm -f conftest.er1
9070 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009072 (exit $ac_status); } && {
9073 test -z "$ac_c_werror_flag" ||
9074 test ! -s conftest.err
9075 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 ac_lo=$ac_mid; break
9077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009079sed 's/^/| /' conftest.$ac_ext >&5
9080
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081 ac_hi=`expr '(' $ac_mid ')' - 1`
9082 if test $ac_mid -le $ac_hi; then
9083 ac_lo= ac_hi=
9084 break
9085 fi
9086 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009088
9089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009090 done
9091else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009093sed 's/^/| /' conftest.$ac_ext >&5
9094
Martin v. Löwiseba40652007-08-30 20:10:57 +00009095 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097
9098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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 +00009102# Binary search between lo and hi bounds.
9103while test "x$ac_lo" != "x$ac_hi"; do
9104 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009106/* confdefs.h. */
9107_ACEOF
9108cat confdefs.h >>conftest.$ac_ext
9109cat >>conftest.$ac_ext <<_ACEOF
9110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009111$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009112 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009113int
9114main ()
9115{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009116static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009117test_array [0] = 0
9118
9119 ;
9120 return 0;
9121}
9122_ACEOF
9123rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124if { (ac_try="$ac_compile"
9125case "(($ac_try" in
9126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9127 *) ac_try_echo=$ac_try;;
9128esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009130 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009132 grep -v '^ *+' conftest.er1 >conftest.err
9133 rm -f conftest.er1
9134 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009136 (exit $ac_status); } && {
9137 test -z "$ac_c_werror_flag" ||
9138 test ! -s conftest.err
9139 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009140 ac_hi=$ac_mid
9141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009143sed 's/^/| /' conftest.$ac_ext >&5
9144
Martin v. Löwiseba40652007-08-30 20:10:57 +00009145 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009147
9148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009149done
9150case $ac_lo in
9151?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009153 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009154See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009155echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009156See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009157 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009158 else
9159 ac_cv_sizeof_short=0
9160 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009161esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009162else
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009164/* confdefs.h. */
9165_ACEOF
9166cat confdefs.h >>conftest.$ac_ext
9167cat >>conftest.$ac_ext <<_ACEOF
9168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009169$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009170 typedef short ac__type_sizeof_;
9171static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9172static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009173#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009174#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009175int
9176main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009177{
Martin v. Löwis11437992002-04-12 09:54:03 +00009178
9179 FILE *f = fopen ("conftest.val", "w");
9180 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009181 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009182 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009183 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009184 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009185 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009186 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009187 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 }
9189 else
9190 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009191 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009192 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009193 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009194 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009197
9198 ;
9199 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009200}
Martin v. Löwis11437992002-04-12 09:54:03 +00009201_ACEOF
9202rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009203if { (ac_try="$ac_link"
9204case "(($ac_try" in
9205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9206 *) ac_try_echo=$ac_try;;
9207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009209 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009213 { (case "(($ac_try" in
9214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9215 *) ac_try_echo=$ac_try;;
9216esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009218 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 (exit $ac_status); }; }; then
9222 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009223else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009224 echo "$as_me: program exited with status $ac_status" >&5
9225echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009226sed 's/^/| /' conftest.$ac_ext >&5
9227
Martin v. Löwis11437992002-04-12 09:54:03 +00009228( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009229if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009230 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009231See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009232echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009233See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009234 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009235 else
9236 ac_cv_sizeof_short=0
9237 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009239rm -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 +00009240fi
9241rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009242fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009243{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9244echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009245
9246
9247
Martin v. Löwis11437992002-04-12 09:54:03 +00009248cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009249#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009250_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009251
9252
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009253{ echo "$as_me:$LINENO: checking for float" >&5
9254echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9255if test "${ac_cv_type_float+set}" = set; then
9256 echo $ECHO_N "(cached) $ECHO_C" >&6
9257else
9258 cat >conftest.$ac_ext <<_ACEOF
9259/* confdefs.h. */
9260_ACEOF
9261cat confdefs.h >>conftest.$ac_ext
9262cat >>conftest.$ac_ext <<_ACEOF
9263/* end confdefs.h. */
9264$ac_includes_default
9265typedef float ac__type_new_;
9266int
9267main ()
9268{
9269if ((ac__type_new_ *) 0)
9270 return 0;
9271if (sizeof (ac__type_new_))
9272 return 0;
9273 ;
9274 return 0;
9275}
9276_ACEOF
9277rm -f conftest.$ac_objext
9278if { (ac_try="$ac_compile"
9279case "(($ac_try" in
9280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9281 *) ac_try_echo=$ac_try;;
9282esac
9283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9284 (eval "$ac_compile") 2>conftest.er1
9285 ac_status=$?
9286 grep -v '^ *+' conftest.er1 >conftest.err
9287 rm -f conftest.er1
9288 cat conftest.err >&5
9289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9290 (exit $ac_status); } && {
9291 test -z "$ac_c_werror_flag" ||
9292 test ! -s conftest.err
9293 } && test -s conftest.$ac_objext; then
9294 ac_cv_type_float=yes
9295else
9296 echo "$as_me: failed program was:" >&5
9297sed 's/^/| /' conftest.$ac_ext >&5
9298
9299 ac_cv_type_float=no
9300fi
9301
9302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9303fi
9304{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9305echo "${ECHO_T}$ac_cv_type_float" >&6; }
9306
Martin v. Löwiseba40652007-08-30 20:10:57 +00009307# The cast to long int works around a bug in the HP C Compiler
9308# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9309# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9310# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009311{ echo "$as_me:$LINENO: checking size of float" >&5
9312echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009313if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009314 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009315else
Martin v. Löwis11437992002-04-12 09:54:03 +00009316 if test "$cross_compiling" = yes; then
9317 # Depending upon the size, compute the lo and hi bounds.
9318cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009319/* confdefs.h. */
9320_ACEOF
9321cat confdefs.h >>conftest.$ac_ext
9322cat >>conftest.$ac_ext <<_ACEOF
9323/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009324$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009325 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009326int
9327main ()
9328{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009329static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009330test_array [0] = 0
9331
9332 ;
9333 return 0;
9334}
9335_ACEOF
9336rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009337if { (ac_try="$ac_compile"
9338case "(($ac_try" in
9339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9340 *) ac_try_echo=$ac_try;;
9341esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009345 grep -v '^ *+' conftest.er1 >conftest.err
9346 rm -f conftest.er1
9347 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009349 (exit $ac_status); } && {
9350 test -z "$ac_c_werror_flag" ||
9351 test ! -s conftest.err
9352 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 ac_lo=0 ac_mid=0
9354 while :; do
9355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009356/* confdefs.h. */
9357_ACEOF
9358cat confdefs.h >>conftest.$ac_ext
9359cat >>conftest.$ac_ext <<_ACEOF
9360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009361$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009362 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009363int
9364main ()
9365{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009366static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009367test_array [0] = 0
9368
9369 ;
9370 return 0;
9371}
9372_ACEOF
9373rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374if { (ac_try="$ac_compile"
9375case "(($ac_try" in
9376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9377 *) ac_try_echo=$ac_try;;
9378esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009382 grep -v '^ *+' conftest.er1 >conftest.err
9383 rm -f conftest.er1
9384 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386 (exit $ac_status); } && {
9387 test -z "$ac_c_werror_flag" ||
9388 test ! -s conftest.err
9389 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 ac_hi=$ac_mid; break
9391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009393sed 's/^/| /' conftest.$ac_ext >&5
9394
Martin v. Löwiseba40652007-08-30 20:10:57 +00009395 ac_lo=`expr $ac_mid + 1`
9396 if test $ac_lo -le $ac_mid; then
9397 ac_lo= ac_hi=
9398 break
9399 fi
9400 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009402
9403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009404 done
9405else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009407sed 's/^/| /' conftest.$ac_ext >&5
9408
Martin v. Löwiseba40652007-08-30 20:10:57 +00009409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* confdefs.h. */
9411_ACEOF
9412cat confdefs.h >>conftest.$ac_ext
9413cat >>conftest.$ac_ext <<_ACEOF
9414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009415$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009416 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009417int
9418main ()
9419{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009420static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009421test_array [0] = 0
9422
9423 ;
9424 return 0;
9425}
9426_ACEOF
9427rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428if { (ac_try="$ac_compile"
9429case "(($ac_try" in
9430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9431 *) ac_try_echo=$ac_try;;
9432esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009436 grep -v '^ *+' conftest.er1 >conftest.err
9437 rm -f conftest.er1
9438 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009440 (exit $ac_status); } && {
9441 test -z "$ac_c_werror_flag" ||
9442 test ! -s conftest.err
9443 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_hi=-1 ac_mid=-1
9445 while :; do
9446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009447/* confdefs.h. */
9448_ACEOF
9449cat confdefs.h >>conftest.$ac_ext
9450cat >>conftest.$ac_ext <<_ACEOF
9451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009452$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009453 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009454int
9455main ()
9456{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009457static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009458test_array [0] = 0
9459
9460 ;
9461 return 0;
9462}
9463_ACEOF
9464rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009465if { (ac_try="$ac_compile"
9466case "(($ac_try" in
9467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9468 *) ac_try_echo=$ac_try;;
9469esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009473 grep -v '^ *+' conftest.er1 >conftest.err
9474 rm -f conftest.er1
9475 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009477 (exit $ac_status); } && {
9478 test -z "$ac_c_werror_flag" ||
9479 test ! -s conftest.err
9480 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_lo=$ac_mid; break
9482else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009484sed 's/^/| /' conftest.$ac_ext >&5
9485
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486 ac_hi=`expr '(' $ac_mid ')' - 1`
9487 if test $ac_mid -le $ac_hi; then
9488 ac_lo= ac_hi=
9489 break
9490 fi
9491 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009493
9494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 done
9496else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009498sed 's/^/| /' conftest.$ac_ext >&5
9499
Martin v. Löwiseba40652007-08-30 20:10:57 +00009500 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502
9503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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 +00009507# Binary search between lo and hi bounds.
9508while test "x$ac_lo" != "x$ac_hi"; do
9509 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009511/* confdefs.h. */
9512_ACEOF
9513cat confdefs.h >>conftest.$ac_ext
9514cat >>conftest.$ac_ext <<_ACEOF
9515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009516$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009517 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009518int
9519main ()
9520{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009521static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009522test_array [0] = 0
9523
9524 ;
9525 return 0;
9526}
9527_ACEOF
9528rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529if { (ac_try="$ac_compile"
9530case "(($ac_try" in
9531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9532 *) ac_try_echo=$ac_try;;
9533esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009537 grep -v '^ *+' conftest.er1 >conftest.err
9538 rm -f conftest.er1
9539 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009541 (exit $ac_status); } && {
9542 test -z "$ac_c_werror_flag" ||
9543 test ! -s conftest.err
9544 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_hi=$ac_mid
9546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009548sed 's/^/| /' conftest.$ac_ext >&5
9549
Martin v. Löwiseba40652007-08-30 20:10:57 +00009550 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009552
9553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009554done
9555case $ac_lo in
9556?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009557'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009558 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009559See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009560echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009561See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009562 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009563 else
9564 ac_cv_sizeof_float=0
9565 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009566esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009567else
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009569/* confdefs.h. */
9570_ACEOF
9571cat confdefs.h >>conftest.$ac_ext
9572cat >>conftest.$ac_ext <<_ACEOF
9573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009574$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009575 typedef float ac__type_sizeof_;
9576static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9577static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009578#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009579#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009580int
9581main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009582{
Martin v. Löwis11437992002-04-12 09:54:03 +00009583
9584 FILE *f = fopen ("conftest.val", "w");
9585 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009586 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009587 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009589 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009590 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009591 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009592 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 }
9594 else
9595 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009596 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009597 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009598 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009599 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009602
9603 ;
9604 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009605}
Martin v. Löwis11437992002-04-12 09:54:03 +00009606_ACEOF
9607rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009608if { (ac_try="$ac_link"
9609case "(($ac_try" in
9610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9611 *) ac_try_echo=$ac_try;;
9612esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009614 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009618 { (case "(($ac_try" in
9619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9620 *) ac_try_echo=$ac_try;;
9621esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009623 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 (exit $ac_status); }; }; then
9627 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009628else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009629 echo "$as_me: program exited with status $ac_status" >&5
9630echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009631sed 's/^/| /' conftest.$ac_ext >&5
9632
Martin v. Löwis11437992002-04-12 09:54:03 +00009633( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009634if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009635 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009636See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009637echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009638See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009639 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009640 else
9641 ac_cv_sizeof_float=0
9642 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009644rm -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 +00009645fi
9646rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009647fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009648{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9649echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009650
9651
9652
Martin v. Löwis11437992002-04-12 09:54:03 +00009653cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009654#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009655_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009656
9657
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009658{ echo "$as_me:$LINENO: checking for double" >&5
9659echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9660if test "${ac_cv_type_double+set}" = set; then
9661 echo $ECHO_N "(cached) $ECHO_C" >&6
9662else
9663 cat >conftest.$ac_ext <<_ACEOF
9664/* confdefs.h. */
9665_ACEOF
9666cat confdefs.h >>conftest.$ac_ext
9667cat >>conftest.$ac_ext <<_ACEOF
9668/* end confdefs.h. */
9669$ac_includes_default
9670typedef double ac__type_new_;
9671int
9672main ()
9673{
9674if ((ac__type_new_ *) 0)
9675 return 0;
9676if (sizeof (ac__type_new_))
9677 return 0;
9678 ;
9679 return 0;
9680}
9681_ACEOF
9682rm -f conftest.$ac_objext
9683if { (ac_try="$ac_compile"
9684case "(($ac_try" in
9685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9686 *) ac_try_echo=$ac_try;;
9687esac
9688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9689 (eval "$ac_compile") 2>conftest.er1
9690 ac_status=$?
9691 grep -v '^ *+' conftest.er1 >conftest.err
9692 rm -f conftest.er1
9693 cat conftest.err >&5
9694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9695 (exit $ac_status); } && {
9696 test -z "$ac_c_werror_flag" ||
9697 test ! -s conftest.err
9698 } && test -s conftest.$ac_objext; then
9699 ac_cv_type_double=yes
9700else
9701 echo "$as_me: failed program was:" >&5
9702sed 's/^/| /' conftest.$ac_ext >&5
9703
9704 ac_cv_type_double=no
9705fi
9706
9707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9708fi
9709{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9710echo "${ECHO_T}$ac_cv_type_double" >&6; }
9711
Martin v. Löwiseba40652007-08-30 20:10:57 +00009712# The cast to long int works around a bug in the HP C Compiler
9713# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9714# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9715# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009716{ echo "$as_me:$LINENO: checking size of double" >&5
9717echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009718if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009719 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009720else
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 if test "$cross_compiling" = yes; then
9722 # Depending upon the size, compute the lo and hi bounds.
9723cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009724/* confdefs.h. */
9725_ACEOF
9726cat confdefs.h >>conftest.$ac_ext
9727cat >>conftest.$ac_ext <<_ACEOF
9728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009729$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009730 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009731int
9732main ()
9733{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009734static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009735test_array [0] = 0
9736
9737 ;
9738 return 0;
9739}
9740_ACEOF
9741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009742if { (ac_try="$ac_compile"
9743case "(($ac_try" in
9744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9745 *) ac_try_echo=$ac_try;;
9746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009750 grep -v '^ *+' conftest.er1 >conftest.err
9751 rm -f conftest.er1
9752 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009754 (exit $ac_status); } && {
9755 test -z "$ac_c_werror_flag" ||
9756 test ! -s conftest.err
9757 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 ac_lo=0 ac_mid=0
9759 while :; do
9760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009761/* confdefs.h. */
9762_ACEOF
9763cat confdefs.h >>conftest.$ac_ext
9764cat >>conftest.$ac_ext <<_ACEOF
9765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009766$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009767 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009768int
9769main ()
9770{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009771static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009772test_array [0] = 0
9773
9774 ;
9775 return 0;
9776}
9777_ACEOF
9778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779if { (ac_try="$ac_compile"
9780case "(($ac_try" in
9781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9782 *) ac_try_echo=$ac_try;;
9783esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009787 grep -v '^ *+' conftest.er1 >conftest.err
9788 rm -f conftest.er1
9789 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791 (exit $ac_status); } && {
9792 test -z "$ac_c_werror_flag" ||
9793 test ! -s conftest.err
9794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 ac_hi=$ac_mid; break
9796else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009798sed 's/^/| /' conftest.$ac_ext >&5
9799
Martin v. Löwiseba40652007-08-30 20:10:57 +00009800 ac_lo=`expr $ac_mid + 1`
9801 if test $ac_lo -le $ac_mid; then
9802 ac_lo= ac_hi=
9803 break
9804 fi
9805 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009807
9808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 done
9810else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009812sed 's/^/| /' conftest.$ac_ext >&5
9813
Martin v. Löwiseba40652007-08-30 20:10:57 +00009814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009815/* confdefs.h. */
9816_ACEOF
9817cat confdefs.h >>conftest.$ac_ext
9818cat >>conftest.$ac_ext <<_ACEOF
9819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009821 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009822int
9823main ()
9824{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009825static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009826test_array [0] = 0
9827
9828 ;
9829 return 0;
9830}
9831_ACEOF
9832rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009833if { (ac_try="$ac_compile"
9834case "(($ac_try" in
9835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9836 *) ac_try_echo=$ac_try;;
9837esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009839 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009841 grep -v '^ *+' conftest.er1 >conftest.err
9842 rm -f conftest.er1
9843 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009845 (exit $ac_status); } && {
9846 test -z "$ac_c_werror_flag" ||
9847 test ! -s conftest.err
9848 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ac_hi=-1 ac_mid=-1
9850 while :; do
9851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009852/* confdefs.h. */
9853_ACEOF
9854cat confdefs.h >>conftest.$ac_ext
9855cat >>conftest.$ac_ext <<_ACEOF
9856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009857$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009858 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009859int
9860main ()
9861{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009862static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009863test_array [0] = 0
9864
9865 ;
9866 return 0;
9867}
9868_ACEOF
9869rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009870if { (ac_try="$ac_compile"
9871case "(($ac_try" in
9872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9873 *) ac_try_echo=$ac_try;;
9874esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009878 grep -v '^ *+' conftest.er1 >conftest.err
9879 rm -f conftest.er1
9880 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009882 (exit $ac_status); } && {
9883 test -z "$ac_c_werror_flag" ||
9884 test ! -s conftest.err
9885 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 ac_lo=$ac_mid; break
9887else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009889sed 's/^/| /' conftest.$ac_ext >&5
9890
Martin v. Löwiseba40652007-08-30 20:10:57 +00009891 ac_hi=`expr '(' $ac_mid ')' - 1`
9892 if test $ac_mid -le $ac_hi; then
9893 ac_lo= ac_hi=
9894 break
9895 fi
9896 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009898
9899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 done
9901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009903sed 's/^/| /' conftest.$ac_ext >&5
9904
Martin v. Löwiseba40652007-08-30 20:10:57 +00009905 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907
9908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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 +00009912# Binary search between lo and hi bounds.
9913while test "x$ac_lo" != "x$ac_hi"; do
9914 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009916/* confdefs.h. */
9917_ACEOF
9918cat confdefs.h >>conftest.$ac_ext
9919cat >>conftest.$ac_ext <<_ACEOF
9920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009921$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009922 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009923int
9924main ()
9925{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009926static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009927test_array [0] = 0
9928
9929 ;
9930 return 0;
9931}
9932_ACEOF
9933rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934if { (ac_try="$ac_compile"
9935case "(($ac_try" in
9936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9937 *) ac_try_echo=$ac_try;;
9938esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009942 grep -v '^ *+' conftest.er1 >conftest.err
9943 rm -f conftest.er1
9944 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009946 (exit $ac_status); } && {
9947 test -z "$ac_c_werror_flag" ||
9948 test ! -s conftest.err
9949 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009950 ac_hi=$ac_mid
9951else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009953sed 's/^/| /' conftest.$ac_ext >&5
9954
Martin v. Löwiseba40652007-08-30 20:10:57 +00009955 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957
9958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009959done
9960case $ac_lo in
9961?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009963 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009964See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009965echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009966See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009967 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009968 else
9969 ac_cv_sizeof_double=0
9970 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009971esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009972else
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009974/* confdefs.h. */
9975_ACEOF
9976cat confdefs.h >>conftest.$ac_ext
9977cat >>conftest.$ac_ext <<_ACEOF
9978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009979$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009980 typedef double ac__type_sizeof_;
9981static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9982static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009983#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009984#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009985int
9986main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009987{
Martin v. Löwis11437992002-04-12 09:54:03 +00009988
9989 FILE *f = fopen ("conftest.val", "w");
9990 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009991 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009992 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009993 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009994 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009995 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009996 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009997 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009998 }
9999 else
10000 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010001 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010002 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010003 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010004 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010005 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010006 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010007
10008 ;
10009 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010010}
Martin v. Löwis11437992002-04-12 09:54:03 +000010011_ACEOF
10012rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010013if { (ac_try="$ac_link"
10014case "(($ac_try" in
10015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10016 *) ac_try_echo=$ac_try;;
10017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010019 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010023 { (case "(($ac_try" in
10024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10025 *) ac_try_echo=$ac_try;;
10026esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010028 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010031 (exit $ac_status); }; }; then
10032 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010033else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010034 echo "$as_me: program exited with status $ac_status" >&5
10035echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010036sed 's/^/| /' conftest.$ac_ext >&5
10037
Martin v. Löwis11437992002-04-12 09:54:03 +000010038( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010039if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010040 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010041See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010042echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010043See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010044 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010045 else
10046 ac_cv_sizeof_double=0
10047 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010049rm -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 +000010050fi
10051rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010052fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010053{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10054echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010055
10056
10057
Martin v. Löwis11437992002-04-12 09:54:03 +000010058cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010059#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010060_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010061
10062
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010063{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10064echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10065if test "${ac_cv_type_fpos_t+set}" = set; then
10066 echo $ECHO_N "(cached) $ECHO_C" >&6
10067else
10068 cat >conftest.$ac_ext <<_ACEOF
10069/* confdefs.h. */
10070_ACEOF
10071cat confdefs.h >>conftest.$ac_ext
10072cat >>conftest.$ac_ext <<_ACEOF
10073/* end confdefs.h. */
10074$ac_includes_default
10075typedef fpos_t ac__type_new_;
10076int
10077main ()
10078{
10079if ((ac__type_new_ *) 0)
10080 return 0;
10081if (sizeof (ac__type_new_))
10082 return 0;
10083 ;
10084 return 0;
10085}
10086_ACEOF
10087rm -f conftest.$ac_objext
10088if { (ac_try="$ac_compile"
10089case "(($ac_try" in
10090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10091 *) ac_try_echo=$ac_try;;
10092esac
10093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10094 (eval "$ac_compile") 2>conftest.er1
10095 ac_status=$?
10096 grep -v '^ *+' conftest.er1 >conftest.err
10097 rm -f conftest.er1
10098 cat conftest.err >&5
10099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10100 (exit $ac_status); } && {
10101 test -z "$ac_c_werror_flag" ||
10102 test ! -s conftest.err
10103 } && test -s conftest.$ac_objext; then
10104 ac_cv_type_fpos_t=yes
10105else
10106 echo "$as_me: failed program was:" >&5
10107sed 's/^/| /' conftest.$ac_ext >&5
10108
10109 ac_cv_type_fpos_t=no
10110fi
10111
10112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10113fi
10114{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10115echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10116
Martin v. Löwiseba40652007-08-30 20:10:57 +000010117# The cast to long int works around a bug in the HP C Compiler
10118# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10119# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10120# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010121{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10122echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010123if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010124 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010125else
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 if test "$cross_compiling" = yes; then
10127 # Depending upon the size, compute the lo and hi bounds.
10128cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010129/* confdefs.h. */
10130_ACEOF
10131cat confdefs.h >>conftest.$ac_ext
10132cat >>conftest.$ac_ext <<_ACEOF
10133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010134$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010135 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010136int
10137main ()
10138{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010139static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010140test_array [0] = 0
10141
10142 ;
10143 return 0;
10144}
10145_ACEOF
10146rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010147if { (ac_try="$ac_compile"
10148case "(($ac_try" in
10149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10150 *) ac_try_echo=$ac_try;;
10151esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010155 grep -v '^ *+' conftest.er1 >conftest.err
10156 rm -f conftest.er1
10157 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010159 (exit $ac_status); } && {
10160 test -z "$ac_c_werror_flag" ||
10161 test ! -s conftest.err
10162 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 ac_lo=0 ac_mid=0
10164 while :; do
10165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010166/* confdefs.h. */
10167_ACEOF
10168cat confdefs.h >>conftest.$ac_ext
10169cat >>conftest.$ac_ext <<_ACEOF
10170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010171$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010172 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010173int
10174main ()
10175{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010176static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010177test_array [0] = 0
10178
10179 ;
10180 return 0;
10181}
10182_ACEOF
10183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010184if { (ac_try="$ac_compile"
10185case "(($ac_try" in
10186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10187 *) ac_try_echo=$ac_try;;
10188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010192 grep -v '^ *+' conftest.er1 >conftest.err
10193 rm -f conftest.er1
10194 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196 (exit $ac_status); } && {
10197 test -z "$ac_c_werror_flag" ||
10198 test ! -s conftest.err
10199 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_hi=$ac_mid; break
10201else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010203sed 's/^/| /' conftest.$ac_ext >&5
10204
Martin v. Löwiseba40652007-08-30 20:10:57 +000010205 ac_lo=`expr $ac_mid + 1`
10206 if test $ac_lo -le $ac_mid; then
10207 ac_lo= ac_hi=
10208 break
10209 fi
10210 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010212
10213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 done
10215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010217sed 's/^/| /' conftest.$ac_ext >&5
10218
Martin v. Löwiseba40652007-08-30 20:10:57 +000010219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* confdefs.h. */
10221_ACEOF
10222cat confdefs.h >>conftest.$ac_ext
10223cat >>conftest.$ac_ext <<_ACEOF
10224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010225$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010226 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010227int
10228main ()
10229{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010230static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010231test_array [0] = 0
10232
10233 ;
10234 return 0;
10235}
10236_ACEOF
10237rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010238if { (ac_try="$ac_compile"
10239case "(($ac_try" in
10240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10241 *) ac_try_echo=$ac_try;;
10242esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010244 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010246 grep -v '^ *+' conftest.er1 >conftest.err
10247 rm -f conftest.er1
10248 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010250 (exit $ac_status); } && {
10251 test -z "$ac_c_werror_flag" ||
10252 test ! -s conftest.err
10253 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_hi=-1 ac_mid=-1
10255 while :; do
10256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010257/* confdefs.h. */
10258_ACEOF
10259cat confdefs.h >>conftest.$ac_ext
10260cat >>conftest.$ac_ext <<_ACEOF
10261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010262$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010263 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010264int
10265main ()
10266{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010267static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010268test_array [0] = 0
10269
10270 ;
10271 return 0;
10272}
10273_ACEOF
10274rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010275if { (ac_try="$ac_compile"
10276case "(($ac_try" in
10277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10278 *) ac_try_echo=$ac_try;;
10279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010283 grep -v '^ *+' conftest.er1 >conftest.err
10284 rm -f conftest.er1
10285 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010287 (exit $ac_status); } && {
10288 test -z "$ac_c_werror_flag" ||
10289 test ! -s conftest.err
10290 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ac_lo=$ac_mid; break
10292else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010294sed 's/^/| /' conftest.$ac_ext >&5
10295
Martin v. Löwiseba40652007-08-30 20:10:57 +000010296 ac_hi=`expr '(' $ac_mid ')' - 1`
10297 if test $ac_mid -le $ac_hi; then
10298 ac_lo= ac_hi=
10299 break
10300 fi
10301 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010303
10304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 done
10306else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010308sed 's/^/| /' conftest.$ac_ext >&5
10309
Martin v. Löwiseba40652007-08-30 20:10:57 +000010310 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010312
10313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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 +000010317# Binary search between lo and hi bounds.
10318while test "x$ac_lo" != "x$ac_hi"; do
10319 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010321/* confdefs.h. */
10322_ACEOF
10323cat confdefs.h >>conftest.$ac_ext
10324cat >>conftest.$ac_ext <<_ACEOF
10325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010326$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010327 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010328int
10329main ()
10330{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010332test_array [0] = 0
10333
10334 ;
10335 return 0;
10336}
10337_ACEOF
10338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010339if { (ac_try="$ac_compile"
10340case "(($ac_try" in
10341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10342 *) ac_try_echo=$ac_try;;
10343esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010347 grep -v '^ *+' conftest.er1 >conftest.err
10348 rm -f conftest.er1
10349 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010351 (exit $ac_status); } && {
10352 test -z "$ac_c_werror_flag" ||
10353 test ! -s conftest.err
10354 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 ac_hi=$ac_mid
10356else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010358sed 's/^/| /' conftest.$ac_ext >&5
10359
Martin v. Löwiseba40652007-08-30 20:10:57 +000010360 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010362
10363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010364done
10365case $ac_lo in
10366?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010367'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010368 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010369See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010370echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010371See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010372 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010373 else
10374 ac_cv_sizeof_fpos_t=0
10375 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010376esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010377else
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010379/* confdefs.h. */
10380_ACEOF
10381cat confdefs.h >>conftest.$ac_ext
10382cat >>conftest.$ac_ext <<_ACEOF
10383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010384$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010385 typedef fpos_t ac__type_sizeof_;
10386static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10387static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010388#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010389#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010390int
10391main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010392{
Martin v. Löwis11437992002-04-12 09:54:03 +000010393
10394 FILE *f = fopen ("conftest.val", "w");
10395 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010396 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010397 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010399 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010400 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010401 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010402 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 }
10404 else
10405 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010406 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010407 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010408 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010409 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010411 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010412
10413 ;
10414 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010415}
Martin v. Löwis11437992002-04-12 09:54:03 +000010416_ACEOF
10417rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010418if { (ac_try="$ac_link"
10419case "(($ac_try" in
10420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10421 *) ac_try_echo=$ac_try;;
10422esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010424 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010428 { (case "(($ac_try" in
10429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10430 *) ac_try_echo=$ac_try;;
10431esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010433 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 (exit $ac_status); }; }; then
10437 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010438else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010439 echo "$as_me: program exited with status $ac_status" >&5
10440echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010441sed 's/^/| /' conftest.$ac_ext >&5
10442
Martin v. Löwis11437992002-04-12 09:54:03 +000010443( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010444if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010445 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010446See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010447echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010448See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010449 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010450 else
10451 ac_cv_sizeof_fpos_t=0
10452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010454rm -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 +000010455fi
10456rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010457fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010458{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10459echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010460
10461
10462
Martin v. Löwis11437992002-04-12 09:54:03 +000010463cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010464#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010465_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010466
Michael W. Hudson54241132001-12-07 15:38:26 +000010467
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010468{ echo "$as_me:$LINENO: checking for size_t" >&5
10469echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10470if test "${ac_cv_type_size_t+set}" = set; then
10471 echo $ECHO_N "(cached) $ECHO_C" >&6
10472else
10473 cat >conftest.$ac_ext <<_ACEOF
10474/* confdefs.h. */
10475_ACEOF
10476cat confdefs.h >>conftest.$ac_ext
10477cat >>conftest.$ac_ext <<_ACEOF
10478/* end confdefs.h. */
10479$ac_includes_default
10480typedef size_t ac__type_new_;
10481int
10482main ()
10483{
10484if ((ac__type_new_ *) 0)
10485 return 0;
10486if (sizeof (ac__type_new_))
10487 return 0;
10488 ;
10489 return 0;
10490}
10491_ACEOF
10492rm -f conftest.$ac_objext
10493if { (ac_try="$ac_compile"
10494case "(($ac_try" in
10495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10496 *) ac_try_echo=$ac_try;;
10497esac
10498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10499 (eval "$ac_compile") 2>conftest.er1
10500 ac_status=$?
10501 grep -v '^ *+' conftest.er1 >conftest.err
10502 rm -f conftest.er1
10503 cat conftest.err >&5
10504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10505 (exit $ac_status); } && {
10506 test -z "$ac_c_werror_flag" ||
10507 test ! -s conftest.err
10508 } && test -s conftest.$ac_objext; then
10509 ac_cv_type_size_t=yes
10510else
10511 echo "$as_me: failed program was:" >&5
10512sed 's/^/| /' conftest.$ac_ext >&5
10513
10514 ac_cv_type_size_t=no
10515fi
10516
10517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10518fi
10519{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10520echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10521
Martin v. Löwiseba40652007-08-30 20:10:57 +000010522# The cast to long int works around a bug in the HP C Compiler
10523# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10524# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10525# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010526{ echo "$as_me:$LINENO: checking size of size_t" >&5
10527echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010529 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010531 if test "$cross_compiling" = yes; then
10532 # Depending upon the size, compute the lo and hi bounds.
10533cat >conftest.$ac_ext <<_ACEOF
10534/* confdefs.h. */
10535_ACEOF
10536cat confdefs.h >>conftest.$ac_ext
10537cat >>conftest.$ac_ext <<_ACEOF
10538/* end confdefs.h. */
10539$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010540 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541int
10542main ()
10543{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010544static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010545test_array [0] = 0
10546
10547 ;
10548 return 0;
10549}
10550_ACEOF
10551rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010552if { (ac_try="$ac_compile"
10553case "(($ac_try" in
10554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10555 *) ac_try_echo=$ac_try;;
10556esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010559 ac_status=$?
10560 grep -v '^ *+' conftest.er1 >conftest.err
10561 rm -f conftest.er1
10562 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010564 (exit $ac_status); } && {
10565 test -z "$ac_c_werror_flag" ||
10566 test ! -s conftest.err
10567 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010568 ac_lo=0 ac_mid=0
10569 while :; do
10570 cat >conftest.$ac_ext <<_ACEOF
10571/* confdefs.h. */
10572_ACEOF
10573cat confdefs.h >>conftest.$ac_ext
10574cat >>conftest.$ac_ext <<_ACEOF
10575/* end confdefs.h. */
10576$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010577 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578int
10579main ()
10580{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010581static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582test_array [0] = 0
10583
10584 ;
10585 return 0;
10586}
10587_ACEOF
10588rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010589if { (ac_try="$ac_compile"
10590case "(($ac_try" in
10591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10592 *) ac_try_echo=$ac_try;;
10593esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010595 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596 ac_status=$?
10597 grep -v '^ *+' conftest.er1 >conftest.err
10598 rm -f conftest.er1
10599 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010601 (exit $ac_status); } && {
10602 test -z "$ac_c_werror_flag" ||
10603 test ! -s conftest.err
10604 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605 ac_hi=$ac_mid; break
10606else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010607 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608sed 's/^/| /' conftest.$ac_ext >&5
10609
Martin v. Löwiseba40652007-08-30 20:10:57 +000010610 ac_lo=`expr $ac_mid + 1`
10611 if test $ac_lo -le $ac_mid; then
10612 ac_lo= ac_hi=
10613 break
10614 fi
10615 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010617
10618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010619 done
10620else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010621 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622sed 's/^/| /' conftest.$ac_ext >&5
10623
Martin v. Löwiseba40652007-08-30 20:10:57 +000010624 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010625/* confdefs.h. */
10626_ACEOF
10627cat confdefs.h >>conftest.$ac_ext
10628cat >>conftest.$ac_ext <<_ACEOF
10629/* end confdefs.h. */
10630$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010631 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010632int
10633main ()
10634{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010635static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636test_array [0] = 0
10637
10638 ;
10639 return 0;
10640}
10641_ACEOF
10642rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010643if { (ac_try="$ac_compile"
10644case "(($ac_try" in
10645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10646 *) ac_try_echo=$ac_try;;
10647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010650 ac_status=$?
10651 grep -v '^ *+' conftest.er1 >conftest.err
10652 rm -f conftest.er1
10653 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010655 (exit $ac_status); } && {
10656 test -z "$ac_c_werror_flag" ||
10657 test ! -s conftest.err
10658 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659 ac_hi=-1 ac_mid=-1
10660 while :; do
10661 cat >conftest.$ac_ext <<_ACEOF
10662/* confdefs.h. */
10663_ACEOF
10664cat confdefs.h >>conftest.$ac_ext
10665cat >>conftest.$ac_ext <<_ACEOF
10666/* end confdefs.h. */
10667$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010668 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669int
10670main ()
10671{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010672static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673test_array [0] = 0
10674
10675 ;
10676 return 0;
10677}
10678_ACEOF
10679rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010680if { (ac_try="$ac_compile"
10681case "(($ac_try" in
10682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10683 *) ac_try_echo=$ac_try;;
10684esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687 ac_status=$?
10688 grep -v '^ *+' conftest.er1 >conftest.err
10689 rm -f conftest.er1
10690 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010692 (exit $ac_status); } && {
10693 test -z "$ac_c_werror_flag" ||
10694 test ! -s conftest.err
10695 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696 ac_lo=$ac_mid; break
10697else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010698 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699sed 's/^/| /' conftest.$ac_ext >&5
10700
Martin v. Löwiseba40652007-08-30 20:10:57 +000010701 ac_hi=`expr '(' $ac_mid ')' - 1`
10702 if test $ac_mid -le $ac_hi; then
10703 ac_lo= ac_hi=
10704 break
10705 fi
10706 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010708
10709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710 done
10711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010712 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010713sed 's/^/| /' conftest.$ac_ext >&5
10714
Martin v. Löwiseba40652007-08-30 20:10:57 +000010715 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010717
10718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +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 +000010722# Binary search between lo and hi bounds.
10723while test "x$ac_lo" != "x$ac_hi"; do
10724 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10725 cat >conftest.$ac_ext <<_ACEOF
10726/* confdefs.h. */
10727_ACEOF
10728cat confdefs.h >>conftest.$ac_ext
10729cat >>conftest.$ac_ext <<_ACEOF
10730/* end confdefs.h. */
10731$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010732 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010733int
10734main ()
10735{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010736static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010737test_array [0] = 0
10738
10739 ;
10740 return 0;
10741}
10742_ACEOF
10743rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010744if { (ac_try="$ac_compile"
10745case "(($ac_try" in
10746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10747 *) ac_try_echo=$ac_try;;
10748esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010751 ac_status=$?
10752 grep -v '^ *+' conftest.er1 >conftest.err
10753 rm -f conftest.er1
10754 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010756 (exit $ac_status); } && {
10757 test -z "$ac_c_werror_flag" ||
10758 test ! -s conftest.err
10759 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010760 ac_hi=$ac_mid
10761else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010762 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010763sed 's/^/| /' conftest.$ac_ext >&5
10764
Martin v. Löwiseba40652007-08-30 20:10:57 +000010765 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010767
10768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010769done
10770case $ac_lo in
10771?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010772'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010773 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010774See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010775echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010776See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010777 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010778 else
10779 ac_cv_sizeof_size_t=0
10780 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010781esac
10782else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010783 cat >conftest.$ac_ext <<_ACEOF
10784/* confdefs.h. */
10785_ACEOF
10786cat confdefs.h >>conftest.$ac_ext
10787cat >>conftest.$ac_ext <<_ACEOF
10788/* end confdefs.h. */
10789$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010790 typedef size_t ac__type_sizeof_;
10791static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10792static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010793#include <stdio.h>
10794#include <stdlib.h>
10795int
10796main ()
10797{
10798
10799 FILE *f = fopen ("conftest.val", "w");
10800 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010801 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010802 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010803 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010804 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010805 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010806 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010807 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010808 }
10809 else
10810 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010811 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010812 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010813 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010814 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010815 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010816 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010817
10818 ;
10819 return 0;
10820}
10821_ACEOF
10822rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010823if { (ac_try="$ac_link"
10824case "(($ac_try" in
10825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10826 *) ac_try_echo=$ac_try;;
10827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010829 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010830 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010832 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010833 { (case "(($ac_try" in
10834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10835 *) ac_try_echo=$ac_try;;
10836esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010838 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010839 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010841 (exit $ac_status); }; }; then
10842 ac_cv_sizeof_size_t=`cat conftest.val`
10843else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010844 echo "$as_me: program exited with status $ac_status" >&5
10845echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010846sed 's/^/| /' conftest.$ac_ext >&5
10847
10848( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010849if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010850 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010851See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010852echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010853See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010854 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010855 else
10856 ac_cv_sizeof_size_t=0
10857 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010859rm -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 +000010860fi
10861rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010862fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010863{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10864echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010865
10866
10867
Martin v. Löwis18e16552006-02-15 17:27:45 +000010868cat >>confdefs.h <<_ACEOF
10869#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10870_ACEOF
10871
10872
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010873{ echo "$as_me:$LINENO: checking for pid_t" >&5
10874echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10875if test "${ac_cv_type_pid_t+set}" = set; then
10876 echo $ECHO_N "(cached) $ECHO_C" >&6
10877else
10878 cat >conftest.$ac_ext <<_ACEOF
10879/* confdefs.h. */
10880_ACEOF
10881cat confdefs.h >>conftest.$ac_ext
10882cat >>conftest.$ac_ext <<_ACEOF
10883/* end confdefs.h. */
10884$ac_includes_default
10885typedef pid_t ac__type_new_;
10886int
10887main ()
10888{
10889if ((ac__type_new_ *) 0)
10890 return 0;
10891if (sizeof (ac__type_new_))
10892 return 0;
10893 ;
10894 return 0;
10895}
10896_ACEOF
10897rm -f conftest.$ac_objext
10898if { (ac_try="$ac_compile"
10899case "(($ac_try" in
10900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10901 *) ac_try_echo=$ac_try;;
10902esac
10903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10904 (eval "$ac_compile") 2>conftest.er1
10905 ac_status=$?
10906 grep -v '^ *+' conftest.er1 >conftest.err
10907 rm -f conftest.er1
10908 cat conftest.err >&5
10909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10910 (exit $ac_status); } && {
10911 test -z "$ac_c_werror_flag" ||
10912 test ! -s conftest.err
10913 } && test -s conftest.$ac_objext; then
10914 ac_cv_type_pid_t=yes
10915else
10916 echo "$as_me: failed program was:" >&5
10917sed 's/^/| /' conftest.$ac_ext >&5
10918
10919 ac_cv_type_pid_t=no
10920fi
10921
10922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10923fi
10924{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10925echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10926
Christian Heimes951cc0f2008-01-31 23:08:23 +000010927# The cast to long int works around a bug in the HP C Compiler
10928# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10929# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10930# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010931{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10932echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010933if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010934 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010935else
10936 if test "$cross_compiling" = yes; then
10937 # Depending upon the size, compute the lo and hi bounds.
10938cat >conftest.$ac_ext <<_ACEOF
10939/* confdefs.h. */
10940_ACEOF
10941cat confdefs.h >>conftest.$ac_ext
10942cat >>conftest.$ac_ext <<_ACEOF
10943/* end confdefs.h. */
10944$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010945 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010946int
10947main ()
10948{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010949static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010950test_array [0] = 0
10951
10952 ;
10953 return 0;
10954}
10955_ACEOF
10956rm -f conftest.$ac_objext
10957if { (ac_try="$ac_compile"
10958case "(($ac_try" in
10959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10960 *) ac_try_echo=$ac_try;;
10961esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010963 (eval "$ac_compile") 2>conftest.er1
10964 ac_status=$?
10965 grep -v '^ *+' conftest.er1 >conftest.err
10966 rm -f conftest.er1
10967 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010969 (exit $ac_status); } && {
10970 test -z "$ac_c_werror_flag" ||
10971 test ! -s conftest.err
10972 } && test -s conftest.$ac_objext; then
10973 ac_lo=0 ac_mid=0
10974 while :; do
10975 cat >conftest.$ac_ext <<_ACEOF
10976/* confdefs.h. */
10977_ACEOF
10978cat confdefs.h >>conftest.$ac_ext
10979cat >>conftest.$ac_ext <<_ACEOF
10980/* end confdefs.h. */
10981$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010982 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010983int
10984main ()
10985{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010986static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010987test_array [0] = 0
10988
10989 ;
10990 return 0;
10991}
10992_ACEOF
10993rm -f conftest.$ac_objext
10994if { (ac_try="$ac_compile"
10995case "(($ac_try" in
10996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10997 *) ac_try_echo=$ac_try;;
10998esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011000 (eval "$ac_compile") 2>conftest.er1
11001 ac_status=$?
11002 grep -v '^ *+' conftest.er1 >conftest.err
11003 rm -f conftest.er1
11004 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011006 (exit $ac_status); } && {
11007 test -z "$ac_c_werror_flag" ||
11008 test ! -s conftest.err
11009 } && test -s conftest.$ac_objext; then
11010 ac_hi=$ac_mid; break
11011else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011012 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011013sed 's/^/| /' conftest.$ac_ext >&5
11014
11015 ac_lo=`expr $ac_mid + 1`
11016 if test $ac_lo -le $ac_mid; then
11017 ac_lo= ac_hi=
11018 break
11019 fi
11020 ac_mid=`expr 2 '*' $ac_mid + 1`
11021fi
11022
11023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11024 done
11025else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011026 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011027sed 's/^/| /' conftest.$ac_ext >&5
11028
11029 cat >conftest.$ac_ext <<_ACEOF
11030/* confdefs.h. */
11031_ACEOF
11032cat confdefs.h >>conftest.$ac_ext
11033cat >>conftest.$ac_ext <<_ACEOF
11034/* end confdefs.h. */
11035$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011036 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011037int
11038main ()
11039{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011040static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011041test_array [0] = 0
11042
11043 ;
11044 return 0;
11045}
11046_ACEOF
11047rm -f conftest.$ac_objext
11048if { (ac_try="$ac_compile"
11049case "(($ac_try" in
11050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11051 *) ac_try_echo=$ac_try;;
11052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011054 (eval "$ac_compile") 2>conftest.er1
11055 ac_status=$?
11056 grep -v '^ *+' conftest.er1 >conftest.err
11057 rm -f conftest.er1
11058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011060 (exit $ac_status); } && {
11061 test -z "$ac_c_werror_flag" ||
11062 test ! -s conftest.err
11063 } && test -s conftest.$ac_objext; then
11064 ac_hi=-1 ac_mid=-1
11065 while :; do
11066 cat >conftest.$ac_ext <<_ACEOF
11067/* confdefs.h. */
11068_ACEOF
11069cat confdefs.h >>conftest.$ac_ext
11070cat >>conftest.$ac_ext <<_ACEOF
11071/* end confdefs.h. */
11072$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011073 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011074int
11075main ()
11076{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011077static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011078test_array [0] = 0
11079
11080 ;
11081 return 0;
11082}
11083_ACEOF
11084rm -f conftest.$ac_objext
11085if { (ac_try="$ac_compile"
11086case "(($ac_try" in
11087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11088 *) ac_try_echo=$ac_try;;
11089esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011091 (eval "$ac_compile") 2>conftest.er1
11092 ac_status=$?
11093 grep -v '^ *+' conftest.er1 >conftest.err
11094 rm -f conftest.er1
11095 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011097 (exit $ac_status); } && {
11098 test -z "$ac_c_werror_flag" ||
11099 test ! -s conftest.err
11100 } && test -s conftest.$ac_objext; then
11101 ac_lo=$ac_mid; break
11102else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011103 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011104sed 's/^/| /' conftest.$ac_ext >&5
11105
11106 ac_hi=`expr '(' $ac_mid ')' - 1`
11107 if test $ac_mid -le $ac_hi; then
11108 ac_lo= ac_hi=
11109 break
11110 fi
11111 ac_mid=`expr 2 '*' $ac_mid`
11112fi
11113
11114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11115 done
11116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011117 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011118sed 's/^/| /' conftest.$ac_ext >&5
11119
11120 ac_lo= ac_hi=
11121fi
11122
11123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11124fi
11125
11126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11127# Binary search between lo and hi bounds.
11128while test "x$ac_lo" != "x$ac_hi"; do
11129 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11130 cat >conftest.$ac_ext <<_ACEOF
11131/* confdefs.h. */
11132_ACEOF
11133cat confdefs.h >>conftest.$ac_ext
11134cat >>conftest.$ac_ext <<_ACEOF
11135/* end confdefs.h. */
11136$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011137 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011138int
11139main ()
11140{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011141static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011142test_array [0] = 0
11143
11144 ;
11145 return 0;
11146}
11147_ACEOF
11148rm -f conftest.$ac_objext
11149if { (ac_try="$ac_compile"
11150case "(($ac_try" in
11151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11152 *) ac_try_echo=$ac_try;;
11153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011155 (eval "$ac_compile") 2>conftest.er1
11156 ac_status=$?
11157 grep -v '^ *+' conftest.er1 >conftest.err
11158 rm -f conftest.er1
11159 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011161 (exit $ac_status); } && {
11162 test -z "$ac_c_werror_flag" ||
11163 test ! -s conftest.err
11164 } && test -s conftest.$ac_objext; then
11165 ac_hi=$ac_mid
11166else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011167 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011168sed 's/^/| /' conftest.$ac_ext >&5
11169
11170 ac_lo=`expr '(' $ac_mid ')' + 1`
11171fi
11172
11173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11174done
11175case $ac_lo in
11176?*) ac_cv_sizeof_pid_t=$ac_lo;;
11177'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011178 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011179See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011180echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011181See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011182 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011183 else
11184 ac_cv_sizeof_pid_t=0
11185 fi ;;
11186esac
11187else
11188 cat >conftest.$ac_ext <<_ACEOF
11189/* confdefs.h. */
11190_ACEOF
11191cat confdefs.h >>conftest.$ac_ext
11192cat >>conftest.$ac_ext <<_ACEOF
11193/* end confdefs.h. */
11194$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011195 typedef pid_t ac__type_sizeof_;
11196static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11197static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011198#include <stdio.h>
11199#include <stdlib.h>
11200int
11201main ()
11202{
11203
11204 FILE *f = fopen ("conftest.val", "w");
11205 if (! f)
11206 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011207 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011208 {
11209 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011210 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011211 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011212 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011213 }
11214 else
11215 {
11216 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011217 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011218 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011219 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011220 }
11221 return ferror (f) || fclose (f) != 0;
11222
11223 ;
11224 return 0;
11225}
11226_ACEOF
11227rm -f conftest$ac_exeext
11228if { (ac_try="$ac_link"
11229case "(($ac_try" in
11230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11231 *) ac_try_echo=$ac_try;;
11232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011234 (eval "$ac_link") 2>&5
11235 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011237 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11238 { (case "(($ac_try" in
11239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11240 *) ac_try_echo=$ac_try;;
11241esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011243 (eval "$ac_try") 2>&5
11244 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011246 (exit $ac_status); }; }; then
11247 ac_cv_sizeof_pid_t=`cat conftest.val`
11248else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011249 echo "$as_me: program exited with status $ac_status" >&5
11250echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011251sed 's/^/| /' conftest.$ac_ext >&5
11252
11253( exit $ac_status )
11254if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011255 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011256See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011257echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011258See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011259 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011260 else
11261 ac_cv_sizeof_pid_t=0
11262 fi
11263fi
11264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11265fi
11266rm -f conftest.val
11267fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011268{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11269echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011270
11271
11272
11273cat >>confdefs.h <<_ACEOF
11274#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11275_ACEOF
11276
11277
Michael W. Hudson54241132001-12-07 15:38:26 +000011278
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011279{ echo "$as_me:$LINENO: checking for long long support" >&5
11280echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011281have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011282cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* confdefs.h. */
11284_ACEOF
11285cat confdefs.h >>conftest.$ac_ext
11286cat >>conftest.$ac_ext <<_ACEOF
11287/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011288
Martin v. Löwis11437992002-04-12 09:54:03 +000011289int
11290main ()
11291{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011292long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011293 ;
11294 return 0;
11295}
11296_ACEOF
11297rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011298if { (ac_try="$ac_compile"
11299case "(($ac_try" in
11300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11301 *) ac_try_echo=$ac_try;;
11302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011304 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011306 grep -v '^ *+' conftest.er1 >conftest.err
11307 rm -f conftest.er1
11308 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011310 (exit $ac_status); } && {
11311 test -z "$ac_c_werror_flag" ||
11312 test ! -s conftest.err
11313 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011314
11315
11316cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011317#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011318_ACEOF
11319
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011320 have_long_long=yes
11321
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011322else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011324sed 's/^/| /' conftest.$ac_ext >&5
11325
Martin v. Löwiseba40652007-08-30 20:10:57 +000011326
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011328
11329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011330{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11331echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011332if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011333{ echo "$as_me:$LINENO: checking for long long" >&5
11334echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11335if test "${ac_cv_type_long_long+set}" = set; then
11336 echo $ECHO_N "(cached) $ECHO_C" >&6
11337else
11338 cat >conftest.$ac_ext <<_ACEOF
11339/* confdefs.h. */
11340_ACEOF
11341cat confdefs.h >>conftest.$ac_ext
11342cat >>conftest.$ac_ext <<_ACEOF
11343/* end confdefs.h. */
11344$ac_includes_default
11345typedef long long ac__type_new_;
11346int
11347main ()
11348{
11349if ((ac__type_new_ *) 0)
11350 return 0;
11351if (sizeof (ac__type_new_))
11352 return 0;
11353 ;
11354 return 0;
11355}
11356_ACEOF
11357rm -f conftest.$ac_objext
11358if { (ac_try="$ac_compile"
11359case "(($ac_try" in
11360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11361 *) ac_try_echo=$ac_try;;
11362esac
11363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11364 (eval "$ac_compile") 2>conftest.er1
11365 ac_status=$?
11366 grep -v '^ *+' conftest.er1 >conftest.err
11367 rm -f conftest.er1
11368 cat conftest.err >&5
11369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11370 (exit $ac_status); } && {
11371 test -z "$ac_c_werror_flag" ||
11372 test ! -s conftest.err
11373 } && test -s conftest.$ac_objext; then
11374 ac_cv_type_long_long=yes
11375else
11376 echo "$as_me: failed program was:" >&5
11377sed 's/^/| /' conftest.$ac_ext >&5
11378
11379 ac_cv_type_long_long=no
11380fi
11381
11382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11383fi
11384{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11385echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11386
Martin v. Löwiseba40652007-08-30 20:10:57 +000011387# The cast to long int works around a bug in the HP C Compiler
11388# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11389# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11390# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011391{ echo "$as_me:$LINENO: checking size of long long" >&5
11392echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011393if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011394 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011395else
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 if test "$cross_compiling" = yes; then
11397 # Depending upon the size, compute the lo and hi bounds.
11398cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011399/* confdefs.h. */
11400_ACEOF
11401cat confdefs.h >>conftest.$ac_ext
11402cat >>conftest.$ac_ext <<_ACEOF
11403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011404$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011405 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011406int
11407main ()
11408{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011410test_array [0] = 0
11411
11412 ;
11413 return 0;
11414}
11415_ACEOF
11416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011417if { (ac_try="$ac_compile"
11418case "(($ac_try" in
11419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11420 *) ac_try_echo=$ac_try;;
11421esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011425 grep -v '^ *+' conftest.er1 >conftest.err
11426 rm -f conftest.er1
11427 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011429 (exit $ac_status); } && {
11430 test -z "$ac_c_werror_flag" ||
11431 test ! -s conftest.err
11432 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 ac_lo=0 ac_mid=0
11434 while :; do
11435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011436/* confdefs.h. */
11437_ACEOF
11438cat confdefs.h >>conftest.$ac_ext
11439cat >>conftest.$ac_ext <<_ACEOF
11440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011441$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011442 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011443int
11444main ()
11445{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011446static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011447test_array [0] = 0
11448
11449 ;
11450 return 0;
11451}
11452_ACEOF
11453rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011454if { (ac_try="$ac_compile"
11455case "(($ac_try" in
11456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11457 *) ac_try_echo=$ac_try;;
11458esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011462 grep -v '^ *+' conftest.er1 >conftest.err
11463 rm -f conftest.er1
11464 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011466 (exit $ac_status); } && {
11467 test -z "$ac_c_werror_flag" ||
11468 test ! -s conftest.err
11469 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 ac_hi=$ac_mid; break
11471else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011473sed 's/^/| /' conftest.$ac_ext >&5
11474
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475 ac_lo=`expr $ac_mid + 1`
11476 if test $ac_lo -le $ac_mid; then
11477 ac_lo= ac_hi=
11478 break
11479 fi
11480 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011482
11483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 done
11485else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011487sed 's/^/| /' conftest.$ac_ext >&5
11488
Martin v. Löwiseba40652007-08-30 20:10:57 +000011489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011490/* confdefs.h. */
11491_ACEOF
11492cat confdefs.h >>conftest.$ac_ext
11493cat >>conftest.$ac_ext <<_ACEOF
11494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011495$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011496 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011497int
11498main ()
11499{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011500static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011501test_array [0] = 0
11502
11503 ;
11504 return 0;
11505}
11506_ACEOF
11507rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011508if { (ac_try="$ac_compile"
11509case "(($ac_try" in
11510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11511 *) ac_try_echo=$ac_try;;
11512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011516 grep -v '^ *+' conftest.er1 >conftest.err
11517 rm -f conftest.er1
11518 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011520 (exit $ac_status); } && {
11521 test -z "$ac_c_werror_flag" ||
11522 test ! -s conftest.err
11523 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 ac_hi=-1 ac_mid=-1
11525 while :; do
11526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011527/* confdefs.h. */
11528_ACEOF
11529cat confdefs.h >>conftest.$ac_ext
11530cat >>conftest.$ac_ext <<_ACEOF
11531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011532$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011533 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011534int
11535main ()
11536{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011537static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011538test_array [0] = 0
11539
11540 ;
11541 return 0;
11542}
11543_ACEOF
11544rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011545if { (ac_try="$ac_compile"
11546case "(($ac_try" in
11547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11548 *) ac_try_echo=$ac_try;;
11549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011553 grep -v '^ *+' conftest.er1 >conftest.err
11554 rm -f conftest.er1
11555 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011557 (exit $ac_status); } && {
11558 test -z "$ac_c_werror_flag" ||
11559 test ! -s conftest.err
11560 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 ac_lo=$ac_mid; break
11562else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011564sed 's/^/| /' conftest.$ac_ext >&5
11565
Martin v. Löwiseba40652007-08-30 20:10:57 +000011566 ac_hi=`expr '(' $ac_mid ')' - 1`
11567 if test $ac_mid -le $ac_hi; then
11568 ac_lo= ac_hi=
11569 break
11570 fi
11571 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011573
11574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 done
11576else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011578sed 's/^/| /' conftest.$ac_ext >&5
11579
Martin v. Löwiseba40652007-08-30 20:10:57 +000011580 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011582
11583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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 +000011587# Binary search between lo and hi bounds.
11588while test "x$ac_lo" != "x$ac_hi"; do
11589 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011591/* confdefs.h. */
11592_ACEOF
11593cat confdefs.h >>conftest.$ac_ext
11594cat >>conftest.$ac_ext <<_ACEOF
11595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011596$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011597 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011598int
11599main ()
11600{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011601static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011602test_array [0] = 0
11603
11604 ;
11605 return 0;
11606}
11607_ACEOF
11608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609if { (ac_try="$ac_compile"
11610case "(($ac_try" in
11611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11612 *) ac_try_echo=$ac_try;;
11613esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011617 grep -v '^ *+' conftest.er1 >conftest.err
11618 rm -f conftest.er1
11619 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011621 (exit $ac_status); } && {
11622 test -z "$ac_c_werror_flag" ||
11623 test ! -s conftest.err
11624 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011625 ac_hi=$ac_mid
11626else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011628sed 's/^/| /' conftest.$ac_ext >&5
11629
Martin v. Löwiseba40652007-08-30 20:10:57 +000011630 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011632
11633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011634done
11635case $ac_lo in
11636?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011637'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011638 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011639See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011640echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011641See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011642 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011643 else
11644 ac_cv_sizeof_long_long=0
11645 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011646esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011647else
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011649/* confdefs.h. */
11650_ACEOF
11651cat confdefs.h >>conftest.$ac_ext
11652cat >>conftest.$ac_ext <<_ACEOF
11653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011654$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011655 typedef long long ac__type_sizeof_;
11656static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11657static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011658#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011659#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011660int
11661main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011662{
Martin v. Löwis11437992002-04-12 09:54:03 +000011663
11664 FILE *f = fopen ("conftest.val", "w");
11665 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011666 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011667 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011669 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011670 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011671 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011672 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011673 }
11674 else
11675 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011676 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011677 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011678 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011679 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011681 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011682
11683 ;
11684 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011685}
Martin v. Löwis11437992002-04-12 09:54:03 +000011686_ACEOF
11687rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011688if { (ac_try="$ac_link"
11689case "(($ac_try" in
11690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11691 *) ac_try_echo=$ac_try;;
11692esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011694 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011695 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011698 { (case "(($ac_try" in
11699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11700 *) ac_try_echo=$ac_try;;
11701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011703 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011704 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 (exit $ac_status); }; }; then
11707 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011708else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011709 echo "$as_me: program exited with status $ac_status" >&5
11710echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011711sed 's/^/| /' conftest.$ac_ext >&5
11712
Martin v. Löwis11437992002-04-12 09:54:03 +000011713( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011714if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011715 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011716See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011717echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011718See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011719 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011720 else
11721 ac_cv_sizeof_long_long=0
11722 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011724rm -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 +000011725fi
11726rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011727fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011728{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11729echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011730
11731
11732
Martin v. Löwis11437992002-04-12 09:54:03 +000011733cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011734#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011735_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011736
Michael W. Hudson54241132001-12-07 15:38:26 +000011737
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011738fi
11739
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011740{ echo "$as_me:$LINENO: checking for long double support" >&5
11741echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011742have_long_double=no
11743cat >conftest.$ac_ext <<_ACEOF
11744/* confdefs.h. */
11745_ACEOF
11746cat confdefs.h >>conftest.$ac_ext
11747cat >>conftest.$ac_ext <<_ACEOF
11748/* end confdefs.h. */
11749
11750int
11751main ()
11752{
11753long double x; x = (long double)0.;
11754 ;
11755 return 0;
11756}
11757_ACEOF
11758rm -f conftest.$ac_objext
11759if { (ac_try="$ac_compile"
11760case "(($ac_try" in
11761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11762 *) ac_try_echo=$ac_try;;
11763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011765 (eval "$ac_compile") 2>conftest.er1
11766 ac_status=$?
11767 grep -v '^ *+' conftest.er1 >conftest.err
11768 rm -f conftest.er1
11769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011771 (exit $ac_status); } && {
11772 test -z "$ac_c_werror_flag" ||
11773 test ! -s conftest.err
11774 } && test -s conftest.$ac_objext; then
11775
11776
11777cat >>confdefs.h <<\_ACEOF
11778#define HAVE_LONG_DOUBLE 1
11779_ACEOF
11780
11781 have_long_double=yes
11782
11783else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011784 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011785sed 's/^/| /' conftest.$ac_ext >&5
11786
11787
11788fi
11789
11790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011791{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11792echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011793if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011794{ echo "$as_me:$LINENO: checking for long double" >&5
11795echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11796if test "${ac_cv_type_long_double+set}" = set; then
11797 echo $ECHO_N "(cached) $ECHO_C" >&6
11798else
11799 cat >conftest.$ac_ext <<_ACEOF
11800/* confdefs.h. */
11801_ACEOF
11802cat confdefs.h >>conftest.$ac_ext
11803cat >>conftest.$ac_ext <<_ACEOF
11804/* end confdefs.h. */
11805$ac_includes_default
11806typedef long double ac__type_new_;
11807int
11808main ()
11809{
11810if ((ac__type_new_ *) 0)
11811 return 0;
11812if (sizeof (ac__type_new_))
11813 return 0;
11814 ;
11815 return 0;
11816}
11817_ACEOF
11818rm -f conftest.$ac_objext
11819if { (ac_try="$ac_compile"
11820case "(($ac_try" in
11821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11822 *) ac_try_echo=$ac_try;;
11823esac
11824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11825 (eval "$ac_compile") 2>conftest.er1
11826 ac_status=$?
11827 grep -v '^ *+' conftest.er1 >conftest.err
11828 rm -f conftest.er1
11829 cat conftest.err >&5
11830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11831 (exit $ac_status); } && {
11832 test -z "$ac_c_werror_flag" ||
11833 test ! -s conftest.err
11834 } && test -s conftest.$ac_objext; then
11835 ac_cv_type_long_double=yes
11836else
11837 echo "$as_me: failed program was:" >&5
11838sed 's/^/| /' conftest.$ac_ext >&5
11839
11840 ac_cv_type_long_double=no
11841fi
11842
11843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11844fi
11845{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11846echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11847
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011848# The cast to long int works around a bug in the HP C Compiler
11849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11851# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011852{ echo "$as_me:$LINENO: checking size of long double" >&5
11853echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011854if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011855 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011856else
11857 if test "$cross_compiling" = yes; then
11858 # Depending upon the size, compute the lo and hi bounds.
11859cat >conftest.$ac_ext <<_ACEOF
11860/* confdefs.h. */
11861_ACEOF
11862cat confdefs.h >>conftest.$ac_ext
11863cat >>conftest.$ac_ext <<_ACEOF
11864/* end confdefs.h. */
11865$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011866 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011867int
11868main ()
11869{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011870static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011871test_array [0] = 0
11872
11873 ;
11874 return 0;
11875}
11876_ACEOF
11877rm -f conftest.$ac_objext
11878if { (ac_try="$ac_compile"
11879case "(($ac_try" in
11880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11881 *) ac_try_echo=$ac_try;;
11882esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011884 (eval "$ac_compile") 2>conftest.er1
11885 ac_status=$?
11886 grep -v '^ *+' conftest.er1 >conftest.err
11887 rm -f conftest.er1
11888 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011890 (exit $ac_status); } && {
11891 test -z "$ac_c_werror_flag" ||
11892 test ! -s conftest.err
11893 } && test -s conftest.$ac_objext; then
11894 ac_lo=0 ac_mid=0
11895 while :; do
11896 cat >conftest.$ac_ext <<_ACEOF
11897/* confdefs.h. */
11898_ACEOF
11899cat confdefs.h >>conftest.$ac_ext
11900cat >>conftest.$ac_ext <<_ACEOF
11901/* end confdefs.h. */
11902$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011903 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011904int
11905main ()
11906{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011907static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011908test_array [0] = 0
11909
11910 ;
11911 return 0;
11912}
11913_ACEOF
11914rm -f conftest.$ac_objext
11915if { (ac_try="$ac_compile"
11916case "(($ac_try" in
11917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11918 *) ac_try_echo=$ac_try;;
11919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011921 (eval "$ac_compile") 2>conftest.er1
11922 ac_status=$?
11923 grep -v '^ *+' conftest.er1 >conftest.err
11924 rm -f conftest.er1
11925 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011927 (exit $ac_status); } && {
11928 test -z "$ac_c_werror_flag" ||
11929 test ! -s conftest.err
11930 } && test -s conftest.$ac_objext; then
11931 ac_hi=$ac_mid; break
11932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011933 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011934sed 's/^/| /' conftest.$ac_ext >&5
11935
11936 ac_lo=`expr $ac_mid + 1`
11937 if test $ac_lo -le $ac_mid; then
11938 ac_lo= ac_hi=
11939 break
11940 fi
11941 ac_mid=`expr 2 '*' $ac_mid + 1`
11942fi
11943
11944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11945 done
11946else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011947 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011948sed 's/^/| /' conftest.$ac_ext >&5
11949
11950 cat >conftest.$ac_ext <<_ACEOF
11951/* confdefs.h. */
11952_ACEOF
11953cat confdefs.h >>conftest.$ac_ext
11954cat >>conftest.$ac_ext <<_ACEOF
11955/* end confdefs.h. */
11956$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011957 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011958int
11959main ()
11960{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011961static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011962test_array [0] = 0
11963
11964 ;
11965 return 0;
11966}
11967_ACEOF
11968rm -f conftest.$ac_objext
11969if { (ac_try="$ac_compile"
11970case "(($ac_try" in
11971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11972 *) ac_try_echo=$ac_try;;
11973esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011975 (eval "$ac_compile") 2>conftest.er1
11976 ac_status=$?
11977 grep -v '^ *+' conftest.er1 >conftest.err
11978 rm -f conftest.er1
11979 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011981 (exit $ac_status); } && {
11982 test -z "$ac_c_werror_flag" ||
11983 test ! -s conftest.err
11984 } && test -s conftest.$ac_objext; then
11985 ac_hi=-1 ac_mid=-1
11986 while :; do
11987 cat >conftest.$ac_ext <<_ACEOF
11988/* confdefs.h. */
11989_ACEOF
11990cat confdefs.h >>conftest.$ac_ext
11991cat >>conftest.$ac_ext <<_ACEOF
11992/* end confdefs.h. */
11993$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011994 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011995int
11996main ()
11997{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011998static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011999test_array [0] = 0
12000
12001 ;
12002 return 0;
12003}
12004_ACEOF
12005rm -f conftest.$ac_objext
12006if { (ac_try="$ac_compile"
12007case "(($ac_try" in
12008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12009 *) ac_try_echo=$ac_try;;
12010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012012 (eval "$ac_compile") 2>conftest.er1
12013 ac_status=$?
12014 grep -v '^ *+' conftest.er1 >conftest.err
12015 rm -f conftest.er1
12016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012018 (exit $ac_status); } && {
12019 test -z "$ac_c_werror_flag" ||
12020 test ! -s conftest.err
12021 } && test -s conftest.$ac_objext; then
12022 ac_lo=$ac_mid; break
12023else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012024 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012025sed 's/^/| /' conftest.$ac_ext >&5
12026
12027 ac_hi=`expr '(' $ac_mid ')' - 1`
12028 if test $ac_mid -le $ac_hi; then
12029 ac_lo= ac_hi=
12030 break
12031 fi
12032 ac_mid=`expr 2 '*' $ac_mid`
12033fi
12034
12035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12036 done
12037else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012038 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012039sed 's/^/| /' conftest.$ac_ext >&5
12040
12041 ac_lo= ac_hi=
12042fi
12043
12044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12045fi
12046
12047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12048# Binary search between lo and hi bounds.
12049while test "x$ac_lo" != "x$ac_hi"; do
12050 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12051 cat >conftest.$ac_ext <<_ACEOF
12052/* confdefs.h. */
12053_ACEOF
12054cat confdefs.h >>conftest.$ac_ext
12055cat >>conftest.$ac_ext <<_ACEOF
12056/* end confdefs.h. */
12057$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012058 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012059int
12060main ()
12061{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012062static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012063test_array [0] = 0
12064
12065 ;
12066 return 0;
12067}
12068_ACEOF
12069rm -f conftest.$ac_objext
12070if { (ac_try="$ac_compile"
12071case "(($ac_try" in
12072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12073 *) ac_try_echo=$ac_try;;
12074esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012076 (eval "$ac_compile") 2>conftest.er1
12077 ac_status=$?
12078 grep -v '^ *+' conftest.er1 >conftest.err
12079 rm -f conftest.er1
12080 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012082 (exit $ac_status); } && {
12083 test -z "$ac_c_werror_flag" ||
12084 test ! -s conftest.err
12085 } && test -s conftest.$ac_objext; then
12086 ac_hi=$ac_mid
12087else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012088 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012089sed 's/^/| /' conftest.$ac_ext >&5
12090
12091 ac_lo=`expr '(' $ac_mid ')' + 1`
12092fi
12093
12094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12095done
12096case $ac_lo in
12097?*) ac_cv_sizeof_long_double=$ac_lo;;
12098'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012099 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012100See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012101echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012102See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012103 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012104 else
12105 ac_cv_sizeof_long_double=0
12106 fi ;;
12107esac
12108else
12109 cat >conftest.$ac_ext <<_ACEOF
12110/* confdefs.h. */
12111_ACEOF
12112cat confdefs.h >>conftest.$ac_ext
12113cat >>conftest.$ac_ext <<_ACEOF
12114/* end confdefs.h. */
12115$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012116 typedef long double ac__type_sizeof_;
12117static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12118static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012119#include <stdio.h>
12120#include <stdlib.h>
12121int
12122main ()
12123{
12124
12125 FILE *f = fopen ("conftest.val", "w");
12126 if (! f)
12127 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012128 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012129 {
12130 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012131 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012132 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012133 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012134 }
12135 else
12136 {
12137 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012138 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012139 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012140 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012141 }
12142 return ferror (f) || fclose (f) != 0;
12143
12144 ;
12145 return 0;
12146}
12147_ACEOF
12148rm -f conftest$ac_exeext
12149if { (ac_try="$ac_link"
12150case "(($ac_try" in
12151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12152 *) ac_try_echo=$ac_try;;
12153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012155 (eval "$ac_link") 2>&5
12156 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012158 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12159 { (case "(($ac_try" in
12160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12161 *) ac_try_echo=$ac_try;;
12162esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012164 (eval "$ac_try") 2>&5
12165 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012167 (exit $ac_status); }; }; then
12168 ac_cv_sizeof_long_double=`cat conftest.val`
12169else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012170 echo "$as_me: program exited with status $ac_status" >&5
12171echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012172sed 's/^/| /' conftest.$ac_ext >&5
12173
12174( exit $ac_status )
12175if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012176 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012177See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012178echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012179See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012180 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012181 else
12182 ac_cv_sizeof_long_double=0
12183 fi
12184fi
12185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12186fi
12187rm -f conftest.val
12188fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012189{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12190echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012191
12192
12193
12194cat >>confdefs.h <<_ACEOF
12195#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12196_ACEOF
12197
12198
12199fi
12200
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012201{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12202echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012203have_c99_bool=no
12204cat >conftest.$ac_ext <<_ACEOF
12205/* confdefs.h. */
12206_ACEOF
12207cat confdefs.h >>conftest.$ac_ext
12208cat >>conftest.$ac_ext <<_ACEOF
12209/* end confdefs.h. */
12210
12211int
12212main ()
12213{
12214_Bool x; x = (_Bool)0;
12215 ;
12216 return 0;
12217}
12218_ACEOF
12219rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012220if { (ac_try="$ac_compile"
12221case "(($ac_try" in
12222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12223 *) ac_try_echo=$ac_try;;
12224esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012226 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012227 ac_status=$?
12228 grep -v '^ *+' conftest.er1 >conftest.err
12229 rm -f conftest.er1
12230 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012232 (exit $ac_status); } && {
12233 test -z "$ac_c_werror_flag" ||
12234 test ! -s conftest.err
12235 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012236
12237
12238cat >>confdefs.h <<\_ACEOF
12239#define HAVE_C99_BOOL 1
12240_ACEOF
12241
12242 have_c99_bool=yes
12243
12244else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012245 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012246sed 's/^/| /' conftest.$ac_ext >&5
12247
Martin v. Löwiseba40652007-08-30 20:10:57 +000012248
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012250
12251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012252{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12253echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012254if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012255{ echo "$as_me:$LINENO: checking for _Bool" >&5
12256echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12257if test "${ac_cv_type__Bool+set}" = set; then
12258 echo $ECHO_N "(cached) $ECHO_C" >&6
12259else
12260 cat >conftest.$ac_ext <<_ACEOF
12261/* confdefs.h. */
12262_ACEOF
12263cat confdefs.h >>conftest.$ac_ext
12264cat >>conftest.$ac_ext <<_ACEOF
12265/* end confdefs.h. */
12266$ac_includes_default
12267typedef _Bool ac__type_new_;
12268int
12269main ()
12270{
12271if ((ac__type_new_ *) 0)
12272 return 0;
12273if (sizeof (ac__type_new_))
12274 return 0;
12275 ;
12276 return 0;
12277}
12278_ACEOF
12279rm -f conftest.$ac_objext
12280if { (ac_try="$ac_compile"
12281case "(($ac_try" in
12282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12283 *) ac_try_echo=$ac_try;;
12284esac
12285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12286 (eval "$ac_compile") 2>conftest.er1
12287 ac_status=$?
12288 grep -v '^ *+' conftest.er1 >conftest.err
12289 rm -f conftest.er1
12290 cat conftest.err >&5
12291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12292 (exit $ac_status); } && {
12293 test -z "$ac_c_werror_flag" ||
12294 test ! -s conftest.err
12295 } && test -s conftest.$ac_objext; then
12296 ac_cv_type__Bool=yes
12297else
12298 echo "$as_me: failed program was:" >&5
12299sed 's/^/| /' conftest.$ac_ext >&5
12300
12301 ac_cv_type__Bool=no
12302fi
12303
12304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12305fi
12306{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12307echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12308
Martin v. Löwiseba40652007-08-30 20:10:57 +000012309# The cast to long int works around a bug in the HP C Compiler
12310# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12311# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12312# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012313{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12314echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012315if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012316 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012317else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012318 if test "$cross_compiling" = yes; then
12319 # Depending upon the size, compute the lo and hi bounds.
12320cat >conftest.$ac_ext <<_ACEOF
12321/* confdefs.h. */
12322_ACEOF
12323cat confdefs.h >>conftest.$ac_ext
12324cat >>conftest.$ac_ext <<_ACEOF
12325/* end confdefs.h. */
12326$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012327 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012328int
12329main ()
12330{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012332test_array [0] = 0
12333
12334 ;
12335 return 0;
12336}
12337_ACEOF
12338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012339if { (ac_try="$ac_compile"
12340case "(($ac_try" in
12341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12342 *) ac_try_echo=$ac_try;;
12343esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012346 ac_status=$?
12347 grep -v '^ *+' conftest.er1 >conftest.err
12348 rm -f conftest.er1
12349 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012351 (exit $ac_status); } && {
12352 test -z "$ac_c_werror_flag" ||
12353 test ! -s conftest.err
12354 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012355 ac_lo=0 ac_mid=0
12356 while :; do
12357 cat >conftest.$ac_ext <<_ACEOF
12358/* confdefs.h. */
12359_ACEOF
12360cat confdefs.h >>conftest.$ac_ext
12361cat >>conftest.$ac_ext <<_ACEOF
12362/* end confdefs.h. */
12363$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012364 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012365int
12366main ()
12367{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012368static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012369test_array [0] = 0
12370
12371 ;
12372 return 0;
12373}
12374_ACEOF
12375rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376if { (ac_try="$ac_compile"
12377case "(($ac_try" in
12378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12379 *) ac_try_echo=$ac_try;;
12380esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012383 ac_status=$?
12384 grep -v '^ *+' conftest.er1 >conftest.err
12385 rm -f conftest.er1
12386 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012388 (exit $ac_status); } && {
12389 test -z "$ac_c_werror_flag" ||
12390 test ! -s conftest.err
12391 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012392 ac_hi=$ac_mid; break
12393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012394 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012395sed 's/^/| /' conftest.$ac_ext >&5
12396
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397 ac_lo=`expr $ac_mid + 1`
12398 if test $ac_lo -le $ac_mid; then
12399 ac_lo= ac_hi=
12400 break
12401 fi
12402 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012404
12405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012406 done
12407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012408 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012409sed 's/^/| /' conftest.$ac_ext >&5
12410
Martin v. Löwiseba40652007-08-30 20:10:57 +000012411 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012412/* confdefs.h. */
12413_ACEOF
12414cat confdefs.h >>conftest.$ac_ext
12415cat >>conftest.$ac_ext <<_ACEOF
12416/* end confdefs.h. */
12417$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012418 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012419int
12420main ()
12421{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012423test_array [0] = 0
12424
12425 ;
12426 return 0;
12427}
12428_ACEOF
12429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012430if { (ac_try="$ac_compile"
12431case "(($ac_try" in
12432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12433 *) ac_try_echo=$ac_try;;
12434esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012437 ac_status=$?
12438 grep -v '^ *+' conftest.er1 >conftest.err
12439 rm -f conftest.er1
12440 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012442 (exit $ac_status); } && {
12443 test -z "$ac_c_werror_flag" ||
12444 test ! -s conftest.err
12445 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012446 ac_hi=-1 ac_mid=-1
12447 while :; do
12448 cat >conftest.$ac_ext <<_ACEOF
12449/* confdefs.h. */
12450_ACEOF
12451cat confdefs.h >>conftest.$ac_ext
12452cat >>conftest.$ac_ext <<_ACEOF
12453/* end confdefs.h. */
12454$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012455 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012456int
12457main ()
12458{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012459static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012460test_array [0] = 0
12461
12462 ;
12463 return 0;
12464}
12465_ACEOF
12466rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012467if { (ac_try="$ac_compile"
12468case "(($ac_try" in
12469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12470 *) ac_try_echo=$ac_try;;
12471esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012474 ac_status=$?
12475 grep -v '^ *+' conftest.er1 >conftest.err
12476 rm -f conftest.er1
12477 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012479 (exit $ac_status); } && {
12480 test -z "$ac_c_werror_flag" ||
12481 test ! -s conftest.err
12482 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012483 ac_lo=$ac_mid; break
12484else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012485 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012486sed 's/^/| /' conftest.$ac_ext >&5
12487
Martin v. Löwiseba40652007-08-30 20:10:57 +000012488 ac_hi=`expr '(' $ac_mid ')' - 1`
12489 if test $ac_mid -le $ac_hi; then
12490 ac_lo= ac_hi=
12491 break
12492 fi
12493 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012495
12496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012497 done
12498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012499 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012500sed 's/^/| /' conftest.$ac_ext >&5
12501
Martin v. Löwiseba40652007-08-30 20:10:57 +000012502 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012504
12505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +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 +000012509# Binary search between lo and hi bounds.
12510while test "x$ac_lo" != "x$ac_hi"; do
12511 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12512 cat >conftest.$ac_ext <<_ACEOF
12513/* confdefs.h. */
12514_ACEOF
12515cat confdefs.h >>conftest.$ac_ext
12516cat >>conftest.$ac_ext <<_ACEOF
12517/* end confdefs.h. */
12518$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012519 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012520int
12521main ()
12522{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012523static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012524test_array [0] = 0
12525
12526 ;
12527 return 0;
12528}
12529_ACEOF
12530rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012531if { (ac_try="$ac_compile"
12532case "(($ac_try" in
12533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12534 *) ac_try_echo=$ac_try;;
12535esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012538 ac_status=$?
12539 grep -v '^ *+' conftest.er1 >conftest.err
12540 rm -f conftest.er1
12541 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012543 (exit $ac_status); } && {
12544 test -z "$ac_c_werror_flag" ||
12545 test ! -s conftest.err
12546 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012547 ac_hi=$ac_mid
12548else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012549 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012550sed 's/^/| /' conftest.$ac_ext >&5
12551
Martin v. Löwiseba40652007-08-30 20:10:57 +000012552 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012554
12555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012556done
12557case $ac_lo in
12558?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012559'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012560 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012561See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012562echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012563See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012564 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012565 else
12566 ac_cv_sizeof__Bool=0
12567 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012568esac
12569else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012570 cat >conftest.$ac_ext <<_ACEOF
12571/* confdefs.h. */
12572_ACEOF
12573cat confdefs.h >>conftest.$ac_ext
12574cat >>conftest.$ac_ext <<_ACEOF
12575/* end confdefs.h. */
12576$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012577 typedef _Bool ac__type_sizeof_;
12578static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12579static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012580#include <stdio.h>
12581#include <stdlib.h>
12582int
12583main ()
12584{
12585
12586 FILE *f = fopen ("conftest.val", "w");
12587 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012588 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012589 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012590 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012591 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012592 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012593 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012594 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012595 }
12596 else
12597 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012598 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012599 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012600 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012601 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012602 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012603 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012604
12605 ;
12606 return 0;
12607}
12608_ACEOF
12609rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012610if { (ac_try="$ac_link"
12611case "(($ac_try" in
12612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12613 *) ac_try_echo=$ac_try;;
12614esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012616 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012617 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012619 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012620 { (case "(($ac_try" in
12621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12622 *) ac_try_echo=$ac_try;;
12623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012625 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012626 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012628 (exit $ac_status); }; }; then
12629 ac_cv_sizeof__Bool=`cat conftest.val`
12630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012631 echo "$as_me: program exited with status $ac_status" >&5
12632echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012633sed 's/^/| /' conftest.$ac_ext >&5
12634
12635( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012636if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012637 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012638See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012639echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012640See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012641 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012642 else
12643 ac_cv_sizeof__Bool=0
12644 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012646rm -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 +000012647fi
12648rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012649fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012650{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12651echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012652
12653
12654
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012655cat >>confdefs.h <<_ACEOF
12656#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12657_ACEOF
12658
12659
12660fi
12661
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012662{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12663echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012664if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012665 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012666else
12667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012668/* confdefs.h. */
12669_ACEOF
12670cat confdefs.h >>conftest.$ac_ext
12671cat >>conftest.$ac_ext <<_ACEOF
12672/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012673#ifdef HAVE_STDINT_H
12674 #include <stdint.h>
12675 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012676
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012677typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012678int
12679main ()
12680{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012681if ((ac__type_new_ *) 0)
12682 return 0;
12683if (sizeof (ac__type_new_))
12684 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012685 ;
12686 return 0;
12687}
12688_ACEOF
12689rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012690if { (ac_try="$ac_compile"
12691case "(($ac_try" in
12692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12693 *) ac_try_echo=$ac_try;;
12694esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012698 grep -v '^ *+' conftest.er1 >conftest.err
12699 rm -f conftest.er1
12700 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012702 (exit $ac_status); } && {
12703 test -z "$ac_c_werror_flag" ||
12704 test ! -s conftest.err
12705 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012706 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012707else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012709sed 's/^/| /' conftest.$ac_ext >&5
12710
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012711 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012713
12714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012715fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012716{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12717echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12718if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012719
12720cat >>confdefs.h <<_ACEOF
12721#define HAVE_UINTPTR_T 1
12722_ACEOF
12723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012724{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12725echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12726if test "${ac_cv_type_uintptr_t+set}" = set; then
12727 echo $ECHO_N "(cached) $ECHO_C" >&6
12728else
12729 cat >conftest.$ac_ext <<_ACEOF
12730/* confdefs.h. */
12731_ACEOF
12732cat confdefs.h >>conftest.$ac_ext
12733cat >>conftest.$ac_ext <<_ACEOF
12734/* end confdefs.h. */
12735$ac_includes_default
12736typedef uintptr_t ac__type_new_;
12737int
12738main ()
12739{
12740if ((ac__type_new_ *) 0)
12741 return 0;
12742if (sizeof (ac__type_new_))
12743 return 0;
12744 ;
12745 return 0;
12746}
12747_ACEOF
12748rm -f conftest.$ac_objext
12749if { (ac_try="$ac_compile"
12750case "(($ac_try" in
12751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12752 *) ac_try_echo=$ac_try;;
12753esac
12754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12755 (eval "$ac_compile") 2>conftest.er1
12756 ac_status=$?
12757 grep -v '^ *+' conftest.er1 >conftest.err
12758 rm -f conftest.er1
12759 cat conftest.err >&5
12760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12761 (exit $ac_status); } && {
12762 test -z "$ac_c_werror_flag" ||
12763 test ! -s conftest.err
12764 } && test -s conftest.$ac_objext; then
12765 ac_cv_type_uintptr_t=yes
12766else
12767 echo "$as_me: failed program was:" >&5
12768sed 's/^/| /' conftest.$ac_ext >&5
12769
12770 ac_cv_type_uintptr_t=no
12771fi
12772
12773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12774fi
12775{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12776echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12777
Martin v. Löwiseba40652007-08-30 20:10:57 +000012778# The cast to long int works around a bug in the HP C Compiler
12779# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12780# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12781# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012782{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12783echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012784if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012785 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012786else
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 if test "$cross_compiling" = yes; then
12788 # Depending upon the size, compute the lo and hi bounds.
12789cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012790/* confdefs.h. */
12791_ACEOF
12792cat confdefs.h >>conftest.$ac_ext
12793cat >>conftest.$ac_ext <<_ACEOF
12794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012795$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012796 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012797int
12798main ()
12799{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012801test_array [0] = 0
12802
12803 ;
12804 return 0;
12805}
12806_ACEOF
12807rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012808if { (ac_try="$ac_compile"
12809case "(($ac_try" in
12810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12811 *) ac_try_echo=$ac_try;;
12812esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012816 grep -v '^ *+' conftest.er1 >conftest.err
12817 rm -f conftest.er1
12818 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012820 (exit $ac_status); } && {
12821 test -z "$ac_c_werror_flag" ||
12822 test ! -s conftest.err
12823 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 ac_lo=0 ac_mid=0
12825 while :; do
12826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012827/* confdefs.h. */
12828_ACEOF
12829cat confdefs.h >>conftest.$ac_ext
12830cat >>conftest.$ac_ext <<_ACEOF
12831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012832$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012833 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012834int
12835main ()
12836{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012837static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012838test_array [0] = 0
12839
12840 ;
12841 return 0;
12842}
12843_ACEOF
12844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012845if { (ac_try="$ac_compile"
12846case "(($ac_try" in
12847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12848 *) ac_try_echo=$ac_try;;
12849esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012853 grep -v '^ *+' conftest.er1 >conftest.err
12854 rm -f conftest.er1
12855 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857 (exit $ac_status); } && {
12858 test -z "$ac_c_werror_flag" ||
12859 test ! -s conftest.err
12860 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 ac_hi=$ac_mid; break
12862else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012864sed 's/^/| /' conftest.$ac_ext >&5
12865
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866 ac_lo=`expr $ac_mid + 1`
12867 if test $ac_lo -le $ac_mid; then
12868 ac_lo= ac_hi=
12869 break
12870 fi
12871 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012873
12874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 done
12876else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012878sed 's/^/| /' conftest.$ac_ext >&5
12879
Martin v. Löwiseba40652007-08-30 20:10:57 +000012880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012881/* confdefs.h. */
12882_ACEOF
12883cat confdefs.h >>conftest.$ac_ext
12884cat >>conftest.$ac_ext <<_ACEOF
12885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012886$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012887 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012888int
12889main ()
12890{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012891static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012892test_array [0] = 0
12893
12894 ;
12895 return 0;
12896}
12897_ACEOF
12898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012899if { (ac_try="$ac_compile"
12900case "(($ac_try" in
12901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12902 *) ac_try_echo=$ac_try;;
12903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012907 grep -v '^ *+' conftest.er1 >conftest.err
12908 rm -f conftest.er1
12909 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012911 (exit $ac_status); } && {
12912 test -z "$ac_c_werror_flag" ||
12913 test ! -s conftest.err
12914 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 ac_hi=-1 ac_mid=-1
12916 while :; do
12917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012918/* confdefs.h. */
12919_ACEOF
12920cat confdefs.h >>conftest.$ac_ext
12921cat >>conftest.$ac_ext <<_ACEOF
12922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012923$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012924 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012925int
12926main ()
12927{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012928static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012929test_array [0] = 0
12930
12931 ;
12932 return 0;
12933}
12934_ACEOF
12935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012936if { (ac_try="$ac_compile"
12937case "(($ac_try" in
12938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12939 *) ac_try_echo=$ac_try;;
12940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012944 grep -v '^ *+' conftest.er1 >conftest.err
12945 rm -f conftest.er1
12946 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012948 (exit $ac_status); } && {
12949 test -z "$ac_c_werror_flag" ||
12950 test ! -s conftest.err
12951 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 ac_lo=$ac_mid; break
12953else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012955sed 's/^/| /' conftest.$ac_ext >&5
12956
Martin v. Löwiseba40652007-08-30 20:10:57 +000012957 ac_hi=`expr '(' $ac_mid ')' - 1`
12958 if test $ac_mid -le $ac_hi; then
12959 ac_lo= ac_hi=
12960 break
12961 fi
12962 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012964
12965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 done
12967else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012969sed 's/^/| /' conftest.$ac_ext >&5
12970
Martin v. Löwiseba40652007-08-30 20:10:57 +000012971 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012973
12974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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 +000012978# Binary search between lo and hi bounds.
12979while test "x$ac_lo" != "x$ac_hi"; do
12980 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012982/* confdefs.h. */
12983_ACEOF
12984cat confdefs.h >>conftest.$ac_ext
12985cat >>conftest.$ac_ext <<_ACEOF
12986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012987$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012988 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012989int
12990main ()
12991{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012992static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012993test_array [0] = 0
12994
12995 ;
12996 return 0;
12997}
12998_ACEOF
12999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013000if { (ac_try="$ac_compile"
13001case "(($ac_try" in
13002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13003 *) ac_try_echo=$ac_try;;
13004esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013008 grep -v '^ *+' conftest.er1 >conftest.err
13009 rm -f conftest.er1
13010 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013012 (exit $ac_status); } && {
13013 test -z "$ac_c_werror_flag" ||
13014 test ! -s conftest.err
13015 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 ac_hi=$ac_mid
13017else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013019sed 's/^/| /' conftest.$ac_ext >&5
13020
Martin v. Löwiseba40652007-08-30 20:10:57 +000013021 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013023
13024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013025done
13026case $ac_lo in
13027?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013028'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013029 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013030See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013031echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013032See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013033 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013034 else
13035 ac_cv_sizeof_uintptr_t=0
13036 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013037esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013038else
Martin v. Löwis11437992002-04-12 09:54:03 +000013039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013040/* confdefs.h. */
13041_ACEOF
13042cat confdefs.h >>conftest.$ac_ext
13043cat >>conftest.$ac_ext <<_ACEOF
13044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013045$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013046 typedef uintptr_t ac__type_sizeof_;
13047static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13048static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013049#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013050#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013051int
13052main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013053{
Martin v. Löwis11437992002-04-12 09:54:03 +000013054
13055 FILE *f = fopen ("conftest.val", "w");
13056 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013057 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013058 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013060 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013061 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013062 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013063 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 }
13065 else
13066 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013067 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013068 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013069 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013070 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013072 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013073
13074 ;
13075 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013076}
Martin v. Löwis11437992002-04-12 09:54:03 +000013077_ACEOF
13078rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013079if { (ac_try="$ac_link"
13080case "(($ac_try" in
13081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13082 *) ac_try_echo=$ac_try;;
13083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013085 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013088 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013089 { (case "(($ac_try" in
13090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13091 *) ac_try_echo=$ac_try;;
13092esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013094 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013095 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 (exit $ac_status); }; }; then
13098 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013099else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013100 echo "$as_me: program exited with status $ac_status" >&5
13101echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013102sed 's/^/| /' conftest.$ac_ext >&5
13103
Martin v. Löwis11437992002-04-12 09:54:03 +000013104( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013105if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013106 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013107See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013108echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013109See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013110 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013111 else
13112 ac_cv_sizeof_uintptr_t=0
13113 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013115rm -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 +000013116fi
13117rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013118fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013119{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13120echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013121
13122
13123
Martin v. Löwis11437992002-04-12 09:54:03 +000013124cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013125#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013126_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013127
Michael W. Hudson54241132001-12-07 15:38:26 +000013128
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013129fi
13130
Martin v. Löwisebe26702006-10-02 14:55:51 +000013131
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013132{ echo "$as_me:$LINENO: checking for off_t" >&5
13133echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13134if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013135 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013136else
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013138/* confdefs.h. */
13139_ACEOF
13140cat confdefs.h >>conftest.$ac_ext
13141cat >>conftest.$ac_ext <<_ACEOF
13142/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013143
13144#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013145#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013146#endif
13147
13148
13149typedef off_t ac__type_new_;
13150int
13151main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013152{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013153if ((ac__type_new_ *) 0)
13154 return 0;
13155if (sizeof (ac__type_new_))
13156 return 0;
13157 ;
13158 return 0;
13159}
13160_ACEOF
13161rm -f conftest.$ac_objext
13162if { (ac_try="$ac_compile"
13163case "(($ac_try" in
13164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13165 *) ac_try_echo=$ac_try;;
13166esac
13167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13168 (eval "$ac_compile") 2>conftest.er1
13169 ac_status=$?
13170 grep -v '^ *+' conftest.er1 >conftest.err
13171 rm -f conftest.er1
13172 cat conftest.err >&5
13173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13174 (exit $ac_status); } && {
13175 test -z "$ac_c_werror_flag" ||
13176 test ! -s conftest.err
13177 } && test -s conftest.$ac_objext; then
13178 ac_cv_type_off_t=yes
13179else
13180 echo "$as_me: failed program was:" >&5
13181sed 's/^/| /' conftest.$ac_ext >&5
13182
13183 ac_cv_type_off_t=no
13184fi
13185
13186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13187fi
13188{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13189echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13190
13191# The cast to long int works around a bug in the HP C Compiler
13192# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13193# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13194# This bug is HP SR number 8606223364.
13195{ echo "$as_me:$LINENO: checking size of off_t" >&5
13196echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13197if test "${ac_cv_sizeof_off_t+set}" = set; then
13198 echo $ECHO_N "(cached) $ECHO_C" >&6
13199else
13200 if test "$cross_compiling" = yes; then
13201 # Depending upon the size, compute the lo and hi bounds.
13202cat >conftest.$ac_ext <<_ACEOF
13203/* confdefs.h. */
13204_ACEOF
13205cat confdefs.h >>conftest.$ac_ext
13206cat >>conftest.$ac_ext <<_ACEOF
13207/* end confdefs.h. */
13208
13209#ifdef HAVE_SYS_TYPES_H
13210#include <sys/types.h>
13211#endif
13212
13213
13214 typedef off_t ac__type_sizeof_;
13215int
13216main ()
13217{
13218static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13219test_array [0] = 0
13220
13221 ;
13222 return 0;
13223}
13224_ACEOF
13225rm -f conftest.$ac_objext
13226if { (ac_try="$ac_compile"
13227case "(($ac_try" in
13228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13229 *) ac_try_echo=$ac_try;;
13230esac
13231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13232 (eval "$ac_compile") 2>conftest.er1
13233 ac_status=$?
13234 grep -v '^ *+' conftest.er1 >conftest.err
13235 rm -f conftest.er1
13236 cat conftest.err >&5
13237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13238 (exit $ac_status); } && {
13239 test -z "$ac_c_werror_flag" ||
13240 test ! -s conftest.err
13241 } && test -s conftest.$ac_objext; then
13242 ac_lo=0 ac_mid=0
13243 while :; do
13244 cat >conftest.$ac_ext <<_ACEOF
13245/* confdefs.h. */
13246_ACEOF
13247cat confdefs.h >>conftest.$ac_ext
13248cat >>conftest.$ac_ext <<_ACEOF
13249/* end confdefs.h. */
13250
13251#ifdef HAVE_SYS_TYPES_H
13252#include <sys/types.h>
13253#endif
13254
13255
13256 typedef off_t ac__type_sizeof_;
13257int
13258main ()
13259{
13260static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13261test_array [0] = 0
13262
13263 ;
13264 return 0;
13265}
13266_ACEOF
13267rm -f conftest.$ac_objext
13268if { (ac_try="$ac_compile"
13269case "(($ac_try" in
13270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13271 *) ac_try_echo=$ac_try;;
13272esac
13273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13274 (eval "$ac_compile") 2>conftest.er1
13275 ac_status=$?
13276 grep -v '^ *+' conftest.er1 >conftest.err
13277 rm -f conftest.er1
13278 cat conftest.err >&5
13279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13280 (exit $ac_status); } && {
13281 test -z "$ac_c_werror_flag" ||
13282 test ! -s conftest.err
13283 } && test -s conftest.$ac_objext; then
13284 ac_hi=$ac_mid; break
13285else
13286 echo "$as_me: failed program was:" >&5
13287sed 's/^/| /' conftest.$ac_ext >&5
13288
13289 ac_lo=`expr $ac_mid + 1`
13290 if test $ac_lo -le $ac_mid; then
13291 ac_lo= ac_hi=
13292 break
13293 fi
13294 ac_mid=`expr 2 '*' $ac_mid + 1`
13295fi
13296
13297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13298 done
13299else
13300 echo "$as_me: failed program was:" >&5
13301sed 's/^/| /' conftest.$ac_ext >&5
13302
13303 cat >conftest.$ac_ext <<_ACEOF
13304/* confdefs.h. */
13305_ACEOF
13306cat confdefs.h >>conftest.$ac_ext
13307cat >>conftest.$ac_ext <<_ACEOF
13308/* end confdefs.h. */
13309
13310#ifdef HAVE_SYS_TYPES_H
13311#include <sys/types.h>
13312#endif
13313
13314
13315 typedef off_t ac__type_sizeof_;
13316int
13317main ()
13318{
13319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13320test_array [0] = 0
13321
13322 ;
13323 return 0;
13324}
13325_ACEOF
13326rm -f conftest.$ac_objext
13327if { (ac_try="$ac_compile"
13328case "(($ac_try" in
13329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13330 *) ac_try_echo=$ac_try;;
13331esac
13332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13333 (eval "$ac_compile") 2>conftest.er1
13334 ac_status=$?
13335 grep -v '^ *+' conftest.er1 >conftest.err
13336 rm -f conftest.er1
13337 cat conftest.err >&5
13338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339 (exit $ac_status); } && {
13340 test -z "$ac_c_werror_flag" ||
13341 test ! -s conftest.err
13342 } && test -s conftest.$ac_objext; then
13343 ac_hi=-1 ac_mid=-1
13344 while :; do
13345 cat >conftest.$ac_ext <<_ACEOF
13346/* confdefs.h. */
13347_ACEOF
13348cat confdefs.h >>conftest.$ac_ext
13349cat >>conftest.$ac_ext <<_ACEOF
13350/* end confdefs.h. */
13351
13352#ifdef HAVE_SYS_TYPES_H
13353#include <sys/types.h>
13354#endif
13355
13356
13357 typedef off_t ac__type_sizeof_;
13358int
13359main ()
13360{
13361static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13362test_array [0] = 0
13363
13364 ;
13365 return 0;
13366}
13367_ACEOF
13368rm -f conftest.$ac_objext
13369if { (ac_try="$ac_compile"
13370case "(($ac_try" in
13371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13372 *) ac_try_echo=$ac_try;;
13373esac
13374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13375 (eval "$ac_compile") 2>conftest.er1
13376 ac_status=$?
13377 grep -v '^ *+' conftest.er1 >conftest.err
13378 rm -f conftest.er1
13379 cat conftest.err >&5
13380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13381 (exit $ac_status); } && {
13382 test -z "$ac_c_werror_flag" ||
13383 test ! -s conftest.err
13384 } && test -s conftest.$ac_objext; then
13385 ac_lo=$ac_mid; break
13386else
13387 echo "$as_me: failed program was:" >&5
13388sed 's/^/| /' conftest.$ac_ext >&5
13389
13390 ac_hi=`expr '(' $ac_mid ')' - 1`
13391 if test $ac_mid -le $ac_hi; then
13392 ac_lo= ac_hi=
13393 break
13394 fi
13395 ac_mid=`expr 2 '*' $ac_mid`
13396fi
13397
13398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13399 done
13400else
13401 echo "$as_me: failed program was:" >&5
13402sed 's/^/| /' conftest.$ac_ext >&5
13403
13404 ac_lo= ac_hi=
13405fi
13406
13407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13408fi
13409
13410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13411# Binary search between lo and hi bounds.
13412while test "x$ac_lo" != "x$ac_hi"; do
13413 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13414 cat >conftest.$ac_ext <<_ACEOF
13415/* confdefs.h. */
13416_ACEOF
13417cat confdefs.h >>conftest.$ac_ext
13418cat >>conftest.$ac_ext <<_ACEOF
13419/* end confdefs.h. */
13420
13421#ifdef HAVE_SYS_TYPES_H
13422#include <sys/types.h>
13423#endif
13424
13425
13426 typedef off_t ac__type_sizeof_;
13427int
13428main ()
13429{
13430static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13431test_array [0] = 0
13432
13433 ;
13434 return 0;
13435}
13436_ACEOF
13437rm -f conftest.$ac_objext
13438if { (ac_try="$ac_compile"
13439case "(($ac_try" in
13440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13441 *) ac_try_echo=$ac_try;;
13442esac
13443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13444 (eval "$ac_compile") 2>conftest.er1
13445 ac_status=$?
13446 grep -v '^ *+' conftest.er1 >conftest.err
13447 rm -f conftest.er1
13448 cat conftest.err >&5
13449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13450 (exit $ac_status); } && {
13451 test -z "$ac_c_werror_flag" ||
13452 test ! -s conftest.err
13453 } && test -s conftest.$ac_objext; then
13454 ac_hi=$ac_mid
13455else
13456 echo "$as_me: failed program was:" >&5
13457sed 's/^/| /' conftest.$ac_ext >&5
13458
13459 ac_lo=`expr '(' $ac_mid ')' + 1`
13460fi
13461
13462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13463done
13464case $ac_lo in
13465?*) ac_cv_sizeof_off_t=$ac_lo;;
13466'') if test "$ac_cv_type_off_t" = yes; then
13467 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13468See \`config.log' for more details." >&5
13469echo "$as_me: error: cannot compute sizeof (off_t)
13470See \`config.log' for more details." >&2;}
13471 { (exit 77); exit 77; }; }
13472 else
13473 ac_cv_sizeof_off_t=0
13474 fi ;;
13475esac
13476else
13477 cat >conftest.$ac_ext <<_ACEOF
13478/* confdefs.h. */
13479_ACEOF
13480cat confdefs.h >>conftest.$ac_ext
13481cat >>conftest.$ac_ext <<_ACEOF
13482/* end confdefs.h. */
13483
13484#ifdef HAVE_SYS_TYPES_H
13485#include <sys/types.h>
13486#endif
13487
13488
13489 typedef off_t ac__type_sizeof_;
13490static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13491static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13492#include <stdio.h>
13493#include <stdlib.h>
13494int
13495main ()
13496{
13497
13498 FILE *f = fopen ("conftest.val", "w");
13499 if (! f)
13500 return 1;
13501 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13502 {
13503 long int i = longval ();
13504 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13505 return 1;
13506 fprintf (f, "%ld\n", i);
13507 }
13508 else
13509 {
13510 unsigned long int i = ulongval ();
13511 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13512 return 1;
13513 fprintf (f, "%lu\n", i);
13514 }
13515 return ferror (f) || fclose (f) != 0;
13516
13517 ;
13518 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013519}
Martin v. Löwis11437992002-04-12 09:54:03 +000013520_ACEOF
13521rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522if { (ac_try="$ac_link"
13523case "(($ac_try" in
13524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13525 *) ac_try_echo=$ac_try;;
13526esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013528 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013531 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013532 { (case "(($ac_try" in
13533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13534 *) ac_try_echo=$ac_try;;
13535esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013537 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013538 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013541 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013543 echo "$as_me: program exited with status $ac_status" >&5
13544echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013545sed 's/^/| /' conftest.$ac_ext >&5
13546
Martin v. Löwis11437992002-04-12 09:54:03 +000013547( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013548if test "$ac_cv_type_off_t" = yes; then
13549 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13550See \`config.log' for more details." >&5
13551echo "$as_me: error: cannot compute sizeof (off_t)
13552See \`config.log' for more details." >&2;}
13553 { (exit 77); exit 77; }; }
13554 else
13555 ac_cv_sizeof_off_t=0
13556 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013558rm -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 +000013559fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013560rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013561fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013562{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13563echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013564
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013565
13566
Martin v. Löwis11437992002-04-12 09:54:03 +000013567cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013568#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013569_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013570
Michael W. Hudson54241132001-12-07 15:38:26 +000013571
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013572
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013573{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13574echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013575if test "$have_long_long" = yes
13576then
13577if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013578 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013579
Martin v. Löwis11437992002-04-12 09:54:03 +000013580cat >>confdefs.h <<\_ACEOF
13581#define HAVE_LARGEFILE_SUPPORT 1
13582_ACEOF
13583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013584 { echo "$as_me:$LINENO: result: yes" >&5
13585echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013587 { echo "$as_me:$LINENO: result: no" >&5
13588echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013589fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013590else
13591 { echo "$as_me:$LINENO: result: no" >&5
13592echo "${ECHO_T}no" >&6; }
13593fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013594
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013595{ echo "$as_me:$LINENO: checking for time_t" >&5
13596echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13597if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013598 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013599else
Martin v. Löwis11437992002-04-12 09:54:03 +000013600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013601/* confdefs.h. */
13602_ACEOF
13603cat confdefs.h >>conftest.$ac_ext
13604cat >>conftest.$ac_ext <<_ACEOF
13605/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013606
13607#ifdef HAVE_SYS_TYPES_H
13608#include <sys/types.h>
13609#endif
13610#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013611#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013612#endif
13613
13614
13615typedef time_t ac__type_new_;
13616int
13617main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013618{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013619if ((ac__type_new_ *) 0)
13620 return 0;
13621if (sizeof (ac__type_new_))
13622 return 0;
13623 ;
13624 return 0;
13625}
13626_ACEOF
13627rm -f conftest.$ac_objext
13628if { (ac_try="$ac_compile"
13629case "(($ac_try" in
13630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13631 *) ac_try_echo=$ac_try;;
13632esac
13633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13634 (eval "$ac_compile") 2>conftest.er1
13635 ac_status=$?
13636 grep -v '^ *+' conftest.er1 >conftest.err
13637 rm -f conftest.er1
13638 cat conftest.err >&5
13639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13640 (exit $ac_status); } && {
13641 test -z "$ac_c_werror_flag" ||
13642 test ! -s conftest.err
13643 } && test -s conftest.$ac_objext; then
13644 ac_cv_type_time_t=yes
13645else
13646 echo "$as_me: failed program was:" >&5
13647sed 's/^/| /' conftest.$ac_ext >&5
13648
13649 ac_cv_type_time_t=no
13650fi
13651
13652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13653fi
13654{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13655echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13656
13657# The cast to long int works around a bug in the HP C Compiler
13658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13660# This bug is HP SR number 8606223364.
13661{ echo "$as_me:$LINENO: checking size of time_t" >&5
13662echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13663if test "${ac_cv_sizeof_time_t+set}" = set; then
13664 echo $ECHO_N "(cached) $ECHO_C" >&6
13665else
13666 if test "$cross_compiling" = yes; then
13667 # Depending upon the size, compute the lo and hi bounds.
13668cat >conftest.$ac_ext <<_ACEOF
13669/* confdefs.h. */
13670_ACEOF
13671cat confdefs.h >>conftest.$ac_ext
13672cat >>conftest.$ac_ext <<_ACEOF
13673/* end confdefs.h. */
13674
13675#ifdef HAVE_SYS_TYPES_H
13676#include <sys/types.h>
13677#endif
13678#ifdef HAVE_TIME_H
13679#include <time.h>
13680#endif
13681
13682
13683 typedef time_t ac__type_sizeof_;
13684int
13685main ()
13686{
13687static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13688test_array [0] = 0
13689
13690 ;
13691 return 0;
13692}
13693_ACEOF
13694rm -f conftest.$ac_objext
13695if { (ac_try="$ac_compile"
13696case "(($ac_try" in
13697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13698 *) ac_try_echo=$ac_try;;
13699esac
13700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13701 (eval "$ac_compile") 2>conftest.er1
13702 ac_status=$?
13703 grep -v '^ *+' conftest.er1 >conftest.err
13704 rm -f conftest.er1
13705 cat conftest.err >&5
13706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707 (exit $ac_status); } && {
13708 test -z "$ac_c_werror_flag" ||
13709 test ! -s conftest.err
13710 } && test -s conftest.$ac_objext; then
13711 ac_lo=0 ac_mid=0
13712 while :; do
13713 cat >conftest.$ac_ext <<_ACEOF
13714/* confdefs.h. */
13715_ACEOF
13716cat confdefs.h >>conftest.$ac_ext
13717cat >>conftest.$ac_ext <<_ACEOF
13718/* end confdefs.h. */
13719
13720#ifdef HAVE_SYS_TYPES_H
13721#include <sys/types.h>
13722#endif
13723#ifdef HAVE_TIME_H
13724#include <time.h>
13725#endif
13726
13727
13728 typedef time_t ac__type_sizeof_;
13729int
13730main ()
13731{
13732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13733test_array [0] = 0
13734
13735 ;
13736 return 0;
13737}
13738_ACEOF
13739rm -f conftest.$ac_objext
13740if { (ac_try="$ac_compile"
13741case "(($ac_try" in
13742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13743 *) ac_try_echo=$ac_try;;
13744esac
13745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13746 (eval "$ac_compile") 2>conftest.er1
13747 ac_status=$?
13748 grep -v '^ *+' conftest.er1 >conftest.err
13749 rm -f conftest.er1
13750 cat conftest.err >&5
13751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13752 (exit $ac_status); } && {
13753 test -z "$ac_c_werror_flag" ||
13754 test ! -s conftest.err
13755 } && test -s conftest.$ac_objext; then
13756 ac_hi=$ac_mid; break
13757else
13758 echo "$as_me: failed program was:" >&5
13759sed 's/^/| /' conftest.$ac_ext >&5
13760
13761 ac_lo=`expr $ac_mid + 1`
13762 if test $ac_lo -le $ac_mid; then
13763 ac_lo= ac_hi=
13764 break
13765 fi
13766 ac_mid=`expr 2 '*' $ac_mid + 1`
13767fi
13768
13769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13770 done
13771else
13772 echo "$as_me: failed program was:" >&5
13773sed 's/^/| /' conftest.$ac_ext >&5
13774
13775 cat >conftest.$ac_ext <<_ACEOF
13776/* confdefs.h. */
13777_ACEOF
13778cat confdefs.h >>conftest.$ac_ext
13779cat >>conftest.$ac_ext <<_ACEOF
13780/* end confdefs.h. */
13781
13782#ifdef HAVE_SYS_TYPES_H
13783#include <sys/types.h>
13784#endif
13785#ifdef HAVE_TIME_H
13786#include <time.h>
13787#endif
13788
13789
13790 typedef time_t ac__type_sizeof_;
13791int
13792main ()
13793{
13794static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13795test_array [0] = 0
13796
13797 ;
13798 return 0;
13799}
13800_ACEOF
13801rm -f conftest.$ac_objext
13802if { (ac_try="$ac_compile"
13803case "(($ac_try" in
13804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13805 *) ac_try_echo=$ac_try;;
13806esac
13807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13808 (eval "$ac_compile") 2>conftest.er1
13809 ac_status=$?
13810 grep -v '^ *+' conftest.er1 >conftest.err
13811 rm -f conftest.er1
13812 cat conftest.err >&5
13813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13814 (exit $ac_status); } && {
13815 test -z "$ac_c_werror_flag" ||
13816 test ! -s conftest.err
13817 } && test -s conftest.$ac_objext; then
13818 ac_hi=-1 ac_mid=-1
13819 while :; do
13820 cat >conftest.$ac_ext <<_ACEOF
13821/* confdefs.h. */
13822_ACEOF
13823cat confdefs.h >>conftest.$ac_ext
13824cat >>conftest.$ac_ext <<_ACEOF
13825/* end confdefs.h. */
13826
13827#ifdef HAVE_SYS_TYPES_H
13828#include <sys/types.h>
13829#endif
13830#ifdef HAVE_TIME_H
13831#include <time.h>
13832#endif
13833
13834
13835 typedef time_t ac__type_sizeof_;
13836int
13837main ()
13838{
13839static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13840test_array [0] = 0
13841
13842 ;
13843 return 0;
13844}
13845_ACEOF
13846rm -f conftest.$ac_objext
13847if { (ac_try="$ac_compile"
13848case "(($ac_try" in
13849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13850 *) ac_try_echo=$ac_try;;
13851esac
13852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13853 (eval "$ac_compile") 2>conftest.er1
13854 ac_status=$?
13855 grep -v '^ *+' conftest.er1 >conftest.err
13856 rm -f conftest.er1
13857 cat conftest.err >&5
13858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13859 (exit $ac_status); } && {
13860 test -z "$ac_c_werror_flag" ||
13861 test ! -s conftest.err
13862 } && test -s conftest.$ac_objext; then
13863 ac_lo=$ac_mid; break
13864else
13865 echo "$as_me: failed program was:" >&5
13866sed 's/^/| /' conftest.$ac_ext >&5
13867
13868 ac_hi=`expr '(' $ac_mid ')' - 1`
13869 if test $ac_mid -le $ac_hi; then
13870 ac_lo= ac_hi=
13871 break
13872 fi
13873 ac_mid=`expr 2 '*' $ac_mid`
13874fi
13875
13876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13877 done
13878else
13879 echo "$as_me: failed program was:" >&5
13880sed 's/^/| /' conftest.$ac_ext >&5
13881
13882 ac_lo= ac_hi=
13883fi
13884
13885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13886fi
13887
13888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13889# Binary search between lo and hi bounds.
13890while test "x$ac_lo" != "x$ac_hi"; do
13891 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13892 cat >conftest.$ac_ext <<_ACEOF
13893/* confdefs.h. */
13894_ACEOF
13895cat confdefs.h >>conftest.$ac_ext
13896cat >>conftest.$ac_ext <<_ACEOF
13897/* end confdefs.h. */
13898
13899#ifdef HAVE_SYS_TYPES_H
13900#include <sys/types.h>
13901#endif
13902#ifdef HAVE_TIME_H
13903#include <time.h>
13904#endif
13905
13906
13907 typedef time_t ac__type_sizeof_;
13908int
13909main ()
13910{
13911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13912test_array [0] = 0
13913
13914 ;
13915 return 0;
13916}
13917_ACEOF
13918rm -f conftest.$ac_objext
13919if { (ac_try="$ac_compile"
13920case "(($ac_try" in
13921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13922 *) ac_try_echo=$ac_try;;
13923esac
13924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13925 (eval "$ac_compile") 2>conftest.er1
13926 ac_status=$?
13927 grep -v '^ *+' conftest.er1 >conftest.err
13928 rm -f conftest.er1
13929 cat conftest.err >&5
13930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13931 (exit $ac_status); } && {
13932 test -z "$ac_c_werror_flag" ||
13933 test ! -s conftest.err
13934 } && test -s conftest.$ac_objext; then
13935 ac_hi=$ac_mid
13936else
13937 echo "$as_me: failed program was:" >&5
13938sed 's/^/| /' conftest.$ac_ext >&5
13939
13940 ac_lo=`expr '(' $ac_mid ')' + 1`
13941fi
13942
13943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13944done
13945case $ac_lo in
13946?*) ac_cv_sizeof_time_t=$ac_lo;;
13947'') if test "$ac_cv_type_time_t" = yes; then
13948 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13949See \`config.log' for more details." >&5
13950echo "$as_me: error: cannot compute sizeof (time_t)
13951See \`config.log' for more details." >&2;}
13952 { (exit 77); exit 77; }; }
13953 else
13954 ac_cv_sizeof_time_t=0
13955 fi ;;
13956esac
13957else
13958 cat >conftest.$ac_ext <<_ACEOF
13959/* confdefs.h. */
13960_ACEOF
13961cat confdefs.h >>conftest.$ac_ext
13962cat >>conftest.$ac_ext <<_ACEOF
13963/* end confdefs.h. */
13964
13965#ifdef HAVE_SYS_TYPES_H
13966#include <sys/types.h>
13967#endif
13968#ifdef HAVE_TIME_H
13969#include <time.h>
13970#endif
13971
13972
13973 typedef time_t ac__type_sizeof_;
13974static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13975static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13976#include <stdio.h>
13977#include <stdlib.h>
13978int
13979main ()
13980{
13981
13982 FILE *f = fopen ("conftest.val", "w");
13983 if (! f)
13984 return 1;
13985 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13986 {
13987 long int i = longval ();
13988 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13989 return 1;
13990 fprintf (f, "%ld\n", i);
13991 }
13992 else
13993 {
13994 unsigned long int i = ulongval ();
13995 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13996 return 1;
13997 fprintf (f, "%lu\n", i);
13998 }
13999 return ferror (f) || fclose (f) != 0;
14000
14001 ;
14002 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014003}
Martin v. Löwis11437992002-04-12 09:54:03 +000014004_ACEOF
14005rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006if { (ac_try="$ac_link"
14007case "(($ac_try" in
14008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14009 *) ac_try_echo=$ac_try;;
14010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014012 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014015 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014016 { (case "(($ac_try" in
14017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14018 *) ac_try_echo=$ac_try;;
14019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014021 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014024 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014025 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014026else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014027 echo "$as_me: program exited with status $ac_status" >&5
14028echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014029sed 's/^/| /' conftest.$ac_ext >&5
14030
Martin v. Löwis11437992002-04-12 09:54:03 +000014031( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014032if test "$ac_cv_type_time_t" = yes; then
14033 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
14034See \`config.log' for more details." >&5
14035echo "$as_me: error: cannot compute sizeof (time_t)
14036See \`config.log' for more details." >&2;}
14037 { (exit 77); exit 77; }; }
14038 else
14039 ac_cv_sizeof_time_t=0
14040 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014042rm -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 +000014043fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014044rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014045fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014046{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14047echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014048
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014049
14050
Martin v. Löwis11437992002-04-12 09:54:03 +000014051cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014052#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014053_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014054
Michael W. Hudson54241132001-12-07 15:38:26 +000014055
14056
Trent Mick635f6fb2000-08-23 21:33:05 +000014057# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014058ac_save_cc="$CC"
14059if test "$ac_cv_kpthread" = "yes"
14060then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014061elif test "$ac_cv_kthread" = "yes"
14062then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014063elif test "$ac_cv_pthread" = "yes"
14064then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014065fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014066{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14067echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014068have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014069cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014070/* confdefs.h. */
14071_ACEOF
14072cat confdefs.h >>conftest.$ac_ext
14073cat >>conftest.$ac_ext <<_ACEOF
14074/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014075#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014076int
14077main ()
14078{
Guido van Rossum12580492000-09-24 16:47:19 +000014079pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014080 ;
14081 return 0;
14082}
14083_ACEOF
14084rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014085if { (ac_try="$ac_compile"
14086case "(($ac_try" in
14087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14088 *) ac_try_echo=$ac_try;;
14089esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014093 grep -v '^ *+' conftest.er1 >conftest.err
14094 rm -f conftest.er1
14095 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014097 (exit $ac_status); } && {
14098 test -z "$ac_c_werror_flag" ||
14099 test ! -s conftest.err
14100 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014101 have_pthread_t=yes
14102else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014104sed 's/^/| /' conftest.$ac_ext >&5
14105
Martin v. Löwiseba40652007-08-30 20:10:57 +000014106
Trent Mick635f6fb2000-08-23 21:33:05 +000014107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014108
14109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014110{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14111echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014112if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014113 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14114echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14115if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014116 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014117else
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014119/* confdefs.h. */
14120_ACEOF
14121cat confdefs.h >>conftest.$ac_ext
14122cat >>conftest.$ac_ext <<_ACEOF
14123/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014124
14125#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014126#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014127#endif
14128
14129
14130typedef pthread_t ac__type_new_;
14131int
14132main ()
14133{
14134if ((ac__type_new_ *) 0)
14135 return 0;
14136if (sizeof (ac__type_new_))
14137 return 0;
14138 ;
14139 return 0;
14140}
14141_ACEOF
14142rm -f conftest.$ac_objext
14143if { (ac_try="$ac_compile"
14144case "(($ac_try" in
14145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14146 *) ac_try_echo=$ac_try;;
14147esac
14148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14149 (eval "$ac_compile") 2>conftest.er1
14150 ac_status=$?
14151 grep -v '^ *+' conftest.er1 >conftest.err
14152 rm -f conftest.er1
14153 cat conftest.err >&5
14154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14155 (exit $ac_status); } && {
14156 test -z "$ac_c_werror_flag" ||
14157 test ! -s conftest.err
14158 } && test -s conftest.$ac_objext; then
14159 ac_cv_type_pthread_t=yes
14160else
14161 echo "$as_me: failed program was:" >&5
14162sed 's/^/| /' conftest.$ac_ext >&5
14163
14164 ac_cv_type_pthread_t=no
14165fi
14166
14167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14168fi
14169{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14170echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14171
14172# The cast to long int works around a bug in the HP C Compiler
14173# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14174# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14175# This bug is HP SR number 8606223364.
14176{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14177echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14178if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14179 echo $ECHO_N "(cached) $ECHO_C" >&6
14180else
14181 if test "$cross_compiling" = yes; then
14182 # Depending upon the size, compute the lo and hi bounds.
14183cat >conftest.$ac_ext <<_ACEOF
14184/* confdefs.h. */
14185_ACEOF
14186cat confdefs.h >>conftest.$ac_ext
14187cat >>conftest.$ac_ext <<_ACEOF
14188/* end confdefs.h. */
14189
14190#ifdef HAVE_PTHREAD_H
14191#include <pthread.h>
14192#endif
14193
14194
14195 typedef pthread_t ac__type_sizeof_;
14196int
14197main ()
14198{
14199static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14200test_array [0] = 0
14201
14202 ;
14203 return 0;
14204}
14205_ACEOF
14206rm -f conftest.$ac_objext
14207if { (ac_try="$ac_compile"
14208case "(($ac_try" in
14209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14210 *) ac_try_echo=$ac_try;;
14211esac
14212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14213 (eval "$ac_compile") 2>conftest.er1
14214 ac_status=$?
14215 grep -v '^ *+' conftest.er1 >conftest.err
14216 rm -f conftest.er1
14217 cat conftest.err >&5
14218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14219 (exit $ac_status); } && {
14220 test -z "$ac_c_werror_flag" ||
14221 test ! -s conftest.err
14222 } && test -s conftest.$ac_objext; then
14223 ac_lo=0 ac_mid=0
14224 while :; do
14225 cat >conftest.$ac_ext <<_ACEOF
14226/* confdefs.h. */
14227_ACEOF
14228cat confdefs.h >>conftest.$ac_ext
14229cat >>conftest.$ac_ext <<_ACEOF
14230/* end confdefs.h. */
14231
14232#ifdef HAVE_PTHREAD_H
14233#include <pthread.h>
14234#endif
14235
14236
14237 typedef pthread_t ac__type_sizeof_;
14238int
14239main ()
14240{
14241static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14242test_array [0] = 0
14243
14244 ;
14245 return 0;
14246}
14247_ACEOF
14248rm -f conftest.$ac_objext
14249if { (ac_try="$ac_compile"
14250case "(($ac_try" in
14251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14252 *) ac_try_echo=$ac_try;;
14253esac
14254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14255 (eval "$ac_compile") 2>conftest.er1
14256 ac_status=$?
14257 grep -v '^ *+' conftest.er1 >conftest.err
14258 rm -f conftest.er1
14259 cat conftest.err >&5
14260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14261 (exit $ac_status); } && {
14262 test -z "$ac_c_werror_flag" ||
14263 test ! -s conftest.err
14264 } && test -s conftest.$ac_objext; then
14265 ac_hi=$ac_mid; break
14266else
14267 echo "$as_me: failed program was:" >&5
14268sed 's/^/| /' conftest.$ac_ext >&5
14269
14270 ac_lo=`expr $ac_mid + 1`
14271 if test $ac_lo -le $ac_mid; then
14272 ac_lo= ac_hi=
14273 break
14274 fi
14275 ac_mid=`expr 2 '*' $ac_mid + 1`
14276fi
14277
14278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14279 done
14280else
14281 echo "$as_me: failed program was:" >&5
14282sed 's/^/| /' conftest.$ac_ext >&5
14283
14284 cat >conftest.$ac_ext <<_ACEOF
14285/* confdefs.h. */
14286_ACEOF
14287cat confdefs.h >>conftest.$ac_ext
14288cat >>conftest.$ac_ext <<_ACEOF
14289/* end confdefs.h. */
14290
14291#ifdef HAVE_PTHREAD_H
14292#include <pthread.h>
14293#endif
14294
14295
14296 typedef pthread_t ac__type_sizeof_;
14297int
14298main ()
14299{
14300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14301test_array [0] = 0
14302
14303 ;
14304 return 0;
14305}
14306_ACEOF
14307rm -f conftest.$ac_objext
14308if { (ac_try="$ac_compile"
14309case "(($ac_try" in
14310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14311 *) ac_try_echo=$ac_try;;
14312esac
14313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14314 (eval "$ac_compile") 2>conftest.er1
14315 ac_status=$?
14316 grep -v '^ *+' conftest.er1 >conftest.err
14317 rm -f conftest.er1
14318 cat conftest.err >&5
14319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320 (exit $ac_status); } && {
14321 test -z "$ac_c_werror_flag" ||
14322 test ! -s conftest.err
14323 } && test -s conftest.$ac_objext; then
14324 ac_hi=-1 ac_mid=-1
14325 while :; do
14326 cat >conftest.$ac_ext <<_ACEOF
14327/* confdefs.h. */
14328_ACEOF
14329cat confdefs.h >>conftest.$ac_ext
14330cat >>conftest.$ac_ext <<_ACEOF
14331/* end confdefs.h. */
14332
14333#ifdef HAVE_PTHREAD_H
14334#include <pthread.h>
14335#endif
14336
14337
14338 typedef pthread_t ac__type_sizeof_;
14339int
14340main ()
14341{
14342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14343test_array [0] = 0
14344
14345 ;
14346 return 0;
14347}
14348_ACEOF
14349rm -f conftest.$ac_objext
14350if { (ac_try="$ac_compile"
14351case "(($ac_try" in
14352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14353 *) ac_try_echo=$ac_try;;
14354esac
14355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14356 (eval "$ac_compile") 2>conftest.er1
14357 ac_status=$?
14358 grep -v '^ *+' conftest.er1 >conftest.err
14359 rm -f conftest.er1
14360 cat conftest.err >&5
14361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14362 (exit $ac_status); } && {
14363 test -z "$ac_c_werror_flag" ||
14364 test ! -s conftest.err
14365 } && test -s conftest.$ac_objext; then
14366 ac_lo=$ac_mid; break
14367else
14368 echo "$as_me: failed program was:" >&5
14369sed 's/^/| /' conftest.$ac_ext >&5
14370
14371 ac_hi=`expr '(' $ac_mid ')' - 1`
14372 if test $ac_mid -le $ac_hi; then
14373 ac_lo= ac_hi=
14374 break
14375 fi
14376 ac_mid=`expr 2 '*' $ac_mid`
14377fi
14378
14379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14380 done
14381else
14382 echo "$as_me: failed program was:" >&5
14383sed 's/^/| /' conftest.$ac_ext >&5
14384
14385 ac_lo= ac_hi=
14386fi
14387
14388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14389fi
14390
14391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14392# Binary search between lo and hi bounds.
14393while test "x$ac_lo" != "x$ac_hi"; do
14394 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14395 cat >conftest.$ac_ext <<_ACEOF
14396/* confdefs.h. */
14397_ACEOF
14398cat confdefs.h >>conftest.$ac_ext
14399cat >>conftest.$ac_ext <<_ACEOF
14400/* end confdefs.h. */
14401
14402#ifdef HAVE_PTHREAD_H
14403#include <pthread.h>
14404#endif
14405
14406
14407 typedef pthread_t ac__type_sizeof_;
14408int
14409main ()
14410{
14411static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14412test_array [0] = 0
14413
14414 ;
14415 return 0;
14416}
14417_ACEOF
14418rm -f conftest.$ac_objext
14419if { (ac_try="$ac_compile"
14420case "(($ac_try" in
14421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14422 *) ac_try_echo=$ac_try;;
14423esac
14424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14425 (eval "$ac_compile") 2>conftest.er1
14426 ac_status=$?
14427 grep -v '^ *+' conftest.er1 >conftest.err
14428 rm -f conftest.er1
14429 cat conftest.err >&5
14430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14431 (exit $ac_status); } && {
14432 test -z "$ac_c_werror_flag" ||
14433 test ! -s conftest.err
14434 } && test -s conftest.$ac_objext; then
14435 ac_hi=$ac_mid
14436else
14437 echo "$as_me: failed program was:" >&5
14438sed 's/^/| /' conftest.$ac_ext >&5
14439
14440 ac_lo=`expr '(' $ac_mid ')' + 1`
14441fi
14442
14443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14444done
14445case $ac_lo in
14446?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14447'') if test "$ac_cv_type_pthread_t" = yes; then
14448 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14449See \`config.log' for more details." >&5
14450echo "$as_me: error: cannot compute sizeof (pthread_t)
14451See \`config.log' for more details." >&2;}
14452 { (exit 77); exit 77; }; }
14453 else
14454 ac_cv_sizeof_pthread_t=0
14455 fi ;;
14456esac
14457else
14458 cat >conftest.$ac_ext <<_ACEOF
14459/* confdefs.h. */
14460_ACEOF
14461cat confdefs.h >>conftest.$ac_ext
14462cat >>conftest.$ac_ext <<_ACEOF
14463/* end confdefs.h. */
14464
14465#ifdef HAVE_PTHREAD_H
14466#include <pthread.h>
14467#endif
14468
14469
14470 typedef pthread_t ac__type_sizeof_;
14471static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14472static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14473#include <stdio.h>
14474#include <stdlib.h>
14475int
14476main ()
14477{
14478
14479 FILE *f = fopen ("conftest.val", "w");
14480 if (! f)
14481 return 1;
14482 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14483 {
14484 long int i = longval ();
14485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14486 return 1;
14487 fprintf (f, "%ld\n", i);
14488 }
14489 else
14490 {
14491 unsigned long int i = ulongval ();
14492 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14493 return 1;
14494 fprintf (f, "%lu\n", i);
14495 }
14496 return ferror (f) || fclose (f) != 0;
14497
14498 ;
14499 return 0;
14500}
Martin v. Löwis11437992002-04-12 09:54:03 +000014501_ACEOF
14502rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503if { (ac_try="$ac_link"
14504case "(($ac_try" in
14505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14506 *) ac_try_echo=$ac_try;;
14507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014509 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014513 { (case "(($ac_try" in
14514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14515 *) ac_try_echo=$ac_try;;
14516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014518 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014519 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014521 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014522 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014524 echo "$as_me: program exited with status $ac_status" >&5
14525echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014526sed 's/^/| /' conftest.$ac_ext >&5
14527
Martin v. Löwis11437992002-04-12 09:54:03 +000014528( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014529if test "$ac_cv_type_pthread_t" = yes; then
14530 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14531See \`config.log' for more details." >&5
14532echo "$as_me: error: cannot compute sizeof (pthread_t)
14533See \`config.log' for more details." >&2;}
14534 { (exit 77); exit 77; }; }
14535 else
14536 ac_cv_sizeof_pthread_t=0
14537 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014539rm -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 +000014540fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014541rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014542fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014543{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014544echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014546
14547
Martin v. Löwis11437992002-04-12 09:54:03 +000014548cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014549#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014550_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014551
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014552
Trent Mick635f6fb2000-08-23 21:33:05 +000014553fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014554CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014556{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14557echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014558# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014559if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014560 enableval=$enable_toolbox_glue;
14561fi
Jack Jansene578a632001-08-15 01:27:14 +000014562
14563
14564if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014565then
Jack Jansene578a632001-08-15 01:27:14 +000014566 case $ac_sys_system/$ac_sys_release in
14567 Darwin/*)
14568 enable_toolbox_glue="yes";;
14569 *)
14570 enable_toolbox_glue="no";;
14571 esac
14572fi
14573case "$enable_toolbox_glue" in
14574yes)
Jack Jansene578a632001-08-15 01:27:14 +000014575 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014576 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014577
14578cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014579#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014580_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014581
14582 ;;
14583*)
Jack Jansene578a632001-08-15 01:27:14 +000014584 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014585 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014586 ;;
14587esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014588{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14589echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014590
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014591
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014592
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014593case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014594 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014595 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14596 ;;
14597 Darwin/*)
14598 OTHER_LIBTOOL_OPT=""
14599 ;;
14600esac
14601
14602
Ronald Oussoren25967582009-09-06 10:00:26 +000014603ARCH_RUN_32BIT=""
14604
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014605case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014606 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014607 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14608 if test "${enable_universalsdk}"; then
14609 :
14610 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014611 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014612 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014613 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014614 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014615 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +000014616 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014617 if test ${gcc_version} '<' 4.0
14618 then
14619 LIBTOOL_CRUFT="-lcc_dynamic"
14620 else
14621 LIBTOOL_CRUFT=""
14622 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014623 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014624 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014625else
14626 cat >conftest.$ac_ext <<_ACEOF
14627/* confdefs.h. */
14628_ACEOF
14629cat confdefs.h >>conftest.$ac_ext
14630cat >>conftest.$ac_ext <<_ACEOF
14631/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014632
Ronald Oussoren25967582009-09-06 10:00:26 +000014633 #include <unistd.h>
14634 int main(int argc, char*argv[])
14635 {
14636 if (sizeof(long) == 4) {
14637 return 0;
14638 } else {
14639 return 1;
14640 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014641 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014642
Ronald Oussoren25967582009-09-06 10:00:26 +000014643_ACEOF
14644rm -f conftest$ac_exeext
14645if { (ac_try="$ac_link"
14646case "(($ac_try" in
14647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14648 *) ac_try_echo=$ac_try;;
14649esac
14650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14651 (eval "$ac_link") 2>&5
14652 ac_status=$?
14653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14655 { (case "(($ac_try" in
14656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14657 *) ac_try_echo=$ac_try;;
14658esac
14659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14660 (eval "$ac_try") 2>&5
14661 ac_status=$?
14662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14663 (exit $ac_status); }; }; then
14664 ac_osx_32bit=yes
14665else
14666 echo "$as_me: program exited with status $ac_status" >&5
14667echo "$as_me: failed program was:" >&5
14668sed 's/^/| /' conftest.$ac_ext >&5
14669
14670( exit $ac_status )
14671ac_osx_32bit=no
14672fi
14673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14674fi
14675
14676
14677
14678 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014679 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014680 i386)
14681 MACOSX_DEFAULT_ARCH="i386"
14682 ;;
14683 ppc)
14684 MACOSX_DEFAULT_ARCH="ppc"
14685 ;;
14686 *)
14687 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14688echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14689 { (exit 1); exit 1; }; }
14690 ;;
14691 esac
14692 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014693 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014694 i386)
14695 MACOSX_DEFAULT_ARCH="x86_64"
14696 ;;
14697 ppc)
14698 MACOSX_DEFAULT_ARCH="ppc64"
14699 ;;
14700 *)
14701 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14702echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14703 { (exit 1); exit 1; }; }
14704 ;;
14705 esac
14706
14707 #ARCH_RUN_32BIT="true"
14708 fi
14709
14710 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014711 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014712 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014713esac
14714
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014715{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14716echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014717if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014718then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014719 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014720 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014721 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014722
Martin v. Löwis11437992002-04-12 09:54:03 +000014723cat >>confdefs.h <<\_ACEOF
14724#define WITH_NEXT_FRAMEWORK 1
14725_ACEOF
14726
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014727 { echo "$as_me:$LINENO: result: yes" >&5
14728echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014729 if test $enable_shared = "yes"
14730 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014731 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14732echo "$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 +000014733 { (exit 1); exit 1; }; }
14734 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014735else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014736 { echo "$as_me:$LINENO: result: no" >&5
14737echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014738fi
14739
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014740{ echo "$as_me:$LINENO: checking for dyld" >&5
14741echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014742case $ac_sys_system/$ac_sys_release in
14743 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014744
Martin v. Löwis11437992002-04-12 09:54:03 +000014745cat >>confdefs.h <<\_ACEOF
14746#define WITH_DYLD 1
14747_ACEOF
14748
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014749 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14750echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014751 ;;
14752 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014753 { echo "$as_me:$LINENO: result: no" >&5
14754echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014755 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014756esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014757
Guido van Rossum0a516c91994-09-12 10:58:40 +000014758# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014759
Michael W. Hudson54241132001-12-07 15:38:26 +000014760
14761
14762
14763
Ronald Oussoren75912852010-04-08 08:13:31 +000014764
Guido van Rossum0a516c91994-09-12 10:58:40 +000014765# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014766# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014767{ echo "$as_me:$LINENO: checking SO" >&5
14768echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014769if test -z "$SO"
14770then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014771 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014772 hp*|HP*)
14773 case `uname -m` in
14774 ia64) SO=.so;;
14775 *) SO=.sl;;
14776 esac
14777 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014778 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014779 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014780 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014781else
14782 # this might also be a termcap variable, see #610332
14783 echo
14784 echo '====================================================================='
14785 echo '+ +'
14786 echo '+ WARNING: You have set SO in your environment. +'
14787 echo '+ Do you really mean to change the extension for shared libraries? +'
14788 echo '+ Continuing in 10 seconds to let you to ponder. +'
14789 echo '+ +'
14790 echo '====================================================================='
14791 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014792fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014793{ echo "$as_me:$LINENO: result: $SO" >&5
14794echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014795
Ronald Oussoren79f90492009-01-02 10:44:46 +000014796
Neal Norwitz58e28882006-05-19 07:00:58 +000014797cat >>confdefs.h <<_ACEOF
14798#define SHLIB_EXT "$SO"
14799_ACEOF
14800
Guido van Rossum0a516c91994-09-12 10:58:40 +000014801# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014802# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014803# (Shared libraries in this instance are shared modules to be loaded into
14804# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014805{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14806echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014807if test -z "$LDSHARED"
14808then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014809 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014810 AIX*)
14811 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014812 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014813 ;;
14814 BeOS*)
14815 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014816 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014817 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014818 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014819 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014821 if test "$GCC" = "yes" ; then
14822 LDSHARED='$(CC) -shared'
14823 LDCXXSHARED='$(CXX) -shared'
14824 else
14825 LDSHARED='$(CC) -G'
14826 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +000014827 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014828 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014829 if test "$GCC" = "yes" ; then
14830 LDSHARED='$(CC) -shared'
14831 LDCXXSHARED='$(CXX) -shared'
14832 else
14833 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +000014834 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014835 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014836 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014837 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014838 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000014839 if test "$enable_framework" ; then
14840 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014841 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14842 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014843 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014844 else
14845 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014846 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +000014847 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014848 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014849 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014850 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014851 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000014852 if test "$enable_framework" ; then
14853 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014854 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14855 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014856 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014857 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014858 # No framework, use the Python app as bundle-loader
14859 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014860 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014861 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014862 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014863 Darwin/*)
14864 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14865 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014866
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014867 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014868 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014869 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014870 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014871 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014872 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Ronald Oussoren75912852010-04-08 08:13:31 +000014873 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +000014874 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014875 else
14876 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014877 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +000014878 if test "$enable_framework" ; then
14879 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014880 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14881 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014882 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014883 else
14884 # No framework, use the Python app as bundle-loader
14885 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14886 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014887 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014888 fi
14889 fi
14890 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014891 Linux*|GNU*|QNX*)
14892 LDSHARED='$(CC) -shared'
14893 LDCXXSHARED='$(CXX) -shared';;
14894 BSD/OS*/4*)
14895 LDSHARED="gcc -shared"
14896 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014897 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014898 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014899 then
Benjamin Peterson3b2abe92010-03-14 15:06:14 +000014900 LDSHARED='$(CC) -shared ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014901 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000014902 else
14903 LDSHARED="ld -Bshareable ${LDFLAGS}"
14904 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014905 OpenBSD*)
14906 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14907 then
14908 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014909 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +000014910 else
14911 case `uname -r` in
14912 [01].* | 2.[0-7] | 2.[0-7].*)
14913 LDSHARED="ld -Bshareable ${LDFLAGS}"
14914 ;;
14915 *)
14916 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014917 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +000014918 ;;
14919 esac
14920 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014921 NetBSD*|DragonFly*)
14922 LDSHARED="cc -shared ${LDFLAGS}"
14923 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014924 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014925 if test "$GCC" = "yes" ; then
14926 LDSHARED='$(CC) -shared'
14927 LDCXXSHARED='$(CXX) -shared'
14928 else
14929 LDSHARED='$(CC) -G'
14930 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014931 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014932 SCO_SV*)
14933 LDSHARED='$(CC) -Wl,-G,-Bexport'
14934 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
14935 CYGWIN*)
14936 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
14937 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
14938 atheos*)
14939 LDSHARED="gcc -shared"
14940 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014941 *) LDSHARED="ld";;
14942 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014943fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014944{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14945echo "${ECHO_T}$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +000014946LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014947BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014948# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014949# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014950{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14951echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014952if test -z "$CCSHARED"
14953then
Guido van Rossum07397971997-04-29 21:49:50 +000014954 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014955 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014956 then CCSHARED="-fPIC";
14957 elif test `uname -p` = sparc;
14958 then CCSHARED="-xcode=pic32";
14959 else CCSHARED="-Kpic";
14960 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014961 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014962 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014963 else CCSHARED="+z";
14964 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014965 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014966 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014967 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014968 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014969 if test "$GCC" = "yes"
14970 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014971 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014972 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014973 SCO_SV*)
14974 if test "$GCC" = "yes"
14975 then CCSHARED="-fPIC"
14976 else CCSHARED="-Kpic -belf"
14977 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014978 IRIX*/6*) case $CC in
14979 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014980 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014981 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014982 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014983 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014984fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014985{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14986echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014987# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014988# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014989{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14990echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014991if test -z "$LINKFORSHARED"
14992then
Guido van Rossum07397971997-04-29 21:49:50 +000014993 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014994 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014995 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014996 LINKFORSHARED="-Wl,-E -Wl,+s";;
14997# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014998 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014999 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000015000 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000015002 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
15003 # which is
Jack Jansene578a632001-08-15 01:27:14 +000015004 # not used by the core itself but which needs to be in the core so
15005 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000015006 # -prebind is no longer used, because it actually seems to give a
15007 # slowdown in stead of a speedup, maybe due to the large number of
15008 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000015009
15010 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000015011 if test "$enable_framework"
15012 then
Jack Jansenda49e192005-01-07 13:08:22 +000015013 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000015014 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000015015 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000015016 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000015017 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000015018 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000015019 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000015020 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
15021 then
15022 LINKFORSHARED="-Wl,--export-dynamic"
15023 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000015024 SunOS/5*) case $CC in
15025 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000015026 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000015027 then
15028 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000015029 fi;;
15030 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000015031 CYGWIN*)
15032 if test $enable_shared = "no"
15033 then
15034 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
15035 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000015036 QNX*)
15037 # -Wl,-E causes the symbols to be added to the dynamic
15038 # symbol table so that they can be found when a module
15039 # is loaded. -N 2048K causes the stack size to be set
15040 # to 2048 kilobytes so that the stack doesn't overflow
15041 # when running test_compile.py.
15042 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000015043 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000015044fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015045{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
15046echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000015047
Michael W. Hudson54241132001-12-07 15:38:26 +000015048
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015049
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015050{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
15051echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015052if test ! "$LIBRARY" = "$LDLIBRARY"
15053then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000015054 case $ac_sys_system in
15055 CYGWIN*)
15056 # Cygwin needs CCSHARED when building extension DLLs
15057 # but not when building the interpreter DLL.
15058 CFLAGSFORSHARED='';;
15059 *)
15060 CFLAGSFORSHARED='$(CCSHARED)'
15061 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015062fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015063{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
15064echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015065
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015066# SHLIBS are libraries (except -lc and -lm) to link to the python shared
15067# library (with --enable-shared).
15068# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015069# symbols, this must be set to $(LIBS) (expanded by make). We do this even
15070# if it is not required, since it creates a dependency of the shared library
15071# to LIBS. This, in turn, means that applications linking the shared libpython
15072# don't need to link LIBS explicitly. The default should be only changed
15073# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015074
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015075{ echo "$as_me:$LINENO: checking SHLIBS" >&5
15076echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015077case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015078 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015079 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015080esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015081{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
15082echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015083
15084
Guido van Rossum627b2d71993-12-24 10:39:16 +000015085# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000015086
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015087{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
15088echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015089if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015091else
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015093LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015094cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015095/* confdefs.h. */
15096_ACEOF
15097cat confdefs.h >>conftest.$ac_ext
15098cat >>conftest.$ac_ext <<_ACEOF
15099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015100
Martin v. Löwiseba40652007-08-30 20:10:57 +000015101/* Override any GCC internal prototype to avoid an error.
15102 Use char because int might match the return type of a GCC
15103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015104#ifdef __cplusplus
15105extern "C"
15106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015107char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015108int
15109main ()
15110{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015111return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015112 ;
15113 return 0;
15114}
15115_ACEOF
15116rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015117if { (ac_try="$ac_link"
15118case "(($ac_try" in
15119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15120 *) ac_try_echo=$ac_try;;
15121esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015123 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015125 grep -v '^ *+' conftest.er1 >conftest.err
15126 rm -f conftest.er1
15127 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015129 (exit $ac_status); } && {
15130 test -z "$ac_c_werror_flag" ||
15131 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015132 } && test -s conftest$ac_exeext &&
15133 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015135else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015137sed 's/^/| /' conftest.$ac_ext >&5
15138
Martin v. Löwiseba40652007-08-30 20:10:57 +000015139 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015141
15142rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015144LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015145fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015146{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15147echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15148if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 cat >>confdefs.h <<_ACEOF
15150#define HAVE_LIBDL 1
15151_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015152
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015153 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015154
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015155fi
15156 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015157
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015158{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15159echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015160if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015161 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015162else
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015164LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015165cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015166/* confdefs.h. */
15167_ACEOF
15168cat confdefs.h >>conftest.$ac_ext
15169cat >>conftest.$ac_ext <<_ACEOF
15170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015171
Martin v. Löwiseba40652007-08-30 20:10:57 +000015172/* Override any GCC internal prototype to avoid an error.
15173 Use char because int might match the return type of a GCC
15174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015175#ifdef __cplusplus
15176extern "C"
15177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015178char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015179int
15180main ()
15181{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015182return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 ;
15184 return 0;
15185}
15186_ACEOF
15187rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015188if { (ac_try="$ac_link"
15189case "(($ac_try" in
15190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15191 *) ac_try_echo=$ac_try;;
15192esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015194 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015196 grep -v '^ *+' conftest.er1 >conftest.err
15197 rm -f conftest.er1
15198 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200 (exit $ac_status); } && {
15201 test -z "$ac_c_werror_flag" ||
15202 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015203 } && test -s conftest$ac_exeext &&
15204 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015206else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015208sed 's/^/| /' conftest.$ac_ext >&5
15209
Martin v. Löwiseba40652007-08-30 20:10:57 +000015210 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212
15213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015214 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015215LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015216fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015217{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15218echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15219if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 cat >>confdefs.h <<_ACEOF
15221#define HAVE_LIBDLD 1
15222_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015223
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015224 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015225
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015226fi
15227 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015228
Ronald Oussoren79f90492009-01-02 10:44:46 +000015229# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015230if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015231 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15232echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015233if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015234 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015235else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015236 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015237cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015238/* confdefs.h. */
15239_ACEOF
15240cat confdefs.h >>conftest.$ac_ext
15241cat >>conftest.$ac_ext <<_ACEOF
15242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015243
Martin v. Löwiseba40652007-08-30 20:10:57 +000015244/* Override any GCC internal prototype to avoid an error.
15245 Use char because int might match the return type of a GCC
15246 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015247#ifdef __cplusplus
15248extern "C"
15249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015250char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015251int
15252main ()
15253{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015254return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 ;
15256 return 0;
15257}
15258_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015259for ac_lib in '' pthread rt posix4; do
15260 if test -z "$ac_lib"; then
15261 ac_res="none required"
15262 else
15263 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015264 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015265 fi
15266 rm -f conftest.$ac_objext conftest$ac_exeext
15267if { (ac_try="$ac_link"
15268case "(($ac_try" in
15269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15270 *) ac_try_echo=$ac_try;;
15271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015273 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015274 ac_status=$?
15275 grep -v '^ *+' conftest.er1 >conftest.err
15276 rm -f conftest.er1
15277 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015279 (exit $ac_status); } && {
15280 test -z "$ac_c_werror_flag" ||
15281 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015282 } && test -s conftest$ac_exeext &&
15283 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015284 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015286 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015287sed 's/^/| /' conftest.$ac_ext >&5
15288
Martin v. Löwiseba40652007-08-30 20:10:57 +000015289
Brett Cannon19fab762007-06-02 03:02:29 +000015290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015291
15292rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15293 conftest$ac_exeext
15294 if test "${ac_cv_search_sem_init+set}" = set; then
15295 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015297done
15298if test "${ac_cv_search_sem_init+set}" = set; then
15299 :
15300else
15301 ac_cv_search_sem_init=no
15302fi
15303rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015304LIBS=$ac_func_search_save_LIBS
15305fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015306{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15307echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015308ac_res=$ac_cv_search_sem_init
15309if test "$ac_res" != no; then
15310 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015311
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015312fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015313 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015314 # posix4 on Solaris 2.6
15315 # pthread (first!) on Linux
15316fi
15317
Martin v. Löwis19d17342003-06-14 21:03:05 +000015318# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015319{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15320echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015321if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015322 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015323else
15324 ac_check_lib_save_LIBS=$LIBS
15325LIBS="-lintl $LIBS"
15326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015327/* confdefs.h. */
15328_ACEOF
15329cat confdefs.h >>conftest.$ac_ext
15330cat >>conftest.$ac_ext <<_ACEOF
15331/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015332
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333/* Override any GCC internal prototype to avoid an error.
15334 Use char because int might match the return type of a GCC
15335 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015336#ifdef __cplusplus
15337extern "C"
15338#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015339char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015340int
15341main ()
15342{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015343return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015344 ;
15345 return 0;
15346}
15347_ACEOF
15348rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015349if { (ac_try="$ac_link"
15350case "(($ac_try" in
15351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15352 *) ac_try_echo=$ac_try;;
15353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357 grep -v '^ *+' conftest.er1 >conftest.err
15358 rm -f conftest.er1
15359 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015361 (exit $ac_status); } && {
15362 test -z "$ac_c_werror_flag" ||
15363 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015364 } && test -s conftest$ac_exeext &&
15365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015366 ac_cv_lib_intl_textdomain=yes
15367else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015369sed 's/^/| /' conftest.$ac_ext >&5
15370
Martin v. Löwiseba40652007-08-30 20:10:57 +000015371 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373
15374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015376LIBS=$ac_check_lib_save_LIBS
15377fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015378{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15379echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15380if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015381
15382cat >>confdefs.h <<\_ACEOF
15383#define WITH_LIBINTL 1
15384_ACEOF
15385
15386fi
15387
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015388
15389# checks for system dependent C++ extensions support
15390case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015391 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15392echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015394/* confdefs.h. */
15395_ACEOF
15396cat confdefs.h >>conftest.$ac_ext
15397cat >>conftest.$ac_ext <<_ACEOF
15398/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015399#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015400int
15401main ()
15402{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015403loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 ;
15405 return 0;
15406}
15407_ACEOF
15408rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409if { (ac_try="$ac_link"
15410case "(($ac_try" in
15411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15412 *) ac_try_echo=$ac_try;;
15413esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015415 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015417 grep -v '^ *+' conftest.er1 >conftest.err
15418 rm -f conftest.er1
15419 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015421 (exit $ac_status); } && {
15422 test -z "$ac_c_werror_flag" ||
15423 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015424 } && test -s conftest$ac_exeext &&
15425 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015426
Martin v. Löwis11437992002-04-12 09:54:03 +000015427cat >>confdefs.h <<\_ACEOF
15428#define AIX_GENUINE_CPLUSPLUS 1
15429_ACEOF
15430
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015431 { echo "$as_me:$LINENO: result: yes" >&5
15432echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015433else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015435sed 's/^/| /' conftest.$ac_ext >&5
15436
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015437 { echo "$as_me:$LINENO: result: no" >&5
15438echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015440
15441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015442 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015443 *) ;;
15444esac
15445
Guido van Rossum70c7f481998-03-26 18:44:10 +000015446# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015447# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015448{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15449echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015450if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015451 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015452else
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015454LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015455cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015456/* confdefs.h. */
15457_ACEOF
15458cat confdefs.h >>conftest.$ac_ext
15459cat >>conftest.$ac_ext <<_ACEOF
15460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015461
Martin v. Löwiseba40652007-08-30 20:10:57 +000015462/* Override any GCC internal prototype to avoid an error.
15463 Use char because int might match the return type of a GCC
15464 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015465#ifdef __cplusplus
15466extern "C"
15467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015468char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015469int
15470main ()
15471{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015472return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 ;
15474 return 0;
15475}
15476_ACEOF
15477rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015478if { (ac_try="$ac_link"
15479case "(($ac_try" in
15480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15481 *) ac_try_echo=$ac_try;;
15482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015484 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015486 grep -v '^ *+' conftest.er1 >conftest.err
15487 rm -f conftest.er1
15488 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015490 (exit $ac_status); } && {
15491 test -z "$ac_c_werror_flag" ||
15492 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015493 } && test -s conftest$ac_exeext &&
15494 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015495 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015496else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015498sed 's/^/| /' conftest.$ac_ext >&5
15499
Martin v. Löwiseba40652007-08-30 20:10:57 +000015500 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015502
15503rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015505LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015506fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015507{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15508echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15509if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015510 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015511fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015512 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015513{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15514echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015515if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015517else
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015519LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015520cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015521/* confdefs.h. */
15522_ACEOF
15523cat confdefs.h >>conftest.$ac_ext
15524cat >>conftest.$ac_ext <<_ACEOF
15525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015526
Martin v. Löwiseba40652007-08-30 20:10:57 +000015527/* Override any GCC internal prototype to avoid an error.
15528 Use char because int might match the return type of a GCC
15529 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015530#ifdef __cplusplus
15531extern "C"
15532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015533char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015534int
15535main ()
15536{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 ;
15539 return 0;
15540}
15541_ACEOF
15542rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015543if { (ac_try="$ac_link"
15544case "(($ac_try" in
15545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15546 *) ac_try_echo=$ac_try;;
15547esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015549 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015551 grep -v '^ *+' conftest.er1 >conftest.err
15552 rm -f conftest.er1
15553 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015555 (exit $ac_status); } && {
15556 test -z "$ac_c_werror_flag" ||
15557 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015558 } && test -s conftest$ac_exeext &&
15559 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015561else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015563sed 's/^/| /' conftest.$ac_ext >&5
15564
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567
15568rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015570LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015571fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015572{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15573echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15574if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015575 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015576fi
15577 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015578
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015579case "$ac_sys_system" in
15580BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015581{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15582echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015583if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015584 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015585else
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015587LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015588cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015589/* confdefs.h. */
15590_ACEOF
15591cat confdefs.h >>conftest.$ac_ext
15592cat >>conftest.$ac_ext <<_ACEOF
15593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015594
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595/* Override any GCC internal prototype to avoid an error.
15596 Use char because int might match the return type of a GCC
15597 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015598#ifdef __cplusplus
15599extern "C"
15600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015601char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015602int
15603main ()
15604{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 ;
15607 return 0;
15608}
15609_ACEOF
15610rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015611if { (ac_try="$ac_link"
15612case "(($ac_try" in
15613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15614 *) ac_try_echo=$ac_try;;
15615esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015619 grep -v '^ *+' conftest.er1 >conftest.err
15620 rm -f conftest.er1
15621 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015623 (exit $ac_status); } && {
15624 test -z "$ac_c_werror_flag" ||
15625 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015626 } && test -s conftest$ac_exeext &&
15627 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015629else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015631sed 's/^/| /' conftest.$ac_ext >&5
15632
Martin v. Löwiseba40652007-08-30 20:10:57 +000015633 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015635
15636rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015638LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015639fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015640{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15641echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15642if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015643 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015644fi
15645 # BeOS
15646;;
15647esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015648
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015649{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15650echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015651
Martin v. Löwiseba40652007-08-30 20:10:57 +000015652# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015653if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015654 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015655{ echo "$as_me:$LINENO: result: $withval" >&5
15656echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015657LIBS="$withval $LIBS"
15658
15659else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015660 { echo "$as_me:$LINENO: result: no" >&5
15661echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015662fi
15663
Guido van Rossum7f43da71994-08-01 12:15:30 +000015664
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015665if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015666 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15667set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15668{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15669echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15670if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15671 echo $ECHO_N "(cached) $ECHO_C" >&6
15672else
15673 case $PKG_CONFIG in
15674 [\\/]* | ?:[\\/]*)
15675 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15676 ;;
15677 *)
15678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15679for as_dir in $PATH
15680do
15681 IFS=$as_save_IFS
15682 test -z "$as_dir" && as_dir=.
15683 for ac_exec_ext in '' $ac_executable_extensions; do
15684 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15685 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15686 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15687 break 2
15688 fi
15689done
15690done
15691IFS=$as_save_IFS
15692
15693 ;;
15694esac
15695fi
15696PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15697if test -n "$PKG_CONFIG"; then
15698 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15699echo "${ECHO_T}$PKG_CONFIG" >&6; }
15700else
15701 { echo "$as_me:$LINENO: result: no" >&5
15702echo "${ECHO_T}no" >&6; }
15703fi
15704
15705
15706fi
15707if test -z "$ac_cv_path_PKG_CONFIG"; then
15708 ac_pt_PKG_CONFIG=$PKG_CONFIG
15709 # Extract the first word of "pkg-config", so it can be a program name with args.
15710set dummy pkg-config; ac_word=$2
15711{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15712echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15713if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15714 echo $ECHO_N "(cached) $ECHO_C" >&6
15715else
15716 case $ac_pt_PKG_CONFIG in
15717 [\\/]* | ?:[\\/]*)
15718 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15719 ;;
15720 *)
15721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15722for as_dir in $PATH
15723do
15724 IFS=$as_save_IFS
15725 test -z "$as_dir" && as_dir=.
15726 for ac_exec_ext in '' $ac_executable_extensions; do
15727 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15728 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15729 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15730 break 2
15731 fi
15732done
15733done
15734IFS=$as_save_IFS
15735
15736 ;;
15737esac
15738fi
15739ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15740if test -n "$ac_pt_PKG_CONFIG"; then
15741 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15742echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15743else
15744 { echo "$as_me:$LINENO: result: no" >&5
15745echo "${ECHO_T}no" >&6; }
15746fi
15747
15748 if test "x$ac_pt_PKG_CONFIG" = x; then
15749 PKG_CONFIG=""
15750 else
15751 case $cross_compiling:$ac_tool_warned in
15752yes:)
15753{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15754whose name does not start with the host triplet. If you think this
15755configuration is useful to you, please write to autoconf@gnu.org." >&5
15756echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15757whose name does not start with the host triplet. If you think this
15758configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15759ac_tool_warned=yes ;;
15760esac
15761 PKG_CONFIG=$ac_pt_PKG_CONFIG
15762 fi
15763else
15764 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15765fi
15766
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015767
15768# Check for use of the system expat library
15769{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15770echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15771
15772# Check whether --with-system_expat was given.
15773if test "${with_system_expat+set}" = set; then
15774 withval=$with_system_expat;
15775fi
15776
15777
15778{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15779echo "${ECHO_T}$with_system_expat" >&6; }
15780
15781# Check for use of the system libffi library
15782{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15783echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15784
15785# Check whether --with-system_ffi was given.
15786if test "${with_system_ffi+set}" = set; then
15787 withval=$with_system_ffi;
15788fi
15789
15790
15791if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015792 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15793else
15794 LIBFFI_INCLUDEDIR=""
15795fi
15796
15797
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015798{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15799echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015800
Benjamin Peterson867475c2009-04-29 20:36:25 +000015801# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015802{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15803echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015804
15805# Check whether --with-dbmliborder was given.
15806if test "${with_dbmliborder+set}" = set; then
15807 withval=$with_dbmliborder;
15808if test x$with_dbmliborder = xyes
15809then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015810{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15811echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015812 { (exit 1); exit 1; }; }
15813else
15814 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15815 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15816 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015817 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15818echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015819 { (exit 1); exit 1; }; }
15820 fi
15821 done
15822fi
15823fi
15824
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015825{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15826echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015827
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015828# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015829
15830
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015831{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15832echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015833
Martin v. Löwiseba40652007-08-30 20:10:57 +000015834# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015835if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015836 withval=$with_signal_module;
15837fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015838
15839
15840if test -z "$with_signal_module"
15841then with_signal_module="yes"
15842fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015843{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15844echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015845
15846if test "${with_signal_module}" = "yes"; then
15847 USE_SIGNAL_MODULE=""
15848 SIGNAL_OBJS=""
15849else
15850 USE_SIGNAL_MODULE="#"
15851 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15852fi
15853
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015854# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015855
Barry Warsawc0d24d82000-06-29 16:12:00 +000015856USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015857
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015858{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15859echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015860
Guido van Rossumec2f0731997-01-22 20:54:01 +000015861
Martin v. Löwiseba40652007-08-30 20:10:57 +000015862# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015863if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015864 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015865{ echo "$as_me:$LINENO: result: $withval" >&5
15866echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015867LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015868if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015869 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015870fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015871else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015872 { echo "$as_me:$LINENO: result: no" >&5
15873echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015874fi
15875
Martin v. Löwis11437992002-04-12 09:54:03 +000015876
15877# Templates for things AC_DEFINEd more than once.
15878# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015879
15880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
15882
15883
15884
15885
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015886{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15887echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015888
Martin v. Löwiseba40652007-08-30 20:10:57 +000015889# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015890if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015891 withval=$with_threads;
15892fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015893
15894
Barry Warsawc0d24d82000-06-29 16:12:00 +000015895# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015896
Martin v. Löwiseba40652007-08-30 20:10:57 +000015897# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015898if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015899 withval=$with_thread; with_threads=$with_thread
15900fi
15901
Barry Warsawc0d24d82000-06-29 16:12:00 +000015902
15903if test -z "$with_threads"
15904then with_threads="yes"
15905fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015906{ echo "$as_me:$LINENO: result: $with_threads" >&5
15907echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015908
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015909
Barry Warsawc0d24d82000-06-29 16:12:00 +000015910if test "$with_threads" = "no"
15911then
15912 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015913elif test "$ac_cv_pthread_is_default" = yes
15914then
Martin v. Löwis11437992002-04-12 09:54:03 +000015915 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015916#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015917_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015918
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015919 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015921#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015922_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015923
15924 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015925 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015926elif test "$ac_cv_kpthread" = "yes"
15927then
15928 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015929 if test "$ac_cv_cxx_thread" = "yes"; then
15930 CXX="$CXX -Kpthread"
15931 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015932 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015933#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015934_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015935
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015936 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015937 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015938elif test "$ac_cv_kthread" = "yes"
15939then
15940 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015941 if test "$ac_cv_cxx_thread" = "yes"; then
15942 CXX="$CXX -Kthread"
15943 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015944 cat >>confdefs.h <<\_ACEOF
15945#define WITH_THREAD 1
15946_ACEOF
15947
15948 posix_threads=yes
15949 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015950elif test "$ac_cv_pthread" = "yes"
15951then
15952 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015953 if test "$ac_cv_cxx_thread" = "yes"; then
15954 CXX="$CXX -pthread"
15955 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015956 cat >>confdefs.h <<\_ACEOF
15957#define WITH_THREAD 1
15958_ACEOF
15959
15960 posix_threads=yes
15961 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015962else
15963 if test ! -z "$with_threads" -a -d "$with_threads"
15964 then LDFLAGS="$LDFLAGS -L$with_threads"
15965 fi
15966 if test ! -z "$withval" -a -d "$withval"
15967 then LDFLAGS="$LDFLAGS -L$withval"
15968 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015969
15970 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015971 # define _POSIX_THREADS in unistd.h. Some apparently don't
15972 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015973 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15974echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015976/* confdefs.h. */
15977_ACEOF
15978cat confdefs.h >>conftest.$ac_ext
15979cat >>conftest.$ac_ext <<_ACEOF
15980/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015981
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015982#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015983#ifdef _POSIX_THREADS
15984yes
15985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015986
15987_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015989 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015990 unistd_defines_pthreads=yes
15991else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015992 unistd_defines_pthreads=no
15993fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +000015994rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015995
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015996 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15997echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015998
Martin v. Löwis11437992002-04-12 09:54:03 +000015999 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000016000#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016001_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000016002
Martin v. Löwis11437992002-04-12 09:54:03 +000016003 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016004 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
16005echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016006if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016007 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016009{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16010echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016011else
Martin v. Löwis11437992002-04-12 09:54:03 +000016012 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016013{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
16014echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016015cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016021$ac_includes_default
16022#include <cthreads.h>
16023_ACEOF
16024rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016025if { (ac_try="$ac_compile"
16026case "(($ac_try" in
16027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16028 *) ac_try_echo=$ac_try;;
16029esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016033 grep -v '^ *+' conftest.er1 >conftest.err
16034 rm -f conftest.er1
16035 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016037 (exit $ac_status); } && {
16038 test -z "$ac_c_werror_flag" ||
16039 test ! -s conftest.err
16040 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016041 ac_header_compiler=yes
16042else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016044sed 's/^/| /' conftest.$ac_ext >&5
16045
Martin v. Löwiseba40652007-08-30 20:10:57 +000016046 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016048
16049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016050{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16051echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016052
16053# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016054{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
16055echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016056cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016057/* confdefs.h. */
16058_ACEOF
16059cat confdefs.h >>conftest.$ac_ext
16060cat >>conftest.$ac_ext <<_ACEOF
16061/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016062#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016063_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016064if { (ac_try="$ac_cpp conftest.$ac_ext"
16065case "(($ac_try" in
16066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16067 *) ac_try_echo=$ac_try;;
16068esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016070 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016071 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016072 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016073 rm -f conftest.er1
16074 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016076 (exit $ac_status); } >/dev/null && {
16077 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16078 test ! -s conftest.err
16079 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 ac_header_preproc=yes
16081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016083sed 's/^/| /' conftest.$ac_ext >&5
16084
Martin v. Löwis11437992002-04-12 09:54:03 +000016085 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016087
Martin v. Löwis11437992002-04-12 09:54:03 +000016088rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016089{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16090echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016091
16092# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016093case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16094 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016095 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16096echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16097 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16098echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016099 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016100 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016101 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016102 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16103echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16104 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16105echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16106 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16107echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16108 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16109echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16110 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16111echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16112 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16113echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016114 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016115## -------------------------------------- ##
16116## Report this to http://bugs.python.org/ ##
16117## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016118_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016119 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016120 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016121esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016122{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16123echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016124if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016125 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016126else
16127 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016128fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016129{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16130echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016131
16132fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016133if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016135#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016136_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016137
Martin v. Löwis11437992002-04-12 09:54:03 +000016138 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016139#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016140_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016141
Martin v. Löwis11437992002-04-12 09:54:03 +000016142
16143cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016144#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016145_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016146
16147 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016148 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016149else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016150
Martin v. Löwis11437992002-04-12 09:54:03 +000016151 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016152 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16153echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016154if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016155 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016156fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016157{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16158echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016159else
Martin v. Löwis11437992002-04-12 09:54:03 +000016160 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016161{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16162echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016163cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016164/* confdefs.h. */
16165_ACEOF
16166cat confdefs.h >>conftest.$ac_ext
16167cat >>conftest.$ac_ext <<_ACEOF
16168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016169$ac_includes_default
16170#include <mach/cthreads.h>
16171_ACEOF
16172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016173if { (ac_try="$ac_compile"
16174case "(($ac_try" in
16175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16176 *) ac_try_echo=$ac_try;;
16177esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016181 grep -v '^ *+' conftest.er1 >conftest.err
16182 rm -f conftest.er1
16183 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016185 (exit $ac_status); } && {
16186 test -z "$ac_c_werror_flag" ||
16187 test ! -s conftest.err
16188 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016189 ac_header_compiler=yes
16190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016192sed 's/^/| /' conftest.$ac_ext >&5
16193
Martin v. Löwiseba40652007-08-30 20:10:57 +000016194 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016196
16197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016198{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16199echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016200
16201# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016202{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16203echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016205/* confdefs.h. */
16206_ACEOF
16207cat confdefs.h >>conftest.$ac_ext
16208cat >>conftest.$ac_ext <<_ACEOF
16209/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016210#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016211_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016212if { (ac_try="$ac_cpp conftest.$ac_ext"
16213case "(($ac_try" in
16214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16215 *) ac_try_echo=$ac_try;;
16216esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016218 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016220 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016221 rm -f conftest.er1
16222 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016224 (exit $ac_status); } >/dev/null && {
16225 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16226 test ! -s conftest.err
16227 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016228 ac_header_preproc=yes
16229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016231sed 's/^/| /' conftest.$ac_ext >&5
16232
Martin v. Löwis11437992002-04-12 09:54:03 +000016233 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016235
Martin v. Löwis11437992002-04-12 09:54:03 +000016236rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016237{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16238echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016239
16240# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016241case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16242 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016243 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16244echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16245 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16246echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016247 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016248 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016249 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016250 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16251echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16252 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16253echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16254 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16255echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16256 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16257echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16258 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16259echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16260 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16261echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016262 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016263## -------------------------------------- ##
16264## Report this to http://bugs.python.org/ ##
16265## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016266_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016267 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016268 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016270{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16271echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016272if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016273 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016274else
16275 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016276fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016277{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16278echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016279
16280fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016281if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016282 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016283#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016284_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016285
Martin v. Löwis11437992002-04-12 09:54:03 +000016286 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016287#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016288_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016289
Martin v. Löwis11437992002-04-12 09:54:03 +000016290
16291cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016292#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016293_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016294
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016295 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016296else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016297
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016298 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16299echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016300
Martin v. Löwiseba40652007-08-30 20:10:57 +000016301# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016302if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016303 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16304echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016305 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016306#define WITH_THREAD 1
16307_ACEOF
16308
16309
16310cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016311#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016312_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016313
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016314 LIBS="-lpth $LIBS"
16315 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016316else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016317 { echo "$as_me:$LINENO: result: no" >&5
16318echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016319
16320 # Just looking for pthread_create in libpthread is not enough:
16321 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16322 # So we really have to include pthread.h, and then link.
16323 _libs=$LIBS
16324 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016325 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16326echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016328/* confdefs.h. */
16329_ACEOF
16330cat confdefs.h >>conftest.$ac_ext
16331cat >>conftest.$ac_ext <<_ACEOF
16332/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016333#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016334
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016335void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016336int
16337main ()
16338{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016339
16340pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016341 ;
16342 return 0;
16343}
16344_ACEOF
16345rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016346if { (ac_try="$ac_link"
16347case "(($ac_try" in
16348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16349 *) ac_try_echo=$ac_try;;
16350esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016352 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016354 grep -v '^ *+' conftest.er1 >conftest.err
16355 rm -f conftest.er1
16356 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016358 (exit $ac_status); } && {
16359 test -z "$ac_c_werror_flag" ||
16360 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016361 } && test -s conftest$ac_exeext &&
16362 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016363
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016364 { echo "$as_me:$LINENO: result: yes" >&5
16365echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016367#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016368_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016369
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016370 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016371 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016372else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016374sed 's/^/| /' conftest.$ac_ext >&5
16375
Martin v. Löwis11437992002-04-12 09:54:03 +000016376
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016377 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016378 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16379echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016380if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016382else
Martin v. Löwis11437992002-04-12 09:54:03 +000016383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016384/* confdefs.h. */
16385_ACEOF
16386cat confdefs.h >>conftest.$ac_ext
16387cat >>conftest.$ac_ext <<_ACEOF
16388/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016389/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16390 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16391#define pthread_detach innocuous_pthread_detach
16392
Guido van Rossumad678af1998-10-02 14:42:15 +000016393/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016394 which can conflict with char pthread_detach (); below.
16395 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016396 <limits.h> exists even on freestanding compilers. */
16397
16398#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016399# include <limits.h>
16400#else
16401# include <assert.h>
16402#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016403
16404#undef pthread_detach
16405
Martin v. Löwiseba40652007-08-30 20:10:57 +000016406/* Override any GCC internal prototype to avoid an error.
16407 Use char because int might match the return type of a GCC
16408 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016409#ifdef __cplusplus
16410extern "C"
16411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016412char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016413/* The GNU C library defines this for functions which it implements
16414 to always fail with ENOSYS. Some functions are actually named
16415 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016416#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016417choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016418#endif
16419
Skip Montanaro6dead952003-09-25 14:50:04 +000016420int
16421main ()
16422{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016423return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 ;
16425 return 0;
16426}
16427_ACEOF
16428rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016429if { (ac_try="$ac_link"
16430case "(($ac_try" in
16431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16432 *) ac_try_echo=$ac_try;;
16433esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016435 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016437 grep -v '^ *+' conftest.er1 >conftest.err
16438 rm -f conftest.er1
16439 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016441 (exit $ac_status); } && {
16442 test -z "$ac_c_werror_flag" ||
16443 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016444 } && test -s conftest$ac_exeext &&
16445 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016446 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016447else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016449sed 's/^/| /' conftest.$ac_ext >&5
16450
Martin v. Löwiseba40652007-08-30 20:10:57 +000016451 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016453
16454rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016455 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016456fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016457{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16458echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16459if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016460 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016461#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016462_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016463
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016464 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016465 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016466else
Guido van Rossumad678af1998-10-02 14:42:15 +000016467
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016468 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016469 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16470echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016471if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016472 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016473fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016474{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16475echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016476else
16477 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016478{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16479echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016480cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016481/* confdefs.h. */
16482_ACEOF
16483cat confdefs.h >>conftest.$ac_ext
16484cat >>conftest.$ac_ext <<_ACEOF
16485/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016486$ac_includes_default
16487#include <atheos/threads.h>
16488_ACEOF
16489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016490if { (ac_try="$ac_compile"
16491case "(($ac_try" in
16492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16493 *) ac_try_echo=$ac_try;;
16494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016498 grep -v '^ *+' conftest.er1 >conftest.err
16499 rm -f conftest.er1
16500 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016502 (exit $ac_status); } && {
16503 test -z "$ac_c_werror_flag" ||
16504 test ! -s conftest.err
16505 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016506 ac_header_compiler=yes
16507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016509sed 's/^/| /' conftest.$ac_ext >&5
16510
Martin v. Löwiseba40652007-08-30 20:10:57 +000016511 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016513
16514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016515{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16516echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016517
16518# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016519{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16520echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016521cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016522/* confdefs.h. */
16523_ACEOF
16524cat confdefs.h >>conftest.$ac_ext
16525cat >>conftest.$ac_ext <<_ACEOF
16526/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016527#include <atheos/threads.h>
16528_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016529if { (ac_try="$ac_cpp conftest.$ac_ext"
16530case "(($ac_try" in
16531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16532 *) ac_try_echo=$ac_try;;
16533esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016535 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016536 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016537 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016538 rm -f conftest.er1
16539 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016541 (exit $ac_status); } >/dev/null && {
16542 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16543 test ! -s conftest.err
16544 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016545 ac_header_preproc=yes
16546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016548sed 's/^/| /' conftest.$ac_ext >&5
16549
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016550 ac_header_preproc=no
16551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016552
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016553rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016554{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16555echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016556
16557# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016558case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16559 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016560 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16561echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16562 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16563echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016564 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016565 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016566 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016567 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16568echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16569 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16570echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16571 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16572echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16573 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16574echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16575 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16576echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16577 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16578echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016579 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016580## -------------------------------------- ##
16581## Report this to http://bugs.python.org/ ##
16582## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016583_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016584 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016585 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016586esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016587{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16588echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016589if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016590 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016591else
16592 ac_cv_header_atheos_threads_h=$ac_header_preproc
16593fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016594{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16595echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016596
16597fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016598if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016599 cat >>confdefs.h <<\_ACEOF
16600#define WITH_THREAD 1
16601_ACEOF
16602
16603
16604cat >>confdefs.h <<\_ACEOF
16605#define ATHEOS_THREADS 1
16606_ACEOF
16607
16608 THREADOBJ="Python/thread.o"
16609else
16610
Martin v. Löwis11437992002-04-12 09:54:03 +000016611 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016612 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16613echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016614if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016615 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016616fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016617{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16618echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016619else
Martin v. Löwis11437992002-04-12 09:54:03 +000016620 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016621{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16622echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016623cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016624/* confdefs.h. */
16625_ACEOF
16626cat confdefs.h >>conftest.$ac_ext
16627cat >>conftest.$ac_ext <<_ACEOF
16628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016629$ac_includes_default
16630#include <kernel/OS.h>
16631_ACEOF
16632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016633if { (ac_try="$ac_compile"
16634case "(($ac_try" in
16635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16636 *) ac_try_echo=$ac_try;;
16637esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016641 grep -v '^ *+' conftest.er1 >conftest.err
16642 rm -f conftest.er1
16643 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016645 (exit $ac_status); } && {
16646 test -z "$ac_c_werror_flag" ||
16647 test ! -s conftest.err
16648 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016649 ac_header_compiler=yes
16650else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016652sed 's/^/| /' conftest.$ac_ext >&5
16653
Martin v. Löwiseba40652007-08-30 20:10:57 +000016654 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016656
16657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016658{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16659echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016660
16661# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016662{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16663echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016664cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016665/* confdefs.h. */
16666_ACEOF
16667cat confdefs.h >>conftest.$ac_ext
16668cat >>conftest.$ac_ext <<_ACEOF
16669/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016670#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016671_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016672if { (ac_try="$ac_cpp conftest.$ac_ext"
16673case "(($ac_try" in
16674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16675 *) ac_try_echo=$ac_try;;
16676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016678 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016679 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016680 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016681 rm -f conftest.er1
16682 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016684 (exit $ac_status); } >/dev/null && {
16685 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16686 test ! -s conftest.err
16687 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016688 ac_header_preproc=yes
16689else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016691sed 's/^/| /' conftest.$ac_ext >&5
16692
Martin v. Löwis11437992002-04-12 09:54:03 +000016693 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016695
Martin v. Löwis11437992002-04-12 09:54:03 +000016696rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016697{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16698echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016699
Martin v. Löwis11437992002-04-12 09:54:03 +000016700# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016701case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16702 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016703 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16704echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16705 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16706echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016707 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016708 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016709 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016710 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16711echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16712 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16713echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16714 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16715echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16716 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16717echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16718 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16719echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16720 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16721echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016723## -------------------------------------- ##
16724## Report this to http://bugs.python.org/ ##
16725## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016726_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016727 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016728 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016730{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16731echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016732if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016733 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016734else
16735 ac_cv_header_kernel_OS_h=$ac_header_preproc
16736fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016737{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16738echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016739
16740fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016741if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016742 cat >>confdefs.h <<\_ACEOF
16743#define WITH_THREAD 1
16744_ACEOF
16745
16746
16747cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016748#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016749_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016750
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016751 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016752else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016753
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016754 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16755echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016756if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016757 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016758else
Martin v. Löwis11437992002-04-12 09:54:03 +000016759 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016760LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016761cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016762/* confdefs.h. */
16763_ACEOF
16764cat confdefs.h >>conftest.$ac_ext
16765cat >>conftest.$ac_ext <<_ACEOF
16766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016767
Martin v. Löwiseba40652007-08-30 20:10:57 +000016768/* Override any GCC internal prototype to avoid an error.
16769 Use char because int might match the return type of a GCC
16770 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016771#ifdef __cplusplus
16772extern "C"
16773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016774char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016775int
16776main ()
16777{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016778return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016779 ;
16780 return 0;
16781}
16782_ACEOF
16783rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016784if { (ac_try="$ac_link"
16785case "(($ac_try" in
16786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16787 *) ac_try_echo=$ac_try;;
16788esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016790 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016792 grep -v '^ *+' conftest.er1 >conftest.err
16793 rm -f conftest.er1
16794 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016796 (exit $ac_status); } && {
16797 test -z "$ac_c_werror_flag" ||
16798 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016799 } && test -s conftest$ac_exeext &&
16800 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016802else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016804sed 's/^/| /' conftest.$ac_ext >&5
16805
Martin v. Löwiseba40652007-08-30 20:10:57 +000016806 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016808
16809rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016810 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016811LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016812fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016813{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16814echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16815if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016816 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016817#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016818_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016819
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016820 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016821 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016822 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016823else
Greg Steinadf63d62000-07-05 10:38:09 +000016824
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016825 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16826echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016827if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016828 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016829else
Martin v. Löwis11437992002-04-12 09:54:03 +000016830 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016831LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016832cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016833/* confdefs.h. */
16834_ACEOF
16835cat confdefs.h >>conftest.$ac_ext
16836cat >>conftest.$ac_ext <<_ACEOF
16837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016838
Martin v. Löwiseba40652007-08-30 20:10:57 +000016839/* Override any GCC internal prototype to avoid an error.
16840 Use char because int might match the return type of a GCC
16841 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016842#ifdef __cplusplus
16843extern "C"
16844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016845char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016846int
16847main ()
16848{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016849return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016850 ;
16851 return 0;
16852}
16853_ACEOF
16854rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016855if { (ac_try="$ac_link"
16856case "(($ac_try" in
16857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16858 *) ac_try_echo=$ac_try;;
16859esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016861 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016863 grep -v '^ *+' conftest.er1 >conftest.err
16864 rm -f conftest.er1
16865 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016867 (exit $ac_status); } && {
16868 test -z "$ac_c_werror_flag" ||
16869 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016870 } && test -s conftest$ac_exeext &&
16871 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016873else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016875sed 's/^/| /' conftest.$ac_ext >&5
16876
Martin v. Löwiseba40652007-08-30 20:10:57 +000016877 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016879
16880rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016881 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016882LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016883fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016884{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16885echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16886if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016887 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016888#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016889_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016890
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016891 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016892 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016893 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016894else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016895
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016896 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16897echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016898if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016899 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016900else
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016902LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016904/* confdefs.h. */
16905_ACEOF
16906cat confdefs.h >>conftest.$ac_ext
16907cat >>conftest.$ac_ext <<_ACEOF
16908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016909
Martin v. Löwiseba40652007-08-30 20:10:57 +000016910/* Override any GCC internal prototype to avoid an error.
16911 Use char because int might match the return type of a GCC
16912 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016913#ifdef __cplusplus
16914extern "C"
16915#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016916char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016917int
16918main ()
16919{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016920return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016921 ;
16922 return 0;
16923}
16924_ACEOF
16925rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926if { (ac_try="$ac_link"
16927case "(($ac_try" in
16928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16929 *) ac_try_echo=$ac_try;;
16930esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016932 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016934 grep -v '^ *+' conftest.er1 >conftest.err
16935 rm -f conftest.er1
16936 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016938 (exit $ac_status); } && {
16939 test -z "$ac_c_werror_flag" ||
16940 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016941 } && test -s conftest$ac_exeext &&
16942 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016943 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016944else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016946sed 's/^/| /' conftest.$ac_ext >&5
16947
Martin v. Löwiseba40652007-08-30 20:10:57 +000016948 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016950
16951rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016952 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016953LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016954fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016955{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16956echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16957if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016958 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016959#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016960_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016961
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016962 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016963 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016964 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016965else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016966
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016967 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16968echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016969if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016970 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016971else
Martin v. Löwis11437992002-04-12 09:54:03 +000016972 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016973LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016975/* confdefs.h. */
16976_ACEOF
16977cat confdefs.h >>conftest.$ac_ext
16978cat >>conftest.$ac_ext <<_ACEOF
16979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016980
Martin v. Löwiseba40652007-08-30 20:10:57 +000016981/* Override any GCC internal prototype to avoid an error.
16982 Use char because int might match the return type of a GCC
16983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016984#ifdef __cplusplus
16985extern "C"
16986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016987char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016988int
16989main ()
16990{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016991return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016992 ;
16993 return 0;
16994}
16995_ACEOF
16996rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016997if { (ac_try="$ac_link"
16998case "(($ac_try" in
16999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17000 *) ac_try_echo=$ac_try;;
17001esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017003 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017005 grep -v '^ *+' conftest.er1 >conftest.err
17006 rm -f conftest.er1
17007 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017009 (exit $ac_status); } && {
17010 test -z "$ac_c_werror_flag" ||
17011 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017012 } && test -s conftest$ac_exeext &&
17013 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017014 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000017015else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017017sed 's/^/| /' conftest.$ac_ext >&5
17018
Martin v. Löwiseba40652007-08-30 20:10:57 +000017019 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000017020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021
17022rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017024LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000017025fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017026{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
17027echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
17028if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000017030#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017031_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000017032
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017033 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000017034 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017035 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000017036else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000017037
Martin v. Löwis130fb172001-07-19 11:00:41 +000017038 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000017039fi
17040
Guido van Rossum627b2d71993-12-24 10:39:16 +000017041
Guido van Rossum7b3853f1996-07-30 18:09:35 +000017042fi
17043
Guido van Rossum0be3e491997-05-22 20:33:33 +000017044fi
17045
Guido van Rossum49545951997-12-02 19:28:29 +000017046fi
17047
Guido van Rossumb93a8621998-05-07 13:27:32 +000017048fi
17049
Guido van Rossum07bd90e2000-05-08 13:41:38 +000017050
Michael W. Hudson54241132001-12-07 15:38:26 +000017051fi
17052
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017053
17054fi
17055
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017057
17058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017060fi
17061
Martin v. Löwis11437992002-04-12 09:54:03 +000017062fi
17063
17064
17065fi
17066
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017067
Michael W. Hudson54241132001-12-07 15:38:26 +000017068
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017069 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
17070echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017071if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017073else
Martin v. Löwis11437992002-04-12 09:54:03 +000017074 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017075LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017077/* confdefs.h. */
17078_ACEOF
17079cat confdefs.h >>conftest.$ac_ext
17080cat >>conftest.$ac_ext <<_ACEOF
17081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017082
Martin v. Löwiseba40652007-08-30 20:10:57 +000017083/* Override any GCC internal prototype to avoid an error.
17084 Use char because int might match the return type of a GCC
17085 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017086#ifdef __cplusplus
17087extern "C"
17088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017089char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017090int
17091main ()
17092{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017093return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 ;
17095 return 0;
17096}
17097_ACEOF
17098rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017099if { (ac_try="$ac_link"
17100case "(($ac_try" in
17101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17102 *) ac_try_echo=$ac_try;;
17103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017105 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017107 grep -v '^ *+' conftest.er1 >conftest.err
17108 rm -f conftest.er1
17109 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017111 (exit $ac_status); } && {
17112 test -z "$ac_c_werror_flag" ||
17113 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017114 } && test -s conftest$ac_exeext &&
17115 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017116 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017119sed 's/^/| /' conftest.$ac_ext >&5
17120
Martin v. Löwiseba40652007-08-30 20:10:57 +000017121 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017123
17124rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017126LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017127fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017128{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17129echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17130if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017131 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017132#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017133_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017134
Martin v. Löwis130fb172001-07-19 11:00:41 +000017135 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017136 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017137 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017138fi
17139
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017140
Neal Norwitza978ab02002-11-02 16:58:05 +000017141 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017142 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17143echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017144if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017145 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017146else
Martin v. Löwis11437992002-04-12 09:54:03 +000017147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017148LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017150/* confdefs.h. */
17151_ACEOF
17152cat confdefs.h >>conftest.$ac_ext
17153cat >>conftest.$ac_ext <<_ACEOF
17154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017155
Martin v. Löwiseba40652007-08-30 20:10:57 +000017156/* Override any GCC internal prototype to avoid an error.
17157 Use char because int might match the return type of a GCC
17158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017159#ifdef __cplusplus
17160extern "C"
17161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017162char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017163int
17164main ()
17165{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017166return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017167 ;
17168 return 0;
17169}
17170_ACEOF
17171rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017172if { (ac_try="$ac_link"
17173case "(($ac_try" in
17174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17175 *) ac_try_echo=$ac_try;;
17176esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017178 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017180 grep -v '^ *+' conftest.er1 >conftest.err
17181 rm -f conftest.er1
17182 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017184 (exit $ac_status); } && {
17185 test -z "$ac_c_werror_flag" ||
17186 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017187 } && test -s conftest$ac_exeext &&
17188 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017189 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017192sed 's/^/| /' conftest.$ac_ext >&5
17193
Martin v. Löwiseba40652007-08-30 20:10:57 +000017194 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017196
17197rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017199LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017200fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017201{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17202echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17203if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017204 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017205#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017206_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017207
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017208 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017209 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017210 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017211fi
17212
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017213 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017214
Martin v. Löwis130fb172001-07-19 11:00:41 +000017215 if test "$USE_THREAD_MODULE" != "#"
17216 then
17217 # If the above checks didn't disable threads, (at least) OSF1
17218 # needs this '-threads' argument during linking.
17219 case $ac_sys_system in
17220 OSF1) LDLAST=-threads;;
17221 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017222 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017223fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017224
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017225if test "$posix_threads" = "yes"; then
17226 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017227
17228cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017229#define _POSIX_THREADS 1
17230_ACEOF
17231
17232 fi
17233
17234 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17235 case $ac_sys_system/$ac_sys_release in
17236 SunOS/5.6)
17237cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017238#define HAVE_PTHREAD_DESTRUCTOR 1
17239_ACEOF
17240
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017241 ;;
17242 SunOS/5.8)
17243cat >>confdefs.h <<\_ACEOF
17244#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17245_ACEOF
17246
17247 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017248 AIX/5)
17249cat >>confdefs.h <<\_ACEOF
17250#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17251_ACEOF
17252
17253 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017254 esac
17255
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017256 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17257echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017258 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017259 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017260else
17261 if test "$cross_compiling" = yes; then
17262 ac_cv_pthread_system_supported=no
17263else
17264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017265/* confdefs.h. */
17266_ACEOF
17267cat confdefs.h >>conftest.$ac_ext
17268cat >>conftest.$ac_ext <<_ACEOF
17269/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017270#include <pthread.h>
17271 void *foo(void *parm) {
17272 return NULL;
17273 }
17274 main() {
17275 pthread_attr_t attr;
17276 pthread_t id;
17277 if (pthread_attr_init(&attr)) exit(-1);
17278 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17279 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17280 exit(0);
17281 }
17282_ACEOF
17283rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017284if { (ac_try="$ac_link"
17285case "(($ac_try" in
17286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17287 *) ac_try_echo=$ac_try;;
17288esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017290 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017291 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017293 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017294 { (case "(($ac_try" in
17295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17296 *) ac_try_echo=$ac_try;;
17297esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017299 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017300 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017302 (exit $ac_status); }; }; then
17303 ac_cv_pthread_system_supported=yes
17304else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017305 echo "$as_me: program exited with status $ac_status" >&5
17306echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017307sed 's/^/| /' conftest.$ac_ext >&5
17308
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017309( exit $ac_status )
17310ac_cv_pthread_system_supported=no
17311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017312rm -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 +000017313fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017314
Martin v. Löwiseba40652007-08-30 20:10:57 +000017315
17316
Guido van Rossum627b2d71993-12-24 10:39:16 +000017317fi
17318
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017319 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17320echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017321 if test "$ac_cv_pthread_system_supported" = "yes"; then
17322
17323cat >>confdefs.h <<\_ACEOF
17324#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17325_ACEOF
17326
17327 fi
17328
17329for ac_func in pthread_sigmask
17330do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017331as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17332{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17333echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017334if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017335 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017336else
17337 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017338/* confdefs.h. */
17339_ACEOF
17340cat confdefs.h >>conftest.$ac_ext
17341cat >>conftest.$ac_ext <<_ACEOF
17342/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017343/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17344 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17345#define $ac_func innocuous_$ac_func
17346
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017347/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017348 which can conflict with char $ac_func (); below.
17349 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017350 <limits.h> exists even on freestanding compilers. */
17351
17352#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017353# include <limits.h>
17354#else
17355# include <assert.h>
17356#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017357
17358#undef $ac_func
17359
Martin v. Löwiseba40652007-08-30 20:10:57 +000017360/* Override any GCC internal prototype to avoid an error.
17361 Use char because int might match the return type of a GCC
17362 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017363#ifdef __cplusplus
17364extern "C"
17365#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017366char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017367/* The GNU C library defines this for functions which it implements
17368 to always fail with ENOSYS. Some functions are actually named
17369 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017370#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017371choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017372#endif
17373
Skip Montanaro6dead952003-09-25 14:50:04 +000017374int
17375main ()
17376{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017377return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017378 ;
17379 return 0;
17380}
17381_ACEOF
17382rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017383if { (ac_try="$ac_link"
17384case "(($ac_try" in
17385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17386 *) ac_try_echo=$ac_try;;
17387esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017389 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017391 grep -v '^ *+' conftest.er1 >conftest.err
17392 rm -f conftest.er1
17393 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017395 (exit $ac_status); } && {
17396 test -z "$ac_c_werror_flag" ||
17397 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017398 } && test -s conftest$ac_exeext &&
17399 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017400 eval "$as_ac_var=yes"
17401else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017403sed 's/^/| /' conftest.$ac_ext >&5
17404
Martin v. Löwiseba40652007-08-30 20:10:57 +000017405 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017407
17408rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017409 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017410fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017411ac_res=`eval echo '${'$as_ac_var'}'`
17412 { echo "$as_me:$LINENO: result: $ac_res" >&5
17413echo "${ECHO_T}$ac_res" >&6; }
17414if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017415 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017416#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017417_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017418 case $ac_sys_system in
17419 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017420
Jason Tishlerfac083d2003-07-22 15:20:49 +000017421cat >>confdefs.h <<\_ACEOF
17422#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17423_ACEOF
17424
17425 ;;
17426 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017427fi
17428done
17429
17430fi
17431
17432
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017433# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017434
17435
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017436{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17437echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017438# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017439if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017440 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017441 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017442 { echo "$as_me:$LINENO: result: no" >&5
17443echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017444 ipv6=no
17445 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017446 *) { echo "$as_me:$LINENO: result: yes" >&5
17447echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017449#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017450_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017451
17452 ipv6=yes
17453 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017454 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017455else
Martin v. Löwis11437992002-04-12 09:54:03 +000017456
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017457 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017458 { echo "$as_me:$LINENO: result: no" >&5
17459echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017460 ipv6=no
17461
17462else
Martin v. Löwis11437992002-04-12 09:54:03 +000017463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017464/* confdefs.h. */
17465_ACEOF
17466cat confdefs.h >>conftest.$ac_ext
17467cat >>conftest.$ac_ext <<_ACEOF
17468/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017469 /* AF_INET6 available check */
17470#include <sys/types.h>
17471#include <sys/socket.h>
17472main()
17473{
17474 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17475 exit(1);
17476 else
17477 exit(0);
17478}
17479
Martin v. Löwis11437992002-04-12 09:54:03 +000017480_ACEOF
17481rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017482if { (ac_try="$ac_link"
17483case "(($ac_try" in
17484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17485 *) ac_try_echo=$ac_try;;
17486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017488 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017489 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017491 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017492 { (case "(($ac_try" in
17493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17494 *) ac_try_echo=$ac_try;;
17495esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017497 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017498 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017500 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017501 { echo "$as_me:$LINENO: result: yes" >&5
17502echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017503 ipv6=yes
17504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017505 echo "$as_me: program exited with status $ac_status" >&5
17506echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017507sed 's/^/| /' conftest.$ac_ext >&5
17508
Martin v. Löwis11437992002-04-12 09:54:03 +000017509( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017510{ echo "$as_me:$LINENO: result: no" >&5
17511echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017512 ipv6=no
17513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017514rm -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 +000017515fi
17516
Martin v. Löwiseba40652007-08-30 20:10:57 +000017517
17518
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017519if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017520 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17521echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017523/* confdefs.h. */
17524_ACEOF
17525cat confdefs.h >>conftest.$ac_ext
17526cat >>conftest.$ac_ext <<_ACEOF
17527/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017528#include <sys/types.h>
17529#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017530int
17531main ()
17532{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017533struct sockaddr_in6 x;
17534x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017535 ;
17536 return 0;
17537}
17538_ACEOF
17539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017540if { (ac_try="$ac_compile"
17541case "(($ac_try" in
17542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17543 *) ac_try_echo=$ac_try;;
17544esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017548 grep -v '^ *+' conftest.er1 >conftest.err
17549 rm -f conftest.er1
17550 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017552 (exit $ac_status); } && {
17553 test -z "$ac_c_werror_flag" ||
17554 test ! -s conftest.err
17555 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017556 { echo "$as_me:$LINENO: result: yes" >&5
17557echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017558 ipv6=yes
17559else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017561sed 's/^/| /' conftest.$ac_ext >&5
17562
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017563 { echo "$as_me:$LINENO: result: no" >&5
17564echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017565 ipv6=no
17566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017567
17568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017569fi
17570
17571if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017572 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017573#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017574_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017575
17576fi
17577
Martin v. Löwiseba40652007-08-30 20:10:57 +000017578fi
17579
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017580
17581ipv6type=unknown
17582ipv6lib=none
17583ipv6trylibc=no
17584
17585if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017586 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17587echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017588 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17589 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017590 case $i in
17591 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017593/* confdefs.h. */
17594_ACEOF
17595cat confdefs.h >>conftest.$ac_ext
17596cat >>conftest.$ac_ext <<_ACEOF
17597/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017598
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017599#include <netinet/in.h>
17600#ifdef IPV6_INRIA_VERSION
17601yes
17602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017603_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017605 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017606 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017607fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +000017608rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017609
17610 ;;
17611 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017613/* confdefs.h. */
17614_ACEOF
17615cat confdefs.h >>conftest.$ac_ext
17616cat >>conftest.$ac_ext <<_ACEOF
17617/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017618
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017619#include <netinet/in.h>
17620#ifdef __KAME__
17621yes
17622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017623_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017625 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017626 ipv6type=$i;
17627 ipv6lib=inet6
17628 ipv6libdir=/usr/local/v6/lib
17629 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017630fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +000017631rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017632
17633 ;;
17634 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017636/* confdefs.h. */
17637_ACEOF
17638cat confdefs.h >>conftest.$ac_ext
17639cat >>conftest.$ac_ext <<_ACEOF
17640/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017641
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017642#include <features.h>
17643#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17644yes
17645#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017646_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017647if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017648 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017649 ipv6type=$i;
17650 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017651fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +000017652rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017653
17654 ;;
17655 linux-inet6)
17656 if test -d /usr/inet6; then
17657 ipv6type=$i
17658 ipv6lib=inet6
17659 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017660 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017661 fi
17662 ;;
17663 solaris)
17664 if test -f /etc/netconfig; then
17665 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17666 ipv6type=$i
17667 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017668 fi
17669 fi
17670 ;;
17671 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017672 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017673/* confdefs.h. */
17674_ACEOF
17675cat confdefs.h >>conftest.$ac_ext
17676cat >>conftest.$ac_ext <<_ACEOF
17677/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017678
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017679#include <sys/param.h>
17680#ifdef _TOSHIBA_INET6
17681yes
17682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017683_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017685 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017686 ipv6type=$i;
17687 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017688 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017689fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +000017690rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017691
17692 ;;
17693 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017695/* confdefs.h. */
17696_ACEOF
17697cat confdefs.h >>conftest.$ac_ext
17698cat >>conftest.$ac_ext <<_ACEOF
17699/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017700
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017701#include </usr/local/v6/include/sys/v6config.h>
17702#ifdef __V6D__
17703yes
17704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017705_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017706if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017707 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017708 ipv6type=$i;
17709 ipv6lib=v6;
17710 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017711 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017712fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +000017713rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017714
17715 ;;
17716 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017718/* confdefs.h. */
17719_ACEOF
17720cat confdefs.h >>conftest.$ac_ext
17721cat >>conftest.$ac_ext <<_ACEOF
17722/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017723
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017724#include <sys/param.h>
17725#ifdef _ZETA_MINAMI_INET6
17726yes
17727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017728_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017730 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017731 ipv6type=$i;
17732 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017733 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017734fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +000017735rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017736
17737 ;;
17738 esac
17739 if test "$ipv6type" != "unknown"; then
17740 break
17741 fi
17742 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017743 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17744echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017745fi
17746
17747if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17748 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17749 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17750 echo "using lib$ipv6lib"
17751 else
17752 if test $ipv6trylibc = "yes"; then
17753 echo "using libc"
17754 else
17755 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17756 echo "You need to fetch lib$ipv6lib.a from appropriate"
17757 echo 'ipv6 kit and compile beforehand.'
17758 exit 1
17759 fi
17760 fi
17761fi
17762
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017763{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17764echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017765cat >conftest.$ac_ext <<_ACEOF
17766/* confdefs.h. */
17767_ACEOF
17768cat confdefs.h >>conftest.$ac_ext
17769cat >>conftest.$ac_ext <<_ACEOF
17770/* end confdefs.h. */
17771#include <Carbon/Carbon.h>
17772int
17773main ()
17774{
17775FSIORefNum fRef = 0
17776 ;
17777 return 0;
17778}
17779_ACEOF
17780rm -f conftest.$ac_objext
17781if { (ac_try="$ac_compile"
17782case "(($ac_try" in
17783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17784 *) ac_try_echo=$ac_try;;
17785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017787 (eval "$ac_compile") 2>conftest.er1
17788 ac_status=$?
17789 grep -v '^ *+' conftest.er1 >conftest.err
17790 rm -f conftest.er1
17791 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017793 (exit $ac_status); } && {
17794 test -z "$ac_c_werror_flag" ||
17795 test ! -s conftest.err
17796 } && test -s conftest.$ac_objext; then
17797
17798cat >>confdefs.h <<\_ACEOF
17799#define HAVE_OSX105_SDK 1
17800_ACEOF
17801
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017802 { echo "$as_me:$LINENO: result: yes" >&5
17803echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017804else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017805 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017806sed 's/^/| /' conftest.$ac_ext >&5
17807
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017808 { echo "$as_me:$LINENO: result: no" >&5
17809echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017810
17811fi
17812
17813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17814
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017815# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017816{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17817echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017818
Martin v. Löwiseba40652007-08-30 20:10:57 +000017819# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017820if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017821 withval=$with_doc_strings;
17822fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017823
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017824
17825if test -z "$with_doc_strings"
17826then with_doc_strings="yes"
17827fi
17828if test "$with_doc_strings" != "no"
17829then
17830
17831cat >>confdefs.h <<\_ACEOF
17832#define WITH_DOC_STRINGS 1
17833_ACEOF
17834
17835fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017836{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17837echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017838
Neil Schemenauera35c6882001-02-27 04:45:05 +000017839# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017840{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17841echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017842
Martin v. Löwiseba40652007-08-30 20:10:57 +000017843# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017844if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017845 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017846if test "$withval" != no
17847then
17848
17849cat >>confdefs.h <<\_ACEOF
17850#define WITH_TSC 1
17851_ACEOF
17852
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017853 { echo "$as_me:$LINENO: result: yes" >&5
17854echo "${ECHO_T}yes" >&6; }
17855else { echo "$as_me:$LINENO: result: no" >&5
17856echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017857fi
17858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017859 { echo "$as_me:$LINENO: result: no" >&5
17860echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017861fi
17862
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017863
17864# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017865{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17866echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
Martin v. Löwiseba40652007-08-30 20:10:57 +000017868# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017869if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017870 withval=$with_pymalloc;
17871fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017872
Neil Schemenauera35c6882001-02-27 04:45:05 +000017873
Neil Schemenauer16c22972002-03-22 15:34:49 +000017874if test -z "$with_pymalloc"
17875then with_pymalloc="yes"
17876fi
17877if test "$with_pymalloc" != "no"
17878then
Martin v. Löwis11437992002-04-12 09:54:03 +000017879
17880cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017881#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017882_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017883
17884fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017885{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17886echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017887
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017888# Check for Valgrind support
17889{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17890echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17891
17892# Check whether --with-valgrind was given.
17893if test "${with_valgrind+set}" = set; then
17894 withval=$with_valgrind;
17895else
17896 with_valgrind=no
17897fi
17898
17899{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17900echo "${ECHO_T}$with_valgrind" >&6; }
17901if test "$with_valgrind" != no; then
17902 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17903 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17904echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17905if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17906 echo $ECHO_N "(cached) $ECHO_C" >&6
17907fi
17908{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17909echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17910else
17911 # Is the header compilable?
17912{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17913echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17914cat >conftest.$ac_ext <<_ACEOF
17915/* confdefs.h. */
17916_ACEOF
17917cat confdefs.h >>conftest.$ac_ext
17918cat >>conftest.$ac_ext <<_ACEOF
17919/* end confdefs.h. */
17920$ac_includes_default
17921#include <valgrind/valgrind.h>
17922_ACEOF
17923rm -f conftest.$ac_objext
17924if { (ac_try="$ac_compile"
17925case "(($ac_try" in
17926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17927 *) ac_try_echo=$ac_try;;
17928esac
17929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17930 (eval "$ac_compile") 2>conftest.er1
17931 ac_status=$?
17932 grep -v '^ *+' conftest.er1 >conftest.err
17933 rm -f conftest.er1
17934 cat conftest.err >&5
17935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17936 (exit $ac_status); } && {
17937 test -z "$ac_c_werror_flag" ||
17938 test ! -s conftest.err
17939 } && test -s conftest.$ac_objext; then
17940 ac_header_compiler=yes
17941else
17942 echo "$as_me: failed program was:" >&5
17943sed 's/^/| /' conftest.$ac_ext >&5
17944
17945 ac_header_compiler=no
17946fi
17947
17948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17949{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17950echo "${ECHO_T}$ac_header_compiler" >&6; }
17951
17952# Is the header present?
17953{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17954echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17955cat >conftest.$ac_ext <<_ACEOF
17956/* confdefs.h. */
17957_ACEOF
17958cat confdefs.h >>conftest.$ac_ext
17959cat >>conftest.$ac_ext <<_ACEOF
17960/* end confdefs.h. */
17961#include <valgrind/valgrind.h>
17962_ACEOF
17963if { (ac_try="$ac_cpp conftest.$ac_ext"
17964case "(($ac_try" in
17965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17966 *) ac_try_echo=$ac_try;;
17967esac
17968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17969 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17970 ac_status=$?
17971 grep -v '^ *+' conftest.er1 >conftest.err
17972 rm -f conftest.er1
17973 cat conftest.err >&5
17974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17975 (exit $ac_status); } >/dev/null && {
17976 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17977 test ! -s conftest.err
17978 }; then
17979 ac_header_preproc=yes
17980else
17981 echo "$as_me: failed program was:" >&5
17982sed 's/^/| /' conftest.$ac_ext >&5
17983
17984 ac_header_preproc=no
17985fi
17986
17987rm -f conftest.err conftest.$ac_ext
17988{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17989echo "${ECHO_T}$ac_header_preproc" >&6; }
17990
17991# So? What about this header?
17992case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17993 yes:no: )
17994 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17995echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17996 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17997echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17998 ac_header_preproc=yes
17999 ;;
18000 no:yes:* )
18001 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
18002echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
18003 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
18004echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
18005 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
18006echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
18007 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
18008echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
18009 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
18010echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
18011 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
18012echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
18013 ( cat <<\_ASBOX
18014## -------------------------------------- ##
18015## Report this to http://bugs.python.org/ ##
18016## -------------------------------------- ##
18017_ASBOX
18018 ) | sed "s/^/$as_me: WARNING: /" >&2
18019 ;;
18020esac
18021{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
18022echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
18023if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
18024 echo $ECHO_N "(cached) $ECHO_C" >&6
18025else
18026 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
18027fi
18028{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
18029echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
18030
18031fi
18032if test $ac_cv_header_valgrind_valgrind_h = yes; then
18033
18034cat >>confdefs.h <<\_ACEOF
18035#define WITH_VALGRIND 1
18036_ACEOF
18037
18038else
18039 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
18040echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
18041 { (exit 1); exit 1; }; }
18042
18043fi
18044
18045
18046fi
18047
Barry Warsawef82cd72000-06-30 16:21:01 +000018048# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018049{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
18050echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018051
Martin v. Löwiseba40652007-08-30 20:10:57 +000018052# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000018053if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018054 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000018055if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018056then
18057
18058cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000018059#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018060_ACEOF
18061
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018062 { echo "$as_me:$LINENO: result: yes" >&5
18063echo "${ECHO_T}yes" >&6; }
18064else { echo "$as_me:$LINENO: result: no" >&5
18065echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000018066fi
18067else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018068 { echo "$as_me:$LINENO: result: no" >&5
18069echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018070fi
18071
Barry Warsawef82cd72000-06-30 16:21:01 +000018072
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018073# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000018074
Guido van Rossum98935bf2001-09-05 19:13:16 +000018075DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018076
Guido van Rossume97ee181999-12-20 21:27:22 +000018077# the dlopen() function means we might want to use dynload_shlib.o. some
18078# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018079
Thomas Wouters3a584202000-08-05 23:28:51 +000018080for ac_func in dlopen
18081do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018082as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18083{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18084echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018085if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018086 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018087else
Martin v. Löwis11437992002-04-12 09:54:03 +000018088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018089/* confdefs.h. */
18090_ACEOF
18091cat confdefs.h >>conftest.$ac_ext
18092cat >>conftest.$ac_ext <<_ACEOF
18093/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018094/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18095 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18096#define $ac_func innocuous_$ac_func
18097
Guido van Rossume97ee181999-12-20 21:27:22 +000018098/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018099 which can conflict with char $ac_func (); below.
18100 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018101 <limits.h> exists even on freestanding compilers. */
18102
18103#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018104# include <limits.h>
18105#else
18106# include <assert.h>
18107#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018108
18109#undef $ac_func
18110
Martin v. Löwiseba40652007-08-30 20:10:57 +000018111/* Override any GCC internal prototype to avoid an error.
18112 Use char because int might match the return type of a GCC
18113 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018114#ifdef __cplusplus
18115extern "C"
18116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018117char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018118/* The GNU C library defines this for functions which it implements
18119 to always fail with ENOSYS. Some functions are actually named
18120 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018121#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018122choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018123#endif
18124
Skip Montanaro6dead952003-09-25 14:50:04 +000018125int
18126main ()
18127{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018128return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018129 ;
18130 return 0;
18131}
18132_ACEOF
18133rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018134if { (ac_try="$ac_link"
18135case "(($ac_try" in
18136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18137 *) ac_try_echo=$ac_try;;
18138esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018140 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018142 grep -v '^ *+' conftest.er1 >conftest.err
18143 rm -f conftest.er1
18144 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018146 (exit $ac_status); } && {
18147 test -z "$ac_c_werror_flag" ||
18148 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018149 } && test -s conftest$ac_exeext &&
18150 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018152else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018154sed 's/^/| /' conftest.$ac_ext >&5
18155
Martin v. Löwiseba40652007-08-30 20:10:57 +000018156 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018158
18159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018160 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018161fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018162ac_res=`eval echo '${'$as_ac_var'}'`
18163 { echo "$as_me:$LINENO: result: $ac_res" >&5
18164echo "${ECHO_T}$ac_res" >&6; }
18165if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018166 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018167#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018168_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018169
Guido van Rossume97ee181999-12-20 21:27:22 +000018170fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018171done
Guido van Rossume97ee181999-12-20 21:27:22 +000018172
Michael W. Hudson54241132001-12-07 15:38:26 +000018173
Guido van Rossume97ee181999-12-20 21:27:22 +000018174# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18175# loading of modules.
18176
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018177{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18178echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018179if test -z "$DYNLOADFILE"
18180then
18181 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018182 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18183 if test "$ac_cv_func_dlopen" = yes
18184 then DYNLOADFILE="dynload_shlib.o"
18185 else DYNLOADFILE="dynload_aix.o"
18186 fi
18187 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018188 BeOS*) DYNLOADFILE="dynload_beos.o";;
18189 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018190 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18191 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018192 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018193 *)
18194 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18195 # out any dynamic loading
18196 if test "$ac_cv_func_dlopen" = yes
18197 then DYNLOADFILE="dynload_shlib.o"
18198 else DYNLOADFILE="dynload_stub.o"
18199 fi
18200 ;;
18201 esac
18202fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018203{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18204echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018205if test "$DYNLOADFILE" != "dynload_stub.o"
18206then
Martin v. Löwis11437992002-04-12 09:54:03 +000018207
18208cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018209#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018210_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018211
18212fi
18213
Neil Schemenauer4e425612001-06-19 15:44:15 +000018214# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18215
Michael W. Hudson54241132001-12-07 15:38:26 +000018216
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018217{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18218echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018219if test -z "$MACHDEP_OBJS"
18220then
Jack Jansene578a632001-08-15 01:27:14 +000018221 MACHDEP_OBJS=$extra_machdep_objs
18222else
18223 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018224fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018225{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18226echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018227
Guido van Rossum627b2d71993-12-24 10:39:16 +000018228# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
Martin v. Löwisd6320502004-08-12 13:45:08 +000018300
Martin v. Löwisc3001752005-01-23 09:27:24 +000018301
18302
Neal Norwitz05a45592006-03-20 06:30:08 +000018303
18304
Martin v. Löwis382abef2007-02-19 10:55:19 +000018305
18306
Christian Heimes36281872007-11-30 21:11:28 +000018307
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018308
18309
Jesse Noller355b1262009-04-02 00:03:28 +000018310
18311
18312
18313
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018327
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018328for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18329 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018330 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018331 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018332 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018333 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018334 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018335 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18336 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018337 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018338 setlocale setregid setreuid setresuid setresgid \
18339 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018340 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018341 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018342 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018343do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018344as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18345{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18346echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018347if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018349else
Martin v. Löwis11437992002-04-12 09:54:03 +000018350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018351/* confdefs.h. */
18352_ACEOF
18353cat confdefs.h >>conftest.$ac_ext
18354cat >>conftest.$ac_ext <<_ACEOF
18355/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018356/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18357 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18358#define $ac_func innocuous_$ac_func
18359
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018360/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018361 which can conflict with char $ac_func (); below.
18362 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018363 <limits.h> exists even on freestanding compilers. */
18364
18365#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018366# include <limits.h>
18367#else
18368# include <assert.h>
18369#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018370
18371#undef $ac_func
18372
Martin v. Löwiseba40652007-08-30 20:10:57 +000018373/* Override any GCC internal prototype to avoid an error.
18374 Use char because int might match the return type of a GCC
18375 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018376#ifdef __cplusplus
18377extern "C"
18378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018379char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018380/* The GNU C library defines this for functions which it implements
18381 to always fail with ENOSYS. Some functions are actually named
18382 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018383#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018384choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018385#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018386
Skip Montanaro6dead952003-09-25 14:50:04 +000018387int
18388main ()
18389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018390return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018391 ;
18392 return 0;
18393}
18394_ACEOF
18395rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018396if { (ac_try="$ac_link"
18397case "(($ac_try" in
18398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18399 *) ac_try_echo=$ac_try;;
18400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018402 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018404 grep -v '^ *+' conftest.er1 >conftest.err
18405 rm -f conftest.er1
18406 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018408 (exit $ac_status); } && {
18409 test -z "$ac_c_werror_flag" ||
18410 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018411 } && test -s conftest$ac_exeext &&
18412 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018413 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018416sed 's/^/| /' conftest.$ac_ext >&5
18417
Martin v. Löwiseba40652007-08-30 20:10:57 +000018418 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018420
18421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018422 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018423fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018424ac_res=`eval echo '${'$as_ac_var'}'`
18425 { echo "$as_me:$LINENO: result: $ac_res" >&5
18426echo "${ECHO_T}$ac_res" >&6; }
18427if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018428 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018429#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018430_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018431
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018432fi
18433done
18434
Michael W. Hudson54241132001-12-07 15:38:26 +000018435
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018436# For some functions, having a definition is not sufficient, since
18437# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018438{ echo "$as_me:$LINENO: checking for chroot" >&5
18439echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018441/* confdefs.h. */
18442_ACEOF
18443cat confdefs.h >>conftest.$ac_ext
18444cat >>conftest.$ac_ext <<_ACEOF
18445/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018446#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018447int
18448main ()
18449{
18450void *x=chroot
18451 ;
18452 return 0;
18453}
18454_ACEOF
18455rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018456if { (ac_try="$ac_compile"
18457case "(($ac_try" in
18458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18459 *) ac_try_echo=$ac_try;;
18460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018462 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018464 grep -v '^ *+' conftest.er1 >conftest.err
18465 rm -f conftest.er1
18466 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018468 (exit $ac_status); } && {
18469 test -z "$ac_c_werror_flag" ||
18470 test ! -s conftest.err
18471 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018472
18473cat >>confdefs.h <<\_ACEOF
18474#define HAVE_CHROOT 1
18475_ACEOF
18476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018477 { echo "$as_me:$LINENO: result: yes" >&5
18478echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018481sed 's/^/| /' conftest.$ac_ext >&5
18482
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018483 { echo "$as_me:$LINENO: result: no" >&5
18484echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018485
18486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018487
18488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018489{ echo "$as_me:$LINENO: checking for link" >&5
18490echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018492/* confdefs.h. */
18493_ACEOF
18494cat confdefs.h >>conftest.$ac_ext
18495cat >>conftest.$ac_ext <<_ACEOF
18496/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018497#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018498int
18499main ()
18500{
18501void *x=link
18502 ;
18503 return 0;
18504}
18505_ACEOF
18506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018507if { (ac_try="$ac_compile"
18508case "(($ac_try" in
18509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18510 *) ac_try_echo=$ac_try;;
18511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018515 grep -v '^ *+' conftest.er1 >conftest.err
18516 rm -f conftest.er1
18517 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018519 (exit $ac_status); } && {
18520 test -z "$ac_c_werror_flag" ||
18521 test ! -s conftest.err
18522 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018523
18524cat >>confdefs.h <<\_ACEOF
18525#define HAVE_LINK 1
18526_ACEOF
18527
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018528 { echo "$as_me:$LINENO: result: yes" >&5
18529echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018532sed 's/^/| /' conftest.$ac_ext >&5
18533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018534 { echo "$as_me:$LINENO: result: no" >&5
18535echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018536
18537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018538
18539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018540{ echo "$as_me:$LINENO: checking for symlink" >&5
18541echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018543/* confdefs.h. */
18544_ACEOF
18545cat confdefs.h >>conftest.$ac_ext
18546cat >>conftest.$ac_ext <<_ACEOF
18547/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018548#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018549int
18550main ()
18551{
18552void *x=symlink
18553 ;
18554 return 0;
18555}
18556_ACEOF
18557rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018558if { (ac_try="$ac_compile"
18559case "(($ac_try" in
18560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18561 *) ac_try_echo=$ac_try;;
18562esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018566 grep -v '^ *+' conftest.er1 >conftest.err
18567 rm -f conftest.er1
18568 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018570 (exit $ac_status); } && {
18571 test -z "$ac_c_werror_flag" ||
18572 test ! -s conftest.err
18573 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018574
18575cat >>confdefs.h <<\_ACEOF
18576#define HAVE_SYMLINK 1
18577_ACEOF
18578
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018579 { echo "$as_me:$LINENO: result: yes" >&5
18580echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018581else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018583sed 's/^/| /' conftest.$ac_ext >&5
18584
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018585 { echo "$as_me:$LINENO: result: no" >&5
18586echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018587
18588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018589
18590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018591{ echo "$as_me:$LINENO: checking for fchdir" >&5
18592echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018594/* confdefs.h. */
18595_ACEOF
18596cat confdefs.h >>conftest.$ac_ext
18597cat >>conftest.$ac_ext <<_ACEOF
18598/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018599#include <unistd.h>
18600int
18601main ()
18602{
18603void *x=fchdir
18604 ;
18605 return 0;
18606}
18607_ACEOF
18608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018609if { (ac_try="$ac_compile"
18610case "(($ac_try" in
18611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18612 *) ac_try_echo=$ac_try;;
18613esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018617 grep -v '^ *+' conftest.er1 >conftest.err
18618 rm -f conftest.er1
18619 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018621 (exit $ac_status); } && {
18622 test -z "$ac_c_werror_flag" ||
18623 test ! -s conftest.err
18624 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018625
18626cat >>confdefs.h <<\_ACEOF
18627#define HAVE_FCHDIR 1
18628_ACEOF
18629
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018630 { echo "$as_me:$LINENO: result: yes" >&5
18631echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018632else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018634sed 's/^/| /' conftest.$ac_ext >&5
18635
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018636 { echo "$as_me:$LINENO: result: no" >&5
18637echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018638
18639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018640
18641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018642{ echo "$as_me:$LINENO: checking for fsync" >&5
18643echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018645/* confdefs.h. */
18646_ACEOF
18647cat confdefs.h >>conftest.$ac_ext
18648cat >>conftest.$ac_ext <<_ACEOF
18649/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018650#include <unistd.h>
18651int
18652main ()
18653{
18654void *x=fsync
18655 ;
18656 return 0;
18657}
18658_ACEOF
18659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018660if { (ac_try="$ac_compile"
18661case "(($ac_try" in
18662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18663 *) ac_try_echo=$ac_try;;
18664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018668 grep -v '^ *+' conftest.er1 >conftest.err
18669 rm -f conftest.er1
18670 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018672 (exit $ac_status); } && {
18673 test -z "$ac_c_werror_flag" ||
18674 test ! -s conftest.err
18675 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018676
18677cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018678#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018679_ACEOF
18680
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018681 { echo "$as_me:$LINENO: result: yes" >&5
18682echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018683else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018685sed 's/^/| /' conftest.$ac_ext >&5
18686
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018687 { echo "$as_me:$LINENO: result: no" >&5
18688echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018689
18690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018691
18692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018693{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18694echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018695cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018696/* confdefs.h. */
18697_ACEOF
18698cat confdefs.h >>conftest.$ac_ext
18699cat >>conftest.$ac_ext <<_ACEOF
18700/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018701#include <unistd.h>
18702int
18703main ()
18704{
18705void *x=fdatasync
18706 ;
18707 return 0;
18708}
18709_ACEOF
18710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018711if { (ac_try="$ac_compile"
18712case "(($ac_try" in
18713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18714 *) ac_try_echo=$ac_try;;
18715esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018719 grep -v '^ *+' conftest.er1 >conftest.err
18720 rm -f conftest.er1
18721 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018723 (exit $ac_status); } && {
18724 test -z "$ac_c_werror_flag" ||
18725 test ! -s conftest.err
18726 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018727
18728cat >>confdefs.h <<\_ACEOF
18729#define HAVE_FDATASYNC 1
18730_ACEOF
18731
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018732 { echo "$as_me:$LINENO: result: yes" >&5
18733echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018734else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018736sed 's/^/| /' conftest.$ac_ext >&5
18737
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018738 { echo "$as_me:$LINENO: result: no" >&5
18739echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018740
18741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018742
18743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018744{ echo "$as_me:$LINENO: checking for epoll" >&5
18745echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018746cat >conftest.$ac_ext <<_ACEOF
18747/* confdefs.h. */
18748_ACEOF
18749cat confdefs.h >>conftest.$ac_ext
18750cat >>conftest.$ac_ext <<_ACEOF
18751/* end confdefs.h. */
18752#include <sys/epoll.h>
18753int
18754main ()
18755{
18756void *x=epoll_create
18757 ;
18758 return 0;
18759}
18760_ACEOF
18761rm -f conftest.$ac_objext
18762if { (ac_try="$ac_compile"
18763case "(($ac_try" in
18764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18765 *) ac_try_echo=$ac_try;;
18766esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018768 (eval "$ac_compile") 2>conftest.er1
18769 ac_status=$?
18770 grep -v '^ *+' conftest.er1 >conftest.err
18771 rm -f conftest.er1
18772 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018774 (exit $ac_status); } && {
18775 test -z "$ac_c_werror_flag" ||
18776 test ! -s conftest.err
18777 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018778
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018779cat >>confdefs.h <<\_ACEOF
18780#define HAVE_EPOLL 1
18781_ACEOF
18782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018783 { echo "$as_me:$LINENO: result: yes" >&5
18784echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018785else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018786 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018787sed 's/^/| /' conftest.$ac_ext >&5
18788
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018789 { echo "$as_me:$LINENO: result: no" >&5
18790echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018791
18792fi
18793
18794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018795{ echo "$as_me:$LINENO: checking for kqueue" >&5
18796echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018797cat >conftest.$ac_ext <<_ACEOF
18798/* confdefs.h. */
18799_ACEOF
18800cat confdefs.h >>conftest.$ac_ext
18801cat >>conftest.$ac_ext <<_ACEOF
18802/* end confdefs.h. */
18803
18804#include <sys/types.h>
18805#include <sys/event.h>
18806
18807int
18808main ()
18809{
18810int x=kqueue()
18811 ;
18812 return 0;
18813}
18814_ACEOF
18815rm -f conftest.$ac_objext
18816if { (ac_try="$ac_compile"
18817case "(($ac_try" in
18818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18819 *) ac_try_echo=$ac_try;;
18820esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018822 (eval "$ac_compile") 2>conftest.er1
18823 ac_status=$?
18824 grep -v '^ *+' conftest.er1 >conftest.err
18825 rm -f conftest.er1
18826 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018828 (exit $ac_status); } && {
18829 test -z "$ac_c_werror_flag" ||
18830 test ! -s conftest.err
18831 } && test -s conftest.$ac_objext; then
18832
18833cat >>confdefs.h <<\_ACEOF
18834#define HAVE_KQUEUE 1
18835_ACEOF
18836
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018837 { echo "$as_me:$LINENO: result: yes" >&5
18838echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018840 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018841sed 's/^/| /' conftest.$ac_ext >&5
18842
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018843 { echo "$as_me:$LINENO: result: no" >&5
18844echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018845
18846fi
18847
18848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018849# On some systems (eg. FreeBSD 5), we would find a definition of the
18850# functions ctermid_r, setgroups in the library, but no prototype
18851# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18852# address to avoid compiler warnings and potential miscompilations
18853# because of the missing prototypes.
18854
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018855{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18856echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018858/* confdefs.h. */
18859_ACEOF
18860cat confdefs.h >>conftest.$ac_ext
18861cat >>conftest.$ac_ext <<_ACEOF
18862/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018863
18864#include "confdefs.h"
18865#include <stdio.h>
18866
Martin v. Löwisd5843682002-11-21 20:41:28 +000018867int
18868main ()
18869{
18870void* p = ctermid_r
18871 ;
18872 return 0;
18873}
18874_ACEOF
18875rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018876if { (ac_try="$ac_compile"
18877case "(($ac_try" in
18878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18879 *) ac_try_echo=$ac_try;;
18880esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018884 grep -v '^ *+' conftest.er1 >conftest.err
18885 rm -f conftest.er1
18886 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018888 (exit $ac_status); } && {
18889 test -z "$ac_c_werror_flag" ||
18890 test ! -s conftest.err
18891 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018892
18893cat >>confdefs.h <<\_ACEOF
18894#define HAVE_CTERMID_R 1
18895_ACEOF
18896
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018897 { echo "$as_me:$LINENO: result: yes" >&5
18898echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018901sed 's/^/| /' conftest.$ac_ext >&5
18902
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018903 { echo "$as_me:$LINENO: result: no" >&5
18904echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018905
18906fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018907
Martin v. Löwiseba40652007-08-30 20:10:57 +000018908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18909
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018910{ echo "$as_me:$LINENO: checking for flock" >&5
18911echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018912cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018913/* confdefs.h. */
18914_ACEOF
18915cat confdefs.h >>conftest.$ac_ext
18916cat >>conftest.$ac_ext <<_ACEOF
18917/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018918
18919#include "confdefs.h"
18920#include <sys/file.h>
18921
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018922int
18923main ()
18924{
18925void* p = flock
18926 ;
18927 return 0;
18928}
18929_ACEOF
18930rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018931if { (ac_try="$ac_compile"
18932case "(($ac_try" in
18933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18934 *) ac_try_echo=$ac_try;;
18935esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018939 grep -v '^ *+' conftest.er1 >conftest.err
18940 rm -f conftest.er1
18941 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018943 (exit $ac_status); } && {
18944 test -z "$ac_c_werror_flag" ||
18945 test ! -s conftest.err
18946 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018947
18948cat >>confdefs.h <<\_ACEOF
18949#define HAVE_FLOCK 1
18950_ACEOF
18951
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018952 { echo "$as_me:$LINENO: result: yes" >&5
18953echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018954else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018956sed 's/^/| /' conftest.$ac_ext >&5
18957
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018958 { echo "$as_me:$LINENO: result: no" >&5
18959echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018960
18961fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018962
Martin v. Löwiseba40652007-08-30 20:10:57 +000018963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18964
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018965{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18966echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018968/* confdefs.h. */
18969_ACEOF
18970cat confdefs.h >>conftest.$ac_ext
18971cat >>conftest.$ac_ext <<_ACEOF
18972/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018973
18974#include "confdefs.h"
18975#include <unistd.h>
18976
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018977int
18978main ()
18979{
18980void* p = getpagesize
18981 ;
18982 return 0;
18983}
18984_ACEOF
18985rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018986if { (ac_try="$ac_compile"
18987case "(($ac_try" in
18988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18989 *) ac_try_echo=$ac_try;;
18990esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018994 grep -v '^ *+' conftest.er1 >conftest.err
18995 rm -f conftest.er1
18996 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018998 (exit $ac_status); } && {
18999 test -z "$ac_c_werror_flag" ||
19000 test ! -s conftest.err
19001 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000019002
19003cat >>confdefs.h <<\_ACEOF
19004#define HAVE_GETPAGESIZE 1
19005_ACEOF
19006
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019007 { echo "$as_me:$LINENO: result: yes" >&5
19008echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000019009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019011sed 's/^/| /' conftest.$ac_ext >&5
19012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019013 { echo "$as_me:$LINENO: result: no" >&5
19014echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000019015
19016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019017
19018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000019019
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019020for ac_prog in true
19021do
19022 # Extract the first word of "$ac_prog", so it can be a program name with args.
19023set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019024{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19025echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019026if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019027 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019028else
19029 if test -n "$TRUE"; then
19030 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
19031else
19032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19033for as_dir in $PATH
19034do
19035 IFS=$as_save_IFS
19036 test -z "$as_dir" && as_dir=.
19037 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000019038 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 +000019039 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019040 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019041 break 2
19042 fi
19043done
19044done
Martin v. Löwiseba40652007-08-30 20:10:57 +000019045IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019046
19047fi
19048fi
19049TRUE=$ac_cv_prog_TRUE
19050if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019051 { echo "$as_me:$LINENO: result: $TRUE" >&5
19052echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019053else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019054 { echo "$as_me:$LINENO: result: no" >&5
19055echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019056fi
19057
Martin v. Löwiseba40652007-08-30 20:10:57 +000019058
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019059 test -n "$TRUE" && break
19060done
19061test -n "$TRUE" || TRUE="/bin/true"
19062
19063
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019064{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
19065echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019066if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019067 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019068else
19069 ac_check_lib_save_LIBS=$LIBS
19070LIBS="-lc $LIBS"
19071cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019072/* confdefs.h. */
19073_ACEOF
19074cat confdefs.h >>conftest.$ac_ext
19075cat >>conftest.$ac_ext <<_ACEOF
19076/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019077
Martin v. Löwiseba40652007-08-30 20:10:57 +000019078/* Override any GCC internal prototype to avoid an error.
19079 Use char because int might match the return type of a GCC
19080 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019081#ifdef __cplusplus
19082extern "C"
19083#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019084char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019085int
19086main ()
19087{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019088return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019089 ;
19090 return 0;
19091}
19092_ACEOF
19093rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019094if { (ac_try="$ac_link"
19095case "(($ac_try" in
19096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19097 *) ac_try_echo=$ac_try;;
19098esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019100 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019102 grep -v '^ *+' conftest.er1 >conftest.err
19103 rm -f conftest.er1
19104 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019106 (exit $ac_status); } && {
19107 test -z "$ac_c_werror_flag" ||
19108 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019109 } && test -s conftest$ac_exeext &&
19110 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019111 ac_cv_lib_c_inet_aton=yes
19112else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019114sed 's/^/| /' conftest.$ac_ext >&5
19115
Martin v. Löwiseba40652007-08-30 20:10:57 +000019116 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019118
19119rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019120 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019121LIBS=$ac_check_lib_save_LIBS
19122fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019123{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19124echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19125if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019126 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019127else
19128
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019129{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19130echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019131if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019132 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019133else
19134 ac_check_lib_save_LIBS=$LIBS
19135LIBS="-lresolv $LIBS"
19136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019137/* confdefs.h. */
19138_ACEOF
19139cat confdefs.h >>conftest.$ac_ext
19140cat >>conftest.$ac_ext <<_ACEOF
19141/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019142
Martin v. Löwiseba40652007-08-30 20:10:57 +000019143/* Override any GCC internal prototype to avoid an error.
19144 Use char because int might match the return type of a GCC
19145 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019146#ifdef __cplusplus
19147extern "C"
19148#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019149char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019150int
19151main ()
19152{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019153return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019154 ;
19155 return 0;
19156}
19157_ACEOF
19158rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019159if { (ac_try="$ac_link"
19160case "(($ac_try" in
19161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19162 *) ac_try_echo=$ac_try;;
19163esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019165 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019167 grep -v '^ *+' conftest.er1 >conftest.err
19168 rm -f conftest.er1
19169 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019171 (exit $ac_status); } && {
19172 test -z "$ac_c_werror_flag" ||
19173 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019174 } && test -s conftest$ac_exeext &&
19175 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019176 ac_cv_lib_resolv_inet_aton=yes
19177else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019179sed 's/^/| /' conftest.$ac_ext >&5
19180
Martin v. Löwiseba40652007-08-30 20:10:57 +000019181 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019183
19184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019186LIBS=$ac_check_lib_save_LIBS
19187fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019188{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19189echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19190if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019191 cat >>confdefs.h <<_ACEOF
19192#define HAVE_LIBRESOLV 1
19193_ACEOF
19194
19195 LIBS="-lresolv $LIBS"
19196
19197fi
19198
19199
19200fi
19201
19202
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019203# On Tru64, chflags seems to be present, but calling it will
19204# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019205{ echo "$as_me:$LINENO: checking for chflags" >&5
19206echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019207if test "${ac_cv_have_chflags+set}" = set; then
19208 echo $ECHO_N "(cached) $ECHO_C" >&6
19209else
19210 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019211 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019212else
19213 cat >conftest.$ac_ext <<_ACEOF
19214/* confdefs.h. */
19215_ACEOF
19216cat confdefs.h >>conftest.$ac_ext
19217cat >>conftest.$ac_ext <<_ACEOF
19218/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019219[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019220#include <sys/stat.h>
19221#include <unistd.h>
19222int main(int argc, char*argv[])
19223{
19224 if(chflags(argv[0], 0) != 0)
19225 return 1;
19226 return 0;
19227}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019228]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019229_ACEOF
19230rm -f conftest$ac_exeext
19231if { (ac_try="$ac_link"
19232case "(($ac_try" in
19233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19234 *) ac_try_echo=$ac_try;;
19235esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019237 (eval "$ac_link") 2>&5
19238 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019240 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19241 { (case "(($ac_try" in
19242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19243 *) ac_try_echo=$ac_try;;
19244esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019246 (eval "$ac_try") 2>&5
19247 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019249 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019250 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019251else
19252 echo "$as_me: program exited with status $ac_status" >&5
19253echo "$as_me: failed program was:" >&5
19254sed 's/^/| /' conftest.$ac_ext >&5
19255
19256( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019257ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019258fi
19259rm -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 +000019260fi
19261
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019262
19263
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019264fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019265{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19266echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019267if test "$ac_cv_have_chflags" = cross ; then
19268 { echo "$as_me:$LINENO: checking for chflags" >&5
19269echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19270if test "${ac_cv_func_chflags+set}" = set; then
19271 echo $ECHO_N "(cached) $ECHO_C" >&6
19272else
19273 cat >conftest.$ac_ext <<_ACEOF
19274/* confdefs.h. */
19275_ACEOF
19276cat confdefs.h >>conftest.$ac_ext
19277cat >>conftest.$ac_ext <<_ACEOF
19278/* end confdefs.h. */
19279/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19280 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19281#define chflags innocuous_chflags
19282
19283/* System header to define __stub macros and hopefully few prototypes,
19284 which can conflict with char chflags (); below.
19285 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19286 <limits.h> exists even on freestanding compilers. */
19287
19288#ifdef __STDC__
19289# include <limits.h>
19290#else
19291# include <assert.h>
19292#endif
19293
19294#undef chflags
19295
19296/* Override any GCC internal prototype to avoid an error.
19297 Use char because int might match the return type of a GCC
19298 builtin and then its argument prototype would still apply. */
19299#ifdef __cplusplus
19300extern "C"
19301#endif
19302char chflags ();
19303/* The GNU C library defines this for functions which it implements
19304 to always fail with ENOSYS. Some functions are actually named
19305 something starting with __ and the normal name is an alias. */
19306#if defined __stub_chflags || defined __stub___chflags
19307choke me
19308#endif
19309
19310int
19311main ()
19312{
19313return chflags ();
19314 ;
19315 return 0;
19316}
19317_ACEOF
19318rm -f conftest.$ac_objext conftest$ac_exeext
19319if { (ac_try="$ac_link"
19320case "(($ac_try" in
19321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19322 *) ac_try_echo=$ac_try;;
19323esac
19324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19325 (eval "$ac_link") 2>conftest.er1
19326 ac_status=$?
19327 grep -v '^ *+' conftest.er1 >conftest.err
19328 rm -f conftest.er1
19329 cat conftest.err >&5
19330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19331 (exit $ac_status); } && {
19332 test -z "$ac_c_werror_flag" ||
19333 test ! -s conftest.err
19334 } && test -s conftest$ac_exeext &&
19335 $as_test_x conftest$ac_exeext; then
19336 ac_cv_func_chflags=yes
19337else
19338 echo "$as_me: failed program was:" >&5
19339sed 's/^/| /' conftest.$ac_ext >&5
19340
19341 ac_cv_func_chflags=no
19342fi
19343
19344rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19345 conftest$ac_exeext conftest.$ac_ext
19346fi
19347{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19348echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19349if test $ac_cv_func_chflags = yes; then
19350 ac_cv_have_chflags="yes"
19351else
19352 ac_cv_have_chflags="no"
19353fi
19354
19355fi
19356if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019357
19358cat >>confdefs.h <<\_ACEOF
19359#define HAVE_CHFLAGS 1
19360_ACEOF
19361
19362fi
19363
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019364{ echo "$as_me:$LINENO: checking for lchflags" >&5
19365echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019366if test "${ac_cv_have_lchflags+set}" = set; then
19367 echo $ECHO_N "(cached) $ECHO_C" >&6
19368else
19369 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019370 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019371else
19372 cat >conftest.$ac_ext <<_ACEOF
19373/* confdefs.h. */
19374_ACEOF
19375cat confdefs.h >>conftest.$ac_ext
19376cat >>conftest.$ac_ext <<_ACEOF
19377/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019378[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019379#include <sys/stat.h>
19380#include <unistd.h>
19381int main(int argc, char*argv[])
19382{
19383 if(lchflags(argv[0], 0) != 0)
19384 return 1;
19385 return 0;
19386}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019387]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019388_ACEOF
19389rm -f conftest$ac_exeext
19390if { (ac_try="$ac_link"
19391case "(($ac_try" in
19392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19393 *) ac_try_echo=$ac_try;;
19394esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019396 (eval "$ac_link") 2>&5
19397 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019399 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19400 { (case "(($ac_try" in
19401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19402 *) ac_try_echo=$ac_try;;
19403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019405 (eval "$ac_try") 2>&5
19406 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019408 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019409 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019410else
19411 echo "$as_me: program exited with status $ac_status" >&5
19412echo "$as_me: failed program was:" >&5
19413sed 's/^/| /' conftest.$ac_ext >&5
19414
19415( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019416ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019417fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19419fi
19420
19421
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019422
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019423fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019424{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19425echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019426if test "$ac_cv_have_lchflags" = cross ; then
19427 { echo "$as_me:$LINENO: checking for lchflags" >&5
19428echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19429if test "${ac_cv_func_lchflags+set}" = set; then
19430 echo $ECHO_N "(cached) $ECHO_C" >&6
19431else
19432 cat >conftest.$ac_ext <<_ACEOF
19433/* confdefs.h. */
19434_ACEOF
19435cat confdefs.h >>conftest.$ac_ext
19436cat >>conftest.$ac_ext <<_ACEOF
19437/* end confdefs.h. */
19438/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19439 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19440#define lchflags innocuous_lchflags
19441
19442/* System header to define __stub macros and hopefully few prototypes,
19443 which can conflict with char lchflags (); below.
19444 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19445 <limits.h> exists even on freestanding compilers. */
19446
19447#ifdef __STDC__
19448# include <limits.h>
19449#else
19450# include <assert.h>
19451#endif
19452
19453#undef lchflags
19454
19455/* Override any GCC internal prototype to avoid an error.
19456 Use char because int might match the return type of a GCC
19457 builtin and then its argument prototype would still apply. */
19458#ifdef __cplusplus
19459extern "C"
19460#endif
19461char lchflags ();
19462/* The GNU C library defines this for functions which it implements
19463 to always fail with ENOSYS. Some functions are actually named
19464 something starting with __ and the normal name is an alias. */
19465#if defined __stub_lchflags || defined __stub___lchflags
19466choke me
19467#endif
19468
19469int
19470main ()
19471{
19472return lchflags ();
19473 ;
19474 return 0;
19475}
19476_ACEOF
19477rm -f conftest.$ac_objext conftest$ac_exeext
19478if { (ac_try="$ac_link"
19479case "(($ac_try" in
19480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19481 *) ac_try_echo=$ac_try;;
19482esac
19483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19484 (eval "$ac_link") 2>conftest.er1
19485 ac_status=$?
19486 grep -v '^ *+' conftest.er1 >conftest.err
19487 rm -f conftest.er1
19488 cat conftest.err >&5
19489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19490 (exit $ac_status); } && {
19491 test -z "$ac_c_werror_flag" ||
19492 test ! -s conftest.err
19493 } && test -s conftest$ac_exeext &&
19494 $as_test_x conftest$ac_exeext; then
19495 ac_cv_func_lchflags=yes
19496else
19497 echo "$as_me: failed program was:" >&5
19498sed 's/^/| /' conftest.$ac_ext >&5
19499
19500 ac_cv_func_lchflags=no
19501fi
19502
19503rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19504 conftest$ac_exeext conftest.$ac_ext
19505fi
19506{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19507echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19508if test $ac_cv_func_lchflags = yes; then
19509 ac_cv_have_lchflags="yes"
19510else
19511 ac_cv_have_lchflags="no"
19512fi
19513
19514fi
19515if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019516
19517cat >>confdefs.h <<\_ACEOF
19518#define HAVE_LCHFLAGS 1
19519_ACEOF
19520
19521fi
19522
Ronald Oussorenf8752642006-07-06 10:13:35 +000019523case $ac_sys_system/$ac_sys_release in
19524Darwin/*)
19525 _CUR_CFLAGS="${CFLAGS}"
19526 _CUR_LDFLAGS="${LDFLAGS}"
19527 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19528 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19529 ;;
19530esac
19531
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019532{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19533echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019534if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019535 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019536else
19537 ac_check_lib_save_LIBS=$LIBS
19538LIBS="-lz $LIBS"
19539cat >conftest.$ac_ext <<_ACEOF
19540/* confdefs.h. */
19541_ACEOF
19542cat confdefs.h >>conftest.$ac_ext
19543cat >>conftest.$ac_ext <<_ACEOF
19544/* end confdefs.h. */
19545
Martin v. Löwiseba40652007-08-30 20:10:57 +000019546/* Override any GCC internal prototype to avoid an error.
19547 Use char because int might match the return type of a GCC
19548 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019549#ifdef __cplusplus
19550extern "C"
19551#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019552char inflateCopy ();
19553int
19554main ()
19555{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019556return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019557 ;
19558 return 0;
19559}
19560_ACEOF
19561rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019562if { (ac_try="$ac_link"
19563case "(($ac_try" in
19564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19565 *) ac_try_echo=$ac_try;;
19566esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019568 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019569 ac_status=$?
19570 grep -v '^ *+' conftest.er1 >conftest.err
19571 rm -f conftest.er1
19572 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019574 (exit $ac_status); } && {
19575 test -z "$ac_c_werror_flag" ||
19576 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019577 } && test -s conftest$ac_exeext &&
19578 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019579 ac_cv_lib_z_inflateCopy=yes
19580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019581 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019582sed 's/^/| /' conftest.$ac_ext >&5
19583
Martin v. Löwiseba40652007-08-30 20:10:57 +000019584 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019586
19587rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019588 conftest$ac_exeext conftest.$ac_ext
19589LIBS=$ac_check_lib_save_LIBS
19590fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019591{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19592echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19593if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019594
19595cat >>confdefs.h <<\_ACEOF
19596#define HAVE_ZLIB_COPY 1
19597_ACEOF
19598
19599fi
19600
19601
Ronald Oussorenf8752642006-07-06 10:13:35 +000019602case $ac_sys_system/$ac_sys_release in
19603Darwin/*)
19604 CFLAGS="${_CUR_CFLAGS}"
19605 LDFLAGS="${_CUR_LDFLAGS}"
19606 ;;
19607esac
19608
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019609{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19610echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019612/* confdefs.h. */
19613_ACEOF
19614cat confdefs.h >>conftest.$ac_ext
19615cat >>conftest.$ac_ext <<_ACEOF
19616/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019617
19618#include "confdefs.h"
19619#include <netdb.h>
19620
Martin v. Löwise9416172003-05-03 10:12:45 +000019621int
19622main ()
19623{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019624void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019625 ;
19626 return 0;
19627}
19628_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019629rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019630if { (ac_try="$ac_link"
19631case "(($ac_try" in
19632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19633 *) ac_try_echo=$ac_try;;
19634esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019636 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019638 grep -v '^ *+' conftest.er1 >conftest.err
19639 rm -f conftest.er1
19640 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019642 (exit $ac_status); } && {
19643 test -z "$ac_c_werror_flag" ||
19644 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019645 } && test -s conftest$ac_exeext &&
19646 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019647
19648cat >>confdefs.h <<\_ACEOF
19649#define HAVE_HSTRERROR 1
19650_ACEOF
19651
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019652 { echo "$as_me:$LINENO: result: yes" >&5
19653echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019654else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019656sed 's/^/| /' conftest.$ac_ext >&5
19657
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019658 { echo "$as_me:$LINENO: result: no" >&5
19659echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019660
19661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019662
19663rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019664 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019665
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019666{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19667echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019668cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019669/* confdefs.h. */
19670_ACEOF
19671cat confdefs.h >>conftest.$ac_ext
19672cat >>conftest.$ac_ext <<_ACEOF
19673/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019674
19675#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019676#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019677#include <sys/socket.h>
19678#include <netinet/in.h>
19679#include <arpa/inet.h>
19680
Martin v. Löwise9416172003-05-03 10:12:45 +000019681int
19682main ()
19683{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019684void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019685 ;
19686 return 0;
19687}
19688_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019689rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019690if { (ac_try="$ac_link"
19691case "(($ac_try" in
19692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19693 *) ac_try_echo=$ac_try;;
19694esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019696 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019698 grep -v '^ *+' conftest.er1 >conftest.err
19699 rm -f conftest.er1
19700 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019702 (exit $ac_status); } && {
19703 test -z "$ac_c_werror_flag" ||
19704 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019705 } && test -s conftest$ac_exeext &&
19706 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019707
19708cat >>confdefs.h <<\_ACEOF
19709#define HAVE_INET_ATON 1
19710_ACEOF
19711
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019712 { echo "$as_me:$LINENO: result: yes" >&5
19713echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019714else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019716sed 's/^/| /' conftest.$ac_ext >&5
19717
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019718 { echo "$as_me:$LINENO: result: no" >&5
19719echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019720
19721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019722
19723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019725
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019726{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19727echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019729/* confdefs.h. */
19730_ACEOF
19731cat confdefs.h >>conftest.$ac_ext
19732cat >>conftest.$ac_ext <<_ACEOF
19733/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019734
19735#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019736#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019737#include <sys/socket.h>
19738#include <netinet/in.h>
19739#include <arpa/inet.h>
19740
Martin v. Löwise9416172003-05-03 10:12:45 +000019741int
19742main ()
19743{
19744void* p = inet_pton
19745 ;
19746 return 0;
19747}
19748_ACEOF
19749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019750if { (ac_try="$ac_compile"
19751case "(($ac_try" in
19752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19753 *) ac_try_echo=$ac_try;;
19754esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019758 grep -v '^ *+' conftest.er1 >conftest.err
19759 rm -f conftest.er1
19760 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019762 (exit $ac_status); } && {
19763 test -z "$ac_c_werror_flag" ||
19764 test ! -s conftest.err
19765 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019766
19767cat >>confdefs.h <<\_ACEOF
19768#define HAVE_INET_PTON 1
19769_ACEOF
19770
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019771 { echo "$as_me:$LINENO: result: yes" >&5
19772echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019773else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019775sed 's/^/| /' conftest.$ac_ext >&5
19776
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019777 { echo "$as_me:$LINENO: result: no" >&5
19778echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019779
19780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019781
19782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019783
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019784# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019785{ echo "$as_me:$LINENO: checking for setgroups" >&5
19786echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019788/* confdefs.h. */
19789_ACEOF
19790cat confdefs.h >>conftest.$ac_ext
19791cat >>conftest.$ac_ext <<_ACEOF
19792/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019793
19794#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019795#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019796#ifdef HAVE_GRP_H
19797#include <grp.h>
19798#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019799
Martin v. Löwisd5843682002-11-21 20:41:28 +000019800int
19801main ()
19802{
19803void* p = setgroups
19804 ;
19805 return 0;
19806}
19807_ACEOF
19808rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019809if { (ac_try="$ac_compile"
19810case "(($ac_try" in
19811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19812 *) ac_try_echo=$ac_try;;
19813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019815 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019817 grep -v '^ *+' conftest.er1 >conftest.err
19818 rm -f conftest.er1
19819 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019821 (exit $ac_status); } && {
19822 test -z "$ac_c_werror_flag" ||
19823 test ! -s conftest.err
19824 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019825
19826cat >>confdefs.h <<\_ACEOF
19827#define HAVE_SETGROUPS 1
19828_ACEOF
19829
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019830 { echo "$as_me:$LINENO: result: yes" >&5
19831echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019832else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019834sed 's/^/| /' conftest.$ac_ext >&5
19835
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019836 { echo "$as_me:$LINENO: result: no" >&5
19837echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019838
19839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019840
19841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019842
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019843# check for openpty and forkpty
19844
Martin v. Löwis11437992002-04-12 09:54:03 +000019845
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019846for ac_func in openpty
19847do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019848as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19849{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19850echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019851if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019852 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019853else
Martin v. Löwis11437992002-04-12 09:54:03 +000019854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019855/* confdefs.h. */
19856_ACEOF
19857cat confdefs.h >>conftest.$ac_ext
19858cat >>conftest.$ac_ext <<_ACEOF
19859/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019860/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19861 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19862#define $ac_func innocuous_$ac_func
19863
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019864/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019865 which can conflict with char $ac_func (); below.
19866 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019867 <limits.h> exists even on freestanding compilers. */
19868
19869#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019870# include <limits.h>
19871#else
19872# include <assert.h>
19873#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019874
19875#undef $ac_func
19876
Martin v. Löwiseba40652007-08-30 20:10:57 +000019877/* Override any GCC internal prototype to avoid an error.
19878 Use char because int might match the return type of a GCC
19879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019880#ifdef __cplusplus
19881extern "C"
19882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019883char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019884/* The GNU C library defines this for functions which it implements
19885 to always fail with ENOSYS. Some functions are actually named
19886 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019887#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019888choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019889#endif
19890
Skip Montanaro6dead952003-09-25 14:50:04 +000019891int
19892main ()
19893{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019894return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019895 ;
19896 return 0;
19897}
19898_ACEOF
19899rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019900if { (ac_try="$ac_link"
19901case "(($ac_try" in
19902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19903 *) ac_try_echo=$ac_try;;
19904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019906 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019908 grep -v '^ *+' conftest.er1 >conftest.err
19909 rm -f conftest.er1
19910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019912 (exit $ac_status); } && {
19913 test -z "$ac_c_werror_flag" ||
19914 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019915 } && test -s conftest$ac_exeext &&
19916 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019917 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019920sed 's/^/| /' conftest.$ac_ext >&5
19921
Martin v. Löwiseba40652007-08-30 20:10:57 +000019922 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019924
19925rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019926 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019927fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019928ac_res=`eval echo '${'$as_ac_var'}'`
19929 { echo "$as_me:$LINENO: result: $ac_res" >&5
19930echo "${ECHO_T}$ac_res" >&6; }
19931if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019932 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019933#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019934_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019935
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019936else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019937 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19938echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019939if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019940 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019941else
Martin v. Löwis11437992002-04-12 09:54:03 +000019942 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019943LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019945/* confdefs.h. */
19946_ACEOF
19947cat confdefs.h >>conftest.$ac_ext
19948cat >>conftest.$ac_ext <<_ACEOF
19949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019950
Martin v. Löwiseba40652007-08-30 20:10:57 +000019951/* Override any GCC internal prototype to avoid an error.
19952 Use char because int might match the return type of a GCC
19953 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019954#ifdef __cplusplus
19955extern "C"
19956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019957char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019958int
19959main ()
19960{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019961return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019962 ;
19963 return 0;
19964}
19965_ACEOF
19966rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019967if { (ac_try="$ac_link"
19968case "(($ac_try" in
19969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19970 *) ac_try_echo=$ac_try;;
19971esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019973 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019975 grep -v '^ *+' conftest.er1 >conftest.err
19976 rm -f conftest.er1
19977 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019979 (exit $ac_status); } && {
19980 test -z "$ac_c_werror_flag" ||
19981 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019982 } && test -s conftest$ac_exeext &&
19983 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019984 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019985else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019987sed 's/^/| /' conftest.$ac_ext >&5
19988
Martin v. Löwiseba40652007-08-30 20:10:57 +000019989 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019991
19992rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019993 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019994LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019995fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019996{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19997echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19998if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019999 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020000#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020001_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020002 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020003else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020004 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
20005echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020006if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020007 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020008else
20009 ac_check_lib_save_LIBS=$LIBS
20010LIBS="-lbsd $LIBS"
20011cat >conftest.$ac_ext <<_ACEOF
20012/* confdefs.h. */
20013_ACEOF
20014cat confdefs.h >>conftest.$ac_ext
20015cat >>conftest.$ac_ext <<_ACEOF
20016/* end confdefs.h. */
20017
Martin v. Löwiseba40652007-08-30 20:10:57 +000020018/* Override any GCC internal prototype to avoid an error.
20019 Use char because int might match the return type of a GCC
20020 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020021#ifdef __cplusplus
20022extern "C"
20023#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020024char openpty ();
20025int
20026main ()
20027{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020028return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020029 ;
20030 return 0;
20031}
20032_ACEOF
20033rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020034if { (ac_try="$ac_link"
20035case "(($ac_try" in
20036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20037 *) ac_try_echo=$ac_try;;
20038esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020040 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020041 ac_status=$?
20042 grep -v '^ *+' conftest.er1 >conftest.err
20043 rm -f conftest.er1
20044 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020046 (exit $ac_status); } && {
20047 test -z "$ac_c_werror_flag" ||
20048 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020049 } && test -s conftest$ac_exeext &&
20050 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020051 ac_cv_lib_bsd_openpty=yes
20052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020053 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020054sed 's/^/| /' conftest.$ac_ext >&5
20055
Martin v. Löwiseba40652007-08-30 20:10:57 +000020056 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020058
20059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020060 conftest$ac_exeext conftest.$ac_ext
20061LIBS=$ac_check_lib_save_LIBS
20062fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020063{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
20064echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
20065if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020066 cat >>confdefs.h <<\_ACEOF
20067#define HAVE_OPENPTY 1
20068_ACEOF
20069 LIBS="$LIBS -lbsd"
20070fi
20071
20072
20073fi
20074
Fred Drake8cef4cf2000-06-28 16:40:38 +000020075
20076fi
20077done
20078
Martin v. Löwis11437992002-04-12 09:54:03 +000020079
Fred Drake8cef4cf2000-06-28 16:40:38 +000020080for ac_func in forkpty
20081do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020082as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20083{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20084echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020085if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020086 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020087else
Martin v. Löwis11437992002-04-12 09:54:03 +000020088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020089/* confdefs.h. */
20090_ACEOF
20091cat confdefs.h >>conftest.$ac_ext
20092cat >>conftest.$ac_ext <<_ACEOF
20093/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020094/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20095 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20096#define $ac_func innocuous_$ac_func
20097
Fred Drake8cef4cf2000-06-28 16:40:38 +000020098/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020099 which can conflict with char $ac_func (); below.
20100 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020101 <limits.h> exists even on freestanding compilers. */
20102
20103#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020104# include <limits.h>
20105#else
20106# include <assert.h>
20107#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020108
20109#undef $ac_func
20110
Martin v. Löwiseba40652007-08-30 20:10:57 +000020111/* Override any GCC internal prototype to avoid an error.
20112 Use char because int might match the return type of a GCC
20113 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020114#ifdef __cplusplus
20115extern "C"
20116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020117char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020118/* The GNU C library defines this for functions which it implements
20119 to always fail with ENOSYS. Some functions are actually named
20120 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020121#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020122choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020123#endif
20124
Skip Montanaro6dead952003-09-25 14:50:04 +000020125int
20126main ()
20127{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020128return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020129 ;
20130 return 0;
20131}
20132_ACEOF
20133rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020134if { (ac_try="$ac_link"
20135case "(($ac_try" in
20136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20137 *) ac_try_echo=$ac_try;;
20138esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020140 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020142 grep -v '^ *+' conftest.er1 >conftest.err
20143 rm -f conftest.er1
20144 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020146 (exit $ac_status); } && {
20147 test -z "$ac_c_werror_flag" ||
20148 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020149 } && test -s conftest$ac_exeext &&
20150 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020151 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020152else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020154sed 's/^/| /' conftest.$ac_ext >&5
20155
Martin v. Löwiseba40652007-08-30 20:10:57 +000020156 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020158
20159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020160 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020161fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020162ac_res=`eval echo '${'$as_ac_var'}'`
20163 { echo "$as_me:$LINENO: result: $ac_res" >&5
20164echo "${ECHO_T}$ac_res" >&6; }
20165if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020166 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020167#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020168_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020169
Fred Drake8cef4cf2000-06-28 16:40:38 +000020170else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020171 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20172echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020173if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020174 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020175else
Martin v. Löwis11437992002-04-12 09:54:03 +000020176 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020177LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020178cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020179/* confdefs.h. */
20180_ACEOF
20181cat confdefs.h >>conftest.$ac_ext
20182cat >>conftest.$ac_ext <<_ACEOF
20183/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020184
Martin v. Löwiseba40652007-08-30 20:10:57 +000020185/* Override any GCC internal prototype to avoid an error.
20186 Use char because int might match the return type of a GCC
20187 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020188#ifdef __cplusplus
20189extern "C"
20190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020191char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020192int
20193main ()
20194{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020195return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020196 ;
20197 return 0;
20198}
20199_ACEOF
20200rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020201if { (ac_try="$ac_link"
20202case "(($ac_try" in
20203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20204 *) ac_try_echo=$ac_try;;
20205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020207 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020209 grep -v '^ *+' conftest.er1 >conftest.err
20210 rm -f conftest.er1
20211 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020213 (exit $ac_status); } && {
20214 test -z "$ac_c_werror_flag" ||
20215 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020216 } && test -s conftest$ac_exeext &&
20217 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020218 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020221sed 's/^/| /' conftest.$ac_ext >&5
20222
Martin v. Löwiseba40652007-08-30 20:10:57 +000020223 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020225
20226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020228LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020229fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020230{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20231echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20232if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020233 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020234#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020235_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020236 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020237else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020238 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20239echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020240if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020241 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020242else
20243 ac_check_lib_save_LIBS=$LIBS
20244LIBS="-lbsd $LIBS"
20245cat >conftest.$ac_ext <<_ACEOF
20246/* confdefs.h. */
20247_ACEOF
20248cat confdefs.h >>conftest.$ac_ext
20249cat >>conftest.$ac_ext <<_ACEOF
20250/* end confdefs.h. */
20251
Martin v. Löwiseba40652007-08-30 20:10:57 +000020252/* Override any GCC internal prototype to avoid an error.
20253 Use char because int might match the return type of a GCC
20254 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020255#ifdef __cplusplus
20256extern "C"
20257#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020258char forkpty ();
20259int
20260main ()
20261{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020262return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020263 ;
20264 return 0;
20265}
20266_ACEOF
20267rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020268if { (ac_try="$ac_link"
20269case "(($ac_try" in
20270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20271 *) ac_try_echo=$ac_try;;
20272esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020274 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020275 ac_status=$?
20276 grep -v '^ *+' conftest.er1 >conftest.err
20277 rm -f conftest.er1
20278 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020280 (exit $ac_status); } && {
20281 test -z "$ac_c_werror_flag" ||
20282 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020283 } && test -s conftest$ac_exeext &&
20284 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020285 ac_cv_lib_bsd_forkpty=yes
20286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020287 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020288sed 's/^/| /' conftest.$ac_ext >&5
20289
Martin v. Löwiseba40652007-08-30 20:10:57 +000020290 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020292
20293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020294 conftest$ac_exeext conftest.$ac_ext
20295LIBS=$ac_check_lib_save_LIBS
20296fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020297{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20298echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20299if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020300 cat >>confdefs.h <<\_ACEOF
20301#define HAVE_FORKPTY 1
20302_ACEOF
20303 LIBS="$LIBS -lbsd"
20304fi
20305
20306
20307fi
20308
Fred Drake8cef4cf2000-06-28 16:40:38 +000020309
20310fi
20311done
20312
Jack Jansendd19cf82001-12-06 22:36:17 +000020313
Brett Cannonaa5778d2008-03-18 04:09:00 +000020314# Stuff for expat.
20315
20316for ac_func in memmove
20317do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020318as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20319{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20320echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020321if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020322 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020323else
20324 cat >conftest.$ac_ext <<_ACEOF
20325/* confdefs.h. */
20326_ACEOF
20327cat confdefs.h >>conftest.$ac_ext
20328cat >>conftest.$ac_ext <<_ACEOF
20329/* end confdefs.h. */
20330/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20331 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20332#define $ac_func innocuous_$ac_func
20333
20334/* System header to define __stub macros and hopefully few prototypes,
20335 which can conflict with char $ac_func (); below.
20336 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20337 <limits.h> exists even on freestanding compilers. */
20338
20339#ifdef __STDC__
20340# include <limits.h>
20341#else
20342# include <assert.h>
20343#endif
20344
20345#undef $ac_func
20346
20347/* Override any GCC internal prototype to avoid an error.
20348 Use char because int might match the return type of a GCC
20349 builtin and then its argument prototype would still apply. */
20350#ifdef __cplusplus
20351extern "C"
20352#endif
20353char $ac_func ();
20354/* The GNU C library defines this for functions which it implements
20355 to always fail with ENOSYS. Some functions are actually named
20356 something starting with __ and the normal name is an alias. */
20357#if defined __stub_$ac_func || defined __stub___$ac_func
20358choke me
20359#endif
20360
20361int
20362main ()
20363{
20364return $ac_func ();
20365 ;
20366 return 0;
20367}
20368_ACEOF
20369rm -f conftest.$ac_objext conftest$ac_exeext
20370if { (ac_try="$ac_link"
20371case "(($ac_try" in
20372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20373 *) ac_try_echo=$ac_try;;
20374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020376 (eval "$ac_link") 2>conftest.er1
20377 ac_status=$?
20378 grep -v '^ *+' conftest.er1 >conftest.err
20379 rm -f conftest.er1
20380 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020382 (exit $ac_status); } && {
20383 test -z "$ac_c_werror_flag" ||
20384 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020385 } && test -s conftest$ac_exeext &&
20386 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020387 eval "$as_ac_var=yes"
20388else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020389 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020390sed 's/^/| /' conftest.$ac_ext >&5
20391
20392 eval "$as_ac_var=no"
20393fi
20394
20395rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20396 conftest$ac_exeext conftest.$ac_ext
20397fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020398ac_res=`eval echo '${'$as_ac_var'}'`
20399 { echo "$as_me:$LINENO: result: $ac_res" >&5
20400echo "${ECHO_T}$ac_res" >&6; }
20401if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020402 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020403#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020404_ACEOF
20405
20406fi
20407done
20408
20409
Michael W. Hudson54241132001-12-07 15:38:26 +000020410# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020411
20412
20413
20414
20415
20416
Fred Drake8cef4cf2000-06-28 16:40:38 +000020417for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20418do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020419as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20420{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20421echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020423 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020424else
Martin v. Löwis11437992002-04-12 09:54:03 +000020425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020426/* confdefs.h. */
20427_ACEOF
20428cat confdefs.h >>conftest.$ac_ext
20429cat >>conftest.$ac_ext <<_ACEOF
20430/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020431/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20432 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20433#define $ac_func innocuous_$ac_func
20434
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020435/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020436 which can conflict with char $ac_func (); below.
20437 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020438 <limits.h> exists even on freestanding compilers. */
20439
20440#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020441# include <limits.h>
20442#else
20443# include <assert.h>
20444#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020445
20446#undef $ac_func
20447
Martin v. Löwiseba40652007-08-30 20:10:57 +000020448/* Override any GCC internal prototype to avoid an error.
20449 Use char because int might match the return type of a GCC
20450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020451#ifdef __cplusplus
20452extern "C"
20453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020454char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020455/* The GNU C library defines this for functions which it implements
20456 to always fail with ENOSYS. Some functions are actually named
20457 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020458#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020459choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020460#endif
20461
Skip Montanaro6dead952003-09-25 14:50:04 +000020462int
20463main ()
20464{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020465return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020466 ;
20467 return 0;
20468}
20469_ACEOF
20470rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020471if { (ac_try="$ac_link"
20472case "(($ac_try" in
20473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20474 *) ac_try_echo=$ac_try;;
20475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020477 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020479 grep -v '^ *+' conftest.er1 >conftest.err
20480 rm -f conftest.er1
20481 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020483 (exit $ac_status); } && {
20484 test -z "$ac_c_werror_flag" ||
20485 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020486 } && test -s conftest$ac_exeext &&
20487 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020488 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020489else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020491sed 's/^/| /' conftest.$ac_ext >&5
20492
Martin v. Löwiseba40652007-08-30 20:10:57 +000020493 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020495
20496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020497 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020498fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020499ac_res=`eval echo '${'$as_ac_var'}'`
20500 { echo "$as_me:$LINENO: result: $ac_res" >&5
20501echo "${ECHO_T}$ac_res" >&6; }
20502if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020503 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020504#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020505_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020506
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020507fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020508done
20509
Michael W. Hudson54241132001-12-07 15:38:26 +000020510
Martin v. Löwis11437992002-04-12 09:54:03 +000020511
20512
20513
Brett Cannonaa5778d2008-03-18 04:09:00 +000020514for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020515do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020516as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20517{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20518echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020519if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020520 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020521else
Martin v. Löwis11437992002-04-12 09:54:03 +000020522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020523/* confdefs.h. */
20524_ACEOF
20525cat confdefs.h >>conftest.$ac_ext
20526cat >>conftest.$ac_ext <<_ACEOF
20527/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020528/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20529 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20530#define $ac_func innocuous_$ac_func
20531
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020532/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020533 which can conflict with char $ac_func (); below.
20534 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020535 <limits.h> exists even on freestanding compilers. */
20536
20537#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020538# include <limits.h>
20539#else
20540# include <assert.h>
20541#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020542
20543#undef $ac_func
20544
Martin v. Löwiseba40652007-08-30 20:10:57 +000020545/* Override any GCC internal prototype to avoid an error.
20546 Use char because int might match the return type of a GCC
20547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020548#ifdef __cplusplus
20549extern "C"
20550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020551char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020552/* The GNU C library defines this for functions which it implements
20553 to always fail with ENOSYS. Some functions are actually named
20554 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020555#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020556choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020557#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020558
Skip Montanaro6dead952003-09-25 14:50:04 +000020559int
20560main ()
20561{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020562return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020563 ;
20564 return 0;
20565}
20566_ACEOF
20567rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020568if { (ac_try="$ac_link"
20569case "(($ac_try" in
20570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20571 *) ac_try_echo=$ac_try;;
20572esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020574 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020576 grep -v '^ *+' conftest.er1 >conftest.err
20577 rm -f conftest.er1
20578 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020580 (exit $ac_status); } && {
20581 test -z "$ac_c_werror_flag" ||
20582 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020583 } && test -s conftest$ac_exeext &&
20584 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020585 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020588sed 's/^/| /' conftest.$ac_ext >&5
20589
Martin v. Löwiseba40652007-08-30 20:10:57 +000020590 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020592
20593rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020595fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020596ac_res=`eval echo '${'$as_ac_var'}'`
20597 { echo "$as_me:$LINENO: result: $ac_res" >&5
20598echo "${ECHO_T}$ac_res" >&6; }
20599if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020600 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020601#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020602_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020603
Martin v. Löwis1142de32002-03-29 16:28:31 +000020604else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020605 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020606 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020607 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20608 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020609esac
20610
Martin v. Löwis1142de32002-03-29 16:28:31 +000020611fi
20612done
20613
20614
Martin v. Löwis11437992002-04-12 09:54:03 +000020615
Martin v. Löwis1142de32002-03-29 16:28:31 +000020616for ac_func in getpgrp
20617do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020618as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20619{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20620echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020621if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020622 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020623else
Martin v. Löwis11437992002-04-12 09:54:03 +000020624 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020625/* confdefs.h. */
20626_ACEOF
20627cat confdefs.h >>conftest.$ac_ext
20628cat >>conftest.$ac_ext <<_ACEOF
20629/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020630/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20631 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20632#define $ac_func innocuous_$ac_func
20633
Martin v. Löwis1142de32002-03-29 16:28:31 +000020634/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020635 which can conflict with char $ac_func (); below.
20636 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020637 <limits.h> exists even on freestanding compilers. */
20638
20639#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020640# include <limits.h>
20641#else
20642# include <assert.h>
20643#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020644
20645#undef $ac_func
20646
Martin v. Löwiseba40652007-08-30 20:10:57 +000020647/* Override any GCC internal prototype to avoid an error.
20648 Use char because int might match the return type of a GCC
20649 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020650#ifdef __cplusplus
20651extern "C"
20652#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020653char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020654/* The GNU C library defines this for functions which it implements
20655 to always fail with ENOSYS. Some functions are actually named
20656 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020657#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020658choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020659#endif
20660
Skip Montanaro6dead952003-09-25 14:50:04 +000020661int
20662main ()
20663{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020664return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 ;
20666 return 0;
20667}
20668_ACEOF
20669rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020670if { (ac_try="$ac_link"
20671case "(($ac_try" in
20672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20673 *) ac_try_echo=$ac_try;;
20674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020676 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020678 grep -v '^ *+' conftest.er1 >conftest.err
20679 rm -f conftest.er1
20680 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020682 (exit $ac_status); } && {
20683 test -z "$ac_c_werror_flag" ||
20684 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020685 } && test -s conftest$ac_exeext &&
20686 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020687 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020690sed 's/^/| /' conftest.$ac_ext >&5
20691
Martin v. Löwiseba40652007-08-30 20:10:57 +000020692 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694
20695rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020696 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020697fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020698ac_res=`eval echo '${'$as_ac_var'}'`
20699 { echo "$as_me:$LINENO: result: $ac_res" >&5
20700echo "${ECHO_T}$ac_res" >&6; }
20701if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020702 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020703#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020704_ACEOF
20705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020706/* confdefs.h. */
20707_ACEOF
20708cat confdefs.h >>conftest.$ac_ext
20709cat >>conftest.$ac_ext <<_ACEOF
20710/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020711#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020712int
20713main ()
20714{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020715getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020716 ;
20717 return 0;
20718}
20719_ACEOF
20720rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020721if { (ac_try="$ac_compile"
20722case "(($ac_try" in
20723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20724 *) ac_try_echo=$ac_try;;
20725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020729 grep -v '^ *+' conftest.er1 >conftest.err
20730 rm -f conftest.er1
20731 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020733 (exit $ac_status); } && {
20734 test -z "$ac_c_werror_flag" ||
20735 test ! -s conftest.err
20736 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020737
20738cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020739#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020740_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020741
Martin v. Löwis11437992002-04-12 09:54:03 +000020742
Guido van Rossumf78abae1997-01-21 22:02:36 +000020743else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020745sed 's/^/| /' conftest.$ac_ext >&5
20746
Martin v. Löwiseba40652007-08-30 20:10:57 +000020747
Guido van Rossum627b2d71993-12-24 10:39:16 +000020748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020749
20750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020751
Guido van Rossum627b2d71993-12-24 10:39:16 +000020752fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020753done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020754
Jack Jansen150753c2003-03-29 22:07:47 +000020755
20756for ac_func in setpgrp
20757do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020758as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20759{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20760echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020761if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020762 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020763else
Martin v. Löwis11437992002-04-12 09:54:03 +000020764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020765/* confdefs.h. */
20766_ACEOF
20767cat confdefs.h >>conftest.$ac_ext
20768cat >>conftest.$ac_ext <<_ACEOF
20769/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020770/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20771 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20772#define $ac_func innocuous_$ac_func
20773
Jack Jansen150753c2003-03-29 22:07:47 +000020774/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020775 which can conflict with char $ac_func (); below.
20776 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020777 <limits.h> exists even on freestanding compilers. */
20778
20779#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020780# include <limits.h>
20781#else
20782# include <assert.h>
20783#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020784
20785#undef $ac_func
20786
Martin v. Löwiseba40652007-08-30 20:10:57 +000020787/* Override any GCC internal prototype to avoid an error.
20788 Use char because int might match the return type of a GCC
20789 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020790#ifdef __cplusplus
20791extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020792#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020793char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020794/* The GNU C library defines this for functions which it implements
20795 to always fail with ENOSYS. Some functions are actually named
20796 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020797#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020798choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020799#endif
20800
Skip Montanaro6dead952003-09-25 14:50:04 +000020801int
20802main ()
20803{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020804return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020805 ;
20806 return 0;
20807}
20808_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020809rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020810if { (ac_try="$ac_link"
20811case "(($ac_try" in
20812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20813 *) ac_try_echo=$ac_try;;
20814esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020816 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020818 grep -v '^ *+' conftest.er1 >conftest.err
20819 rm -f conftest.er1
20820 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822 (exit $ac_status); } && {
20823 test -z "$ac_c_werror_flag" ||
20824 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020825 } && test -s conftest$ac_exeext &&
20826 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020827 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020828else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020830sed 's/^/| /' conftest.$ac_ext >&5
20831
Martin v. Löwiseba40652007-08-30 20:10:57 +000020832 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020834
20835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020836 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020837fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020838ac_res=`eval echo '${'$as_ac_var'}'`
20839 { echo "$as_me:$LINENO: result: $ac_res" >&5
20840echo "${ECHO_T}$ac_res" >&6; }
20841if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020842 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020843#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020844_ACEOF
20845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020846/* confdefs.h. */
20847_ACEOF
20848cat confdefs.h >>conftest.$ac_ext
20849cat >>conftest.$ac_ext <<_ACEOF
20850/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020851#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020852int
20853main ()
20854{
20855setpgrp(0,0);
20856 ;
20857 return 0;
20858}
20859_ACEOF
20860rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020861if { (ac_try="$ac_compile"
20862case "(($ac_try" in
20863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20864 *) ac_try_echo=$ac_try;;
20865esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020867 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020869 grep -v '^ *+' conftest.er1 >conftest.err
20870 rm -f conftest.er1
20871 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020873 (exit $ac_status); } && {
20874 test -z "$ac_c_werror_flag" ||
20875 test ! -s conftest.err
20876 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020877
20878cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020879#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020880_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020881
Jack Jansen150753c2003-03-29 22:07:47 +000020882
20883else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020885sed 's/^/| /' conftest.$ac_ext >&5
20886
Martin v. Löwiseba40652007-08-30 20:10:57 +000020887
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020889
20890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020891
20892fi
20893done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020894
Martin v. Löwis11437992002-04-12 09:54:03 +000020895
Thomas Wouters3a584202000-08-05 23:28:51 +000020896for ac_func in gettimeofday
20897do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020898as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20899{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20900echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020901if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020902 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020903else
Martin v. Löwis11437992002-04-12 09:54:03 +000020904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020905/* confdefs.h. */
20906_ACEOF
20907cat confdefs.h >>conftest.$ac_ext
20908cat >>conftest.$ac_ext <<_ACEOF
20909/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020910/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20911 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20912#define $ac_func innocuous_$ac_func
20913
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020914/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020915 which can conflict with char $ac_func (); below.
20916 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020917 <limits.h> exists even on freestanding compilers. */
20918
20919#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020920# include <limits.h>
20921#else
20922# include <assert.h>
20923#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020924
20925#undef $ac_func
20926
Martin v. Löwiseba40652007-08-30 20:10:57 +000020927/* Override any GCC internal prototype to avoid an error.
20928 Use char because int might match the return type of a GCC
20929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020930#ifdef __cplusplus
20931extern "C"
20932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020933char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020934/* The GNU C library defines this for functions which it implements
20935 to always fail with ENOSYS. Some functions are actually named
20936 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020937#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020938choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020939#endif
20940
Skip Montanaro6dead952003-09-25 14:50:04 +000020941int
20942main ()
20943{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020944return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020945 ;
20946 return 0;
20947}
20948_ACEOF
20949rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020950if { (ac_try="$ac_link"
20951case "(($ac_try" in
20952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20953 *) ac_try_echo=$ac_try;;
20954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020956 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020958 grep -v '^ *+' conftest.er1 >conftest.err
20959 rm -f conftest.er1
20960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020962 (exit $ac_status); } && {
20963 test -z "$ac_c_werror_flag" ||
20964 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020965 } && test -s conftest$ac_exeext &&
20966 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020967 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020970sed 's/^/| /' conftest.$ac_ext >&5
20971
Martin v. Löwiseba40652007-08-30 20:10:57 +000020972 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020974
20975rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020976 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020977fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020978ac_res=`eval echo '${'$as_ac_var'}'`
20979 { echo "$as_me:$LINENO: result: $ac_res" >&5
20980echo "${ECHO_T}$ac_res" >&6; }
20981if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020982 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020983#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020984_ACEOF
20985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020986/* confdefs.h. */
20987_ACEOF
20988cat confdefs.h >>conftest.$ac_ext
20989cat >>conftest.$ac_ext <<_ACEOF
20990/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020991#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020992int
20993main ()
20994{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020995gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020996 ;
20997 return 0;
20998}
20999_ACEOF
21000rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021001if { (ac_try="$ac_compile"
21002case "(($ac_try" in
21003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21004 *) ac_try_echo=$ac_try;;
21005esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021009 grep -v '^ *+' conftest.er1 >conftest.err
21010 rm -f conftest.er1
21011 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021013 (exit $ac_status); } && {
21014 test -z "$ac_c_werror_flag" ||
21015 test ! -s conftest.err
21016 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000021017 :
21018else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021020sed 's/^/| /' conftest.$ac_ext >&5
21021
Martin v. Löwis11437992002-04-12 09:54:03 +000021022
21023cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021024#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021025_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021026
Martin v. Löwis11437992002-04-12 09:54:03 +000021027
Guido van Rossum627b2d71993-12-24 10:39:16 +000021028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021029
21030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021031
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021032fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021033done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021034
Michael W. Hudson54241132001-12-07 15:38:26 +000021035
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021036{ echo "$as_me:$LINENO: checking for major" >&5
21037echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021039/* confdefs.h. */
21040_ACEOF
21041cat confdefs.h >>conftest.$ac_ext
21042cat >>conftest.$ac_ext <<_ACEOF
21043/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021044
Neal Norwitz6eb37f02003-02-23 23:28:15 +000021045#if defined(MAJOR_IN_MKDEV)
21046#include <sys/mkdev.h>
21047#elif defined(MAJOR_IN_SYSMACROS)
21048#include <sys/sysmacros.h>
21049#else
21050#include <sys/types.h>
21051#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021052
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021053int
21054main ()
21055{
21056
21057 makedev(major(0),minor(0));
21058
21059 ;
21060 return 0;
21061}
21062_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000021063rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021064if { (ac_try="$ac_link"
21065case "(($ac_try" in
21066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21067 *) ac_try_echo=$ac_try;;
21068esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021070 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021072 grep -v '^ *+' conftest.er1 >conftest.err
21073 rm -f conftest.er1
21074 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021076 (exit $ac_status); } && {
21077 test -z "$ac_c_werror_flag" ||
21078 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021079 } && test -s conftest$ac_exeext &&
21080 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021081
21082
21083cat >>confdefs.h <<\_ACEOF
21084#define HAVE_DEVICE_MACROS 1
21085_ACEOF
21086
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021087 { echo "$as_me:$LINENO: result: yes" >&5
21088echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021089
21090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021092sed 's/^/| /' conftest.$ac_ext >&5
21093
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021094
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021095 { echo "$as_me:$LINENO: result: no" >&5
21096echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021097
21098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021099
21100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021101 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021102
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021103# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021104# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021105{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21106echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021108/* confdefs.h. */
21109_ACEOF
21110cat confdefs.h >>conftest.$ac_ext
21111cat >>conftest.$ac_ext <<_ACEOF
21112/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021113
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021114#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021115#include <sys/socket.h>
21116#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021117#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021118
Martin v. Löwis11437992002-04-12 09:54:03 +000021119int
21120main ()
21121{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021122getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021123 ;
21124 return 0;
21125}
21126_ACEOF
21127rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021128if { (ac_try="$ac_link"
21129case "(($ac_try" in
21130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21131 *) ac_try_echo=$ac_try;;
21132esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021134 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021136 grep -v '^ *+' conftest.er1 >conftest.err
21137 rm -f conftest.er1
21138 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021140 (exit $ac_status); } && {
21141 test -z "$ac_c_werror_flag" ||
21142 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021143 } && test -s conftest$ac_exeext &&
21144 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021145 have_getaddrinfo=yes
21146else
21147 echo "$as_me: failed program was:" >&5
21148sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021149
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021150 have_getaddrinfo=no
21151fi
21152
21153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21154 conftest$ac_exeext conftest.$ac_ext
21155{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21156echo "${ECHO_T}$have_getaddrinfo" >&6; }
21157if test $have_getaddrinfo = yes
21158then
21159 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021160echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021161 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21162 echo $ECHO_N "(cached) $ECHO_C" >&6
21163else
21164 if test "$cross_compiling" = yes; then
21165 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021166else
Martin v. Löwis11437992002-04-12 09:54:03 +000021167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021168/* confdefs.h. */
21169_ACEOF
21170cat confdefs.h >>conftest.$ac_ext
21171cat >>conftest.$ac_ext <<_ACEOF
21172/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021173
21174#include <sys/types.h>
21175#include <netdb.h>
21176#include <string.h>
21177#include <sys/socket.h>
21178#include <netinet/in.h>
21179
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021180int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021181{
21182 int passive, gaierr, inet4 = 0, inet6 = 0;
21183 struct addrinfo hints, *ai, *aitop;
21184 char straddr[INET6_ADDRSTRLEN], strport[16];
21185
21186 for (passive = 0; passive <= 1; passive++) {
21187 memset(&hints, 0, sizeof(hints));
21188 hints.ai_family = AF_UNSPEC;
21189 hints.ai_flags = passive ? AI_PASSIVE : 0;
21190 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021191 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021192 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21193 (void)gai_strerror(gaierr);
21194 goto bad;
21195 }
21196 for (ai = aitop; ai; ai = ai->ai_next) {
21197 if (ai->ai_addr == NULL ||
21198 ai->ai_addrlen == 0 ||
21199 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21200 straddr, sizeof(straddr), strport, sizeof(strport),
21201 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21202 goto bad;
21203 }
21204 switch (ai->ai_family) {
21205 case AF_INET:
21206 if (strcmp(strport, "54321") != 0) {
21207 goto bad;
21208 }
21209 if (passive) {
21210 if (strcmp(straddr, "0.0.0.0") != 0) {
21211 goto bad;
21212 }
21213 } else {
21214 if (strcmp(straddr, "127.0.0.1") != 0) {
21215 goto bad;
21216 }
21217 }
21218 inet4++;
21219 break;
21220 case AF_INET6:
21221 if (strcmp(strport, "54321") != 0) {
21222 goto bad;
21223 }
21224 if (passive) {
21225 if (strcmp(straddr, "::") != 0) {
21226 goto bad;
21227 }
21228 } else {
21229 if (strcmp(straddr, "::1") != 0) {
21230 goto bad;
21231 }
21232 }
21233 inet6++;
21234 break;
21235 case AF_UNSPEC:
21236 goto bad;
21237 break;
21238 default:
21239 /* another family support? */
21240 break;
21241 }
21242 }
21243 }
21244
21245 if (!(inet4 == 0 || inet4 == 2))
21246 goto bad;
21247 if (!(inet6 == 0 || inet6 == 2))
21248 goto bad;
21249
21250 if (aitop)
21251 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021252 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021253
21254 bad:
21255 if (aitop)
21256 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021257 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021258}
21259
Martin v. Löwis11437992002-04-12 09:54:03 +000021260_ACEOF
21261rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021262if { (ac_try="$ac_link"
21263case "(($ac_try" in
21264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21265 *) ac_try_echo=$ac_try;;
21266esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021268 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021269 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021271 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021272 { (case "(($ac_try" in
21273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21274 *) ac_try_echo=$ac_try;;
21275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021277 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021278 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021280 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021281 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021282else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021283 echo "$as_me: program exited with status $ac_status" >&5
21284echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021285sed 's/^/| /' conftest.$ac_ext >&5
21286
Martin v. Löwis11437992002-04-12 09:54:03 +000021287( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021288ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021290rm -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 +000021291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021292
21293
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021294fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021295
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021297
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021298if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021299then
21300 if test $ipv6 = yes
21301 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021302 echo 'Fatal: You must get working getaddrinfo() function.'
21303 echo ' or you can specify "--disable-ipv6"'.
21304 exit 1
21305 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021306else
Martin v. Löwis11437992002-04-12 09:54:03 +000021307
21308cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021309#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021310_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021311
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021313
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021314for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021315do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021316as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21317{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21318echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021319if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021320 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021321else
Martin v. Löwis11437992002-04-12 09:54:03 +000021322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021323/* confdefs.h. */
21324_ACEOF
21325cat confdefs.h >>conftest.$ac_ext
21326cat >>conftest.$ac_ext <<_ACEOF
21327/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021328/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21329 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21330#define $ac_func innocuous_$ac_func
21331
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021332/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021333 which can conflict with char $ac_func (); below.
21334 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021335 <limits.h> exists even on freestanding compilers. */
21336
21337#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021338# include <limits.h>
21339#else
21340# include <assert.h>
21341#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021342
21343#undef $ac_func
21344
Martin v. Löwiseba40652007-08-30 20:10:57 +000021345/* Override any GCC internal prototype to avoid an error.
21346 Use char because int might match the return type of a GCC
21347 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021348#ifdef __cplusplus
21349extern "C"
21350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021351char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021352/* The GNU C library defines this for functions which it implements
21353 to always fail with ENOSYS. Some functions are actually named
21354 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021355#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021356choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021357#endif
21358
Skip Montanaro6dead952003-09-25 14:50:04 +000021359int
21360main ()
21361{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021362return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021363 ;
21364 return 0;
21365}
21366_ACEOF
21367rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021368if { (ac_try="$ac_link"
21369case "(($ac_try" in
21370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21371 *) ac_try_echo=$ac_try;;
21372esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021374 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021376 grep -v '^ *+' conftest.er1 >conftest.err
21377 rm -f conftest.er1
21378 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021380 (exit $ac_status); } && {
21381 test -z "$ac_c_werror_flag" ||
21382 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021383 } && test -s conftest$ac_exeext &&
21384 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021385 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021386else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021388sed 's/^/| /' conftest.$ac_ext >&5
21389
Martin v. Löwiseba40652007-08-30 20:10:57 +000021390 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021392
21393rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021394 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021395fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021396ac_res=`eval echo '${'$as_ac_var'}'`
21397 { echo "$as_me:$LINENO: result: $ac_res" >&5
21398echo "${ECHO_T}$ac_res" >&6; }
21399if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021400 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021401#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021402_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021403
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021404fi
21405done
21406
Michael W. Hudson54241132001-12-07 15:38:26 +000021407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021408# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021409{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21410echo $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 +000021411if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021412 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021413else
Martin v. Löwis11437992002-04-12 09:54:03 +000021414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021415/* confdefs.h. */
21416_ACEOF
21417cat confdefs.h >>conftest.$ac_ext
21418cat >>conftest.$ac_ext <<_ACEOF
21419/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021420#include <sys/types.h>
21421#include <sys/time.h>
21422#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021423
Martin v. Löwis11437992002-04-12 09:54:03 +000021424int
21425main ()
21426{
21427if ((struct tm *) 0)
21428return 0;
21429 ;
21430 return 0;
21431}
21432_ACEOF
21433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021434if { (ac_try="$ac_compile"
21435case "(($ac_try" in
21436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21437 *) ac_try_echo=$ac_try;;
21438esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021442 grep -v '^ *+' conftest.er1 >conftest.err
21443 rm -f conftest.er1
21444 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021446 (exit $ac_status); } && {
21447 test -z "$ac_c_werror_flag" ||
21448 test ! -s conftest.err
21449 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021450 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021451else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021453sed 's/^/| /' conftest.$ac_ext >&5
21454
Martin v. Löwiseba40652007-08-30 20:10:57 +000021455 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021457
21458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021459fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021460{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21461echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021462if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021463
21464cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021465#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021466_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021467
21468fi
21469
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021470{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21471echo $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 +000021472if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021474else
Martin v. Löwis11437992002-04-12 09:54:03 +000021475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021476/* confdefs.h. */
21477_ACEOF
21478cat confdefs.h >>conftest.$ac_ext
21479cat >>conftest.$ac_ext <<_ACEOF
21480/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021481#include <sys/types.h>
21482#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021483
Martin v. Löwis11437992002-04-12 09:54:03 +000021484int
21485main ()
21486{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021487struct tm tm;
21488 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021489 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021490 ;
21491 return 0;
21492}
21493_ACEOF
21494rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021495if { (ac_try="$ac_compile"
21496case "(($ac_try" in
21497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21498 *) ac_try_echo=$ac_try;;
21499esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021503 grep -v '^ *+' conftest.er1 >conftest.err
21504 rm -f conftest.er1
21505 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021507 (exit $ac_status); } && {
21508 test -z "$ac_c_werror_flag" ||
21509 test ! -s conftest.err
21510 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021511 ac_cv_struct_tm=time.h
21512else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021514sed 's/^/| /' conftest.$ac_ext >&5
21515
Martin v. Löwiseba40652007-08-30 20:10:57 +000021516 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021518
21519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021520fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021521{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21522echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021523if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021524
21525cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021526#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021527_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021528
21529fi
21530
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021531{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21532echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021533if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021534 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021535else
Martin v. Löwis11437992002-04-12 09:54:03 +000021536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021537/* confdefs.h. */
21538_ACEOF
21539cat confdefs.h >>conftest.$ac_ext
21540cat >>conftest.$ac_ext <<_ACEOF
21541/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021542#include <sys/types.h>
21543#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021544
21545
Martin v. Löwis11437992002-04-12 09:54:03 +000021546int
21547main ()
21548{
21549static struct tm ac_aggr;
21550if (ac_aggr.tm_zone)
21551return 0;
21552 ;
21553 return 0;
21554}
21555_ACEOF
21556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021557if { (ac_try="$ac_compile"
21558case "(($ac_try" in
21559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21560 *) ac_try_echo=$ac_try;;
21561esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021565 grep -v '^ *+' conftest.er1 >conftest.err
21566 rm -f conftest.er1
21567 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021569 (exit $ac_status); } && {
21570 test -z "$ac_c_werror_flag" ||
21571 test ! -s conftest.err
21572 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021573 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021574else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021576sed 's/^/| /' conftest.$ac_ext >&5
21577
Martin v. Löwiseba40652007-08-30 20:10:57 +000021578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021579/* confdefs.h. */
21580_ACEOF
21581cat confdefs.h >>conftest.$ac_ext
21582cat >>conftest.$ac_ext <<_ACEOF
21583/* end confdefs.h. */
21584#include <sys/types.h>
21585#include <$ac_cv_struct_tm>
21586
21587
21588int
21589main ()
21590{
21591static struct tm ac_aggr;
21592if (sizeof ac_aggr.tm_zone)
21593return 0;
21594 ;
21595 return 0;
21596}
21597_ACEOF
21598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021599if { (ac_try="$ac_compile"
21600case "(($ac_try" in
21601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21602 *) ac_try_echo=$ac_try;;
21603esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021605 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021607 grep -v '^ *+' conftest.er1 >conftest.err
21608 rm -f conftest.er1
21609 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021611 (exit $ac_status); } && {
21612 test -z "$ac_c_werror_flag" ||
21613 test ! -s conftest.err
21614 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021615 ac_cv_member_struct_tm_tm_zone=yes
21616else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021618sed 's/^/| /' conftest.$ac_ext >&5
21619
Martin v. Löwiseba40652007-08-30 20:10:57 +000021620 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021622
21623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021625
21626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021627fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021628{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21629echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21630if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021631
21632cat >>confdefs.h <<_ACEOF
21633#define HAVE_STRUCT_TM_TM_ZONE 1
21634_ACEOF
21635
21636
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021637fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021638
Martin v. Löwis11437992002-04-12 09:54:03 +000021639if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21640
21641cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021642#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021644
21645else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021646 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21647echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021648if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021649 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021650else
21651 cat >conftest.$ac_ext <<_ACEOF
21652/* confdefs.h. */
21653_ACEOF
21654cat confdefs.h >>conftest.$ac_ext
21655cat >>conftest.$ac_ext <<_ACEOF
21656/* end confdefs.h. */
21657#include <time.h>
21658
21659int
21660main ()
21661{
21662#ifndef tzname
21663 (void) tzname;
21664#endif
21665
21666 ;
21667 return 0;
21668}
21669_ACEOF
21670rm -f conftest.$ac_objext
21671if { (ac_try="$ac_compile"
21672case "(($ac_try" in
21673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21674 *) ac_try_echo=$ac_try;;
21675esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021677 (eval "$ac_compile") 2>conftest.er1
21678 ac_status=$?
21679 grep -v '^ *+' conftest.er1 >conftest.err
21680 rm -f conftest.er1
21681 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021683 (exit $ac_status); } && {
21684 test -z "$ac_c_werror_flag" ||
21685 test ! -s conftest.err
21686 } && test -s conftest.$ac_objext; then
21687 ac_cv_have_decl_tzname=yes
21688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021689 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021690sed 's/^/| /' conftest.$ac_ext >&5
21691
21692 ac_cv_have_decl_tzname=no
21693fi
21694
21695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21696fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021697{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21698echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21699if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021700
21701cat >>confdefs.h <<_ACEOF
21702#define HAVE_DECL_TZNAME 1
21703_ACEOF
21704
21705
21706else
21707 cat >>confdefs.h <<_ACEOF
21708#define HAVE_DECL_TZNAME 0
21709_ACEOF
21710
21711
21712fi
21713
21714
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021715 { echo "$as_me:$LINENO: checking for tzname" >&5
21716echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021717if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021718 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021719else
Martin v. Löwis11437992002-04-12 09:54:03 +000021720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021721/* confdefs.h. */
21722_ACEOF
21723cat confdefs.h >>conftest.$ac_ext
21724cat >>conftest.$ac_ext <<_ACEOF
21725/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021726#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021727#if !HAVE_DECL_TZNAME
21728extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021729#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021730
Martin v. Löwis11437992002-04-12 09:54:03 +000021731int
21732main ()
21733{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021734return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021735 ;
21736 return 0;
21737}
21738_ACEOF
21739rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021740if { (ac_try="$ac_link"
21741case "(($ac_try" in
21742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21743 *) ac_try_echo=$ac_try;;
21744esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021746 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021748 grep -v '^ *+' conftest.er1 >conftest.err
21749 rm -f conftest.er1
21750 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021752 (exit $ac_status); } && {
21753 test -z "$ac_c_werror_flag" ||
21754 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021755 } && test -s conftest$ac_exeext &&
21756 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021757 ac_cv_var_tzname=yes
21758else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021760sed 's/^/| /' conftest.$ac_ext >&5
21761
Martin v. Löwiseba40652007-08-30 20:10:57 +000021762 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021764
21765rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021766 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021767fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021768{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21769echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021770 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021771
21772cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021773#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021774_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021775
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021776 fi
21777fi
21778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021779{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21780echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021781if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021782 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021783else
21784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021785/* confdefs.h. */
21786_ACEOF
21787cat confdefs.h >>conftest.$ac_ext
21788cat >>conftest.$ac_ext <<_ACEOF
21789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021790$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021791int
21792main ()
21793{
21794static struct stat ac_aggr;
21795if (ac_aggr.st_rdev)
21796return 0;
21797 ;
21798 return 0;
21799}
21800_ACEOF
21801rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021802if { (ac_try="$ac_compile"
21803case "(($ac_try" in
21804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21805 *) ac_try_echo=$ac_try;;
21806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021808 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021810 grep -v '^ *+' conftest.er1 >conftest.err
21811 rm -f conftest.er1
21812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021814 (exit $ac_status); } && {
21815 test -z "$ac_c_werror_flag" ||
21816 test ! -s conftest.err
21817 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021818 ac_cv_member_struct_stat_st_rdev=yes
21819else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021821sed 's/^/| /' conftest.$ac_ext >&5
21822
Martin v. Löwiseba40652007-08-30 20:10:57 +000021823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021824/* confdefs.h. */
21825_ACEOF
21826cat confdefs.h >>conftest.$ac_ext
21827cat >>conftest.$ac_ext <<_ACEOF
21828/* end confdefs.h. */
21829$ac_includes_default
21830int
21831main ()
21832{
21833static struct stat ac_aggr;
21834if (sizeof ac_aggr.st_rdev)
21835return 0;
21836 ;
21837 return 0;
21838}
21839_ACEOF
21840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021841if { (ac_try="$ac_compile"
21842case "(($ac_try" in
21843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21844 *) ac_try_echo=$ac_try;;
21845esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021847 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021849 grep -v '^ *+' conftest.er1 >conftest.err
21850 rm -f conftest.er1
21851 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021853 (exit $ac_status); } && {
21854 test -z "$ac_c_werror_flag" ||
21855 test ! -s conftest.err
21856 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021857 ac_cv_member_struct_stat_st_rdev=yes
21858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021860sed 's/^/| /' conftest.$ac_ext >&5
21861
Martin v. Löwiseba40652007-08-30 20:10:57 +000021862 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021864
21865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021867
21868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021869fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021870{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21871echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21872if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021873
21874cat >>confdefs.h <<_ACEOF
21875#define HAVE_STRUCT_STAT_ST_RDEV 1
21876_ACEOF
21877
21878
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021879fi
21880
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021881{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21882echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021883if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021885else
Martin v. Löwis11437992002-04-12 09:54:03 +000021886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021887/* confdefs.h. */
21888_ACEOF
21889cat confdefs.h >>conftest.$ac_ext
21890cat >>conftest.$ac_ext <<_ACEOF
21891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021892$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021893int
21894main ()
21895{
21896static struct stat ac_aggr;
21897if (ac_aggr.st_blksize)
21898return 0;
21899 ;
21900 return 0;
21901}
21902_ACEOF
21903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021904if { (ac_try="$ac_compile"
21905case "(($ac_try" in
21906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21907 *) ac_try_echo=$ac_try;;
21908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021912 grep -v '^ *+' conftest.er1 >conftest.err
21913 rm -f conftest.er1
21914 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021916 (exit $ac_status); } && {
21917 test -z "$ac_c_werror_flag" ||
21918 test ! -s conftest.err
21919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021920 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021923sed 's/^/| /' conftest.$ac_ext >&5
21924
Martin v. Löwiseba40652007-08-30 20:10:57 +000021925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021926/* confdefs.h. */
21927_ACEOF
21928cat confdefs.h >>conftest.$ac_ext
21929cat >>conftest.$ac_ext <<_ACEOF
21930/* end confdefs.h. */
21931$ac_includes_default
21932int
21933main ()
21934{
21935static struct stat ac_aggr;
21936if (sizeof ac_aggr.st_blksize)
21937return 0;
21938 ;
21939 return 0;
21940}
21941_ACEOF
21942rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021943if { (ac_try="$ac_compile"
21944case "(($ac_try" in
21945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21946 *) ac_try_echo=$ac_try;;
21947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021949 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021951 grep -v '^ *+' conftest.er1 >conftest.err
21952 rm -f conftest.er1
21953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021955 (exit $ac_status); } && {
21956 test -z "$ac_c_werror_flag" ||
21957 test ! -s conftest.err
21958 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021959 ac_cv_member_struct_stat_st_blksize=yes
21960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021962sed 's/^/| /' conftest.$ac_ext >&5
21963
Martin v. Löwiseba40652007-08-30 20:10:57 +000021964 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021966
21967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021969
21970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021971fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021972{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21973echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21974if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021975
Martin v. Löwis11437992002-04-12 09:54:03 +000021976cat >>confdefs.h <<_ACEOF
21977#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21978_ACEOF
21979
21980
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021981fi
21982
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021983{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21984echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021985if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021986 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021987else
21988 cat >conftest.$ac_ext <<_ACEOF
21989/* confdefs.h. */
21990_ACEOF
21991cat confdefs.h >>conftest.$ac_ext
21992cat >>conftest.$ac_ext <<_ACEOF
21993/* end confdefs.h. */
21994$ac_includes_default
21995int
21996main ()
21997{
21998static struct stat ac_aggr;
21999if (ac_aggr.st_flags)
22000return 0;
22001 ;
22002 return 0;
22003}
22004_ACEOF
22005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022006if { (ac_try="$ac_compile"
22007case "(($ac_try" in
22008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22009 *) ac_try_echo=$ac_try;;
22010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022012 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022013 ac_status=$?
22014 grep -v '^ *+' conftest.er1 >conftest.err
22015 rm -f conftest.er1
22016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022018 (exit $ac_status); } && {
22019 test -z "$ac_c_werror_flag" ||
22020 test ! -s conftest.err
22021 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022022 ac_cv_member_struct_stat_st_flags=yes
22023else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022024 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022025sed 's/^/| /' conftest.$ac_ext >&5
22026
Martin v. Löwiseba40652007-08-30 20:10:57 +000022027 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022028/* confdefs.h. */
22029_ACEOF
22030cat confdefs.h >>conftest.$ac_ext
22031cat >>conftest.$ac_ext <<_ACEOF
22032/* end confdefs.h. */
22033$ac_includes_default
22034int
22035main ()
22036{
22037static struct stat ac_aggr;
22038if (sizeof ac_aggr.st_flags)
22039return 0;
22040 ;
22041 return 0;
22042}
22043_ACEOF
22044rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022045if { (ac_try="$ac_compile"
22046case "(($ac_try" in
22047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22048 *) ac_try_echo=$ac_try;;
22049esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022051 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022052 ac_status=$?
22053 grep -v '^ *+' conftest.er1 >conftest.err
22054 rm -f conftest.er1
22055 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022057 (exit $ac_status); } && {
22058 test -z "$ac_c_werror_flag" ||
22059 test ! -s conftest.err
22060 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022061 ac_cv_member_struct_stat_st_flags=yes
22062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022063 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022064sed 's/^/| /' conftest.$ac_ext >&5
22065
Martin v. Löwiseba40652007-08-30 20:10:57 +000022066 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022068
22069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022071
22072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022073fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022074{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
22075echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
22076if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022077
22078cat >>confdefs.h <<_ACEOF
22079#define HAVE_STRUCT_STAT_ST_FLAGS 1
22080_ACEOF
22081
22082
22083fi
22084
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022085{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22086echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022087if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022088 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022089else
22090 cat >conftest.$ac_ext <<_ACEOF
22091/* confdefs.h. */
22092_ACEOF
22093cat confdefs.h >>conftest.$ac_ext
22094cat >>conftest.$ac_ext <<_ACEOF
22095/* end confdefs.h. */
22096$ac_includes_default
22097int
22098main ()
22099{
22100static struct stat ac_aggr;
22101if (ac_aggr.st_gen)
22102return 0;
22103 ;
22104 return 0;
22105}
22106_ACEOF
22107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022108if { (ac_try="$ac_compile"
22109case "(($ac_try" in
22110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22111 *) ac_try_echo=$ac_try;;
22112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022115 ac_status=$?
22116 grep -v '^ *+' conftest.er1 >conftest.err
22117 rm -f conftest.er1
22118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022120 (exit $ac_status); } && {
22121 test -z "$ac_c_werror_flag" ||
22122 test ! -s conftest.err
22123 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022124 ac_cv_member_struct_stat_st_gen=yes
22125else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022126 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022127sed 's/^/| /' conftest.$ac_ext >&5
22128
Martin v. Löwiseba40652007-08-30 20:10:57 +000022129 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022130/* confdefs.h. */
22131_ACEOF
22132cat confdefs.h >>conftest.$ac_ext
22133cat >>conftest.$ac_ext <<_ACEOF
22134/* end confdefs.h. */
22135$ac_includes_default
22136int
22137main ()
22138{
22139static struct stat ac_aggr;
22140if (sizeof ac_aggr.st_gen)
22141return 0;
22142 ;
22143 return 0;
22144}
22145_ACEOF
22146rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022147if { (ac_try="$ac_compile"
22148case "(($ac_try" in
22149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22150 *) ac_try_echo=$ac_try;;
22151esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022154 ac_status=$?
22155 grep -v '^ *+' conftest.er1 >conftest.err
22156 rm -f conftest.er1
22157 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022159 (exit $ac_status); } && {
22160 test -z "$ac_c_werror_flag" ||
22161 test ! -s conftest.err
22162 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022163 ac_cv_member_struct_stat_st_gen=yes
22164else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022165 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022166sed 's/^/| /' conftest.$ac_ext >&5
22167
Martin v. Löwiseba40652007-08-30 20:10:57 +000022168 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022170
22171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022173
22174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022175fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022176{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22177echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22178if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022179
22180cat >>confdefs.h <<_ACEOF
22181#define HAVE_STRUCT_STAT_ST_GEN 1
22182_ACEOF
22183
22184
22185fi
22186
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022187{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22188echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022189if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022190 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022191else
22192 cat >conftest.$ac_ext <<_ACEOF
22193/* confdefs.h. */
22194_ACEOF
22195cat confdefs.h >>conftest.$ac_ext
22196cat >>conftest.$ac_ext <<_ACEOF
22197/* end confdefs.h. */
22198$ac_includes_default
22199int
22200main ()
22201{
22202static struct stat ac_aggr;
22203if (ac_aggr.st_birthtime)
22204return 0;
22205 ;
22206 return 0;
22207}
22208_ACEOF
22209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022210if { (ac_try="$ac_compile"
22211case "(($ac_try" in
22212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22213 *) ac_try_echo=$ac_try;;
22214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022217 ac_status=$?
22218 grep -v '^ *+' conftest.er1 >conftest.err
22219 rm -f conftest.er1
22220 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022222 (exit $ac_status); } && {
22223 test -z "$ac_c_werror_flag" ||
22224 test ! -s conftest.err
22225 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022226 ac_cv_member_struct_stat_st_birthtime=yes
22227else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022228 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022229sed 's/^/| /' conftest.$ac_ext >&5
22230
Martin v. Löwiseba40652007-08-30 20:10:57 +000022231 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022232/* confdefs.h. */
22233_ACEOF
22234cat confdefs.h >>conftest.$ac_ext
22235cat >>conftest.$ac_ext <<_ACEOF
22236/* end confdefs.h. */
22237$ac_includes_default
22238int
22239main ()
22240{
22241static struct stat ac_aggr;
22242if (sizeof ac_aggr.st_birthtime)
22243return 0;
22244 ;
22245 return 0;
22246}
22247_ACEOF
22248rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022249if { (ac_try="$ac_compile"
22250case "(($ac_try" in
22251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22252 *) ac_try_echo=$ac_try;;
22253esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022255 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022256 ac_status=$?
22257 grep -v '^ *+' conftest.er1 >conftest.err
22258 rm -f conftest.er1
22259 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022261 (exit $ac_status); } && {
22262 test -z "$ac_c_werror_flag" ||
22263 test ! -s conftest.err
22264 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022265 ac_cv_member_struct_stat_st_birthtime=yes
22266else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022267 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022268sed 's/^/| /' conftest.$ac_ext >&5
22269
Martin v. Löwiseba40652007-08-30 20:10:57 +000022270 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022272
22273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022275
22276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022277fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022278{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22279echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22280if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022281
22282cat >>confdefs.h <<_ACEOF
22283#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22284_ACEOF
22285
22286
22287fi
22288
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022289{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22290echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022291if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022293else
Martin v. Löwis11437992002-04-12 09:54:03 +000022294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022295/* confdefs.h. */
22296_ACEOF
22297cat confdefs.h >>conftest.$ac_ext
22298cat >>conftest.$ac_ext <<_ACEOF
22299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022300$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022301int
22302main ()
22303{
22304static struct stat ac_aggr;
22305if (ac_aggr.st_blocks)
22306return 0;
22307 ;
22308 return 0;
22309}
22310_ACEOF
22311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022312if { (ac_try="$ac_compile"
22313case "(($ac_try" in
22314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22315 *) ac_try_echo=$ac_try;;
22316esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022320 grep -v '^ *+' conftest.er1 >conftest.err
22321 rm -f conftest.er1
22322 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022324 (exit $ac_status); } && {
22325 test -z "$ac_c_werror_flag" ||
22326 test ! -s conftest.err
22327 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022328 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022331sed 's/^/| /' conftest.$ac_ext >&5
22332
Martin v. Löwiseba40652007-08-30 20:10:57 +000022333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022334/* confdefs.h. */
22335_ACEOF
22336cat confdefs.h >>conftest.$ac_ext
22337cat >>conftest.$ac_ext <<_ACEOF
22338/* end confdefs.h. */
22339$ac_includes_default
22340int
22341main ()
22342{
22343static struct stat ac_aggr;
22344if (sizeof ac_aggr.st_blocks)
22345return 0;
22346 ;
22347 return 0;
22348}
22349_ACEOF
22350rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022351if { (ac_try="$ac_compile"
22352case "(($ac_try" in
22353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22354 *) ac_try_echo=$ac_try;;
22355esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022357 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022359 grep -v '^ *+' conftest.er1 >conftest.err
22360 rm -f conftest.er1
22361 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022363 (exit $ac_status); } && {
22364 test -z "$ac_c_werror_flag" ||
22365 test ! -s conftest.err
22366 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022367 ac_cv_member_struct_stat_st_blocks=yes
22368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022370sed 's/^/| /' conftest.$ac_ext >&5
22371
Martin v. Löwiseba40652007-08-30 20:10:57 +000022372 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022374
22375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022377
22378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022379fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022380{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22381echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22382if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022383
Martin v. Löwis11437992002-04-12 09:54:03 +000022384cat >>confdefs.h <<_ACEOF
22385#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22386_ACEOF
22387
22388
22389cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022390#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022391_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022392
22393else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022394 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022395 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022396 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22397 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022398esac
22399
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022400fi
22401
Michael W. Hudson54241132001-12-07 15:38:26 +000022402
Martin v. Löwis11437992002-04-12 09:54:03 +000022403
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022404{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22405echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022406if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022407 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022408else
Martin v. Löwis11437992002-04-12 09:54:03 +000022409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022410/* confdefs.h. */
22411_ACEOF
22412cat confdefs.h >>conftest.$ac_ext
22413cat >>conftest.$ac_ext <<_ACEOF
22414/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022415#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022416int
22417main ()
22418{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022419return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022420 ;
22421 return 0;
22422}
22423_ACEOF
22424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022425if { (ac_try="$ac_compile"
22426case "(($ac_try" in
22427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22428 *) ac_try_echo=$ac_try;;
22429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022433 grep -v '^ *+' conftest.er1 >conftest.err
22434 rm -f conftest.er1
22435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022437 (exit $ac_status); } && {
22438 test -z "$ac_c_werror_flag" ||
22439 test ! -s conftest.err
22440 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022441 ac_cv_header_time_altzone=yes
22442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022444sed 's/^/| /' conftest.$ac_ext >&5
22445
Martin v. Löwiseba40652007-08-30 20:10:57 +000022446 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022447fi
22448
Martin v. Löwiseba40652007-08-30 20:10:57 +000022449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22450fi
22451
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022452{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22453echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022454if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022455
22456cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022457#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022458_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022459
22460fi
22461
Guido van Rossumda88dad1995-01-26 00:46:29 +000022462was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022463{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22464echo $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 +000022465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022466/* confdefs.h. */
22467_ACEOF
22468cat confdefs.h >>conftest.$ac_ext
22469cat >>conftest.$ac_ext <<_ACEOF
22470/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022471
22472#include <sys/types.h>
22473#include <sys/select.h>
22474#include <sys/time.h>
22475
Martin v. Löwis11437992002-04-12 09:54:03 +000022476int
22477main ()
22478{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022479;
Martin v. Löwis11437992002-04-12 09:54:03 +000022480 ;
22481 return 0;
22482}
22483_ACEOF
22484rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022485if { (ac_try="$ac_compile"
22486case "(($ac_try" in
22487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22488 *) ac_try_echo=$ac_try;;
22489esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022491 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022493 grep -v '^ *+' conftest.er1 >conftest.err
22494 rm -f conftest.er1
22495 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022497 (exit $ac_status); } && {
22498 test -z "$ac_c_werror_flag" ||
22499 test ! -s conftest.err
22500 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022501
22502
22503cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022504#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022505_ACEOF
22506
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022507 was_it_defined=yes
22508
Guido van Rossumf78abae1997-01-21 22:02:36 +000022509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022511sed 's/^/| /' conftest.$ac_ext >&5
22512
Brett Cannon19fab762007-06-02 03:02:29 +000022513
Martin v. Löwiseba40652007-08-30 20:10:57 +000022514fi
22515
22516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022517{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22518echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022519
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022520{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22521echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022522if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022523 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022524else
Martin v. Löwis11437992002-04-12 09:54:03 +000022525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022526/* confdefs.h. */
22527_ACEOF
22528cat confdefs.h >>conftest.$ac_ext
22529cat >>conftest.$ac_ext <<_ACEOF
22530/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022531
22532# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022533int
22534main ()
22535{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022536struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022537 ;
22538 return 0;
22539}
22540_ACEOF
22541rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022542if { (ac_try="$ac_compile"
22543case "(($ac_try" in
22544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22545 *) ac_try_echo=$ac_try;;
22546esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022548 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022550 grep -v '^ *+' conftest.er1 >conftest.err
22551 rm -f conftest.er1
22552 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022554 (exit $ac_status); } && {
22555 test -z "$ac_c_werror_flag" ||
22556 test ! -s conftest.err
22557 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022558 ac_cv_struct_addrinfo=yes
22559else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022561sed 's/^/| /' conftest.$ac_ext >&5
22562
Martin v. Löwiseba40652007-08-30 20:10:57 +000022563 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022564fi
22565
Martin v. Löwiseba40652007-08-30 20:10:57 +000022566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22567fi
22568
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022569{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22570echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022571if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022572
22573cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022574#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022575_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022576
22577fi
22578
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022579{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22580echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022581if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022582 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022583else
Martin v. Löwis11437992002-04-12 09:54:03 +000022584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022585/* confdefs.h. */
22586_ACEOF
22587cat confdefs.h >>conftest.$ac_ext
22588cat >>conftest.$ac_ext <<_ACEOF
22589/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022590
22591# include <sys/types.h>
22592# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022593int
22594main ()
22595{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022596struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022597 ;
22598 return 0;
22599}
22600_ACEOF
22601rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022602if { (ac_try="$ac_compile"
22603case "(($ac_try" in
22604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22605 *) ac_try_echo=$ac_try;;
22606esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022610 grep -v '^ *+' conftest.er1 >conftest.err
22611 rm -f conftest.er1
22612 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022614 (exit $ac_status); } && {
22615 test -z "$ac_c_werror_flag" ||
22616 test ! -s conftest.err
22617 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022618 ac_cv_struct_sockaddr_storage=yes
22619else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022621sed 's/^/| /' conftest.$ac_ext >&5
22622
Martin v. Löwiseba40652007-08-30 20:10:57 +000022623 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022624fi
22625
Martin v. Löwiseba40652007-08-30 20:10:57 +000022626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22627fi
22628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022629{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22630echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022631if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022632
22633cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022634#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022635_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022636
22637fi
22638
Guido van Rossum627b2d71993-12-24 10:39:16 +000022639# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022640
Michael W. Hudson54241132001-12-07 15:38:26 +000022641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022642{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22643echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022644if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022645 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022646else
Martin v. Löwis11437992002-04-12 09:54:03 +000022647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022648/* confdefs.h. */
22649_ACEOF
22650cat confdefs.h >>conftest.$ac_ext
22651cat >>conftest.$ac_ext <<_ACEOF
22652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022653$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022654int
22655main ()
22656{
22657static int test_array [1 - 2 * !(((char) -1) < 0)];
22658test_array [0] = 0
22659
22660 ;
22661 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022662}
Martin v. Löwis11437992002-04-12 09:54:03 +000022663_ACEOF
22664rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022665if { (ac_try="$ac_compile"
22666case "(($ac_try" in
22667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22668 *) ac_try_echo=$ac_try;;
22669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022673 grep -v '^ *+' conftest.er1 >conftest.err
22674 rm -f conftest.er1
22675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022677 (exit $ac_status); } && {
22678 test -z "$ac_c_werror_flag" ||
22679 test ! -s conftest.err
22680 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022681 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022682else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022684sed 's/^/| /' conftest.$ac_ext >&5
22685
Martin v. Löwiseba40652007-08-30 20:10:57 +000022686 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022688
22689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022690fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022691{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22692echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022693if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022694 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022695#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022696_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022697
22698fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022699
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022700{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22701echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022702if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022703 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022704else
22705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022706/* confdefs.h. */
22707_ACEOF
22708cat confdefs.h >>conftest.$ac_ext
22709cat >>conftest.$ac_ext <<_ACEOF
22710/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022711
Martin v. Löwis11437992002-04-12 09:54:03 +000022712int
22713main ()
22714{
22715/* FIXME: Include the comments suggested by Paul. */
22716#ifndef __cplusplus
22717 /* Ultrix mips cc rejects this. */
22718 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022719 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022720 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022721 char const *const *pcpcc;
22722 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022723 /* NEC SVR4.0.2 mips cc rejects this. */
22724 struct point {int x, y;};
22725 static struct point const zero = {0,0};
22726 /* AIX XL C 1.02.0.0 rejects this.
22727 It does not let you subtract one const X* pointer from another in
22728 an arm of an if-expression whose if-part is not a constant
22729 expression */
22730 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022731 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022732 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022733 ++pcpcc;
22734 ppc = (char**) pcpcc;
22735 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022736 { /* SCO 3.2v4 cc rejects this. */
22737 char *t;
22738 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022739
Martin v. Löwis11437992002-04-12 09:54:03 +000022740 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022741 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022742 }
22743 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22744 int x[] = {25, 17};
22745 const int *foo = &x[0];
22746 ++foo;
22747 }
22748 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22749 typedef const int *iptr;
22750 iptr p = 0;
22751 ++p;
22752 }
22753 { /* AIX XL C 1.02.0.0 rejects this saying
22754 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22755 struct s { int j; const int *ap[3]; };
22756 struct s *b; b->j = 5;
22757 }
22758 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22759 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022760 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022761 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022762 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022763#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022764
Martin v. Löwis11437992002-04-12 09:54:03 +000022765 ;
22766 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022767}
Martin v. Löwis11437992002-04-12 09:54:03 +000022768_ACEOF
22769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022770if { (ac_try="$ac_compile"
22771case "(($ac_try" in
22772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22773 *) ac_try_echo=$ac_try;;
22774esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022778 grep -v '^ *+' conftest.er1 >conftest.err
22779 rm -f conftest.er1
22780 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022782 (exit $ac_status); } && {
22783 test -z "$ac_c_werror_flag" ||
22784 test ! -s conftest.err
22785 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022786 ac_cv_c_const=yes
22787else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022789sed 's/^/| /' conftest.$ac_ext >&5
22790
Martin v. Löwiseba40652007-08-30 20:10:57 +000022791 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022793
22794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022795fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022796{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22797echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022798if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022799
22800cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022801#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022802_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022803
22804fi
22805
Michael W. Hudson54241132001-12-07 15:38:26 +000022806
Guido van Rossumda88dad1995-01-26 00:46:29 +000022807works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022808{ echo "$as_me:$LINENO: checking for working volatile" >&5
22809echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022811/* confdefs.h. */
22812_ACEOF
22813cat confdefs.h >>conftest.$ac_ext
22814cat >>conftest.$ac_ext <<_ACEOF
22815/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022816
Martin v. Löwis11437992002-04-12 09:54:03 +000022817int
22818main ()
22819{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022820volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022821 ;
22822 return 0;
22823}
22824_ACEOF
22825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022826if { (ac_try="$ac_compile"
22827case "(($ac_try" in
22828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22829 *) ac_try_echo=$ac_try;;
22830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022834 grep -v '^ *+' conftest.er1 >conftest.err
22835 rm -f conftest.er1
22836 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022838 (exit $ac_status); } && {
22839 test -z "$ac_c_werror_flag" ||
22840 test ! -s conftest.err
22841 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022842 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022843else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022845sed 's/^/| /' conftest.$ac_ext >&5
22846
Martin v. Löwis11437992002-04-12 09:54:03 +000022847
22848cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022849#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022850_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022851
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022852
Guido van Rossum627b2d71993-12-24 10:39:16 +000022853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022854
22855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022856{ echo "$as_me:$LINENO: result: $works" >&5
22857echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022858
Guido van Rossumda88dad1995-01-26 00:46:29 +000022859works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022860{ echo "$as_me:$LINENO: checking for working signed char" >&5
22861echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022863/* confdefs.h. */
22864_ACEOF
22865cat confdefs.h >>conftest.$ac_ext
22866cat >>conftest.$ac_ext <<_ACEOF
22867/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022868
Martin v. Löwis11437992002-04-12 09:54:03 +000022869int
22870main ()
22871{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022872signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022873 ;
22874 return 0;
22875}
22876_ACEOF
22877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022878if { (ac_try="$ac_compile"
22879case "(($ac_try" in
22880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22881 *) ac_try_echo=$ac_try;;
22882esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022886 grep -v '^ *+' conftest.er1 >conftest.err
22887 rm -f conftest.er1
22888 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022890 (exit $ac_status); } && {
22891 test -z "$ac_c_werror_flag" ||
22892 test ! -s conftest.err
22893 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022894 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022895else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022897sed 's/^/| /' conftest.$ac_ext >&5
22898
Martin v. Löwis11437992002-04-12 09:54:03 +000022899
22900cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022901#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022902_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022903
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022904
Guido van Rossum7f43da71994-08-01 12:15:30 +000022905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022906
22907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022908{ echo "$as_me:$LINENO: result: $works" >&5
22909echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022910
Guido van Rossumda88dad1995-01-26 00:46:29 +000022911have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022912{ echo "$as_me:$LINENO: checking for prototypes" >&5
22913echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022914cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022915/* confdefs.h. */
22916_ACEOF
22917cat confdefs.h >>conftest.$ac_ext
22918cat >>conftest.$ac_ext <<_ACEOF
22919/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022920int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022921int
22922main ()
22923{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022924return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022925 ;
22926 return 0;
22927}
22928_ACEOF
22929rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022930if { (ac_try="$ac_compile"
22931case "(($ac_try" in
22932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22933 *) ac_try_echo=$ac_try;;
22934esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022938 grep -v '^ *+' conftest.er1 >conftest.err
22939 rm -f conftest.er1
22940 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022942 (exit $ac_status); } && {
22943 test -z "$ac_c_werror_flag" ||
22944 test ! -s conftest.err
22945 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022946
22947
22948cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022949#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022950_ACEOF
22951
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022952 have_prototypes=yes
22953
Guido van Rossumf78abae1997-01-21 22:02:36 +000022954else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022956sed 's/^/| /' conftest.$ac_ext >&5
22957
Martin v. Löwiseba40652007-08-30 20:10:57 +000022958
Guido van Rossum7f43da71994-08-01 12:15:30 +000022959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022960
22961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022962{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22963echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022964
Guido van Rossumda88dad1995-01-26 00:46:29 +000022965works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022966{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22967echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022969/* confdefs.h. */
22970_ACEOF
22971cat confdefs.h >>conftest.$ac_ext
22972cat >>conftest.$ac_ext <<_ACEOF
22973/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022974
22975#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022976int foo(int x, ...) {
22977 va_list va;
22978 va_start(va, x);
22979 va_arg(va, int);
22980 va_arg(va, char *);
22981 va_arg(va, double);
22982 return 0;
22983}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022984
Martin v. Löwis11437992002-04-12 09:54:03 +000022985int
22986main ()
22987{
Guido van Rossum90eea071996-08-30 20:58:57 +000022988return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022989 ;
22990 return 0;
22991}
22992_ACEOF
22993rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022994if { (ac_try="$ac_compile"
22995case "(($ac_try" in
22996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22997 *) ac_try_echo=$ac_try;;
22998esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023000 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023002 grep -v '^ *+' conftest.er1 >conftest.err
23003 rm -f conftest.er1
23004 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023006 (exit $ac_status); } && {
23007 test -z "$ac_c_werror_flag" ||
23008 test ! -s conftest.err
23009 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023010
23011
23012cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023013#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023014_ACEOF
23015
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023016 works=yes
23017
Guido van Rossumf78abae1997-01-21 22:02:36 +000023018else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023020sed 's/^/| /' conftest.$ac_ext >&5
23021
Martin v. Löwiseba40652007-08-30 20:10:57 +000023022
Guido van Rossum627b2d71993-12-24 10:39:16 +000023023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023024
23025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023026{ echo "$as_me:$LINENO: result: $works" >&5
23027echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023028
Martin v. Löwisd6320502004-08-12 13:45:08 +000023029# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023030{ echo "$as_me:$LINENO: checking for socketpair" >&5
23031echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023032cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000023033/* confdefs.h. */
23034_ACEOF
23035cat confdefs.h >>conftest.$ac_ext
23036cat >>conftest.$ac_ext <<_ACEOF
23037/* end confdefs.h. */
23038
23039#include <sys/types.h>
23040#include <sys/socket.h>
23041
23042int
23043main ()
23044{
23045void *x=socketpair
23046 ;
23047 return 0;
23048}
23049_ACEOF
23050rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023051if { (ac_try="$ac_compile"
23052case "(($ac_try" in
23053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23054 *) ac_try_echo=$ac_try;;
23055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000023058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023059 grep -v '^ *+' conftest.er1 >conftest.err
23060 rm -f conftest.er1
23061 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023063 (exit $ac_status); } && {
23064 test -z "$ac_c_werror_flag" ||
23065 test ! -s conftest.err
23066 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000023067
23068cat >>confdefs.h <<\_ACEOF
23069#define HAVE_SOCKETPAIR 1
23070_ACEOF
23071
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023072 { echo "$as_me:$LINENO: result: yes" >&5
23073echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023074else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023075 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000023076sed 's/^/| /' conftest.$ac_ext >&5
23077
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023078 { echo "$as_me:$LINENO: result: no" >&5
23079echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023080
23081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023082
23083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000023084
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023085# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023086{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23087echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023089/* confdefs.h. */
23090_ACEOF
23091cat confdefs.h >>conftest.$ac_ext
23092cat >>conftest.$ac_ext <<_ACEOF
23093/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023094#include <sys/types.h>
23095#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023096int
23097main ()
23098{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023099struct sockaddr x;
23100x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023101 ;
23102 return 0;
23103}
23104_ACEOF
23105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023106if { (ac_try="$ac_compile"
23107case "(($ac_try" in
23108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23109 *) ac_try_echo=$ac_try;;
23110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023114 grep -v '^ *+' conftest.er1 >conftest.err
23115 rm -f conftest.er1
23116 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023118 (exit $ac_status); } && {
23119 test -z "$ac_c_werror_flag" ||
23120 test ! -s conftest.err
23121 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023122 { echo "$as_me:$LINENO: result: yes" >&5
23123echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023124
23125cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023126#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023127_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023128
23129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023131sed 's/^/| /' conftest.$ac_ext >&5
23132
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023133 { echo "$as_me:$LINENO: result: no" >&5
23134echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023136
23137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023138
Guido van Rossumda88dad1995-01-26 00:46:29 +000023139va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023140{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23141echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023143/* confdefs.h. */
23144_ACEOF
23145cat confdefs.h >>conftest.$ac_ext
23146cat >>conftest.$ac_ext <<_ACEOF
23147/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023148
23149#ifdef HAVE_STDARG_PROTOTYPES
23150#include <stdarg.h>
23151#else
23152#include <varargs.h>
23153#endif
23154
Martin v. Löwis11437992002-04-12 09:54:03 +000023155int
23156main ()
23157{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023158va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023159 ;
23160 return 0;
23161}
23162_ACEOF
23163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023164if { (ac_try="$ac_compile"
23165case "(($ac_try" in
23166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23167 *) ac_try_echo=$ac_try;;
23168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023172 grep -v '^ *+' conftest.er1 >conftest.err
23173 rm -f conftest.er1
23174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023176 (exit $ac_status); } && {
23177 test -z "$ac_c_werror_flag" ||
23178 test ! -s conftest.err
23179 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023180 :
23181else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023183sed 's/^/| /' conftest.$ac_ext >&5
23184
Martin v. Löwis11437992002-04-12 09:54:03 +000023185
23186
23187cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023188#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023189_ACEOF
23190
Guido van Rossumda88dad1995-01-26 00:46:29 +000023191 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023192
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023194
23195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023196{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23197echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023198
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023199# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023200
23201
23202
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023203{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23204echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023205if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023206 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023207else
Martin v. Löwis11437992002-04-12 09:54:03 +000023208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023209/* confdefs.h. */
23210_ACEOF
23211cat confdefs.h >>conftest.$ac_ext
23212cat >>conftest.$ac_ext <<_ACEOF
23213/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023214/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23215 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23216#define gethostbyname_r innocuous_gethostbyname_r
23217
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023218/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023219 which can conflict with char gethostbyname_r (); below.
23220 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023221 <limits.h> exists even on freestanding compilers. */
23222
23223#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023224# include <limits.h>
23225#else
23226# include <assert.h>
23227#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023228
23229#undef gethostbyname_r
23230
Martin v. Löwiseba40652007-08-30 20:10:57 +000023231/* Override any GCC internal prototype to avoid an error.
23232 Use char because int might match the return type of a GCC
23233 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023234#ifdef __cplusplus
23235extern "C"
23236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023237char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023238/* The GNU C library defines this for functions which it implements
23239 to always fail with ENOSYS. Some functions are actually named
23240 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023241#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023242choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023243#endif
23244
Skip Montanaro6dead952003-09-25 14:50:04 +000023245int
23246main ()
23247{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023248return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023249 ;
23250 return 0;
23251}
23252_ACEOF
23253rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023254if { (ac_try="$ac_link"
23255case "(($ac_try" in
23256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23257 *) ac_try_echo=$ac_try;;
23258esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023260 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023262 grep -v '^ *+' conftest.er1 >conftest.err
23263 rm -f conftest.er1
23264 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023266 (exit $ac_status); } && {
23267 test -z "$ac_c_werror_flag" ||
23268 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023269 } && test -s conftest$ac_exeext &&
23270 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023271 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023274sed 's/^/| /' conftest.$ac_ext >&5
23275
Martin v. Löwiseba40652007-08-30 20:10:57 +000023276 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023278
23279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023280 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023281fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023282{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23283echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23284if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023285
Martin v. Löwis11437992002-04-12 09:54:03 +000023286 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023287#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023288_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023289
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023290 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23291echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023292 OLD_CFLAGS=$CFLAGS
23293 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023295/* confdefs.h. */
23296_ACEOF
23297cat confdefs.h >>conftest.$ac_ext
23298cat >>conftest.$ac_ext <<_ACEOF
23299/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023300
23301# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023302
Martin v. Löwis11437992002-04-12 09:54:03 +000023303int
23304main ()
23305{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023306
23307 char *name;
23308 struct hostent *he, *res;
23309 char buffer[2048];
23310 int buflen = 2048;
23311 int h_errnop;
23312
23313 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023314
23315 ;
23316 return 0;
23317}
23318_ACEOF
23319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023320if { (ac_try="$ac_compile"
23321case "(($ac_try" in
23322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23323 *) ac_try_echo=$ac_try;;
23324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023328 grep -v '^ *+' conftest.er1 >conftest.err
23329 rm -f conftest.er1
23330 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023332 (exit $ac_status); } && {
23333 test -z "$ac_c_werror_flag" ||
23334 test ! -s conftest.err
23335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023336
23337 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023338#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023339_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023340
Martin v. Löwis11437992002-04-12 09:54:03 +000023341
23342cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023343#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023344_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023345
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023346 { echo "$as_me:$LINENO: result: yes" >&5
23347echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023348
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023349else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023351sed 's/^/| /' conftest.$ac_ext >&5
23352
Martin v. Löwis11437992002-04-12 09:54:03 +000023353
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023354 { echo "$as_me:$LINENO: result: no" >&5
23355echo "${ECHO_T}no" >&6; }
23356 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23357echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023359/* confdefs.h. */
23360_ACEOF
23361cat confdefs.h >>conftest.$ac_ext
23362cat >>conftest.$ac_ext <<_ACEOF
23363/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023364
23365# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023366
Martin v. Löwis11437992002-04-12 09:54:03 +000023367int
23368main ()
23369{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023370
23371 char *name;
23372 struct hostent *he;
23373 char buffer[2048];
23374 int buflen = 2048;
23375 int h_errnop;
23376
23377 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023378
23379 ;
23380 return 0;
23381}
23382_ACEOF
23383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023384if { (ac_try="$ac_compile"
23385case "(($ac_try" in
23386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23387 *) ac_try_echo=$ac_try;;
23388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023392 grep -v '^ *+' conftest.er1 >conftest.err
23393 rm -f conftest.er1
23394 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023396 (exit $ac_status); } && {
23397 test -z "$ac_c_werror_flag" ||
23398 test ! -s conftest.err
23399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023400
23401 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023402#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023403_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023404
Martin v. Löwis11437992002-04-12 09:54:03 +000023405
23406cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023407#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023408_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023409
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023410 { echo "$as_me:$LINENO: result: yes" >&5
23411echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023412
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023413else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023415sed 's/^/| /' conftest.$ac_ext >&5
23416
Martin v. Löwis11437992002-04-12 09:54:03 +000023417
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023418 { echo "$as_me:$LINENO: result: no" >&5
23419echo "${ECHO_T}no" >&6; }
23420 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23421echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023423/* confdefs.h. */
23424_ACEOF
23425cat confdefs.h >>conftest.$ac_ext
23426cat >>conftest.$ac_ext <<_ACEOF
23427/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023428
23429# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023430
Martin v. Löwis11437992002-04-12 09:54:03 +000023431int
23432main ()
23433{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023434
23435 char *name;
23436 struct hostent *he;
23437 struct hostent_data data;
23438
23439 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023440
23441 ;
23442 return 0;
23443}
23444_ACEOF
23445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023446if { (ac_try="$ac_compile"
23447case "(($ac_try" in
23448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23449 *) ac_try_echo=$ac_try;;
23450esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023454 grep -v '^ *+' conftest.er1 >conftest.err
23455 rm -f conftest.er1
23456 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023458 (exit $ac_status); } && {
23459 test -z "$ac_c_werror_flag" ||
23460 test ! -s conftest.err
23461 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023462
23463 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023464#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023465_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023466
Martin v. Löwis11437992002-04-12 09:54:03 +000023467
23468cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023469#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023470_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023471
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023472 { echo "$as_me:$LINENO: result: yes" >&5
23473echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023474
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023475else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023477sed 's/^/| /' conftest.$ac_ext >&5
23478
Martin v. Löwis11437992002-04-12 09:54:03 +000023479
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023480 { echo "$as_me:$LINENO: result: no" >&5
23481echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023482
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023484
23485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023486
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023488
23489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023490
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023492
23493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023494 CFLAGS=$OLD_CFLAGS
23495
23496else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023497
Martin v. Löwis11437992002-04-12 09:54:03 +000023498
23499for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023500do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023501as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23502{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23503echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023504if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023506else
Martin v. Löwis11437992002-04-12 09:54:03 +000023507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023508/* confdefs.h. */
23509_ACEOF
23510cat confdefs.h >>conftest.$ac_ext
23511cat >>conftest.$ac_ext <<_ACEOF
23512/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023513/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23514 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23515#define $ac_func innocuous_$ac_func
23516
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023517/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023518 which can conflict with char $ac_func (); below.
23519 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023520 <limits.h> exists even on freestanding compilers. */
23521
23522#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023523# include <limits.h>
23524#else
23525# include <assert.h>
23526#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023527
23528#undef $ac_func
23529
Martin v. Löwiseba40652007-08-30 20:10:57 +000023530/* Override any GCC internal prototype to avoid an error.
23531 Use char because int might match the return type of a GCC
23532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023533#ifdef __cplusplus
23534extern "C"
23535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023536char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023537/* The GNU C library defines this for functions which it implements
23538 to always fail with ENOSYS. Some functions are actually named
23539 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023540#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023541choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023542#endif
23543
Skip Montanaro6dead952003-09-25 14:50:04 +000023544int
23545main ()
23546{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023547return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023548 ;
23549 return 0;
23550}
23551_ACEOF
23552rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023553if { (ac_try="$ac_link"
23554case "(($ac_try" in
23555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23556 *) ac_try_echo=$ac_try;;
23557esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023559 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023561 grep -v '^ *+' conftest.er1 >conftest.err
23562 rm -f conftest.er1
23563 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023565 (exit $ac_status); } && {
23566 test -z "$ac_c_werror_flag" ||
23567 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023568 } && test -s conftest$ac_exeext &&
23569 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023570 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023571else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023573sed 's/^/| /' conftest.$ac_ext >&5
23574
Martin v. Löwiseba40652007-08-30 20:10:57 +000023575 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023577
23578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023579 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023580fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023581ac_res=`eval echo '${'$as_ac_var'}'`
23582 { echo "$as_me:$LINENO: result: $ac_res" >&5
23583echo "${ECHO_T}$ac_res" >&6; }
23584if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023585 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023586#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023587_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023589fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023590done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023591
Michael W. Hudson54241132001-12-07 15:38:26 +000023592
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023593fi
23594
Michael W. Hudson54241132001-12-07 15:38:26 +000023595
23596
23597
23598
23599
23600
Guido van Rossum627b2d71993-12-24 10:39:16 +000023601# checks for system services
23602# (none yet)
23603
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023604# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023605{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23606echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023607if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023608 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023609else
Martin v. Löwis11437992002-04-12 09:54:03 +000023610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023611/* confdefs.h. */
23612_ACEOF
23613cat confdefs.h >>conftest.$ac_ext
23614cat >>conftest.$ac_ext <<_ACEOF
23615/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023616/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23617 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23618#define __fpu_control innocuous___fpu_control
23619
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023620/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023621 which can conflict with char __fpu_control (); below.
23622 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023623 <limits.h> exists even on freestanding compilers. */
23624
23625#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023626# include <limits.h>
23627#else
23628# include <assert.h>
23629#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023630
23631#undef __fpu_control
23632
Martin v. Löwiseba40652007-08-30 20:10:57 +000023633/* Override any GCC internal prototype to avoid an error.
23634 Use char because int might match the return type of a GCC
23635 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023636#ifdef __cplusplus
23637extern "C"
23638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023639char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023640/* The GNU C library defines this for functions which it implements
23641 to always fail with ENOSYS. Some functions are actually named
23642 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023643#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023644choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023645#endif
23646
Skip Montanaro6dead952003-09-25 14:50:04 +000023647int
23648main ()
23649{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023650return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023651 ;
23652 return 0;
23653}
23654_ACEOF
23655rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023656if { (ac_try="$ac_link"
23657case "(($ac_try" in
23658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23659 *) ac_try_echo=$ac_try;;
23660esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023662 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023664 grep -v '^ *+' conftest.er1 >conftest.err
23665 rm -f conftest.er1
23666 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023668 (exit $ac_status); } && {
23669 test -z "$ac_c_werror_flag" ||
23670 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023671 } && test -s conftest$ac_exeext &&
23672 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023673 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023674else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023676sed 's/^/| /' conftest.$ac_ext >&5
23677
Martin v. Löwiseba40652007-08-30 20:10:57 +000023678 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023680
23681rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023682 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023683fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023684{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23685echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23686if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023687 :
23688else
Martin v. Löwis11437992002-04-12 09:54:03 +000023689
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023690{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23691echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023692if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023694else
Martin v. Löwis11437992002-04-12 09:54:03 +000023695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023696LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023697cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023698/* confdefs.h. */
23699_ACEOF
23700cat confdefs.h >>conftest.$ac_ext
23701cat >>conftest.$ac_ext <<_ACEOF
23702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023703
Martin v. Löwiseba40652007-08-30 20:10:57 +000023704/* Override any GCC internal prototype to avoid an error.
23705 Use char because int might match the return type of a GCC
23706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023707#ifdef __cplusplus
23708extern "C"
23709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023710char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023711int
23712main ()
23713{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023714return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023715 ;
23716 return 0;
23717}
23718_ACEOF
23719rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023720if { (ac_try="$ac_link"
23721case "(($ac_try" in
23722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23723 *) ac_try_echo=$ac_try;;
23724esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023726 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023728 grep -v '^ *+' conftest.er1 >conftest.err
23729 rm -f conftest.er1
23730 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023732 (exit $ac_status); } && {
23733 test -z "$ac_c_werror_flag" ||
23734 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023735 } && test -s conftest$ac_exeext &&
23736 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023737 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023740sed 's/^/| /' conftest.$ac_ext >&5
23741
Martin v. Löwiseba40652007-08-30 20:10:57 +000023742 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023744
23745rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023746 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023747LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023748fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023749{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23750echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23751if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023752 cat >>confdefs.h <<_ACEOF
23753#define HAVE_LIBIEEE 1
23754_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023755
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023756 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023757
Guido van Rossum627b2d71993-12-24 10:39:16 +000023758fi
23759
Michael W. Hudson54241132001-12-07 15:38:26 +000023760
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023761fi
23762
Michael W. Hudson54241132001-12-07 15:38:26 +000023763
Guido van Rossum7f253911997-05-09 02:42:48 +000023764# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023765{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23766echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023767
Martin v. Löwiseba40652007-08-30 20:10:57 +000023768# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023769if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023770 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023771if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023772then
23773
23774cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023775#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023776_ACEOF
23777
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023778 { echo "$as_me:$LINENO: result: yes" >&5
23779echo "${ECHO_T}yes" >&6; }
23780else { echo "$as_me:$LINENO: result: no" >&5
23781echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023782fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023783else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023784 { echo "$as_me:$LINENO: result: no" >&5
23785echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023786fi
23787
Guido van Rossum7f253911997-05-09 02:42:48 +000023788
Guido van Rossum7f43da71994-08-01 12:15:30 +000023789# check for --with-libm=...
23790
Guido van Rossum563e7081996-09-10 18:20:48 +000023791case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023792Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023793BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023794*) LIBM=-lm
23795esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023796{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23797echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023798
Martin v. Löwiseba40652007-08-30 20:10:57 +000023799# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023800if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023801 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023802if test "$withval" = no
23803then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023804 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23805echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023806elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023807then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023808 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23809echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23810else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23811echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023812 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023813fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023814else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023815 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23816echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023817fi
23818
Guido van Rossum7f43da71994-08-01 12:15:30 +000023819
23820# check for --with-libc=...
23821
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023822{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23823echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023824
Martin v. Löwiseba40652007-08-30 20:10:57 +000023825# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023826if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023827 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023828if test "$withval" = no
23829then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023830 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23831echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023832elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023833then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023834 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23835echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23836else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23837echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023838 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023839fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023841 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23842echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023843fi
23844
Guido van Rossum7f43da71994-08-01 12:15:30 +000023845
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023846# **************************************************
23847# * Check for various properties of floating point *
23848# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023849
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023850{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23851echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23852if test "${ac_cv_little_endian_double+set}" = set; then
23853 echo $ECHO_N "(cached) $ECHO_C" >&6
23854else
23855
23856if test "$cross_compiling" = yes; then
23857 ac_cv_little_endian_double=no
23858else
23859 cat >conftest.$ac_ext <<_ACEOF
23860/* confdefs.h. */
23861_ACEOF
23862cat confdefs.h >>conftest.$ac_ext
23863cat >>conftest.$ac_ext <<_ACEOF
23864/* end confdefs.h. */
23865
23866#include <string.h>
23867int main() {
23868 double x = 9006104071832581.0;
23869 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23870 return 0;
23871 else
23872 return 1;
23873}
23874
23875_ACEOF
23876rm -f conftest$ac_exeext
23877if { (ac_try="$ac_link"
23878case "(($ac_try" in
23879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23880 *) ac_try_echo=$ac_try;;
23881esac
23882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23883 (eval "$ac_link") 2>&5
23884 ac_status=$?
23885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23887 { (case "(($ac_try" in
23888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23889 *) ac_try_echo=$ac_try;;
23890esac
23891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23892 (eval "$ac_try") 2>&5
23893 ac_status=$?
23894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23895 (exit $ac_status); }; }; then
23896 ac_cv_little_endian_double=yes
23897else
23898 echo "$as_me: program exited with status $ac_status" >&5
23899echo "$as_me: failed program was:" >&5
23900sed 's/^/| /' conftest.$ac_ext >&5
23901
23902( exit $ac_status )
23903ac_cv_little_endian_double=no
23904fi
23905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23906fi
23907
23908
23909fi
23910
23911{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23912echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23913if test "$ac_cv_little_endian_double" = yes
23914then
23915
23916cat >>confdefs.h <<\_ACEOF
23917#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23918_ACEOF
23919
23920fi
23921
23922{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23923echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23924if test "${ac_cv_big_endian_double+set}" = set; then
23925 echo $ECHO_N "(cached) $ECHO_C" >&6
23926else
23927
23928if test "$cross_compiling" = yes; then
23929 ac_cv_big_endian_double=no
23930else
23931 cat >conftest.$ac_ext <<_ACEOF
23932/* confdefs.h. */
23933_ACEOF
23934cat confdefs.h >>conftest.$ac_ext
23935cat >>conftest.$ac_ext <<_ACEOF
23936/* end confdefs.h. */
23937
23938#include <string.h>
23939int main() {
23940 double x = 9006104071832581.0;
23941 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23942 return 0;
23943 else
23944 return 1;
23945}
23946
23947_ACEOF
23948rm -f conftest$ac_exeext
23949if { (ac_try="$ac_link"
23950case "(($ac_try" in
23951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23952 *) ac_try_echo=$ac_try;;
23953esac
23954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23955 (eval "$ac_link") 2>&5
23956 ac_status=$?
23957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23958 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23959 { (case "(($ac_try" in
23960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23961 *) ac_try_echo=$ac_try;;
23962esac
23963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23964 (eval "$ac_try") 2>&5
23965 ac_status=$?
23966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23967 (exit $ac_status); }; }; then
23968 ac_cv_big_endian_double=yes
23969else
23970 echo "$as_me: program exited with status $ac_status" >&5
23971echo "$as_me: failed program was:" >&5
23972sed 's/^/| /' conftest.$ac_ext >&5
23973
23974( exit $ac_status )
23975ac_cv_big_endian_double=no
23976fi
23977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23978fi
23979
23980
23981fi
23982
23983{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23984echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23985if test "$ac_cv_big_endian_double" = yes
23986then
23987
23988cat >>confdefs.h <<\_ACEOF
23989#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23990_ACEOF
23991
23992fi
23993
23994# Some ARM platforms use a mixed-endian representation for doubles.
23995# While Python doesn't currently have full support for these platforms
23996# (see e.g., issue 1762561), we can at least make sure that float <-> string
23997# conversions work.
23998{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23999echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
24000if test "${ac_cv_mixed_endian_double+set}" = set; then
24001 echo $ECHO_N "(cached) $ECHO_C" >&6
24002else
24003
24004if test "$cross_compiling" = yes; then
24005 ac_cv_mixed_endian_double=no
24006else
24007 cat >conftest.$ac_ext <<_ACEOF
24008/* confdefs.h. */
24009_ACEOF
24010cat confdefs.h >>conftest.$ac_ext
24011cat >>conftest.$ac_ext <<_ACEOF
24012/* end confdefs.h. */
24013
24014#include <string.h>
24015int main() {
24016 double x = 9006104071832581.0;
24017 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
24018 return 0;
24019 else
24020 return 1;
24021}
24022
24023_ACEOF
24024rm -f conftest$ac_exeext
24025if { (ac_try="$ac_link"
24026case "(($ac_try" in
24027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24028 *) ac_try_echo=$ac_try;;
24029esac
24030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24031 (eval "$ac_link") 2>&5
24032 ac_status=$?
24033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24034 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24035 { (case "(($ac_try" in
24036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24037 *) ac_try_echo=$ac_try;;
24038esac
24039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24040 (eval "$ac_try") 2>&5
24041 ac_status=$?
24042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24043 (exit $ac_status); }; }; then
24044 ac_cv_mixed_endian_double=yes
24045else
24046 echo "$as_me: program exited with status $ac_status" >&5
24047echo "$as_me: failed program was:" >&5
24048sed 's/^/| /' conftest.$ac_ext >&5
24049
24050( exit $ac_status )
24051ac_cv_mixed_endian_double=no
24052fi
24053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24054fi
24055
24056
24057fi
24058
24059{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
24060echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
24061if test "$ac_cv_mixed_endian_double" = yes
24062then
24063
24064cat >>confdefs.h <<\_ACEOF
24065#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
24066_ACEOF
24067
24068fi
24069
24070# The short float repr introduced in Python 3.1 requires the
24071# correctly-rounded string <-> double conversion functions from
24072# Python/dtoa.c, which in turn require that the FPU uses 53-bit
24073# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000024074# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024075# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000024076
24077# This inline assembler syntax may also work for suncc and icc,
24078# so we try it on all platforms.
24079
24080{ 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 +000024081echo $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 +000024082cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024083/* confdefs.h. */
24084_ACEOF
24085cat confdefs.h >>conftest.$ac_ext
24086cat >>conftest.$ac_ext <<_ACEOF
24087/* end confdefs.h. */
24088
24089int
24090main ()
24091{
24092
Mark Dickinsona548dee2009-11-15 13:12:43 +000024093 unsigned short cw;
24094 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24095 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024096
24097 ;
24098 return 0;
24099}
24100_ACEOF
24101rm -f conftest.$ac_objext
24102if { (ac_try="$ac_compile"
24103case "(($ac_try" in
24104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24105 *) ac_try_echo=$ac_try;;
24106esac
24107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24108 (eval "$ac_compile") 2>conftest.er1
24109 ac_status=$?
24110 grep -v '^ *+' conftest.er1 >conftest.err
24111 rm -f conftest.er1
24112 cat conftest.err >&5
24113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24114 (exit $ac_status); } && {
24115 test -z "$ac_c_werror_flag" ||
24116 test ! -s conftest.err
24117 } && test -s conftest.$ac_objext; then
24118 have_gcc_asm_for_x87=yes
24119else
24120 echo "$as_me: failed program was:" >&5
24121sed 's/^/| /' conftest.$ac_ext >&5
24122
24123 have_gcc_asm_for_x87=no
24124fi
24125
24126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024127{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024128echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024129if test "$have_gcc_asm_for_x87" = yes
24130then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024131
24132cat >>confdefs.h <<\_ACEOF
24133#define HAVE_GCC_ASM_FOR_X87 1
24134_ACEOF
24135
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024136fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024137
Mark Dickinson04b27232009-01-04 12:29:36 +000024138# Detect whether system arithmetic is subject to x87-style double
24139# rounding issues. The result of this test has little meaning on non
24140# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24141# mode is round-to-nearest and double rounding issues are present, and
24142# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024143{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24144echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024145# $BASECFLAGS may affect the result
24146ac_save_cc="$CC"
24147CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024148if test "$cross_compiling" = yes; then
24149 ac_cv_x87_double_rounding=no
24150else
24151 cat >conftest.$ac_ext <<_ACEOF
24152/* confdefs.h. */
24153_ACEOF
24154cat confdefs.h >>conftest.$ac_ext
24155cat >>conftest.$ac_ext <<_ACEOF
24156/* end confdefs.h. */
24157
24158#include <stdlib.h>
24159#include <math.h>
24160int main() {
24161 volatile double x, y, z;
24162 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24163 x = 0.99999999999999989; /* 1-2**-53 */
24164 y = 1./x;
24165 if (y != 1.)
24166 exit(0);
24167 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24168 x = 1e16;
24169 y = 2.99999;
24170 z = x + y;
24171 if (z != 1e16+4.)
24172 exit(0);
24173 /* both tests show evidence of double rounding */
24174 exit(1);
24175}
24176
24177_ACEOF
24178rm -f conftest$ac_exeext
24179if { (ac_try="$ac_link"
24180case "(($ac_try" in
24181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24182 *) ac_try_echo=$ac_try;;
24183esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024185 (eval "$ac_link") 2>&5
24186 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024188 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24189 { (case "(($ac_try" in
24190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24191 *) ac_try_echo=$ac_try;;
24192esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024194 (eval "$ac_try") 2>&5
24195 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024197 (exit $ac_status); }; }; then
24198 ac_cv_x87_double_rounding=no
24199else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024200 echo "$as_me: program exited with status $ac_status" >&5
24201echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024202sed 's/^/| /' conftest.$ac_ext >&5
24203
24204( exit $ac_status )
24205ac_cv_x87_double_rounding=yes
24206fi
24207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24208fi
24209
24210
Mark Dickinson99abd142009-10-24 13:44:16 +000024211CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024212{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24213echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024214if test "$ac_cv_x87_double_rounding" = yes
24215then
24216
24217cat >>confdefs.h <<\_ACEOF
24218#define X87_DOUBLE_ROUNDING 1
24219_ACEOF
24220
24221fi
24222
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024223# ************************************
24224# * Check for mathematical functions *
24225# ************************************
24226
24227LIBS_SAVE=$LIBS
24228LIBS="$LIBS $LIBM"
24229
Mark Dickinson265d7382008-04-21 22:32:24 +000024230# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24231# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024232{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24233echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024234if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024235 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024236else
24237
24238if test "$cross_compiling" = yes; then
24239 ac_cv_tanh_preserves_zero_sign=no
24240else
24241 cat >conftest.$ac_ext <<_ACEOF
24242/* confdefs.h. */
24243_ACEOF
24244cat confdefs.h >>conftest.$ac_ext
24245cat >>conftest.$ac_ext <<_ACEOF
24246/* end confdefs.h. */
24247
24248#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024249#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024250int main() {
24251 /* return 0 if either negative zeros don't exist
24252 on this platform or if negative zeros exist
24253 and tanh(-0.) == -0. */
24254 if (atan2(0., -1.) == atan2(-0., -1.) ||
24255 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24256 else exit(1);
24257}
24258
24259_ACEOF
24260rm -f conftest$ac_exeext
24261if { (ac_try="$ac_link"
24262case "(($ac_try" in
24263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24264 *) ac_try_echo=$ac_try;;
24265esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024267 (eval "$ac_link") 2>&5
24268 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024270 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24271 { (case "(($ac_try" in
24272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24273 *) ac_try_echo=$ac_try;;
24274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024276 (eval "$ac_try") 2>&5
24277 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024279 (exit $ac_status); }; }; then
24280 ac_cv_tanh_preserves_zero_sign=yes
24281else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024282 echo "$as_me: program exited with status $ac_status" >&5
24283echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024284sed 's/^/| /' conftest.$ac_ext >&5
24285
24286( exit $ac_status )
24287ac_cv_tanh_preserves_zero_sign=no
24288fi
24289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24290fi
24291
24292
24293fi
24294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024295{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24296echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024297if test "$ac_cv_tanh_preserves_zero_sign" = yes
24298then
24299
24300cat >>confdefs.h <<\_ACEOF
24301#define TANH_PRESERVES_ZERO_SIGN 1
24302_ACEOF
24303
24304fi
24305
Martin v. Löwis11437992002-04-12 09:54:03 +000024306
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024307
Michael W. Hudson54241132001-12-07 15:38:26 +000024308
Christian Heimes0a8143f2007-12-18 23:22:54 +000024309
24310
24311
24312
24313
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024314
Mark Dickinson65898e02009-09-05 10:27:00 +000024315for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24316do
24317as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24318{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24319echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24320if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24321 echo $ECHO_N "(cached) $ECHO_C" >&6
24322else
24323 cat >conftest.$ac_ext <<_ACEOF
24324/* confdefs.h. */
24325_ACEOF
24326cat confdefs.h >>conftest.$ac_ext
24327cat >>conftest.$ac_ext <<_ACEOF
24328/* end confdefs.h. */
24329/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24330 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24331#define $ac_func innocuous_$ac_func
24332
24333/* System header to define __stub macros and hopefully few prototypes,
24334 which can conflict with char $ac_func (); below.
24335 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24336 <limits.h> exists even on freestanding compilers. */
24337
24338#ifdef __STDC__
24339# include <limits.h>
24340#else
24341# include <assert.h>
24342#endif
24343
24344#undef $ac_func
24345
24346/* Override any GCC internal prototype to avoid an error.
24347 Use char because int might match the return type of a GCC
24348 builtin and then its argument prototype would still apply. */
24349#ifdef __cplusplus
24350extern "C"
24351#endif
24352char $ac_func ();
24353/* The GNU C library defines this for functions which it implements
24354 to always fail with ENOSYS. Some functions are actually named
24355 something starting with __ and the normal name is an alias. */
24356#if defined __stub_$ac_func || defined __stub___$ac_func
24357choke me
24358#endif
24359
24360int
24361main ()
24362{
24363return $ac_func ();
24364 ;
24365 return 0;
24366}
24367_ACEOF
24368rm -f conftest.$ac_objext conftest$ac_exeext
24369if { (ac_try="$ac_link"
24370case "(($ac_try" in
24371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24372 *) ac_try_echo=$ac_try;;
24373esac
24374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24375 (eval "$ac_link") 2>conftest.er1
24376 ac_status=$?
24377 grep -v '^ *+' conftest.er1 >conftest.err
24378 rm -f conftest.er1
24379 cat conftest.err >&5
24380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24381 (exit $ac_status); } && {
24382 test -z "$ac_c_werror_flag" ||
24383 test ! -s conftest.err
24384 } && test -s conftest$ac_exeext &&
24385 $as_test_x conftest$ac_exeext; then
24386 eval "$as_ac_var=yes"
24387else
24388 echo "$as_me: failed program was:" >&5
24389sed 's/^/| /' conftest.$ac_ext >&5
24390
24391 eval "$as_ac_var=no"
24392fi
24393
24394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24395 conftest$ac_exeext conftest.$ac_ext
24396fi
24397ac_res=`eval echo '${'$as_ac_var'}'`
24398 { echo "$as_me:$LINENO: result: $ac_res" >&5
24399echo "${ECHO_T}$ac_res" >&6; }
24400if test `eval echo '${'$as_ac_var'}'` = yes; then
24401 cat >>confdefs.h <<_ACEOF
24402#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24403_ACEOF
24404
24405fi
24406done
24407
24408
24409
24410
24411
24412
24413for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024414do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024415as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24416{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24417echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024418if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024419 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024420else
24421 cat >conftest.$ac_ext <<_ACEOF
24422/* confdefs.h. */
24423_ACEOF
24424cat confdefs.h >>conftest.$ac_ext
24425cat >>conftest.$ac_ext <<_ACEOF
24426/* end confdefs.h. */
24427/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24428 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24429#define $ac_func innocuous_$ac_func
24430
24431/* System header to define __stub macros and hopefully few prototypes,
24432 which can conflict with char $ac_func (); below.
24433 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24434 <limits.h> exists even on freestanding compilers. */
24435
24436#ifdef __STDC__
24437# include <limits.h>
24438#else
24439# include <assert.h>
24440#endif
24441
24442#undef $ac_func
24443
24444/* Override any GCC internal prototype to avoid an error.
24445 Use char because int might match the return type of a GCC
24446 builtin and then its argument prototype would still apply. */
24447#ifdef __cplusplus
24448extern "C"
24449#endif
24450char $ac_func ();
24451/* The GNU C library defines this for functions which it implements
24452 to always fail with ENOSYS. Some functions are actually named
24453 something starting with __ and the normal name is an alias. */
24454#if defined __stub_$ac_func || defined __stub___$ac_func
24455choke me
24456#endif
24457
24458int
24459main ()
24460{
24461return $ac_func ();
24462 ;
24463 return 0;
24464}
24465_ACEOF
24466rm -f conftest.$ac_objext conftest$ac_exeext
24467if { (ac_try="$ac_link"
24468case "(($ac_try" in
24469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24470 *) ac_try_echo=$ac_try;;
24471esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024473 (eval "$ac_link") 2>conftest.er1
24474 ac_status=$?
24475 grep -v '^ *+' conftest.er1 >conftest.err
24476 rm -f conftest.er1
24477 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024479 (exit $ac_status); } && {
24480 test -z "$ac_c_werror_flag" ||
24481 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024482 } && test -s conftest$ac_exeext &&
24483 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024484 eval "$as_ac_var=yes"
24485else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024486 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024487sed 's/^/| /' conftest.$ac_ext >&5
24488
24489 eval "$as_ac_var=no"
24490fi
24491
24492rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24493 conftest$ac_exeext conftest.$ac_ext
24494fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024495ac_res=`eval echo '${'$as_ac_var'}'`
24496 { echo "$as_me:$LINENO: result: $ac_res" >&5
24497echo "${ECHO_T}$ac_res" >&6; }
24498if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024499 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024500#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024501_ACEOF
24502
24503fi
24504done
24505
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024506{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24507echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024508if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024509 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024510else
24511 cat >conftest.$ac_ext <<_ACEOF
24512/* confdefs.h. */
24513_ACEOF
24514cat confdefs.h >>conftest.$ac_ext
24515cat >>conftest.$ac_ext <<_ACEOF
24516/* end confdefs.h. */
24517#include <math.h>
24518
24519int
24520main ()
24521{
24522#ifndef isinf
24523 (void) isinf;
24524#endif
24525
24526 ;
24527 return 0;
24528}
24529_ACEOF
24530rm -f conftest.$ac_objext
24531if { (ac_try="$ac_compile"
24532case "(($ac_try" in
24533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24534 *) ac_try_echo=$ac_try;;
24535esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024537 (eval "$ac_compile") 2>conftest.er1
24538 ac_status=$?
24539 grep -v '^ *+' conftest.er1 >conftest.err
24540 rm -f conftest.er1
24541 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024543 (exit $ac_status); } && {
24544 test -z "$ac_c_werror_flag" ||
24545 test ! -s conftest.err
24546 } && test -s conftest.$ac_objext; then
24547 ac_cv_have_decl_isinf=yes
24548else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024549 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024550sed 's/^/| /' conftest.$ac_ext >&5
24551
24552 ac_cv_have_decl_isinf=no
24553fi
24554
24555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024557{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24558echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24559if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024560
24561cat >>confdefs.h <<_ACEOF
24562#define HAVE_DECL_ISINF 1
24563_ACEOF
24564
24565
24566else
24567 cat >>confdefs.h <<_ACEOF
24568#define HAVE_DECL_ISINF 0
24569_ACEOF
24570
24571
24572fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024573{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24574echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024575if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024576 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024577else
24578 cat >conftest.$ac_ext <<_ACEOF
24579/* confdefs.h. */
24580_ACEOF
24581cat confdefs.h >>conftest.$ac_ext
24582cat >>conftest.$ac_ext <<_ACEOF
24583/* end confdefs.h. */
24584#include <math.h>
24585
24586int
24587main ()
24588{
24589#ifndef isnan
24590 (void) isnan;
24591#endif
24592
24593 ;
24594 return 0;
24595}
24596_ACEOF
24597rm -f conftest.$ac_objext
24598if { (ac_try="$ac_compile"
24599case "(($ac_try" in
24600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24601 *) ac_try_echo=$ac_try;;
24602esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024604 (eval "$ac_compile") 2>conftest.er1
24605 ac_status=$?
24606 grep -v '^ *+' conftest.er1 >conftest.err
24607 rm -f conftest.er1
24608 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024610 (exit $ac_status); } && {
24611 test -z "$ac_c_werror_flag" ||
24612 test ! -s conftest.err
24613 } && test -s conftest.$ac_objext; then
24614 ac_cv_have_decl_isnan=yes
24615else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024616 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024617sed 's/^/| /' conftest.$ac_ext >&5
24618
24619 ac_cv_have_decl_isnan=no
24620fi
24621
24622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24623fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024624{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24625echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24626if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024627
24628cat >>confdefs.h <<_ACEOF
24629#define HAVE_DECL_ISNAN 1
24630_ACEOF
24631
24632
24633else
24634 cat >>confdefs.h <<_ACEOF
24635#define HAVE_DECL_ISNAN 0
24636_ACEOF
24637
24638
24639fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024640{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24641echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024642if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024643 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024644else
24645 cat >conftest.$ac_ext <<_ACEOF
24646/* confdefs.h. */
24647_ACEOF
24648cat confdefs.h >>conftest.$ac_ext
24649cat >>conftest.$ac_ext <<_ACEOF
24650/* end confdefs.h. */
24651#include <math.h>
24652
24653int
24654main ()
24655{
24656#ifndef isfinite
24657 (void) isfinite;
24658#endif
24659
24660 ;
24661 return 0;
24662}
24663_ACEOF
24664rm -f conftest.$ac_objext
24665if { (ac_try="$ac_compile"
24666case "(($ac_try" in
24667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24668 *) ac_try_echo=$ac_try;;
24669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024671 (eval "$ac_compile") 2>conftest.er1
24672 ac_status=$?
24673 grep -v '^ *+' conftest.er1 >conftest.err
24674 rm -f conftest.er1
24675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024677 (exit $ac_status); } && {
24678 test -z "$ac_c_werror_flag" ||
24679 test ! -s conftest.err
24680 } && test -s conftest.$ac_objext; then
24681 ac_cv_have_decl_isfinite=yes
24682else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024683 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024684sed 's/^/| /' conftest.$ac_ext >&5
24685
24686 ac_cv_have_decl_isfinite=no
24687fi
24688
24689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24690fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024691{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24692echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24693if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024694
24695cat >>confdefs.h <<_ACEOF
24696#define HAVE_DECL_ISFINITE 1
24697_ACEOF
24698
24699
24700else
24701 cat >>confdefs.h <<_ACEOF
24702#define HAVE_DECL_ISFINITE 0
24703_ACEOF
24704
24705
24706fi
24707
24708
Christian Heimes0a8143f2007-12-18 23:22:54 +000024709
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024710LIBS=$LIBS_SAVE
24711
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024712# For multiprocessing module, check that sem_open
24713# actually works. For FreeBSD versions <= 7.2,
24714# the kernel module that provides POSIX semaphores
24715# isn't loaded by default, so an attempt to call
24716# sem_open results in a 'Signal 12' error.
24717{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24718echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24719if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24720 echo $ECHO_N "(cached) $ECHO_C" >&6
24721else
24722 if test "$cross_compiling" = yes; then
24723 ac_cv_posix_semaphores_enabled=yes
24724else
24725 cat >conftest.$ac_ext <<_ACEOF
24726/* confdefs.h. */
24727_ACEOF
24728cat confdefs.h >>conftest.$ac_ext
24729cat >>conftest.$ac_ext <<_ACEOF
24730/* end confdefs.h. */
24731
24732#include <unistd.h>
24733#include <fcntl.h>
24734#include <stdio.h>
24735#include <semaphore.h>
24736#include <sys/stat.h>
24737
24738int main(void) {
24739 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24740 if (a == SEM_FAILED) {
24741 perror("sem_open");
24742 return 1;
24743 }
24744 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024745 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024746 return 0;
24747}
24748
24749_ACEOF
24750rm -f conftest$ac_exeext
24751if { (ac_try="$ac_link"
24752case "(($ac_try" in
24753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24754 *) ac_try_echo=$ac_try;;
24755esac
24756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24757 (eval "$ac_link") 2>&5
24758 ac_status=$?
24759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24760 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24761 { (case "(($ac_try" in
24762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24763 *) ac_try_echo=$ac_try;;
24764esac
24765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24766 (eval "$ac_try") 2>&5
24767 ac_status=$?
24768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24769 (exit $ac_status); }; }; then
24770 ac_cv_posix_semaphores_enabled=yes
24771else
24772 echo "$as_me: program exited with status $ac_status" >&5
24773echo "$as_me: failed program was:" >&5
24774sed 's/^/| /' conftest.$ac_ext >&5
24775
24776( exit $ac_status )
24777ac_cv_posix_semaphores_enabled=no
24778fi
24779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24780fi
24781
24782
24783
24784fi
24785
24786{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24787echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24788if test $ac_cv_posix_semaphores_enabled = no
24789then
24790
24791cat >>confdefs.h <<\_ACEOF
24792#define POSIX_SEMAPHORES_NOT_ENABLED 1
24793_ACEOF
24794
24795fi
24796
24797# Multiprocessing check for broken sem_getvalue
24798{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24799echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24800if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24801 echo $ECHO_N "(cached) $ECHO_C" >&6
24802else
24803 if test "$cross_compiling" = yes; then
24804 ac_cv_broken_sem_getvalue=yes
24805else
24806 cat >conftest.$ac_ext <<_ACEOF
24807/* confdefs.h. */
24808_ACEOF
24809cat confdefs.h >>conftest.$ac_ext
24810cat >>conftest.$ac_ext <<_ACEOF
24811/* end confdefs.h. */
24812
24813#include <unistd.h>
24814#include <fcntl.h>
24815#include <stdio.h>
24816#include <semaphore.h>
24817#include <sys/stat.h>
24818
24819int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024820 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024821 int count;
24822 int res;
24823 if(a==SEM_FAILED){
24824 perror("sem_open");
24825 return 1;
24826
24827 }
24828 res = sem_getvalue(a, &count);
24829 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024830 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024831 return res==-1 ? 1 : 0;
24832}
24833
24834_ACEOF
24835rm -f conftest$ac_exeext
24836if { (ac_try="$ac_link"
24837case "(($ac_try" in
24838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24839 *) ac_try_echo=$ac_try;;
24840esac
24841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24842 (eval "$ac_link") 2>&5
24843 ac_status=$?
24844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24845 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24846 { (case "(($ac_try" in
24847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24848 *) ac_try_echo=$ac_try;;
24849esac
24850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24851 (eval "$ac_try") 2>&5
24852 ac_status=$?
24853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24854 (exit $ac_status); }; }; then
24855 ac_cv_broken_sem_getvalue=no
24856else
24857 echo "$as_me: program exited with status $ac_status" >&5
24858echo "$as_me: failed program was:" >&5
24859sed 's/^/| /' conftest.$ac_ext >&5
24860
24861( exit $ac_status )
24862ac_cv_broken_sem_getvalue=yes
24863fi
24864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24865fi
24866
24867
24868
24869fi
24870
24871{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24872echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24873if test $ac_cv_broken_sem_getvalue = yes
24874then
24875
24876cat >>confdefs.h <<\_ACEOF
24877#define HAVE_BROKEN_SEM_GETVALUE 1
24878_ACEOF
24879
24880fi
24881
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024882# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024883{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24884echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024885# Check whether --enable-big-digits was given.
24886if test "${enable_big_digits+set}" = set; then
24887 enableval=$enable_big_digits; case $enable_big_digits in
24888yes)
24889 enable_big_digits=30 ;;
24890no)
24891 enable_big_digits=15 ;;
2489215|30)
24893 ;;
24894*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024895 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24896echo "$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 +000024897 { (exit 1); exit 1; }; } ;;
24898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024899{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24900echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024901
24902cat >>confdefs.h <<_ACEOF
24903#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24904_ACEOF
24905
24906
24907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024908 { echo "$as_me:$LINENO: result: no value specified" >&5
24909echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024910fi
24911
24912
Guido van Rossumef2255b2000-03-10 22:30:29 +000024913# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024914if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024915 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24916echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024917if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024918 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024919fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024920{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24921echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024922else
Martin v. Löwis11437992002-04-12 09:54:03 +000024923 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024924{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24925echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024926cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024927/* confdefs.h. */
24928_ACEOF
24929cat confdefs.h >>conftest.$ac_ext
24930cat >>conftest.$ac_ext <<_ACEOF
24931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024932$ac_includes_default
24933#include <wchar.h>
24934_ACEOF
24935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024936if { (ac_try="$ac_compile"
24937case "(($ac_try" in
24938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24939 *) ac_try_echo=$ac_try;;
24940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024944 grep -v '^ *+' conftest.er1 >conftest.err
24945 rm -f conftest.er1
24946 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024948 (exit $ac_status); } && {
24949 test -z "$ac_c_werror_flag" ||
24950 test ! -s conftest.err
24951 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024952 ac_header_compiler=yes
24953else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024955sed 's/^/| /' conftest.$ac_ext >&5
24956
Martin v. Löwiseba40652007-08-30 20:10:57 +000024957 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024959
24960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024961{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24962echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024963
24964# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024965{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24966echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024968/* confdefs.h. */
24969_ACEOF
24970cat confdefs.h >>conftest.$ac_ext
24971cat >>conftest.$ac_ext <<_ACEOF
24972/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024973#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024974_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024975if { (ac_try="$ac_cpp conftest.$ac_ext"
24976case "(($ac_try" in
24977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24978 *) ac_try_echo=$ac_try;;
24979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024981 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024982 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024983 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024984 rm -f conftest.er1
24985 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024987 (exit $ac_status); } >/dev/null && {
24988 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24989 test ! -s conftest.err
24990 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024991 ac_header_preproc=yes
24992else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024994sed 's/^/| /' conftest.$ac_ext >&5
24995
Martin v. Löwis11437992002-04-12 09:54:03 +000024996 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024998
Martin v. Löwis11437992002-04-12 09:54:03 +000024999rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025000{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25001echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025002
25003# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025004case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25005 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025006 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
25007echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
25008 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
25009echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000025010 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025011 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000025012 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025013 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
25014echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
25015 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
25016echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
25017 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
25018echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
25019 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
25020echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
25021 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
25022echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
25023 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
25024echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000025025 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000025026## -------------------------------------- ##
25027## Report this to http://bugs.python.org/ ##
25028## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000025029_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000025030 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000025031 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025032esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025033{ echo "$as_me:$LINENO: checking for wchar.h" >&5
25034echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025035if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025036 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025037else
25038 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000025039fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025040{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
25041echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025042
25043fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025044if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025045
25046
25047cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000025048#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025049_ACEOF
25050
Martin v. Löwisc45929e2002-04-06 10:10:49 +000025051 wchar_h="yes"
25052
Guido van Rossumef2255b2000-03-10 22:30:29 +000025053else
Martin v. Löwis11437992002-04-12 09:54:03 +000025054 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000025055
25056fi
25057
Michael W. Hudson54241132001-12-07 15:38:26 +000025058
Martin v. Löwis11437992002-04-12 09:54:03 +000025059
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025060# determine wchar_t size
25061if test "$wchar_h" = yes
25062then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025063 { echo "$as_me:$LINENO: checking for wchar_t" >&5
25064echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
25065if test "${ac_cv_type_wchar_t+set}" = set; then
25066 echo $ECHO_N "(cached) $ECHO_C" >&6
25067else
25068 cat >conftest.$ac_ext <<_ACEOF
25069/* confdefs.h. */
25070_ACEOF
25071cat confdefs.h >>conftest.$ac_ext
25072cat >>conftest.$ac_ext <<_ACEOF
25073/* end confdefs.h. */
25074#include <wchar.h>
25075
25076typedef wchar_t ac__type_new_;
25077int
25078main ()
25079{
25080if ((ac__type_new_ *) 0)
25081 return 0;
25082if (sizeof (ac__type_new_))
25083 return 0;
25084 ;
25085 return 0;
25086}
25087_ACEOF
25088rm -f conftest.$ac_objext
25089if { (ac_try="$ac_compile"
25090case "(($ac_try" in
25091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25092 *) ac_try_echo=$ac_try;;
25093esac
25094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25095 (eval "$ac_compile") 2>conftest.er1
25096 ac_status=$?
25097 grep -v '^ *+' conftest.er1 >conftest.err
25098 rm -f conftest.er1
25099 cat conftest.err >&5
25100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25101 (exit $ac_status); } && {
25102 test -z "$ac_c_werror_flag" ||
25103 test ! -s conftest.err
25104 } && test -s conftest.$ac_objext; then
25105 ac_cv_type_wchar_t=yes
25106else
25107 echo "$as_me: failed program was:" >&5
25108sed 's/^/| /' conftest.$ac_ext >&5
25109
25110 ac_cv_type_wchar_t=no
25111fi
25112
25113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25114fi
25115{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25116echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25117
25118# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025119# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25120# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25121# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025122{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25123echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025124if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025125 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025126else
Martin v. Löwis11437992002-04-12 09:54:03 +000025127 if test "$cross_compiling" = yes; then
25128 # Depending upon the size, compute the lo and hi bounds.
25129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025130/* confdefs.h. */
25131_ACEOF
25132cat confdefs.h >>conftest.$ac_ext
25133cat >>conftest.$ac_ext <<_ACEOF
25134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025135#include <wchar.h>
25136
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025137 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025138int
25139main ()
25140{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025141static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025142test_array [0] = 0
25143
25144 ;
25145 return 0;
25146}
25147_ACEOF
25148rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025149if { (ac_try="$ac_compile"
25150case "(($ac_try" in
25151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25152 *) ac_try_echo=$ac_try;;
25153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025155 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025157 grep -v '^ *+' conftest.er1 >conftest.err
25158 rm -f conftest.er1
25159 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025161 (exit $ac_status); } && {
25162 test -z "$ac_c_werror_flag" ||
25163 test ! -s conftest.err
25164 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025165 ac_lo=0 ac_mid=0
25166 while :; do
25167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025168/* confdefs.h. */
25169_ACEOF
25170cat confdefs.h >>conftest.$ac_ext
25171cat >>conftest.$ac_ext <<_ACEOF
25172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025173#include <wchar.h>
25174
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025175 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025176int
25177main ()
25178{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025179static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025180test_array [0] = 0
25181
25182 ;
25183 return 0;
25184}
25185_ACEOF
25186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025187if { (ac_try="$ac_compile"
25188case "(($ac_try" in
25189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25190 *) ac_try_echo=$ac_try;;
25191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025195 grep -v '^ *+' conftest.er1 >conftest.err
25196 rm -f conftest.er1
25197 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025199 (exit $ac_status); } && {
25200 test -z "$ac_c_werror_flag" ||
25201 test ! -s conftest.err
25202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025203 ac_hi=$ac_mid; break
25204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025206sed 's/^/| /' conftest.$ac_ext >&5
25207
Martin v. Löwiseba40652007-08-30 20:10:57 +000025208 ac_lo=`expr $ac_mid + 1`
25209 if test $ac_lo -le $ac_mid; then
25210 ac_lo= ac_hi=
25211 break
25212 fi
25213 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025215
25216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025217 done
25218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025220sed 's/^/| /' conftest.$ac_ext >&5
25221
Martin v. Löwiseba40652007-08-30 20:10:57 +000025222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025223/* confdefs.h. */
25224_ACEOF
25225cat confdefs.h >>conftest.$ac_ext
25226cat >>conftest.$ac_ext <<_ACEOF
25227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025228#include <wchar.h>
25229
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025230 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025231int
25232main ()
25233{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025234static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025235test_array [0] = 0
25236
25237 ;
25238 return 0;
25239}
25240_ACEOF
25241rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025242if { (ac_try="$ac_compile"
25243case "(($ac_try" in
25244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25245 *) ac_try_echo=$ac_try;;
25246esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025250 grep -v '^ *+' conftest.er1 >conftest.err
25251 rm -f conftest.er1
25252 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025254 (exit $ac_status); } && {
25255 test -z "$ac_c_werror_flag" ||
25256 test ! -s conftest.err
25257 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025258 ac_hi=-1 ac_mid=-1
25259 while :; do
25260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025261/* confdefs.h. */
25262_ACEOF
25263cat confdefs.h >>conftest.$ac_ext
25264cat >>conftest.$ac_ext <<_ACEOF
25265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025266#include <wchar.h>
25267
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025268 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025269int
25270main ()
25271{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025272static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025273test_array [0] = 0
25274
25275 ;
25276 return 0;
25277}
25278_ACEOF
25279rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025280if { (ac_try="$ac_compile"
25281case "(($ac_try" in
25282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25283 *) ac_try_echo=$ac_try;;
25284esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025288 grep -v '^ *+' conftest.er1 >conftest.err
25289 rm -f conftest.er1
25290 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025292 (exit $ac_status); } && {
25293 test -z "$ac_c_werror_flag" ||
25294 test ! -s conftest.err
25295 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025296 ac_lo=$ac_mid; break
25297else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025299sed 's/^/| /' conftest.$ac_ext >&5
25300
Martin v. Löwiseba40652007-08-30 20:10:57 +000025301 ac_hi=`expr '(' $ac_mid ')' - 1`
25302 if test $ac_mid -le $ac_hi; then
25303 ac_lo= ac_hi=
25304 break
25305 fi
25306 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025308
25309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025310 done
25311else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025313sed 's/^/| /' conftest.$ac_ext >&5
25314
Martin v. Löwiseba40652007-08-30 20:10:57 +000025315 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025317
25318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025320
25321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025322# Binary search between lo and hi bounds.
25323while test "x$ac_lo" != "x$ac_hi"; do
25324 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25325 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025326/* confdefs.h. */
25327_ACEOF
25328cat confdefs.h >>conftest.$ac_ext
25329cat >>conftest.$ac_ext <<_ACEOF
25330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025331#include <wchar.h>
25332
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025333 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025334int
25335main ()
25336{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025338test_array [0] = 0
25339
25340 ;
25341 return 0;
25342}
25343_ACEOF
25344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025345if { (ac_try="$ac_compile"
25346case "(($ac_try" in
25347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25348 *) ac_try_echo=$ac_try;;
25349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025353 grep -v '^ *+' conftest.er1 >conftest.err
25354 rm -f conftest.er1
25355 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025357 (exit $ac_status); } && {
25358 test -z "$ac_c_werror_flag" ||
25359 test ! -s conftest.err
25360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025361 ac_hi=$ac_mid
25362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025364sed 's/^/| /' conftest.$ac_ext >&5
25365
Martin v. Löwiseba40652007-08-30 20:10:57 +000025366 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025368
25369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025370done
25371case $ac_lo in
25372?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025373'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025374 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025375See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025376echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025377See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025378 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025379 else
25380 ac_cv_sizeof_wchar_t=0
25381 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025382esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025383else
Martin v. Löwis11437992002-04-12 09:54:03 +000025384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025385/* confdefs.h. */
25386_ACEOF
25387cat confdefs.h >>conftest.$ac_ext
25388cat >>conftest.$ac_ext <<_ACEOF
25389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025390#include <wchar.h>
25391
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025392 typedef wchar_t ac__type_sizeof_;
25393static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25394static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025395#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025396#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025397int
25398main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025399{
Martin v. Löwis11437992002-04-12 09:54:03 +000025400
25401 FILE *f = fopen ("conftest.val", "w");
25402 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025403 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025404 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025405 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025406 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025407 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025408 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025409 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025410 }
25411 else
25412 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025413 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025414 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025415 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025416 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025417 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025418 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025419
25420 ;
25421 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025422}
Martin v. Löwis11437992002-04-12 09:54:03 +000025423_ACEOF
25424rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025425if { (ac_try="$ac_link"
25426case "(($ac_try" in
25427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25428 *) ac_try_echo=$ac_try;;
25429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025431 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025432 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025435 { (case "(($ac_try" in
25436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25437 *) ac_try_echo=$ac_try;;
25438esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025440 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025441 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025443 (exit $ac_status); }; }; then
25444 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025445else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025446 echo "$as_me: program exited with status $ac_status" >&5
25447echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025448sed 's/^/| /' conftest.$ac_ext >&5
25449
Martin v. Löwis11437992002-04-12 09:54:03 +000025450( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025451if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025453See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025454echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025455See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025456 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025457 else
25458 ac_cv_sizeof_wchar_t=0
25459 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025461rm -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 +000025462fi
25463rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025464fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025465{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25466echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025467
25468
25469
Martin v. Löwis11437992002-04-12 09:54:03 +000025470cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025471#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025472_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025473
Michael W. Hudson54241132001-12-07 15:38:26 +000025474
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025475fi
25476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025477{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25478echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025479have_ucs4_tcl=no
25480cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025481/* confdefs.h. */
25482_ACEOF
25483cat confdefs.h >>conftest.$ac_ext
25484cat >>conftest.$ac_ext <<_ACEOF
25485/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025486
25487#include <tcl.h>
25488#if TCL_UTF_MAX != 6
25489# error "NOT UCS4_TCL"
25490#endif
25491int
25492main ()
25493{
25494
25495 ;
25496 return 0;
25497}
25498_ACEOF
25499rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025500if { (ac_try="$ac_compile"
25501case "(($ac_try" in
25502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25503 *) ac_try_echo=$ac_try;;
25504esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025508 grep -v '^ *+' conftest.er1 >conftest.err
25509 rm -f conftest.er1
25510 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025512 (exit $ac_status); } && {
25513 test -z "$ac_c_werror_flag" ||
25514 test ! -s conftest.err
25515 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025516
25517
25518cat >>confdefs.h <<\_ACEOF
25519#define HAVE_UCS4_TCL 1
25520_ACEOF
25521
25522 have_ucs4_tcl=yes
25523
25524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025526sed 's/^/| /' conftest.$ac_ext >&5
25527
Martin v. Löwiseba40652007-08-30 20:10:57 +000025528
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025530
25531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025532{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25533echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025534
Skip Montanaro6dead952003-09-25 14:50:04 +000025535# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025536if test "$wchar_h" = yes
25537then
25538 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025539 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25540echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025541 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025542 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025543else
25544
25545 if test "$cross_compiling" = yes; then
25546 ac_cv_wchar_t_signed=yes
25547else
25548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025549/* confdefs.h. */
25550_ACEOF
25551cat confdefs.h >>conftest.$ac_ext
25552cat >>conftest.$ac_ext <<_ACEOF
25553/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025554
25555 #include <wchar.h>
25556 int main()
25557 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025558 /* Success: exit code 0 */
25559 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025560 }
25561
25562_ACEOF
25563rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025564if { (ac_try="$ac_link"
25565case "(($ac_try" in
25566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25567 *) ac_try_echo=$ac_try;;
25568esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025570 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025571 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025574 { (case "(($ac_try" in
25575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25576 *) ac_try_echo=$ac_try;;
25577esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025579 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025580 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025582 (exit $ac_status); }; }; then
25583 ac_cv_wchar_t_signed=yes
25584else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025585 echo "$as_me: program exited with status $ac_status" >&5
25586echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025587sed 's/^/| /' conftest.$ac_ext >&5
25588
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025589( exit $ac_status )
25590ac_cv_wchar_t_signed=no
25591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025592rm -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 +000025593fi
25594
Martin v. Löwiseba40652007-08-30 20:10:57 +000025595
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025596fi
25597
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025598 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25599echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025600fi
25601
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025602{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25603echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025604# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025605if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025606 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025607else
25608 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025609fi
25610
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025611
25612if test $enable_unicode = yes
25613then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025614 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025615 case "$have_ucs4_tcl" in
25616 yes) enable_unicode="ucs4"
25617 ;;
25618 *) enable_unicode="ucs2"
25619 ;;
25620 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025621fi
25622
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025623
25624
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025625case "$enable_unicode" in
25626ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025627 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025628#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025629_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025630
25631 ;;
25632ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025633 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025634#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025635_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025636
25637 ;;
Benjamin Peterson8b650542010-02-27 00:11:42 +000025638*) { { echo "$as_me:$LINENO: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&5
25639echo "$as_me: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&2;}
25640 { (exit 1); exit 1; }; } ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025641esac
25642
Michael W. Hudson54241132001-12-07 15:38:26 +000025643
Martin v. Löwis11437992002-04-12 09:54:03 +000025644
25645
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025646
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025647if test "$enable_unicode" = "no"
25648then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025649 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025650 { echo "$as_me:$LINENO: result: not used" >&5
25651echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025652else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025653 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025654
25655cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025656#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025657_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025658
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025659
25660 # wchar_t is only usable if it maps to an unsigned type
25661 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025662 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025663 then
25664 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025665
Martin v. Löwis11437992002-04-12 09:54:03 +000025666cat >>confdefs.h <<\_ACEOF
25667#define HAVE_USABLE_WCHAR_T 1
25668_ACEOF
25669
25670 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025671#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025672_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025673
25674 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25675 then
25676 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025677 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025678#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025679_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025680
25681 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25682 then
25683 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025684 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025685#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025686_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025687
25688 else
25689 PY_UNICODE_TYPE="no type found"
25690 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025691 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25692echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025693fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025694
25695# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025696{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25697echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025698if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025699 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025700else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025701 # See if sys/param.h defines the BYTE_ORDER macro.
25702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025703/* confdefs.h. */
25704_ACEOF
25705cat confdefs.h >>conftest.$ac_ext
25706cat >>conftest.$ac_ext <<_ACEOF
25707/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025708#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025709#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025710
Martin v. Löwis11437992002-04-12 09:54:03 +000025711int
25712main ()
25713{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025714#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25715 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25716 bogus endian macros
25717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025718
25719 ;
25720 return 0;
25721}
25722_ACEOF
25723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025724if { (ac_try="$ac_compile"
25725case "(($ac_try" in
25726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25727 *) ac_try_echo=$ac_try;;
25728esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025732 grep -v '^ *+' conftest.er1 >conftest.err
25733 rm -f conftest.er1
25734 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025736 (exit $ac_status); } && {
25737 test -z "$ac_c_werror_flag" ||
25738 test ! -s conftest.err
25739 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025740 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025742/* confdefs.h. */
25743_ACEOF
25744cat confdefs.h >>conftest.$ac_ext
25745cat >>conftest.$ac_ext <<_ACEOF
25746/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025747#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025748#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025749
Martin v. Löwis11437992002-04-12 09:54:03 +000025750int
25751main ()
25752{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025753#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025754 not big endian
25755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025756
25757 ;
25758 return 0;
25759}
25760_ACEOF
25761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025762if { (ac_try="$ac_compile"
25763case "(($ac_try" in
25764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25765 *) ac_try_echo=$ac_try;;
25766esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025770 grep -v '^ *+' conftest.er1 >conftest.err
25771 rm -f conftest.er1
25772 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025774 (exit $ac_status); } && {
25775 test -z "$ac_c_werror_flag" ||
25776 test ! -s conftest.err
25777 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025778 ac_cv_c_bigendian=yes
25779else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025781sed 's/^/| /' conftest.$ac_ext >&5
25782
Martin v. Löwiseba40652007-08-30 20:10:57 +000025783 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025785
25786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025787else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025789sed 's/^/| /' conftest.$ac_ext >&5
25790
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025791 # It does not; compile a test program.
25792if test "$cross_compiling" = yes; then
25793 # try to guess the endianness by grepping values into an object file
25794 ac_cv_c_bigendian=unknown
25795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025796/* confdefs.h. */
25797_ACEOF
25798cat confdefs.h >>conftest.$ac_ext
25799cat >>conftest.$ac_ext <<_ACEOF
25800/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025801short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25802short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25803void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25804short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25805short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25806void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025807int
25808main ()
25809{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025810 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025811 ;
25812 return 0;
25813}
25814_ACEOF
25815rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025816if { (ac_try="$ac_compile"
25817case "(($ac_try" in
25818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25819 *) ac_try_echo=$ac_try;;
25820esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025824 grep -v '^ *+' conftest.er1 >conftest.err
25825 rm -f conftest.er1
25826 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025828 (exit $ac_status); } && {
25829 test -z "$ac_c_werror_flag" ||
25830 test ! -s conftest.err
25831 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025832 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025833 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025834fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025835if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25836 if test "$ac_cv_c_bigendian" = unknown; then
25837 ac_cv_c_bigendian=no
25838 else
25839 # finding both strings is unlikely to happen, but who knows?
25840 ac_cv_c_bigendian=unknown
25841 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025842fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025843else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025845sed 's/^/| /' conftest.$ac_ext >&5
25846
Martin v. Löwiseba40652007-08-30 20:10:57 +000025847
Martin v. Löwis11437992002-04-12 09:54:03 +000025848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025849
25850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025851else
25852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025853/* confdefs.h. */
25854_ACEOF
25855cat confdefs.h >>conftest.$ac_ext
25856cat >>conftest.$ac_ext <<_ACEOF
25857/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025858$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025859int
25860main ()
25861{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025863 /* Are we little or big endian? From Harbison&Steele. */
25864 union
25865 {
25866 long int l;
25867 char c[sizeof (long int)];
25868 } u;
25869 u.l = 1;
25870 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025871
25872 ;
25873 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025874}
Martin v. Löwis11437992002-04-12 09:54:03 +000025875_ACEOF
25876rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025877if { (ac_try="$ac_link"
25878case "(($ac_try" in
25879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25880 *) ac_try_echo=$ac_try;;
25881esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025883 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025884 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025887 { (case "(($ac_try" in
25888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25889 *) ac_try_echo=$ac_try;;
25890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025892 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025893 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025895 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025896 ac_cv_c_bigendian=no
25897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025898 echo "$as_me: program exited with status $ac_status" >&5
25899echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025900sed 's/^/| /' conftest.$ac_ext >&5
25901
Martin v. Löwis11437992002-04-12 09:54:03 +000025902( exit $ac_status )
25903ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025905rm -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 +000025906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025907
25908
Martin v. Löwis11437992002-04-12 09:54:03 +000025909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025910
25911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25912fi
25913{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25914echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25915case $ac_cv_c_bigendian in
25916 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025917
25918cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025919#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025920_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025921 ;;
25922 no)
25923 ;;
25924 *)
25925 { { echo "$as_me:$LINENO: error: unknown endianness
25926presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25927echo "$as_me: error: unknown endianness
25928presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025929 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025930esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025931
Michael W. Hudson54241132001-12-07 15:38:26 +000025932
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025933# Check whether right shifting a negative integer extends the sign bit
25934# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025935{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25936echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025937if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025938 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025939else
Martin v. Löwis11437992002-04-12 09:54:03 +000025940
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025941if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025942 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025943else
Martin v. Löwis11437992002-04-12 09:54:03 +000025944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025945/* confdefs.h. */
25946_ACEOF
25947cat confdefs.h >>conftest.$ac_ext
25948cat >>conftest.$ac_ext <<_ACEOF
25949/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025950
25951int main()
25952{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025953 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025954}
25955
Martin v. Löwis11437992002-04-12 09:54:03 +000025956_ACEOF
25957rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025958if { (ac_try="$ac_link"
25959case "(($ac_try" in
25960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25961 *) ac_try_echo=$ac_try;;
25962esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025964 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025965 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025967 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025968 { (case "(($ac_try" in
25969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25970 *) ac_try_echo=$ac_try;;
25971esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025973 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025974 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025976 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025977 ac_cv_rshift_extends_sign=yes
25978else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025979 echo "$as_me: program exited with status $ac_status" >&5
25980echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025981sed 's/^/| /' conftest.$ac_ext >&5
25982
Martin v. Löwis11437992002-04-12 09:54:03 +000025983( exit $ac_status )
25984ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025986rm -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 +000025987fi
25988
Martin v. Löwiseba40652007-08-30 20:10:57 +000025989
25990fi
25991
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025992{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25993echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025994if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025995then
Martin v. Löwis11437992002-04-12 09:54:03 +000025996
25997cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025998#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025999_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026000
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026001fi
26002
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026003# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026004{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
26005echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026006if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026007 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026008else
Martin v. Löwis11437992002-04-12 09:54:03 +000026009
26010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026011/* confdefs.h. */
26012_ACEOF
26013cat confdefs.h >>conftest.$ac_ext
26014cat >>conftest.$ac_ext <<_ACEOF
26015/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026016#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026017int
26018main ()
26019{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026020
26021 FILE *f = fopen("/dev/null", "r");
26022 flockfile(f);
26023 getc_unlocked(f);
26024 funlockfile(f);
26025
Martin v. Löwis11437992002-04-12 09:54:03 +000026026 ;
26027 return 0;
26028}
26029_ACEOF
26030rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026031if { (ac_try="$ac_link"
26032case "(($ac_try" in
26033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26034 *) ac_try_echo=$ac_try;;
26035esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026037 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026039 grep -v '^ *+' conftest.er1 >conftest.err
26040 rm -f conftest.er1
26041 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026043 (exit $ac_status); } && {
26044 test -z "$ac_c_werror_flag" ||
26045 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026046 } && test -s conftest$ac_exeext &&
26047 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026048 ac_cv_have_getc_unlocked=yes
26049else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026051sed 's/^/| /' conftest.$ac_ext >&5
26052
Martin v. Löwiseba40652007-08-30 20:10:57 +000026053 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026055
26056rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026057 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026058fi
26059
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026060{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
26061echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026062if test "$ac_cv_have_getc_unlocked" = yes
26063then
Martin v. Löwis11437992002-04-12 09:54:03 +000026064
26065cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026066#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026067_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026068
26069fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026070
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026071# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000026072# save the value of LIBS so we don't actually link Python with readline
26073LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026074
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026075# On some systems we need to link readline to a termcap compatible
26076# library. NOTE: Keep the precedence of listed libraries synchronised
26077# with setup.py.
26078py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026079{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
26080echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026081for py_libtermcap in "" ncursesw ncurses curses termcap; do
26082 if test -z "$py_libtermcap"; then
26083 READLINE_LIBS="-lreadline"
26084 else
26085 READLINE_LIBS="-lreadline -l$py_libtermcap"
26086 fi
26087 LIBS="$READLINE_LIBS $LIBS_no_readline"
26088 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026089/* confdefs.h. */
26090_ACEOF
26091cat confdefs.h >>conftest.$ac_ext
26092cat >>conftest.$ac_ext <<_ACEOF
26093/* end confdefs.h. */
26094
Martin v. Löwiseba40652007-08-30 20:10:57 +000026095/* Override any GCC internal prototype to avoid an error.
26096 Use char because int might match the return type of a GCC
26097 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026098#ifdef __cplusplus
26099extern "C"
26100#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026101char readline ();
26102int
26103main ()
26104{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026105return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026106 ;
26107 return 0;
26108}
26109_ACEOF
26110rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026111if { (ac_try="$ac_link"
26112case "(($ac_try" in
26113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26114 *) ac_try_echo=$ac_try;;
26115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026117 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026118 ac_status=$?
26119 grep -v '^ *+' conftest.er1 >conftest.err
26120 rm -f conftest.er1
26121 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026123 (exit $ac_status); } && {
26124 test -z "$ac_c_werror_flag" ||
26125 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026126 } && test -s conftest$ac_exeext &&
26127 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026128 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026130 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026131sed 's/^/| /' conftest.$ac_ext >&5
26132
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026133
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026135
26136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026137 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026138 if test $py_cv_lib_readline = yes; then
26139 break
26140 fi
26141done
26142# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26143#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026144if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026145 { echo "$as_me:$LINENO: result: none" >&5
26146echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026147else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026148 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26149echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026150
26151cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026152#define HAVE_LIBREADLINE 1
26153_ACEOF
26154
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026155fi
26156
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026157# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026158{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26159echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026160if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026161 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026162else
26163 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026164LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026165cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026166/* confdefs.h. */
26167_ACEOF
26168cat confdefs.h >>conftest.$ac_ext
26169cat >>conftest.$ac_ext <<_ACEOF
26170/* end confdefs.h. */
26171
Martin v. Löwiseba40652007-08-30 20:10:57 +000026172/* Override any GCC internal prototype to avoid an error.
26173 Use char because int might match the return type of a GCC
26174 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026175#ifdef __cplusplus
26176extern "C"
26177#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026178char rl_callback_handler_install ();
26179int
26180main ()
26181{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026182return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026183 ;
26184 return 0;
26185}
26186_ACEOF
26187rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026188if { (ac_try="$ac_link"
26189case "(($ac_try" in
26190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26191 *) ac_try_echo=$ac_try;;
26192esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026194 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026196 grep -v '^ *+' conftest.er1 >conftest.err
26197 rm -f conftest.er1
26198 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026200 (exit $ac_status); } && {
26201 test -z "$ac_c_werror_flag" ||
26202 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026203 } && test -s conftest$ac_exeext &&
26204 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026205 ac_cv_lib_readline_rl_callback_handler_install=yes
26206else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026207 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026208sed 's/^/| /' conftest.$ac_ext >&5
26209
Martin v. Löwiseba40652007-08-30 20:10:57 +000026210 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026212
26213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026214 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026215LIBS=$ac_check_lib_save_LIBS
26216fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026217{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26218echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26219if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026220
26221cat >>confdefs.h <<\_ACEOF
26222#define HAVE_RL_CALLBACK 1
26223_ACEOF
26224
26225fi
26226
26227
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026228# check for readline 2.2
26229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026230/* confdefs.h. */
26231_ACEOF
26232cat confdefs.h >>conftest.$ac_ext
26233cat >>conftest.$ac_ext <<_ACEOF
26234/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026235#include <readline/readline.h>
26236_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026237if { (ac_try="$ac_cpp conftest.$ac_ext"
26238case "(($ac_try" in
26239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26240 *) ac_try_echo=$ac_try;;
26241esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026243 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026244 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026245 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026246 rm -f conftest.er1
26247 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026249 (exit $ac_status); } >/dev/null && {
26250 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26251 test ! -s conftest.err
26252 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026253 have_readline=yes
26254else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026256sed 's/^/| /' conftest.$ac_ext >&5
26257
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026258 have_readline=no
26259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026260
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026261rm -f conftest.err conftest.$ac_ext
26262if test $have_readline = yes
26263then
26264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026265/* confdefs.h. */
26266_ACEOF
26267cat confdefs.h >>conftest.$ac_ext
26268cat >>conftest.$ac_ext <<_ACEOF
26269/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026270#include <readline/readline.h>
26271
26272_ACEOF
26273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026274 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026275
26276cat >>confdefs.h <<\_ACEOF
26277#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26278_ACEOF
26279
26280fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +000026281rm -f -r conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026282
26283 cat >conftest.$ac_ext <<_ACEOF
26284/* confdefs.h. */
26285_ACEOF
26286cat confdefs.h >>conftest.$ac_ext
26287cat >>conftest.$ac_ext <<_ACEOF
26288/* end confdefs.h. */
26289#include <readline/readline.h>
26290
26291_ACEOF
26292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26293 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26294
26295cat >>confdefs.h <<\_ACEOF
26296#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26297_ACEOF
26298
26299fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +000026300rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026301
26302fi
26303
Martin v. Löwis0daad592001-09-30 21:09:59 +000026304# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026305{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26306echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026307if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026308 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026309else
Martin v. Löwis11437992002-04-12 09:54:03 +000026310 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026311LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026312cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026313/* confdefs.h. */
26314_ACEOF
26315cat confdefs.h >>conftest.$ac_ext
26316cat >>conftest.$ac_ext <<_ACEOF
26317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026318
Martin v. Löwiseba40652007-08-30 20:10:57 +000026319/* Override any GCC internal prototype to avoid an error.
26320 Use char because int might match the return type of a GCC
26321 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026322#ifdef __cplusplus
26323extern "C"
26324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026325char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026326int
26327main ()
26328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026329return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026330 ;
26331 return 0;
26332}
26333_ACEOF
26334rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026335if { (ac_try="$ac_link"
26336case "(($ac_try" in
26337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26338 *) ac_try_echo=$ac_try;;
26339esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026341 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026343 grep -v '^ *+' conftest.er1 >conftest.err
26344 rm -f conftest.er1
26345 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026347 (exit $ac_status); } && {
26348 test -z "$ac_c_werror_flag" ||
26349 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026350 } && test -s conftest$ac_exeext &&
26351 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026352 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026353else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026355sed 's/^/| /' conftest.$ac_ext >&5
26356
Martin v. Löwiseba40652007-08-30 20:10:57 +000026357 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026359
26360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026362LIBS=$ac_check_lib_save_LIBS
26363fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026364{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26365echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26366if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026367
Martin v. Löwis11437992002-04-12 09:54:03 +000026368cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026369#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026370_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026371
Martin v. Löwis0daad592001-09-30 21:09:59 +000026372fi
26373
Michael W. Hudson54241132001-12-07 15:38:26 +000026374
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026375# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026376{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26377echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026378if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026379 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026380else
26381 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026382LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026383cat >conftest.$ac_ext <<_ACEOF
26384/* confdefs.h. */
26385_ACEOF
26386cat confdefs.h >>conftest.$ac_ext
26387cat >>conftest.$ac_ext <<_ACEOF
26388/* end confdefs.h. */
26389
26390/* Override any GCC internal prototype to avoid an error.
26391 Use char because int might match the return type of a GCC
26392 builtin and then its argument prototype would still apply. */
26393#ifdef __cplusplus
26394extern "C"
26395#endif
26396char rl_completion_display_matches_hook ();
26397int
26398main ()
26399{
26400return rl_completion_display_matches_hook ();
26401 ;
26402 return 0;
26403}
26404_ACEOF
26405rm -f conftest.$ac_objext conftest$ac_exeext
26406if { (ac_try="$ac_link"
26407case "(($ac_try" in
26408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26409 *) ac_try_echo=$ac_try;;
26410esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026412 (eval "$ac_link") 2>conftest.er1
26413 ac_status=$?
26414 grep -v '^ *+' conftest.er1 >conftest.err
26415 rm -f conftest.er1
26416 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026418 (exit $ac_status); } && {
26419 test -z "$ac_c_werror_flag" ||
26420 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026421 } && test -s conftest$ac_exeext &&
26422 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026423 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26424else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026425 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026426sed 's/^/| /' conftest.$ac_ext >&5
26427
26428 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26429fi
26430
26431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26432 conftest$ac_exeext conftest.$ac_ext
26433LIBS=$ac_check_lib_save_LIBS
26434fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026435{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26436echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26437if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026438
26439cat >>confdefs.h <<\_ACEOF
26440#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26441_ACEOF
26442
26443fi
26444
26445
Martin v. Löwis0daad592001-09-30 21:09:59 +000026446# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026447{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26448echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026449if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026450 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026451else
Martin v. Löwis11437992002-04-12 09:54:03 +000026452 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026453LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026454cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026455/* confdefs.h. */
26456_ACEOF
26457cat confdefs.h >>conftest.$ac_ext
26458cat >>conftest.$ac_ext <<_ACEOF
26459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026460
Martin v. Löwiseba40652007-08-30 20:10:57 +000026461/* Override any GCC internal prototype to avoid an error.
26462 Use char because int might match the return type of a GCC
26463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026464#ifdef __cplusplus
26465extern "C"
26466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026467char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026468int
26469main ()
26470{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026471return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026472 ;
26473 return 0;
26474}
26475_ACEOF
26476rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026477if { (ac_try="$ac_link"
26478case "(($ac_try" in
26479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26480 *) ac_try_echo=$ac_try;;
26481esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026483 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026485 grep -v '^ *+' conftest.er1 >conftest.err
26486 rm -f conftest.er1
26487 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026489 (exit $ac_status); } && {
26490 test -z "$ac_c_werror_flag" ||
26491 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026492 } && test -s conftest$ac_exeext &&
26493 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026494 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026495else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026497sed 's/^/| /' conftest.$ac_ext >&5
26498
Martin v. Löwiseba40652007-08-30 20:10:57 +000026499 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026501
26502rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026503 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026504LIBS=$ac_check_lib_save_LIBS
26505fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026506{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26507echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26508if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026509
Martin v. Löwis11437992002-04-12 09:54:03 +000026510cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026511#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026512_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026513
Guido van Rossum353ae582001-07-10 16:45:32 +000026514fi
26515
Jack Jansendd19cf82001-12-06 22:36:17 +000026516
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026517# also in readline 4.2
26518cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026519/* confdefs.h. */
26520_ACEOF
26521cat confdefs.h >>conftest.$ac_ext
26522cat >>conftest.$ac_ext <<_ACEOF
26523/* end confdefs.h. */
26524#include <readline/readline.h>
26525_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026526if { (ac_try="$ac_cpp conftest.$ac_ext"
26527case "(($ac_try" in
26528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26529 *) ac_try_echo=$ac_try;;
26530esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026532 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026533 ac_status=$?
26534 grep -v '^ *+' conftest.er1 >conftest.err
26535 rm -f conftest.er1
26536 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026538 (exit $ac_status); } >/dev/null && {
26539 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26540 test ! -s conftest.err
26541 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026542 have_readline=yes
26543else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026544 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026545sed 's/^/| /' conftest.$ac_ext >&5
26546
26547 have_readline=no
26548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026549
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026550rm -f conftest.err conftest.$ac_ext
26551if test $have_readline = yes
26552then
26553 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026554/* confdefs.h. */
26555_ACEOF
26556cat confdefs.h >>conftest.$ac_ext
26557cat >>conftest.$ac_ext <<_ACEOF
26558/* end confdefs.h. */
26559#include <readline/readline.h>
26560
26561_ACEOF
26562if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26563 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26564
26565cat >>confdefs.h <<\_ACEOF
26566#define HAVE_RL_CATCH_SIGNAL 1
26567_ACEOF
26568
26569fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +000026570rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026571
26572fi
26573
Martin v. Löwis82bca632006-02-10 20:49:30 +000026574# End of readline checks: restore LIBS
26575LIBS=$LIBS_no_readline
26576
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026577{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26578echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026579if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026580 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026581else
Martin v. Löwis11437992002-04-12 09:54:03 +000026582
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026583if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026584 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026585else
Martin v. Löwis11437992002-04-12 09:54:03 +000026586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026587/* confdefs.h. */
26588_ACEOF
26589cat confdefs.h >>conftest.$ac_ext
26590cat >>conftest.$ac_ext <<_ACEOF
26591/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026592
26593int main()
26594{
26595 int val1 = nice(1);
26596 if (val1 != -1 && val1 == nice(2))
26597 exit(0);
26598 exit(1);
26599}
26600
Martin v. Löwis11437992002-04-12 09:54:03 +000026601_ACEOF
26602rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026603if { (ac_try="$ac_link"
26604case "(($ac_try" in
26605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26606 *) ac_try_echo=$ac_try;;
26607esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026609 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026610 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026613 { (case "(($ac_try" in
26614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26615 *) ac_try_echo=$ac_try;;
26616esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026618 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026619 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026621 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026622 ac_cv_broken_nice=yes
26623else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026624 echo "$as_me: program exited with status $ac_status" >&5
26625echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026626sed 's/^/| /' conftest.$ac_ext >&5
26627
Martin v. Löwis11437992002-04-12 09:54:03 +000026628( exit $ac_status )
26629ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026631rm -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 +000026632fi
26633
Martin v. Löwiseba40652007-08-30 20:10:57 +000026634
26635fi
26636
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026637{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26638echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026639if test "$ac_cv_broken_nice" = yes
26640then
Martin v. Löwis11437992002-04-12 09:54:03 +000026641
26642cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026643#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026644_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026645
26646fi
26647
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026648{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26649echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026650if test "${ac_cv_broken_poll+set}" = set; then
26651 echo $ECHO_N "(cached) $ECHO_C" >&6
26652else
26653 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026654 ac_cv_broken_poll=no
26655else
26656 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026657/* confdefs.h. */
26658_ACEOF
26659cat confdefs.h >>conftest.$ac_ext
26660cat >>conftest.$ac_ext <<_ACEOF
26661/* end confdefs.h. */
26662
26663#include <poll.h>
26664
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026665int main()
26666{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026667 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026668 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026669
26670 close (42);
26671
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026672 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026673 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026674 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026675 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026676 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026677 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026678 return 1;
26679}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026680
26681_ACEOF
26682rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026683if { (ac_try="$ac_link"
26684case "(($ac_try" in
26685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26686 *) ac_try_echo=$ac_try;;
26687esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026689 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026690 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026693 { (case "(($ac_try" in
26694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26695 *) ac_try_echo=$ac_try;;
26696esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026698 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026699 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026701 (exit $ac_status); }; }; then
26702 ac_cv_broken_poll=yes
26703else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026704 echo "$as_me: program exited with status $ac_status" >&5
26705echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026706sed 's/^/| /' conftest.$ac_ext >&5
26707
26708( exit $ac_status )
26709ac_cv_broken_poll=no
26710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026711rm -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 +000026712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026713
26714
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026715fi
26716
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026717{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26718echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026719if test "$ac_cv_broken_poll" = yes
26720then
26721
26722cat >>confdefs.h <<\_ACEOF
26723#define HAVE_BROKEN_POLL 1
26724_ACEOF
26725
26726fi
26727
Brett Cannon43802422005-02-10 20:48:03 +000026728# 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 +000026729# (which is not required by ISO C or UNIX spec) and/or if we support
26730# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026731{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26732echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026733if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026734 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026735else
26736 cat >conftest.$ac_ext <<_ACEOF
26737/* confdefs.h. */
26738_ACEOF
26739cat confdefs.h >>conftest.$ac_ext
26740cat >>conftest.$ac_ext <<_ACEOF
26741/* end confdefs.h. */
26742#include <sys/types.h>
26743#include <$ac_cv_struct_tm>
26744
26745
26746int
26747main ()
26748{
26749static struct tm ac_aggr;
26750if (ac_aggr.tm_zone)
26751return 0;
26752 ;
26753 return 0;
26754}
26755_ACEOF
26756rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026757if { (ac_try="$ac_compile"
26758case "(($ac_try" in
26759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26760 *) ac_try_echo=$ac_try;;
26761esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026763 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026764 ac_status=$?
26765 grep -v '^ *+' conftest.er1 >conftest.err
26766 rm -f conftest.er1
26767 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026769 (exit $ac_status); } && {
26770 test -z "$ac_c_werror_flag" ||
26771 test ! -s conftest.err
26772 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026773 ac_cv_member_struct_tm_tm_zone=yes
26774else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026775 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026776sed 's/^/| /' conftest.$ac_ext >&5
26777
Martin v. Löwiseba40652007-08-30 20:10:57 +000026778 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026779/* confdefs.h. */
26780_ACEOF
26781cat confdefs.h >>conftest.$ac_ext
26782cat >>conftest.$ac_ext <<_ACEOF
26783/* end confdefs.h. */
26784#include <sys/types.h>
26785#include <$ac_cv_struct_tm>
26786
26787
26788int
26789main ()
26790{
26791static struct tm ac_aggr;
26792if (sizeof ac_aggr.tm_zone)
26793return 0;
26794 ;
26795 return 0;
26796}
26797_ACEOF
26798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026799if { (ac_try="$ac_compile"
26800case "(($ac_try" in
26801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26802 *) ac_try_echo=$ac_try;;
26803esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026805 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026806 ac_status=$?
26807 grep -v '^ *+' conftest.er1 >conftest.err
26808 rm -f conftest.er1
26809 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026811 (exit $ac_status); } && {
26812 test -z "$ac_c_werror_flag" ||
26813 test ! -s conftest.err
26814 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026815 ac_cv_member_struct_tm_tm_zone=yes
26816else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026817 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026818sed 's/^/| /' conftest.$ac_ext >&5
26819
Martin v. Löwiseba40652007-08-30 20:10:57 +000026820 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026822
26823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026825
26826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026827fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026828{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26829echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26830if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026831
26832cat >>confdefs.h <<_ACEOF
26833#define HAVE_STRUCT_TM_TM_ZONE 1
26834_ACEOF
26835
26836
26837fi
26838
26839if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26840
26841cat >>confdefs.h <<\_ACEOF
26842#define HAVE_TM_ZONE 1
26843_ACEOF
26844
26845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026846 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26847echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026848if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026849 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026850else
26851 cat >conftest.$ac_ext <<_ACEOF
26852/* confdefs.h. */
26853_ACEOF
26854cat confdefs.h >>conftest.$ac_ext
26855cat >>conftest.$ac_ext <<_ACEOF
26856/* end confdefs.h. */
26857#include <time.h>
26858
26859int
26860main ()
26861{
26862#ifndef tzname
26863 (void) tzname;
26864#endif
26865
26866 ;
26867 return 0;
26868}
26869_ACEOF
26870rm -f conftest.$ac_objext
26871if { (ac_try="$ac_compile"
26872case "(($ac_try" in
26873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26874 *) ac_try_echo=$ac_try;;
26875esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026877 (eval "$ac_compile") 2>conftest.er1
26878 ac_status=$?
26879 grep -v '^ *+' conftest.er1 >conftest.err
26880 rm -f conftest.er1
26881 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026883 (exit $ac_status); } && {
26884 test -z "$ac_c_werror_flag" ||
26885 test ! -s conftest.err
26886 } && test -s conftest.$ac_objext; then
26887 ac_cv_have_decl_tzname=yes
26888else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026889 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026890sed 's/^/| /' conftest.$ac_ext >&5
26891
26892 ac_cv_have_decl_tzname=no
26893fi
26894
26895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26896fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026897{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26898echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26899if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026900
26901cat >>confdefs.h <<_ACEOF
26902#define HAVE_DECL_TZNAME 1
26903_ACEOF
26904
26905
26906else
26907 cat >>confdefs.h <<_ACEOF
26908#define HAVE_DECL_TZNAME 0
26909_ACEOF
26910
26911
26912fi
26913
26914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026915 { echo "$as_me:$LINENO: checking for tzname" >&5
26916echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026917if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026918 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026919else
26920 cat >conftest.$ac_ext <<_ACEOF
26921/* confdefs.h. */
26922_ACEOF
26923cat confdefs.h >>conftest.$ac_ext
26924cat >>conftest.$ac_ext <<_ACEOF
26925/* end confdefs.h. */
26926#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026927#if !HAVE_DECL_TZNAME
26928extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026929#endif
26930
26931int
26932main ()
26933{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026934return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026935 ;
26936 return 0;
26937}
26938_ACEOF
26939rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026940if { (ac_try="$ac_link"
26941case "(($ac_try" in
26942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26943 *) ac_try_echo=$ac_try;;
26944esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026946 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026947 ac_status=$?
26948 grep -v '^ *+' conftest.er1 >conftest.err
26949 rm -f conftest.er1
26950 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026952 (exit $ac_status); } && {
26953 test -z "$ac_c_werror_flag" ||
26954 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026955 } && test -s conftest$ac_exeext &&
26956 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026957 ac_cv_var_tzname=yes
26958else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026959 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026960sed 's/^/| /' conftest.$ac_ext >&5
26961
Martin v. Löwiseba40652007-08-30 20:10:57 +000026962 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026964
26965rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026966 conftest$ac_exeext conftest.$ac_ext
26967fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026968{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26969echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026970 if test $ac_cv_var_tzname = yes; then
26971
26972cat >>confdefs.h <<\_ACEOF
26973#define HAVE_TZNAME 1
26974_ACEOF
26975
26976 fi
26977fi
26978
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026979
Martin v. Löwis1d459062005-03-14 21:23:33 +000026980# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026981{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26982echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026983if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026984 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026985else
26986
26987if test "$cross_compiling" = yes; then
26988 ac_cv_working_tzset=no
26989else
26990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026991/* confdefs.h. */
26992_ACEOF
26993cat confdefs.h >>conftest.$ac_ext
26994cat >>conftest.$ac_ext <<_ACEOF
26995/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026996
26997#include <stdlib.h>
26998#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026999#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000027000
27001#if HAVE_TZNAME
27002extern char *tzname[];
27003#endif
27004
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027005int main()
27006{
Brett Cannon18367812003-09-19 00:59:16 +000027007 /* Note that we need to ensure that not only does tzset(3)
27008 do 'something' with localtime, but it works as documented
27009 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000027010 This includes making sure that tzname is set properly if
27011 tm->tm_zone does not exist since it is the alternative way
27012 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000027013
27014 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000027015 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000027016 */
27017
Martin v. Löwis1d459062005-03-14 21:23:33 +000027018 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000027019 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
27020
Neal Norwitz7f2588c2003-04-11 15:35:53 +000027021 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027022 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000027023 if (localtime(&groundhogday)->tm_hour != 0)
27024 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027025#if HAVE_TZNAME
27026 /* For UTC, tzname[1] is sometimes "", sometimes " " */
27027 if (strcmp(tzname[0], "UTC") ||
27028 (tzname[1][0] != 0 && tzname[1][0] != ' '))
27029 exit(1);
27030#endif
Brett Cannon18367812003-09-19 00:59:16 +000027031
Neal Norwitz7f2588c2003-04-11 15:35:53 +000027032 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027033 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000027034 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027035 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027036#if HAVE_TZNAME
27037 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
27038 exit(1);
27039#endif
Brett Cannon18367812003-09-19 00:59:16 +000027040
27041 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
27042 tzset();
27043 if (localtime(&groundhogday)->tm_hour != 11)
27044 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027045#if HAVE_TZNAME
27046 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
27047 exit(1);
27048#endif
27049
27050#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000027051 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
27052 exit(1);
27053 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
27054 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027055#endif
Brett Cannon18367812003-09-19 00:59:16 +000027056
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027057 exit(0);
27058}
27059
27060_ACEOF
27061rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027062if { (ac_try="$ac_link"
27063case "(($ac_try" in
27064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27065 *) ac_try_echo=$ac_try;;
27066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027068 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027069 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027071 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027072 { (case "(($ac_try" in
27073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27074 *) ac_try_echo=$ac_try;;
27075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027077 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027078 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027080 (exit $ac_status); }; }; then
27081 ac_cv_working_tzset=yes
27082else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027083 echo "$as_me: program exited with status $ac_status" >&5
27084echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027085sed 's/^/| /' conftest.$ac_ext >&5
27086
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027087( exit $ac_status )
27088ac_cv_working_tzset=no
27089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027090rm -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 +000027091fi
27092
Martin v. Löwiseba40652007-08-30 20:10:57 +000027093
27094fi
27095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027096{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27097echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027098if test "$ac_cv_working_tzset" = yes
27099then
27100
27101cat >>confdefs.h <<\_ACEOF
27102#define HAVE_WORKING_TZSET 1
27103_ACEOF
27104
27105fi
27106
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027107# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027108{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27109echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027110if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027111 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027112else
27113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027114/* confdefs.h. */
27115_ACEOF
27116cat confdefs.h >>conftest.$ac_ext
27117cat >>conftest.$ac_ext <<_ACEOF
27118/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027119#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027120int
27121main ()
27122{
27123
27124struct stat st;
27125st.st_mtim.tv_nsec = 1;
27126
27127 ;
27128 return 0;
27129}
27130_ACEOF
27131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027132if { (ac_try="$ac_compile"
27133case "(($ac_try" in
27134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27135 *) ac_try_echo=$ac_try;;
27136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027140 grep -v '^ *+' conftest.er1 >conftest.err
27141 rm -f conftest.er1
27142 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027144 (exit $ac_status); } && {
27145 test -z "$ac_c_werror_flag" ||
27146 test ! -s conftest.err
27147 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027148 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027149else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027151sed 's/^/| /' conftest.$ac_ext >&5
27152
Martin v. Löwiseba40652007-08-30 20:10:57 +000027153 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027154fi
27155
Martin v. Löwiseba40652007-08-30 20:10:57 +000027156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27157fi
27158
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027159{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27160echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027161if test "$ac_cv_stat_tv_nsec" = yes
27162then
27163
27164cat >>confdefs.h <<\_ACEOF
27165#define HAVE_STAT_TV_NSEC 1
27166_ACEOF
27167
27168fi
27169
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027170# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027171{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27172echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027173if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027174 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027175else
27176 cat >conftest.$ac_ext <<_ACEOF
27177/* confdefs.h. */
27178_ACEOF
27179cat confdefs.h >>conftest.$ac_ext
27180cat >>conftest.$ac_ext <<_ACEOF
27181/* end confdefs.h. */
27182#include <sys/stat.h>
27183int
27184main ()
27185{
27186
27187struct stat st;
27188st.st_mtimespec.tv_nsec = 1;
27189
27190 ;
27191 return 0;
27192}
27193_ACEOF
27194rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027195if { (ac_try="$ac_compile"
27196case "(($ac_try" in
27197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27198 *) ac_try_echo=$ac_try;;
27199esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027201 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027202 ac_status=$?
27203 grep -v '^ *+' conftest.er1 >conftest.err
27204 rm -f conftest.er1
27205 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027207 (exit $ac_status); } && {
27208 test -z "$ac_c_werror_flag" ||
27209 test ! -s conftest.err
27210 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027211 ac_cv_stat_tv_nsec2=yes
27212else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027213 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027214sed 's/^/| /' conftest.$ac_ext >&5
27215
Martin v. Löwiseba40652007-08-30 20:10:57 +000027216 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027217fi
27218
Martin v. Löwiseba40652007-08-30 20:10:57 +000027219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27220fi
27221
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027222{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27223echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027224if test "$ac_cv_stat_tv_nsec2" = yes
27225then
27226
27227cat >>confdefs.h <<\_ACEOF
27228#define HAVE_STAT_TV_NSEC2 1
27229_ACEOF
27230
27231fi
27232
Jack Jansen666b1e72001-10-31 12:11:48 +000027233# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027234{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27235echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027236if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027237 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027238else
Martin v. Löwis11437992002-04-12 09:54:03 +000027239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027240/* confdefs.h. */
27241_ACEOF
27242cat confdefs.h >>conftest.$ac_ext
27243cat >>conftest.$ac_ext <<_ACEOF
27244/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027245#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027246int
27247main ()
27248{
Jack Jansen666b1e72001-10-31 12:11:48 +000027249
27250 int rtn;
27251 rtn = mvwdelch(0,0,0);
27252
Martin v. Löwis11437992002-04-12 09:54:03 +000027253 ;
27254 return 0;
27255}
27256_ACEOF
27257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027258if { (ac_try="$ac_compile"
27259case "(($ac_try" in
27260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27261 *) ac_try_echo=$ac_try;;
27262esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027266 grep -v '^ *+' conftest.er1 >conftest.err
27267 rm -f conftest.er1
27268 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027270 (exit $ac_status); } && {
27271 test -z "$ac_c_werror_flag" ||
27272 test ! -s conftest.err
27273 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027274 ac_cv_mvwdelch_is_expression=yes
27275else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027277sed 's/^/| /' conftest.$ac_ext >&5
27278
Martin v. Löwiseba40652007-08-30 20:10:57 +000027279 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027280fi
27281
Martin v. Löwiseba40652007-08-30 20:10:57 +000027282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27283fi
27284
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027285{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27286echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027287
27288if test "$ac_cv_mvwdelch_is_expression" = yes
27289then
Martin v. Löwis11437992002-04-12 09:54:03 +000027290
27291cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027292#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027293_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027294
27295fi
27296
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027297{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27298echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027299if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027300 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027301else
Martin v. Löwis11437992002-04-12 09:54:03 +000027302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027303/* confdefs.h. */
27304_ACEOF
27305cat confdefs.h >>conftest.$ac_ext
27306cat >>conftest.$ac_ext <<_ACEOF
27307/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027308#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027309int
27310main ()
27311{
Jack Jansen666b1e72001-10-31 12:11:48 +000027312
27313 WINDOW *w;
27314 w->_flags = 0;
27315
Martin v. Löwis11437992002-04-12 09:54:03 +000027316 ;
27317 return 0;
27318}
27319_ACEOF
27320rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027321if { (ac_try="$ac_compile"
27322case "(($ac_try" in
27323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27324 *) ac_try_echo=$ac_try;;
27325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027329 grep -v '^ *+' conftest.er1 >conftest.err
27330 rm -f conftest.er1
27331 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027333 (exit $ac_status); } && {
27334 test -z "$ac_c_werror_flag" ||
27335 test ! -s conftest.err
27336 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027337 ac_cv_window_has_flags=yes
27338else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027340sed 's/^/| /' conftest.$ac_ext >&5
27341
Martin v. Löwiseba40652007-08-30 20:10:57 +000027342 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027343fi
27344
Martin v. Löwiseba40652007-08-30 20:10:57 +000027345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27346fi
27347
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027348{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27349echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027350
Jack Jansen666b1e72001-10-31 12:11:48 +000027351
27352if test "$ac_cv_window_has_flags" = yes
27353then
Martin v. Löwis11437992002-04-12 09:54:03 +000027354
27355cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027356#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027357_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027358
27359fi
27360
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027361{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27362echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027363cat >conftest.$ac_ext <<_ACEOF
27364/* confdefs.h. */
27365_ACEOF
27366cat confdefs.h >>conftest.$ac_ext
27367cat >>conftest.$ac_ext <<_ACEOF
27368/* end confdefs.h. */
27369#include <curses.h>
27370int
27371main ()
27372{
27373void *x=is_term_resized
27374 ;
27375 return 0;
27376}
27377_ACEOF
27378rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027379if { (ac_try="$ac_compile"
27380case "(($ac_try" in
27381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27382 *) ac_try_echo=$ac_try;;
27383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027385 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027386 ac_status=$?
27387 grep -v '^ *+' conftest.er1 >conftest.err
27388 rm -f conftest.er1
27389 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027391 (exit $ac_status); } && {
27392 test -z "$ac_c_werror_flag" ||
27393 test ! -s conftest.err
27394 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027395
27396cat >>confdefs.h <<\_ACEOF
27397#define HAVE_CURSES_IS_TERM_RESIZED 1
27398_ACEOF
27399
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027400 { echo "$as_me:$LINENO: result: yes" >&5
27401echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027403 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027404sed 's/^/| /' conftest.$ac_ext >&5
27405
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027406 { echo "$as_me:$LINENO: result: no" >&5
27407echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027408
27409fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027410
Martin v. Löwiseba40652007-08-30 20:10:57 +000027411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027413{ echo "$as_me:$LINENO: checking for resize_term" >&5
27414echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027415cat >conftest.$ac_ext <<_ACEOF
27416/* confdefs.h. */
27417_ACEOF
27418cat confdefs.h >>conftest.$ac_ext
27419cat >>conftest.$ac_ext <<_ACEOF
27420/* end confdefs.h. */
27421#include <curses.h>
27422int
27423main ()
27424{
27425void *x=resize_term
27426 ;
27427 return 0;
27428}
27429_ACEOF
27430rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027431if { (ac_try="$ac_compile"
27432case "(($ac_try" in
27433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27434 *) ac_try_echo=$ac_try;;
27435esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027437 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027438 ac_status=$?
27439 grep -v '^ *+' conftest.er1 >conftest.err
27440 rm -f conftest.er1
27441 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027443 (exit $ac_status); } && {
27444 test -z "$ac_c_werror_flag" ||
27445 test ! -s conftest.err
27446 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027447
27448cat >>confdefs.h <<\_ACEOF
27449#define HAVE_CURSES_RESIZE_TERM 1
27450_ACEOF
27451
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027452 { echo "$as_me:$LINENO: result: yes" >&5
27453echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027454else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027455 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027456sed 's/^/| /' conftest.$ac_ext >&5
27457
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027458 { echo "$as_me:$LINENO: result: no" >&5
27459echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027460
27461fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027462
Martin v. Löwiseba40652007-08-30 20:10:57 +000027463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27464
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027465{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27466echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027467cat >conftest.$ac_ext <<_ACEOF
27468/* confdefs.h. */
27469_ACEOF
27470cat confdefs.h >>conftest.$ac_ext
27471cat >>conftest.$ac_ext <<_ACEOF
27472/* end confdefs.h. */
27473#include <curses.h>
27474int
27475main ()
27476{
27477void *x=resizeterm
27478 ;
27479 return 0;
27480}
27481_ACEOF
27482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027483if { (ac_try="$ac_compile"
27484case "(($ac_try" in
27485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27486 *) ac_try_echo=$ac_try;;
27487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027489 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027490 ac_status=$?
27491 grep -v '^ *+' conftest.er1 >conftest.err
27492 rm -f conftest.er1
27493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027495 (exit $ac_status); } && {
27496 test -z "$ac_c_werror_flag" ||
27497 test ! -s conftest.err
27498 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027499
27500cat >>confdefs.h <<\_ACEOF
27501#define HAVE_CURSES_RESIZETERM 1
27502_ACEOF
27503
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027504 { echo "$as_me:$LINENO: result: yes" >&5
27505echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027507 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027508sed 's/^/| /' conftest.$ac_ext >&5
27509
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027510 { echo "$as_me:$LINENO: result: no" >&5
27511echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027512
27513fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027514
Martin v. Löwiseba40652007-08-30 20:10:57 +000027515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27516
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027517{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27518echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027519
27520if test -r /dev/ptmx
27521then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027522 { echo "$as_me:$LINENO: result: yes" >&5
27523echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027524
27525cat >>confdefs.h <<\_ACEOF
27526#define HAVE_DEV_PTMX 1
27527_ACEOF
27528
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027530 { echo "$as_me:$LINENO: result: no" >&5
27531echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027532fi
27533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027534{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27535echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027536
27537if test -r /dev/ptc
27538then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027539 { echo "$as_me:$LINENO: result: yes" >&5
27540echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027541
27542cat >>confdefs.h <<\_ACEOF
27543#define HAVE_DEV_PTC 1
27544_ACEOF
27545
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027547 { echo "$as_me:$LINENO: result: no" >&5
27548echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027549fi
27550
Mark Dickinson82864d12009-11-15 16:18:58 +000027551if test "$have_long_long" = yes
27552then
27553 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27554echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27555 if test "${ac_cv_have_long_long_format+set}" = set; then
27556 echo $ECHO_N "(cached) $ECHO_C" >&6
27557else
27558 if test "$cross_compiling" = yes; then
27559 ac_cv_have_long_long_format=no
27560else
27561 cat >conftest.$ac_ext <<_ACEOF
27562/* confdefs.h. */
27563_ACEOF
27564cat confdefs.h >>conftest.$ac_ext
27565cat >>conftest.$ac_ext <<_ACEOF
27566/* end confdefs.h. */
27567
27568 #include <stdio.h>
27569 #include <stddef.h>
27570 #include <string.h>
27571
27572 #ifdef HAVE_SYS_TYPES_H
27573 #include <sys/types.h>
27574 #endif
27575
27576 int main()
27577 {
27578 char buffer[256];
27579
27580 if (sprintf(buffer, "%lld", (long long)123) < 0)
27581 return 1;
27582 if (strcmp(buffer, "123"))
27583 return 1;
27584
27585 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27586 return 1;
27587 if (strcmp(buffer, "-123"))
27588 return 1;
27589
27590 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27591 return 1;
27592 if (strcmp(buffer, "123"))
27593 return 1;
27594
27595 return 0;
27596 }
27597
27598_ACEOF
27599rm -f conftest$ac_exeext
27600if { (ac_try="$ac_link"
27601case "(($ac_try" in
27602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27603 *) ac_try_echo=$ac_try;;
27604esac
27605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27606 (eval "$ac_link") 2>&5
27607 ac_status=$?
27608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27609 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27610 { (case "(($ac_try" in
27611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27612 *) ac_try_echo=$ac_try;;
27613esac
27614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27615 (eval "$ac_try") 2>&5
27616 ac_status=$?
27617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27618 (exit $ac_status); }; }; then
27619 ac_cv_have_long_long_format=yes
27620else
27621 echo "$as_me: program exited with status $ac_status" >&5
27622echo "$as_me: failed program was:" >&5
27623sed 's/^/| /' conftest.$ac_ext >&5
27624
27625( exit $ac_status )
27626ac_cv_have_long_long_format=no
27627fi
27628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27629fi
27630
27631
27632
27633fi
27634
27635 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27636echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27637fi
27638
Mark Dickinson5ce84742009-12-31 20:48:04 +000027639if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027640then
27641
27642cat >>confdefs.h <<\_ACEOF
27643#define PY_FORMAT_LONG_LONG "ll"
27644_ACEOF
27645
27646fi
27647
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027648if test $ac_sys_system = Darwin
27649then
27650 LIBS="$LIBS -framework CoreFoundation"
27651fi
27652
Mark Dickinson82864d12009-11-15 16:18:58 +000027653
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027654{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27655echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027656if test "${ac_cv_have_size_t_format+set}" = set; then
27657 echo $ECHO_N "(cached) $ECHO_C" >&6
27658else
27659 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027660 ac_cv_have_size_t_format="cross -- assuming yes"
27661
Brett Cannon09d12362006-05-11 05:11:33 +000027662else
27663 cat >conftest.$ac_ext <<_ACEOF
27664/* confdefs.h. */
27665_ACEOF
27666cat confdefs.h >>conftest.$ac_ext
27667cat >>conftest.$ac_ext <<_ACEOF
27668/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027669
Brett Cannon09d12362006-05-11 05:11:33 +000027670#include <stdio.h>
27671#include <stddef.h>
27672#include <string.h>
27673
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027674#ifdef HAVE_SYS_TYPES_H
27675#include <sys/types.h>
27676#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027677
27678#ifdef HAVE_SSIZE_T
27679typedef ssize_t Py_ssize_t;
27680#elif SIZEOF_VOID_P == SIZEOF_LONG
27681typedef long Py_ssize_t;
27682#else
27683typedef int Py_ssize_t;
27684#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027685
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027686int main()
27687{
27688 char buffer[256];
27689
Brett Cannon09d12362006-05-11 05:11:33 +000027690 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27691 return 1;
27692
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027693 if (strcmp(buffer, "123"))
27694 return 1;
27695
27696 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27697 return 1;
27698
27699 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027700 return 1;
27701
27702 return 0;
27703}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027704
Brett Cannon09d12362006-05-11 05:11:33 +000027705_ACEOF
27706rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027707if { (ac_try="$ac_link"
27708case "(($ac_try" in
27709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27710 *) ac_try_echo=$ac_try;;
27711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027713 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027714 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027716 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027717 { (case "(($ac_try" in
27718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27719 *) ac_try_echo=$ac_try;;
27720esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027722 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027723 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027725 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027726 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027727else
27728 echo "$as_me: program exited with status $ac_status" >&5
27729echo "$as_me: failed program was:" >&5
27730sed 's/^/| /' conftest.$ac_ext >&5
27731
27732( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027733ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027734fi
27735rm -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 +000027736fi
27737
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027738
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027739fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027740{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27741echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027742if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027743
27744cat >>confdefs.h <<\_ACEOF
27745#define PY_FORMAT_SIZE_T "z"
27746_ACEOF
27747
27748fi
27749
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027750{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27751echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027752if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027753 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027754else
Martin v. Löwis11437992002-04-12 09:54:03 +000027755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027756/* confdefs.h. */
27757_ACEOF
27758cat confdefs.h >>conftest.$ac_ext
27759cat >>conftest.$ac_ext <<_ACEOF
27760/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027761
27762#ifdef HAVE_SYS_TYPES_H
27763#include <sys/types.h>
27764#endif
27765#ifdef HAVE_SYS_SOCKET_H
27766#include <sys/socket.h>
27767#endif
27768
27769
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027770typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027771int
27772main ()
27773{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027774if ((ac__type_new_ *) 0)
27775 return 0;
27776if (sizeof (ac__type_new_))
27777 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027778 ;
27779 return 0;
27780}
27781_ACEOF
27782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027783if { (ac_try="$ac_compile"
27784case "(($ac_try" in
27785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27786 *) ac_try_echo=$ac_try;;
27787esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027791 grep -v '^ *+' conftest.er1 >conftest.err
27792 rm -f conftest.er1
27793 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027795 (exit $ac_status); } && {
27796 test -z "$ac_c_werror_flag" ||
27797 test ! -s conftest.err
27798 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027799 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027800else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027802sed 's/^/| /' conftest.$ac_ext >&5
27803
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027804 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027806
27807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027808fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027809{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27810echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27811if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027812 :
27813else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027814
Martin v. Löwis01c04012002-11-11 14:58:44 +000027815cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027816#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027817_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027818
27819fi
27820
Michael W. Hudson54241132001-12-07 15:38:26 +000027821
Michael W. Hudson54241132001-12-07 15:38:26 +000027822
27823
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027824for h in `(cd $srcdir;echo Python/thread_*.h)`
27825do
27826 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27827done
27828
Michael W. Hudson54241132001-12-07 15:38:26 +000027829
Neal Norwitzd24499d2005-12-18 21:36:39 +000027830SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027831{ echo "$as_me:$LINENO: checking for build directories" >&5
27832echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027833for dir in $SRCDIRS; do
27834 if test ! -d $dir; then
27835 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027836 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027837done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027838{ echo "$as_me:$LINENO: result: done" >&5
27839echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027840
Guido van Rossum627b2d71993-12-24 10:39:16 +000027841# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027842ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027843
Martin v. Löwis11437992002-04-12 09:54:03 +000027844cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027845# This file is a shell script that caches the results of configure
27846# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027847# scripts and configure runs, see configure's option --config-cache.
27848# It is not useful on other systems. If it contains results you don't
27849# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027850#
Martin v. Löwis11437992002-04-12 09:54:03 +000027851# config.status only pays attention to the cache file if you give it
27852# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027853#
Skip Montanaro6dead952003-09-25 14:50:04 +000027854# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027855# loading this file, other *unset* `ac_cv_foo' will be assigned the
27856# following values.
27857
27858_ACEOF
27859
Guido van Rossumf78abae1997-01-21 22:02:36 +000027860# The following way of writing the cache mishandles newlines in values,
27861# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027862# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027863# Ultrix sh set writes to stderr and can't be redirected directly,
27864# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027865(
27866 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27867 eval ac_val=\$$ac_var
27868 case $ac_val in #(
27869 *${as_nl}*)
27870 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027871 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27872echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027873 esac
27874 case $ac_var in #(
27875 _ | IFS | as_nl) ;; #(
27876 *) $as_unset $ac_var ;;
27877 esac ;;
27878 esac
27879 done
27880
Martin v. Löwis11437992002-04-12 09:54:03 +000027881 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027882 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27883 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027884 # `set' does not quote correctly, so add quotes (double-quote
27885 # substitution turns \\\\ into \\, and sed turns \\ into \).
27886 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027887 "s/'/'\\\\''/g;
27888 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027889 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027890 *)
27891 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027892 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027893 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027894 esac |
27895 sort
27896) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027897 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027898 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027899 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027900 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027901 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27902 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027903 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27904 :end' >>confcache
27905if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27906 if test -w "$cache_file"; then
27907 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027908 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27909echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027910 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027911 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027912 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27913echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027914 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027915fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027916rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027917
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027918test "x$prefix" = xNONE && prefix=$ac_default_prefix
27919# Let make expand exec_prefix.
27920test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027921
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027922DEFS=-DHAVE_CONFIG_H
27923
Skip Montanaro6dead952003-09-25 14:50:04 +000027924ac_libobjs=
27925ac_ltlibobjs=
27926for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27927 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027928 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027929 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027930 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27931 # will be set to the directory where LIBOBJS objects are built.
27932 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27933 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027934done
27935LIBOBJS=$ac_libobjs
27936
27937LTLIBOBJS=$ac_ltlibobjs
27938
27939
Martin v. Löwis11437992002-04-12 09:54:03 +000027940
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027941: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027942ac_clean_files_save=$ac_clean_files
27943ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027944{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27945echo "$as_me: creating $CONFIG_STATUS" >&6;}
27946cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027947#! $SHELL
27948# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027949# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027950# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027951# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027952
Martin v. Löwis11437992002-04-12 09:54:03 +000027953debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027954ac_cs_recheck=false
27955ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027956SHELL=\${CONFIG_SHELL-$SHELL}
27957_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027958
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027959cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027960## --------------------- ##
27961## M4sh Initialization. ##
27962## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027963
Martin v. Löwiseba40652007-08-30 20:10:57 +000027964# Be more Bourne compatible
27965DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027966if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27967 emulate sh
27968 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027969 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027970 # is contrary to our usage. Disable this feature.
27971 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027972 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027973else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027974 case `(set -o) 2>/dev/null` in
27975 *posix*) set -o posix ;;
27976esac
27977
Martin v. Löwis11437992002-04-12 09:54:03 +000027978fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027979
Skip Montanaro6dead952003-09-25 14:50:04 +000027980
Martin v. Löwis11437992002-04-12 09:54:03 +000027981
27982
Martin v. Löwiseba40652007-08-30 20:10:57 +000027983# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027984# Avoid depending upon Character Ranges.
27985as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27986as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27987as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27988as_cr_digits='0123456789'
27989as_cr_alnum=$as_cr_Letters$as_cr_digits
27990
27991# The user is always right.
27992if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027993 echo "#! /bin/sh" >conf$$.sh
27994 echo "exit 0" >>conf$$.sh
27995 chmod +x conf$$.sh
27996 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27997 PATH_SEPARATOR=';'
27998 else
27999 PATH_SEPARATOR=:
28000 fi
28001 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000028002fi
28003
Martin v. Löwiseba40652007-08-30 20:10:57 +000028004# Support unset when possible.
28005if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
28006 as_unset=unset
28007else
28008 as_unset=false
28009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000028010
Martin v. Löwiseba40652007-08-30 20:10:57 +000028011
28012# IFS
28013# We need space, tab and new line, in precisely that order. Quoting is
28014# there to prevent editors from complaining about space-tab.
28015# (If _AS_PATH_WALK were called with IFS unset, it would disable word
28016# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028017as_nl='
28018'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028019IFS=" "" $as_nl"
28020
28021# Find who we are. Look in the path if we contain no directory separator.
28022case $0 in
28023 *[\\/]* ) as_myself=$0 ;;
28024 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000028025for as_dir in $PATH
28026do
28027 IFS=$as_save_IFS
28028 test -z "$as_dir" && as_dir=.
28029 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
28030done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028031IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000028032
Martin v. Löwiseba40652007-08-30 20:10:57 +000028033 ;;
28034esac
28035# We did not find ourselves, most probably we were run as `sh COMMAND'
28036# in which case we are not to be found in the path.
28037if test "x$as_myself" = x; then
28038 as_myself=$0
28039fi
28040if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028041 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000028042 { (exit 1); exit 1; }
28043fi
28044
28045# Work around bugs in pre-3.0 UWIN ksh.
28046for as_var in ENV MAIL MAILPATH
28047do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28048done
28049PS1='$ '
28050PS2='> '
28051PS4='+ '
28052
28053# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028054for as_var in \
28055 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
28056 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
28057 LC_TELEPHONE LC_TIME
28058do
28059 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
28060 eval $as_var=C; export $as_var
28061 else
28062 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28063 fi
28064done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028065
28066# Required to use basename.
28067if expr a : '\(a\)' >/dev/null 2>&1 &&
28068 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28069 as_expr=expr
28070else
28071 as_expr=false
28072fi
28073
28074if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28075 as_basename=basename
28076else
28077 as_basename=false
28078fi
28079
28080
28081# Name of the executable.
28082as_me=`$as_basename -- "$0" ||
28083$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28084 X"$0" : 'X\(//\)$' \| \
28085 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028086echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028087 sed '/^.*\/\([^/][^/]*\)\/*$/{
28088 s//\1/
28089 q
28090 }
28091 /^X\/\(\/\/\)$/{
28092 s//\1/
28093 q
28094 }
28095 /^X\/\(\/\).*/{
28096 s//\1/
28097 q
28098 }
28099 s/.*/./; q'`
28100
28101# CDPATH.
28102$as_unset CDPATH
28103
28104
28105
Martin v. Löwis11437992002-04-12 09:54:03 +000028106 as_lineno_1=$LINENO
28107 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028108 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028109 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028110
Martin v. Löwis11437992002-04-12 09:54:03 +000028111 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28112 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028113 # line-number line after each line using $LINENO; the second 'sed'
28114 # does the real work. The second script uses 'N' to pair each
28115 # line-number line with the line containing $LINENO, and appends
28116 # trailing '-' during substitution so that $LINENO is not a special
28117 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028118 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028119 # scripts with optimization help from Paolo Bonzini. Blame Lee
28120 # E. McMahon (1931-1989) for sed's syntax. :-)
28121 sed -n '
28122 p
28123 /[$]LINENO/=
28124 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028125 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028126 s/[$]LINENO.*/&-/
28127 t lineno
28128 b
28129 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028130 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028131 :loop
28132 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028133 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028134 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028135 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028136 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028137 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028138 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028139
Martin v. Löwis11437992002-04-12 09:54:03 +000028140 # Don't try to exec as it changes $[0], causing all sort of problems
28141 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028142 # original and so on. Autoconf is especially sensitive to this).
28143 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028144 # Exit status is that of the last command.
28145 exit
28146}
28147
28148
Martin v. Löwiseba40652007-08-30 20:10:57 +000028149if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28150 as_dirname=dirname
28151else
28152 as_dirname=false
28153fi
28154
28155ECHO_C= ECHO_N= ECHO_T=
28156case `echo -n x` in
28157-n*)
28158 case `echo 'x\c'` in
28159 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28160 *) ECHO_C='\c';;
28161 esac;;
28162*)
28163 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028165
Martin v. Löwiseba40652007-08-30 20:10:57 +000028166if expr a : '\(a\)' >/dev/null 2>&1 &&
28167 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028168 as_expr=expr
28169else
28170 as_expr=false
28171fi
28172
28173rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028174if test -d conf$$.dir; then
28175 rm -f conf$$.dir/conf$$.file
28176else
28177 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028178 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028179fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028180echo >conf$$.file
28181if ln -s conf$$.file conf$$ 2>/dev/null; then
28182 as_ln_s='ln -s'
28183 # ... but there are two gotchas:
28184 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28185 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28186 # In both cases, we have to default to `cp -p'.
28187 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028188 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028189elif ln conf$$.file conf$$ 2>/dev/null; then
28190 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028191else
28192 as_ln_s='cp -p'
28193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028194rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28195rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028196
Skip Montanaro6dead952003-09-25 14:50:04 +000028197if mkdir -p . 2>/dev/null; then
28198 as_mkdir_p=:
28199else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028200 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028201 as_mkdir_p=false
28202fi
28203
Martin v. Löwiseba40652007-08-30 20:10:57 +000028204if test -x / >/dev/null 2>&1; then
28205 as_test_x='test -x'
28206else
28207 if ls -dL / >/dev/null 2>&1; then
28208 as_ls_L_option=L
28209 else
28210 as_ls_L_option=
28211 fi
28212 as_test_x='
28213 eval sh -c '\''
28214 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028215 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028216 else
28217 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028218 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028219 esac;
28220 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28221 ???[sx]*):;;*)false;;esac;fi
28222 '\'' sh
28223 '
28224fi
28225as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028226
28227# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028228as_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 +000028229
28230# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028232
28233
Martin v. Löwis11437992002-04-12 09:54:03 +000028234exec 6>&1
28235
Martin v. Löwiseba40652007-08-30 20:10:57 +000028236# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028237# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028238# values after options handling.
28239ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028240This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028241generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028242
28243 CONFIG_FILES = $CONFIG_FILES
28244 CONFIG_HEADERS = $CONFIG_HEADERS
28245 CONFIG_LINKS = $CONFIG_LINKS
28246 CONFIG_COMMANDS = $CONFIG_COMMANDS
28247 $ $0 $@
28248
Martin v. Löwiseba40652007-08-30 20:10:57 +000028249on `(hostname || uname -n) 2>/dev/null | sed 1q`
28250"
28251
Martin v. Löwis11437992002-04-12 09:54:03 +000028252_ACEOF
28253
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028254cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028255# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028256config_files="$ac_config_files"
28257config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028258
Martin v. Löwiseba40652007-08-30 20:10:57 +000028259_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028260
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028261cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028262ac_cs_usage="\
28263\`$as_me' instantiates files from templates according to the
28264current configuration.
28265
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028266Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028267
28268 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028269 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028270 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028271 -d, --debug don't remove temporary files
28272 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028273 --file=FILE[:TEMPLATE]
28274 instantiate the configuration file FILE
28275 --header=FILE[:TEMPLATE]
28276 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028277
28278Configuration files:
28279$config_files
28280
28281Configuration headers:
28282$config_headers
28283
28284Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028285
Martin v. Löwiseba40652007-08-30 20:10:57 +000028286_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028287cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028288ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028289python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028290configured by $0, generated by GNU Autoconf 2.61,
28291 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028292
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028293Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028294This config.status script is free software; the Free Software Foundation
28295gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028296
28297ac_pwd='$ac_pwd'
28298srcdir='$srcdir'
28299INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028300_ACEOF
28301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028302cat >>$CONFIG_STATUS <<\_ACEOF
28303# If no file are specified by the user, then we need to provide default
28304# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028305ac_need_defaults=:
28306while test $# != 0
28307do
28308 case $1 in
28309 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028310 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28311 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028312 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028313 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028314 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028315 ac_option=$1
28316 ac_optarg=$2
28317 ac_shift=shift
28318 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028319 esac
28320
Skip Montanaro6dead952003-09-25 14:50:04 +000028321 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028322 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028323 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28324 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028325 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028326 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028327 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028328 debug=: ;;
28329 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028330 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028331 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028332 ac_need_defaults=false;;
28333 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028334 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028335 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028336 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028337 --he | --h)
28338 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028339 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028340Try \`$0 --help' for more information." >&2
28341 { (exit 1); exit 1; }; };;
28342 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028343 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028344 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28345 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28346 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028347
28348 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028349 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028350Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028351 { (exit 1); exit 1; }; } ;;
28352
Martin v. Löwiseba40652007-08-30 20:10:57 +000028353 *) ac_config_targets="$ac_config_targets $1"
28354 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028355
28356 esac
28357 shift
28358done
28359
Skip Montanaro6dead952003-09-25 14:50:04 +000028360ac_configure_extra_args=
28361
28362if $ac_cs_silent; then
28363 exec 6>/dev/null
28364 ac_configure_extra_args="$ac_configure_extra_args --silent"
28365fi
28366
28367_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028368cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028369if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028370 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28371 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028372 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028373 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028374fi
28375
Martin v. Löwis11437992002-04-12 09:54:03 +000028376_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028377cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028378exec 5>>config.log
28379{
28380 echo
28381 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28382## Running $as_me. ##
28383_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028384 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028385} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028386
Martin v. Löwiseba40652007-08-30 20:10:57 +000028387_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028388cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028389_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028390
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028391cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028392
28393# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028394for ac_config_target in $ac_config_targets
28395do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028396 case $ac_config_target in
28397 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28398 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28399 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28400 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028401 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28402 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028403 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28404 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028405 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028406
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028407 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28408echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028409 { (exit 1); exit 1; }; };;
28410 esac
28411done
28412
Martin v. Löwiseba40652007-08-30 20:10:57 +000028413
Martin v. Löwis11437992002-04-12 09:54:03 +000028414# If the user did not use the arguments to specify the items to instantiate,
28415# then the envvar interface is used. Set only those that are not.
28416# We use the long form for the default assignment because of an extremely
28417# bizarre bug on SunOS 4.1.3.
28418if $ac_need_defaults; then
28419 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28420 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28421fi
28422
Skip Montanaro6dead952003-09-25 14:50:04 +000028423# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028424# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028425# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028426# Hook for its removal unless debugging.
28427# Note that there is a small window in which the directory will not be cleaned:
28428# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028429$debug ||
28430{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028431 tmp=
28432 trap 'exit_status=$?
28433 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28434' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028435 trap '{ (exit 1); exit 1; }' 1 2 13 15
28436}
Martin v. Löwis11437992002-04-12 09:54:03 +000028437# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028438
Martin v. Löwis11437992002-04-12 09:54:03 +000028439{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028440 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028441 test -n "$tmp" && test -d "$tmp"
28442} ||
28443{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028444 tmp=./conf$$-$RANDOM
28445 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028446} ||
28447{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028448 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028449 { (exit 1); exit 1; }
28450}
28451
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028452#
28453# Set up the sed scripts for CONFIG_FILES section.
28454#
28455
28456# No need to generate the scripts if there are no CONFIG_FILES.
28457# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028458if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028459
28460_ACEOF
28461
Martin v. Löwiseba40652007-08-30 20:10:57 +000028462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028463
Martin v. Löwiseba40652007-08-30 20:10:57 +000028464ac_delim='%!_!# '
28465for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028466 cat >conf$$subs.sed <<_ACEOF
28467SHELL!$SHELL$ac_delim
28468PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28469PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28470PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28471PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28472PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28473PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28474exec_prefix!$exec_prefix$ac_delim
28475prefix!$prefix$ac_delim
28476program_transform_name!$program_transform_name$ac_delim
28477bindir!$bindir$ac_delim
28478sbindir!$sbindir$ac_delim
28479libexecdir!$libexecdir$ac_delim
28480datarootdir!$datarootdir$ac_delim
28481datadir!$datadir$ac_delim
28482sysconfdir!$sysconfdir$ac_delim
28483sharedstatedir!$sharedstatedir$ac_delim
28484localstatedir!$localstatedir$ac_delim
28485includedir!$includedir$ac_delim
28486oldincludedir!$oldincludedir$ac_delim
28487docdir!$docdir$ac_delim
28488infodir!$infodir$ac_delim
28489htmldir!$htmldir$ac_delim
28490dvidir!$dvidir$ac_delim
28491pdfdir!$pdfdir$ac_delim
28492psdir!$psdir$ac_delim
28493libdir!$libdir$ac_delim
28494localedir!$localedir$ac_delim
28495mandir!$mandir$ac_delim
28496DEFS!$DEFS$ac_delim
28497ECHO_C!$ECHO_C$ac_delim
28498ECHO_N!$ECHO_N$ac_delim
28499ECHO_T!$ECHO_T$ac_delim
28500LIBS!$LIBS$ac_delim
28501build_alias!$build_alias$ac_delim
28502host_alias!$host_alias$ac_delim
28503target_alias!$target_alias$ac_delim
28504VERSION!$VERSION$ac_delim
28505SOVERSION!$SOVERSION$ac_delim
28506CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28507UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28508ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028509LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028510PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28511PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28512PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28513PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28514PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28515FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28516FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28517FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28518FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28519FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
Ronald Oussoren01d149f2010-04-30 11:20:14 +000028520FRAMEWORKINSTALLAPPSPREFIX!$FRAMEWORKINSTALLAPPSPREFIX$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028521MACHDEP!$MACHDEP$ac_delim
28522SGI_ABI!$SGI_ABI$ac_delim
28523EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28524EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28525CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28526EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28527CC!$CC$ac_delim
28528CFLAGS!$CFLAGS$ac_delim
28529LDFLAGS!$LDFLAGS$ac_delim
28530CPPFLAGS!$CPPFLAGS$ac_delim
28531ac_ct_CC!$ac_ct_CC$ac_delim
28532EXEEXT!$EXEEXT$ac_delim
28533OBJEXT!$OBJEXT$ac_delim
28534CXX!$CXX$ac_delim
28535MAINCC!$MAINCC$ac_delim
28536CPP!$CPP$ac_delim
28537GREP!$GREP$ac_delim
28538EGREP!$EGREP$ac_delim
28539BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28540LIBRARY!$LIBRARY$ac_delim
28541LDLIBRARY!$LDLIBRARY$ac_delim
28542DLLLIBRARY!$DLLLIBRARY$ac_delim
28543BLDLIBRARY!$BLDLIBRARY$ac_delim
28544LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28545INSTSONAME!$INSTSONAME$ac_delim
28546RUNSHARED!$RUNSHARED$ac_delim
28547LINKCC!$LINKCC$ac_delim
28548GNULD!$GNULD$ac_delim
28549RANLIB!$RANLIB$ac_delim
28550AR!$AR$ac_delim
28551ARFLAGS!$ARFLAGS$ac_delim
28552SVNVERSION!$SVNVERSION$ac_delim
28553INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28554INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28555INSTALL_DATA!$INSTALL_DATA$ac_delim
28556LN!$LN$ac_delim
28557OPT!$OPT$ac_delim
28558BASECFLAGS!$BASECFLAGS$ac_delim
28559UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28560OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28561LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28562SO!$SO$ac_delim
28563LDSHARED!$LDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028564_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028565
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028566 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 +000028567 break
28568 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028569 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28570echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028571 { (exit 1); exit 1; }; }
28572 else
28573 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028574 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028575done
28576
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028577ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28578if test -n "$ac_eof"; then
28579 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28580 ac_eof=`expr $ac_eof + 1`
28581fi
28582
28583cat >>$CONFIG_STATUS <<_ACEOF
28584cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28585/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028586_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028587sed '
28588s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28589s/^/s,@/; s/!/@,|#_!!_#|/
28590:n
28591t n
28592s/'"$ac_delim"'$/,g/; t
28593s/$/\\/; p
28594N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28595' >>$CONFIG_STATUS <conf$$subs.sed
28596rm -f conf$$subs.sed
28597cat >>$CONFIG_STATUS <<_ACEOF
28598CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028599_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028600
28601
28602ac_delim='%!_!# '
28603for ac_last_try in false false false false false :; do
28604 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren01d149f2010-04-30 11:20:14 +000028605LDCXXSHARED!$LDCXXSHARED$ac_delim
Ronald Oussoren75912852010-04-08 08:13:31 +000028606BLDSHARED!$BLDSHARED$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028607CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028608LINKFORSHARED!$LINKFORSHARED$ac_delim
28609CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28610SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028611PKG_CONFIG!$PKG_CONFIG$ac_delim
28612LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028613USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28614SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28615USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28616LDLAST!$LDLAST$ac_delim
28617THREADOBJ!$THREADOBJ$ac_delim
28618DLINCLDIR!$DLINCLDIR$ac_delim
28619DYNLOADFILE!$DYNLOADFILE$ac_delim
28620MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28621TRUE!$TRUE$ac_delim
28622LIBOBJS!$LIBOBJS$ac_delim
28623HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28624HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28625HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28626HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28627HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28628LIBM!$LIBM$ac_delim
28629LIBC!$LIBC$ac_delim
28630UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28631THREADHEADERS!$THREADHEADERS$ac_delim
28632SRCDIRS!$SRCDIRS$ac_delim
28633LTLIBOBJS!$LTLIBOBJS$ac_delim
28634_ACEOF
28635
Ronald Oussoren01d149f2010-04-30 11:20:14 +000028636 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028637 break
28638 elif $ac_last_try; then
28639 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28640echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028641 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028642 else
28643 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28644 fi
28645done
28646
28647ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28648if test -n "$ac_eof"; then
28649 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28650 ac_eof=`expr $ac_eof + 1`
28651fi
28652
28653cat >>$CONFIG_STATUS <<_ACEOF
28654cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28655/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028656_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028657sed '
28658s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28659s/^/s,@/; s/!/@,|#_!!_#|/
28660:n
28661t n
28662s/'"$ac_delim"'$/,g/; t
28663s/$/\\/; p
28664N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28665' >>$CONFIG_STATUS <conf$$subs.sed
28666rm -f conf$$subs.sed
28667cat >>$CONFIG_STATUS <<_ACEOF
28668:end
28669s/|#_!!_#|//g
28670CEOF$ac_eof
28671_ACEOF
28672
Martin v. Löwiseba40652007-08-30 20:10:57 +000028673
28674# VPATH may cause trouble with some makes, so we remove $(srcdir),
28675# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28676# trailing colons and then remove the whole line if VPATH becomes empty
28677# (actually we leave an empty line to preserve line numbers).
28678if test "x$srcdir" = x.; then
28679 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28680s/:*\$(srcdir):*/:/
28681s/:*\${srcdir}:*/:/
28682s/:*@srcdir@:*/:/
28683s/^\([^=]*=[ ]*\):*/\1/
28684s/:*$//
28685s/^[^=]*=[ ]*$//
28686}'
28687fi
28688
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028689cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028690fi # test -n "$CONFIG_FILES"
28691
Martin v. Löwiseba40652007-08-30 20:10:57 +000028692
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028693for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028694do
28695 case $ac_tag in
28696 :[FHLC]) ac_mode=$ac_tag; continue;;
28697 esac
28698 case $ac_mode$ac_tag in
28699 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028700 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28701echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028702 { (exit 1); exit 1; }; };;
28703 :[FH]-) ac_tag=-:-;;
28704 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28705 esac
28706 ac_save_IFS=$IFS
28707 IFS=:
28708 set x $ac_tag
28709 IFS=$ac_save_IFS
28710 shift
28711 ac_file=$1
28712 shift
28713
28714 case $ac_mode in
28715 :L) ac_source=$1;;
28716 :[FH])
28717 ac_file_inputs=
28718 for ac_f
28719 do
28720 case $ac_f in
28721 -) ac_f="$tmp/stdin";;
28722 *) # Look for the file first in the build tree, then in the source tree
28723 # (if the path is not absolute). The absolute path cannot be DOS-style,
28724 # because $ac_f cannot contain `:'.
28725 test -f "$ac_f" ||
28726 case $ac_f in
28727 [\\/$]*) false;;
28728 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28729 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028730 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28731echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028732 { (exit 1); exit 1; }; };;
28733 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028734 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028735 done
28736
28737 # Let's still pretend it is `configure' which instantiates (i.e., don't
28738 # use $as_me), people would be surprised to read:
28739 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028740 configure_input="Generated from "`IFS=:
28741 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028742 if test x"$ac_file" != x-; then
28743 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028744 { echo "$as_me:$LINENO: creating $ac_file" >&5
28745echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028746 fi
28747
28748 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028749 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028750 esac
28751 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028752 esac
28753
Martin v. Löwiseba40652007-08-30 20:10:57 +000028754 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028755$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028756 X"$ac_file" : 'X\(//\)[^/]' \| \
28757 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028758 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028759echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028760 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28761 s//\1/
28762 q
28763 }
28764 /^X\(\/\/\)[^/].*/{
28765 s//\1/
28766 q
28767 }
28768 /^X\(\/\/\)$/{
28769 s//\1/
28770 q
28771 }
28772 /^X\(\/\).*/{
28773 s//\1/
28774 q
28775 }
28776 s/.*/./; q'`
28777 { as_dir="$ac_dir"
28778 case $as_dir in #(
28779 -*) as_dir=./$as_dir;;
28780 esac
28781 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028782 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028783 while :; do
28784 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028785 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028786 *) as_qdir=$as_dir;;
28787 esac
28788 as_dirs="'$as_qdir' $as_dirs"
28789 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028790$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028791 X"$as_dir" : 'X\(//\)[^/]' \| \
28792 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028793 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028794echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028795 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28796 s//\1/
28797 q
28798 }
28799 /^X\(\/\/\)[^/].*/{
28800 s//\1/
28801 q
28802 }
28803 /^X\(\/\/\)$/{
28804 s//\1/
28805 q
28806 }
28807 /^X\(\/\).*/{
28808 s//\1/
28809 q
28810 }
28811 s/.*/./; q'`
28812 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028813 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028814 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028815 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28816echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028817 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028818 ac_builddir=.
28819
Martin v. Löwiseba40652007-08-30 20:10:57 +000028820case "$ac_dir" in
28821.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28822*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028823 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028824 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028825 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028826 case $ac_top_builddir_sub in
28827 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28828 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28829 esac ;;
28830esac
28831ac_abs_top_builddir=$ac_pwd
28832ac_abs_builddir=$ac_pwd$ac_dir_suffix
28833# for backward compatibility:
28834ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028835
28836case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028837 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028838 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028839 ac_top_srcdir=$ac_top_builddir_sub
28840 ac_abs_top_srcdir=$ac_pwd ;;
28841 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028842 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028843 ac_top_srcdir=$srcdir
28844 ac_abs_top_srcdir=$srcdir ;;
28845 *) # Relative name.
28846 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28847 ac_top_srcdir=$ac_top_build_prefix$srcdir
28848 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028849esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028850ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028851
Martin v. Löwis11437992002-04-12 09:54:03 +000028852
Martin v. Löwiseba40652007-08-30 20:10:57 +000028853 case $ac_mode in
28854 :F)
28855 #
28856 # CONFIG_FILE
28857 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028858
28859 case $INSTALL in
28860 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028861 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028862 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028863_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028864
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028865cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028866# If the template does not know about datarootdir, expand it.
28867# FIXME: This hack should be removed a few years after 2.60.
28868ac_datarootdir_hack=; ac_datarootdir_seen=
28869
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028870case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028871 p
28872 q
28873}
28874/@datadir@/p
28875/@docdir@/p
28876/@infodir@/p
28877/@localedir@/p
28878/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028879' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028880*datarootdir*) ac_datarootdir_seen=yes;;
28881*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028882 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28883echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028884_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028885cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028886 ac_datarootdir_hack='
28887 s&@datadir@&$datadir&g
28888 s&@docdir@&$docdir&g
28889 s&@infodir@&$infodir&g
28890 s&@localedir@&$localedir&g
28891 s&@mandir@&$mandir&g
28892 s&\\\${datarootdir}&$datarootdir&g' ;;
28893esac
28894_ACEOF
28895
28896# Neutralize VPATH when `$srcdir' = `.'.
28897# Shell code in configure.ac might set extrasub.
28898# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028899cat >>$CONFIG_STATUS <<_ACEOF
28900 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028901$extrasub
28902_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028903cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028904:t
28905/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028906s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028907s&@top_builddir@&$ac_top_builddir_sub&;t t
28908s&@srcdir@&$ac_srcdir&;t t
28909s&@abs_srcdir@&$ac_abs_srcdir&;t t
28910s&@top_srcdir@&$ac_top_srcdir&;t t
28911s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28912s&@builddir@&$ac_builddir&;t t
28913s&@abs_builddir@&$ac_abs_builddir&;t t
28914s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28915s&@INSTALL@&$ac_INSTALL&;t t
28916$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028917" $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 +000028918
Martin v. Löwiseba40652007-08-30 20:10:57 +000028919test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28920 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28921 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028922 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028923which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028924echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028925which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028926
Martin v. Löwiseba40652007-08-30 20:10:57 +000028927 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028928 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028929 -) cat "$tmp/out"; rm -f "$tmp/out";;
28930 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28931 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028932 ;;
28933 :H)
28934 #
28935 # CONFIG_HEADER
28936 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028937_ACEOF
28938
28939# Transform confdefs.h into a sed script `conftest.defines', that
28940# substitutes the proper values into config.h.in to produce config.h.
28941rm -f conftest.defines conftest.tail
28942# First, append a space to every undef/define line, to ease matching.
28943echo 's/$/ /' >conftest.defines
28944# Then, protect against being on the right side of a sed subst, or in
28945# an unquoted here document, in config.status. If some macros were
28946# called several times there might be several #defines for the same
28947# symbol, which is useless. But do not sort them, since the last
28948# AC_DEFINE must be honored.
28949ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28950# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28951# NAME is the cpp macro being defined, VALUE is the value it is being given.
28952# PARAMS is the parameter list in the macro definition--in most cases, it's
28953# just an empty string.
28954ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28955ac_dB='\\)[ (].*,\\1define\\2'
28956ac_dC=' '
28957ac_dD=' ,'
28958
28959uniq confdefs.h |
28960 sed -n '
28961 t rset
28962 :rset
28963 s/^[ ]*#[ ]*define[ ][ ]*//
28964 t ok
28965 d
28966 :ok
28967 s/[\\&,]/\\&/g
28968 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28969 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28970 ' >>conftest.defines
28971
28972# Remove the space that was appended to ease matching.
28973# Then replace #undef with comments. This is necessary, for
28974# example, in the case of _POSIX_SOURCE, which is predefined and required
28975# on some systems where configure will not decide to define it.
28976# (The regexp can be short, since the line contains either #define or #undef.)
28977echo 's/ $//
28978s,^[ #]*u.*,/* & */,' >>conftest.defines
28979
28980# Break up conftest.defines:
28981ac_max_sed_lines=50
28982
28983# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28984# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28985# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28986# et cetera.
28987ac_in='$ac_file_inputs'
28988ac_out='"$tmp/out1"'
28989ac_nxt='"$tmp/out2"'
28990
28991while :
28992do
28993 # Write a here document:
28994 cat >>$CONFIG_STATUS <<_ACEOF
28995 # First, check the format of the line:
28996 cat >"\$tmp/defines.sed" <<\\CEOF
28997/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28998/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28999b
29000:def
29001_ACEOF
29002 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
29003 echo 'CEOF
29004 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
29005 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
29006 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
29007 grep . conftest.tail >/dev/null || break
29008 rm -f conftest.defines
29009 mv conftest.tail conftest.defines
29010done
29011rm -f conftest.defines conftest.tail
29012
29013echo "ac_result=$ac_in" >>$CONFIG_STATUS
29014cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000029015 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029016 echo "/* $configure_input */" >"$tmp/config.h"
29017 cat "$ac_result" >>"$tmp/config.h"
29018 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
29019 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
29020echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000029021 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029022 rm -f $ac_file
29023 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000029024 fi
29025 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029026 echo "/* $configure_input */"
29027 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000029028 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029029 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000029030 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000029031
Martin v. Löwiseba40652007-08-30 20:10:57 +000029032
29033 esac
29034
29035done # for ac_tag
29036
Guido van Rossum627b2d71993-12-24 10:39:16 +000029037
Martin v. Löwis11437992002-04-12 09:54:03 +000029038{ (exit 0); exit 0; }
29039_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000029040chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000029041ac_clean_files=$ac_clean_files_save
29042
29043
29044# configure is writing to config.log, and then calls config.status.
29045# config.status does its own redirection, appending to config.log.
29046# Unfortunately, on DOS this fails, as config.log is still kept open
29047# by configure, so config.status won't be able to write to it; its
29048# output is simply discarded. So we exec the FD to /dev/null,
29049# effectively closing config.log, so it can be properly (re)opened and
29050# appended to by config.status. When coming back to configure, we
29051# need to make the FD available again.
29052if test "$no_create" != yes; then
29053 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000029054 ac_config_status_args=
29055 test "$silent" = yes &&
29056 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000029057 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000029058 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000029059 exec 5>>config.log
29060 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29061 # would make configure fail if this is the last instruction.
29062 $ac_cs_success || { (exit 1); exit 1; }
29063fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000029064
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029065
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029066echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029067if test ! -f Modules/Setup
29068then
29069 cp $srcdir/Modules/Setup.dist Modules/Setup
29070fi
29071
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029072echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029073if test ! -f Modules/Setup.local
29074then
29075 echo "# Edit this file for local setup changes" >Modules/Setup.local
29076fi
29077
29078echo "creating Makefile"
29079$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
29080 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000029081 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000029082
29083case $ac_sys_system in
29084BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029085 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029086
29087 Support for BeOS is deprecated as of Python 2.6.
29088 See PEP 11 for the gory details.
29089 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029090echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029091
29092 Support for BeOS is deprecated as of Python 2.6.
29093 See PEP 11 for the gory details.
29094 " >&2;}
29095 ;;
29096*) ;;
29097esac
29098
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029099mv config.c Modules